mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +02:00
- fixed the cursor bug mentioned by claymore
This commit is contained in:
@@ -848,23 +848,17 @@ void sleep(int millis) {
|
||||
SDL_Delay(millis);
|
||||
}
|
||||
|
||||
void showCursor(bool b) {
|
||||
//int x,y;
|
||||
//if(b) {
|
||||
//SDL_GetMouseState( &x, &y );
|
||||
//}
|
||||
bool isCursorShowing() {
|
||||
int state = SDL_ShowCursor(SDL_QUERY);
|
||||
if( (state == SDL_DISABLE && b == false) ||
|
||||
(state == SDL_ENABLE && b == true)) {
|
||||
return (state == SDL_ENABLE);
|
||||
}
|
||||
|
||||
void showCursor(bool b) {
|
||||
if(isCursorShowing() == b) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_ShowCursor(b == true ? SDL_ENABLE : SDL_DISABLE);
|
||||
//SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
//if(b == true) {
|
||||
//SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
//SDL_WarpMouse(x,y);
|
||||
//}
|
||||
}
|
||||
|
||||
bool isKeyDown(int virtualKey) {
|
||||
|
Reference in New Issue
Block a user