aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/tinsel.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel/tinsel.h')
-rw-r--r--engines/tinsel/tinsel.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index ec504b69cd..5eb3b7d7b8 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -184,7 +184,7 @@ public:
uint32 getFlags() const;
Common::Platform getPlatform() const;
bool getIsADGFDemo() const;
- bool isCD() const;
+ bool isV1CD() const;
const char *getSampleIndex(LANGUAGE lang);
const char *getSampleFile(LANGUAGE lang);
@@ -226,7 +226,11 @@ public:
Graphics::Surface &screen() { return _screenSurface; }
Common::Point getMousePosition() const { return _mousePos; }
- void setMousePosition(const Common::Point &pt) {
+ void setMousePosition(Common::Point pt) {
+ // Clip mouse position to be within the screen coordinates
+ pt.x = CLIP<int16>(pt.x, 0, SCREEN_WIDTH - 1);
+ pt.y = CLIP<int16>(pt.y, 0, SCREEN_HEIGHT - 1);
+
int yOffset = TinselV2 ? (g_system->getHeight() - _screenSurface.h) / 2 : 0;
g_system->warpMouse(pt.x, pt.y + yOffset);
_mousePos = pt;