1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 08:51:53 +02:00

Minor cleanup: group handle init code together.

This commit is contained in:
Maarten ter Huurne 2011-09-23 01:01:57 +02:00
parent 0acbd35fb4
commit 799bb13f0f

View File

@ -231,6 +231,11 @@ void GMenu2X::initCPULimits() {
} }
void GMenu2X::init() { void GMenu2X::init() {
batteryHandle = 0;
backlightHandle = 0;
usbHandle = 0;
acHandle = 0;
#ifdef PLATFORM_GP2X #ifdef PLATFORM_GP2X
/* gp2x_mem = open("/dev/mem", O_RDWR); /* gp2x_mem = open("/dev/mem", O_RDWR);
gp2x_memregs=(unsigned short *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, gp2x_mem, 0xc0000000); gp2x_memregs=(unsigned short *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, gp2x_mem, 0xc0000000);
@ -354,11 +359,6 @@ GMenu2X::GMenu2X()
path = ""; path = "";
getExePath(); getExePath();
batteryHandle = 0;
backlightHandle = 0;
usbHandle = 0;
acHandle = 0;
init(); init();
#ifdef PLATFORM_GP2X #ifdef PLATFORM_GP2X