aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/PalmOS/Src/os5_mouse.cpp9
-rw-r--r--backends/platform/sdl/sdl-common.h3
-rw-r--r--backends/platform/wince/wince-sdl.cpp7
3 files changed, 15 insertions, 4 deletions
diff --git a/backends/platform/PalmOS/Src/os5_mouse.cpp b/backends/platform/PalmOS/Src/os5_mouse.cpp
index 375dc125ce..20e725694c 100644
--- a/backends/platform/PalmOS/Src/os5_mouse.cpp
+++ b/backends/platform/PalmOS/Src/os5_mouse.cpp
@@ -41,6 +41,15 @@ void OSystem_PalmOS5::setMouseCursor(const byte *buf, uint w, uint h, int hotspo
if (w == 0 || h == 0)
return;
+FIXME: The restriction on MAX_MOUSE_H / MAX_MOUSE_W is obsolete;
+in particular, BS2 might use bigger cursors these days.
+See also bug #1609058. 1607180
+Hence this code now might overwrite memory unchecked; at the
+very least an assert should be inserted to cause a controlled
+crash, but of course it would be better to remove the restriction
+on "small" cursors.
+
+
_mouseCurState.w = w;
_mouseCurState.h = h;
diff --git a/backends/platform/sdl/sdl-common.h b/backends/platform/sdl/sdl-common.h
index 27a4d25e78..2a5b88cef2 100644
--- a/backends/platform/sdl/sdl-common.h
+++ b/backends/platform/sdl/sdl-common.h
@@ -283,9 +283,6 @@ protected:
enum {
NUM_DIRTY_RECT = 100,
-
- MAX_MOUSE_W = 80,
- MAX_MOUSE_H = 80,
MAX_SCALING = 3
};
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 4a3b657155..c316274657 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -851,7 +851,7 @@ void OSystem_WINCE3::update_game_settings() {
if (ConfMan.hasKey("landscape"))
if (ConfMan.get("landscape")[0] > 57) {
_newOrientation = _orientationLandscape = ConfMan.getBool("landscape");
- //ConfMan.removeKey("landscape", String::emptyString);
+ //ConfMan.removeKey("landscape", "");
ConfMan.setInt("landscape", _orientationLandscape);
} else
_newOrientation = _orientationLandscape = ConfMan.getInt("landscape");
@@ -1704,6 +1704,11 @@ void OSystem_WINCE3::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
if (w == 0 || h == 0)
return;
+/*
+FIXME: The restriction on MAX_MOUSE_H / MAX_MOUSE_W is obsolete;
+in particular, BS2 might use bigger cursors these days.
+See also bug #1609058. 1607180
+*/
assert(w <= MAX_MOUSE_W);
assert(h <= MAX_MOUSE_H);
_mouseCurState.w = w;