aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-03 02:02:57 +0200
committerJohannes Schickel2012-06-03 02:02:57 +0200
commita401f0a19e09d7d00a3ee94d928db82e658b7b48 (patch)
tree9e3bee460f2db533e42de506faa6cf9d6aea4f42 /backends/platform/android
parentdb77b9e4a7f8491d45b47b539af2077fb15e9376 (diff)
downloadscummvm-rg350-a401f0a19e09d7d00a3ee94d928db82e658b7b48.tar.gz
scummvm-rg350-a401f0a19e09d7d00a3ee94d928db82e658b7b48.tar.bz2
scummvm-rg350-a401f0a19e09d7d00a3ee94d928db82e658b7b48.zip
ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
All uses of the old target scale API actually wanted to disallow scaling of the mouse cursor. This commit adapts our API to this and thus simplifies backend implementations. Some backends, most notable the Wii and Android, did some implementation of the cursor target scale, which I didn't adapt yet. I added a TODO for the porters there.
Diffstat (limited to 'backends/platform/android')
-rw-r--r--backends/platform/android/android.h2
-rw-r--r--backends/platform/android/gfx.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 47a6515a2a..4dad1ee7ed 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -269,7 +269,7 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
int hotspotY, uint32 keycolor,
- int cursorTargetScale,
+ bool dontScale,
const Graphics::PixelFormat *format);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 8bc914f567..304031b4ba 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -687,10 +687,10 @@ bool OSystem_Android::showMouse(bool visible) {
void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
int hotspotX, int hotspotY,
- uint32 keycolor, int cursorTargetScale,
+ uint32 keycolor, bool dontScale,
const Graphics::PixelFormat *format) {
ENTER("%p, %u, %u, %d, %d, %u, %d, %p", buf, w, h, hotspotX, hotspotY,
- keycolor, cursorTargetScale, format);
+ keycolor, dontScale, format);
GLTHREADCHECK;
@@ -766,7 +766,8 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
}
_mouse_hotspot = Common::Point(hotspotX, hotspotY);
- _mouse_targetscale = cursorTargetScale;
+ // TODO: Adapt to the new "do not scale" cursor logic.
+ _mouse_targetscale = 1;
}
void OSystem_Android::setCursorPaletteInternal(const byte *colors,