aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/gp2x
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/gp2x')
-rw-r--r--backends/platform/gp2x/events.cpp4
-rw-r--r--backends/platform/gp2x/gp2x-common.h2
-rw-r--r--backends/platform/gp2x/graphics.cpp48
3 files changed, 27 insertions, 27 deletions
diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp
index d9ff45130a..b68c2619cc 100644
--- a/backends/platform/gp2x/events.cpp
+++ b/backends/platform/gp2x/events.cpp
@@ -214,7 +214,7 @@ void OSystem_GP2X::moveStick() {
} else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])){
if (_km.y_down_count!=2){
_km.y_vel = 1;
- _km.y_down_count = 1;
+ _km.y_down_count = 1;
}else
_km.y_vel = 4;
}
@@ -297,7 +297,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
Combos:
GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP)
- GP2X_BUTTON_L & GP2X_BUTTON_SELECT Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
+ GP2X_BUTTON_L & GP2X_BUTTON_SELECT Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
GP2X_BUTTON_L & GP2X_BUTTON_Y Toggles setZoomOnMouse() for larger then 320*240 games to scale to the point + raduis.
GP2X_BUTTON_L & GP2X_BUTTON_A Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games)
*/
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 1aa5107fcc..3d4a4c90a0 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -309,7 +309,7 @@ protected:
int16 x, y;
// The size and hotspot of the original cursor image.
- int16 w, h;
+ int16 w, h;
int16 hotX, hotY;
// The size and hotspot of the pre-scaled cursor image, in real
diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp
index 1aa7519f86..2f16cf7068 100644
--- a/backends/platform/gp2x/graphics.cpp
+++ b/backends/platform/gp2x/graphics.cpp
@@ -1222,29 +1222,29 @@ void OSystem_GP2X::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x
_mouseKeyColor = keycolor;
- _cursorTargetScale = cursorTargetScale;
+ _cursorTargetScale = cursorTargetScale;
- if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) {
- _mouseCurState.w = w;
- _mouseCurState.h = h;
+ if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) {
+ _mouseCurState.w = w;
+ _mouseCurState.h = h;
- if (_mouseOrigSurface)
- SDL_FreeSurface(_mouseOrigSurface);
+ if (_mouseOrigSurface)
+ SDL_FreeSurface(_mouseOrigSurface);
// Allocate bigger surface because AdvMame2x adds black pixel at [0,0]
- _mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
- _mouseCurState.w + 2,
- _mouseCurState.h + 2,
- 16,
- _hwscreen->format->Rmask,
- _hwscreen->format->Gmask,
- _hwscreen->format->Bmask,
- _hwscreen->format->Amask);
-
- if (_mouseOrigSurface == NULL)
- error("allocating _mouseOrigSurface failed");
- SDL_SetColorKey(_mouseOrigSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
- }
+ _mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
+ _mouseCurState.w + 2,
+ _mouseCurState.h + 2,
+ 16,
+ _hwscreen->format->Rmask,
+ _hwscreen->format->Gmask,
+ _hwscreen->format->Bmask,
+ _hwscreen->format->Amask);
+
+ if (_mouseOrigSurface == NULL)
+ error("allocating _mouseOrigSurface failed");
+ SDL_SetColorKey(_mouseOrigSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
+ }
free(_mouseData);
@@ -1260,7 +1260,7 @@ void OSystem_GP2X::blitCursor() {
int w, h, i, j;
if (!_mouseOrigSurface || !_mouseData)
- return;
+ return;
w = _mouseCurState.w;
h = _mouseCurState.h;
@@ -1297,7 +1297,7 @@ void OSystem_GP2X::blitCursor() {
srcPtr++;
}
dstPtr += _mouseOrigSurface->pitch - w * 2;
- }
+ }
int rW, rH;
@@ -1338,7 +1338,7 @@ void OSystem_GP2X::blitCursor() {
_mouseCurState.vH = h;
_mouseCurState.vHotX = _mouseCurState.hotX;
_mouseCurState.vHotY = _mouseCurState.hotY;
- }
+ }
int rH1 = rH; // store original to pass to aspect-correction function later
if (_adjustAspectRatio && _cursorTargetScale == 1) {
@@ -1366,7 +1366,7 @@ void OSystem_GP2X::blitCursor() {
error("allocating _mouseSurface failed");
SDL_SetColorKey(_mouseSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
- }
+ }
SDL_LockSurface(_mouseSurface);
@@ -1429,7 +1429,7 @@ void OSystem_GP2X::undrawMouse() {
void OSystem_GP2X::drawMouse() {
if (!_mouseVisible || !_mouseSurface) {
_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
- return;
+ return;
}
SDL_Rect zoomdst;