- changed show cursor code since it was not easily allowing you to cursour out of the SDL window

This commit is contained in:
Mark Vejvoda 2010-06-22 14:21:52 +00:00
parent f720c43462
commit 6560ba73dc

View File

@ -780,11 +780,12 @@ void sleep(int millis) {
void showCursor(bool b) {
int x,y;
if(b) {
SDL_GetMouseState( &x, &y );
//SDL_GetMouseState( &x, &y );
}
SDL_ShowCursor(b ? SDL_ENABLE : SDL_DISABLE);
if(b) {
SDL_WarpMouse(x,y);
SDL_WM_GrabInput(SDL_GRAB_OFF);
//SDL_WarpMouse(x,y);
}
}