diff options
author | Max Horn | 2007-09-18 20:16:33 +0000 |
---|---|---|
committer | Max Horn | 2007-09-18 20:16:33 +0000 |
commit | 3abc11611e1d1d93f1cf794df28879de3571bd01 (patch) | |
tree | e1ac8a925d1388f8df010a114d7bed471fc9fe3b /backends/platform/gp2x | |
parent | c3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac (diff) | |
download | scummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.tar.gz scummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.tar.bz2 scummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.zip |
Code formatting fixes
svn-id: r28945
Diffstat (limited to 'backends/platform/gp2x')
-rw-r--r-- | backends/platform/gp2x/events.cpp | 20 | ||||
-rw-r--r-- | backends/platform/gp2x/gp2x-hw.cpp | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp index ef39ab333e..d9ff45130a 100644 --- a/backends/platform/gp2x/events.cpp +++ b/backends/platform/gp2x/events.cpp @@ -183,17 +183,17 @@ void OSystem_GP2X::moveStick() { memcpy(stickBtn, _stickBtn, sizeof(stickBtn)); - if((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6])) + if ((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6])) stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0; - if((stickBtn[1])||(stickBtn[2])||(stickBtn[3])){ - if(_km.x_down_count!=2){ + if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])){ + if (_km.x_down_count!=2){ _km.x_vel = -1; _km.x_down_count = 1; }else _km.x_vel = -4; - } else if((stickBtn[5])||(stickBtn[6])||(stickBtn[7])){ - if(_km.x_down_count!=2){ + } else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])){ + if (_km.x_down_count!=2){ _km.x_vel = 1; _km.x_down_count = 1; }else @@ -205,14 +205,14 @@ void OSystem_GP2X::moveStick() { } - if((stickBtn[0])||(stickBtn[1])||(stickBtn[7])){ - if(_km.y_down_count!=2){ + if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])){ + if (_km.y_down_count!=2){ _km.y_vel = -1; _km.y_down_count = 1; }else _km.y_vel = -4; - } else if((stickBtn[3])||(stickBtn[4])||(stickBtn[5])){ - if(_km.y_down_count!=2){ + } else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])){ + if (_km.y_down_count!=2){ _km.y_vel = 1; _km.y_down_count = 1; }else @@ -302,7 +302,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { GP2X_BUTTON_L & GP2X_BUTTON_A Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games) */ - while(SDL_PollEvent(&ev)) { + while (SDL_PollEvent(&ev)) { switch(ev.type) { case SDL_KEYDOWN:{ diff --git a/backends/platform/gp2x/gp2x-hw.cpp b/backends/platform/gp2x/gp2x-hw.cpp index d322aa5d08..6e0e5215ef 100644 --- a/backends/platform/gp2x/gp2x-hw.cpp +++ b/backends/platform/gp2x/gp2x-hw.cpp @@ -63,18 +63,18 @@ static volatile unsigned short *MEM_REG; void GP2X_device_init() { // Open devices - if(!gp2x_dev[0]) gp2x_dev[0] = open("/dev/mixer", O_RDWR); - if(!gp2x_dev[1]) gp2x_dev[1] = open("/dev/batt", O_RDONLY); - if(!gp2x_dev[2]) gp2x_dev[2] = open("/dev/mem", O_RDWR); + if (!gp2x_dev[0]) gp2x_dev[0] = open("/dev/mixer", O_RDWR); + if (!gp2x_dev[1]) gp2x_dev[1] = open("/dev/batt", O_RDONLY); + if (!gp2x_dev[2]) gp2x_dev[2] = open("/dev/mem", O_RDWR); } void GP2X_device_deinit() { // Close devices { int i; - for(i=0;i<8;i++) + for (i=0;i<8;i++) { - if(gp2x_dev[i]) + if (gp2x_dev[i]) { close(gp2x_dev[i]); } @@ -211,7 +211,7 @@ void Disable_940(void) void gp2x_video_wait_vsync(void) { MEM_REG[0x2846>>1]=(MEM_REG[0x2846>>1] | 0x20) & ~2; - while(!(MEM_REG[0x2846>>1] & 2)); + while (!(MEM_REG[0x2846>>1] & 2)); } //char GP2X_get_battery_level() { |