From bb1034e1e26ec50bceed21a8954a2fb20f800477 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 22 Jun 2010 13:38:30 +0000 Subject: [PATCH] - feedble attempt to help people with mouse problems --- .../shared_lib/sources/platform/common/platform_common.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index 72aadeb00..d84e20c5a 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -778,7 +778,14 @@ void sleep(int millis) { } void showCursor(bool b) { + int x,y; + if(b) { + SDL_GetMouseState( &x, &y ); + } SDL_ShowCursor(b ? SDL_ENABLE : SDL_DISABLE); + if(b) { + SDL_WarpMouse(x,y); + } } bool isKeyDown(int virtualKey) {