[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.23,1.24 sdl-common.h,1.13,1.14
James Brown
ender at users.sourceforge.net
Thu Jan 9 00:08:02 CET 2003
Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv7756/backends/sdl
Modified Files:
sdl-common.cpp sdl-common.h
Log Message:
Patch 664895: Cannon fixes. Porters, this requires a new OSystem interface function
Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- sdl-common.cpp 28 Dec 2002 04:51:34 -0000 1.23
+++ sdl-common.cpp 9 Jan 2003 08:07:13 -0000 1.24
@@ -398,6 +398,16 @@
undraw_mouse();
}
}
+
+void OSystem_SDL_Common::warp_mouse(int x, int y) {
+ // FIXME: For whatever reason, I can't get CMI's cannon scene to work
+ // properly in fullscreen mode unless I temporarily show the mouse
+ // cursor here.
+ if (_full_screen) SDL_ShowCursor(SDL_ENABLE);
+ SDL_WarpMouse(x * _scaleFactor, y * _scaleFactor);
+ if (_full_screen) SDL_ShowCursor(SDL_DISABLE);
+ set_mouse_pos(x, y);
+}
void OSystem_SDL_Common::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) {
Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- sdl-common.h 28 Dec 2002 12:33:16 -0000 1.13
+++ sdl-common.h 9 Jan 2003 08:07:13 -0000 1.14
@@ -52,6 +52,11 @@
// Set the position of the mouse cursor
void set_mouse_pos(int x, int y);
+
+ // Warp the mouse cursor. Where set_mouse_pos() only informs the
+ // backend of the mouse cursor's current position, this function
+ // actually moves the cursor to the specified position.
+ void warp_mouse(int x, int y);
// Set the bitmap that's used when drawing the cursor.
void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y);
More information about the Scummvm-git-logs
mailing list