From a401f0a19e09d7d00a3ee94d928db82e658b7b48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jun 2012 02:02:57 +0200 Subject: 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. --- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'backends/platform/wii') diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 64197f913a..b6784d59e4 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -189,7 +189,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 bool pollEvent(Common::Event &event); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 83607984cc..a00cea8252 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -644,7 +644,7 @@ void OSystem_Wii::warpMouse(int x, int y) { void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, - int cursorTargetScale, + bool dontScale, const Graphics::PixelFormat *format) { gfx_tex_format_t tex_format = GFX_TF_PALETTE_RGB5A3; uint tw, th; @@ -742,7 +742,8 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, _mouseHotspotX = hotspotX; _mouseHotspotY = hotspotY; - _cursorScale = cursorTargetScale; + // TODO: Adapt to new dontScale logic! + _cursorScale = 1; if ((_texMouse.palette) && (oldKeycolor != _mouseKeyColor)) _cursorPaletteDirty = true; -- cgit v1.2.3