aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-15 16:58:03 +0000
committerMartin Kiewitz2010-06-15 16:58:03 +0000
commit831e626ccd488df9e8c3d534bf129c48e66f18e0 (patch)
tree84e964232e2738f8d03f28f63a9ef45226713d82 /engines/sci
parentcf38303497e00744fbd7c95bbd711d25cac1c6c4 (diff)
downloadscummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.tar.gz
scummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.tar.bz2
scummvm-rg350-831e626ccd488df9e8c3d534bf129c48e66f18e0.zip
SDL: only change mouse cursor, when mouse is currently within our window, also enable mouse position changing again for SCI
svn-id: r49866
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/cursor.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 14ab3fcdaf..38e9d389a6 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -219,6 +219,7 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
// TODO: What about the 2000 resources? Inventory items? How to handle?
// TODO: What games does this work for? At least it does for KQ6.
// TODO: Stop asking rhetorical questions.
+ // TODO: It was fred all along!
Resource *resource = _resMan->findResource(ResourceId(kResourceTypeCursor, 1000 + celNum), false);
@@ -258,16 +259,12 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
}
void GfxCursor::setPosition(Common::Point pos) {
- // This code has been disabled because it's annoying in windowed mode. The engine shouldn't move
- // the mouse cursor whenever it wants, it interferes with other programs
-#if 0
if (!_upscaledHires) {
g_system->warpMouse(pos.x, pos.y);
} else {
_screen->adjustToUpscaledCoordinates(pos.y, pos.x);
g_system->warpMouse(pos.x, pos.y);
}
-#endif
}
Common::Point GfxCursor::getPosition() {
@@ -293,9 +290,6 @@ Common::Point GfxCursor::getPosition() {
}
void GfxCursor::refreshPosition() {
- // This code has been disabled because it's annoying in windowed mode. The engine shouldn't move
- // the mouse cursor whenever it wants, it interferes with other programs
-#if 0
bool clipped = false;
Common::Point mousePoint = getPosition();
@@ -318,7 +312,6 @@ void GfxCursor::refreshPosition() {
// FIXME: Do this only when mouse is grabbed?
if (clipped)
setPosition(mousePoint);
-#endif
}
void GfxCursor::kernelSetMoveZone(Common::Rect zone) {