mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- bugfixes related to SDL library upgrade on windows build and mouse cursor toggling (especially that stupid windows 7 issue where alt-tab doesn't let you move your cursor in fullscreen mode)
For reference: http://bugzilla.libsdl.org/show_bug.cgi?id=849
This commit is contained in:
@@ -819,9 +819,9 @@ void sleep(int millis) {
|
||||
|
||||
void showCursor(bool b) {
|
||||
//int x,y;
|
||||
if(b) {
|
||||
//if(b) {
|
||||
//SDL_GetMouseState( &x, &y );
|
||||
}
|
||||
//}
|
||||
int state = SDL_ShowCursor(SDL_QUERY);
|
||||
if( (state == SDL_DISABLE && b == false) ||
|
||||
(state == SDL_ENABLE && b == true)) {
|
||||
@@ -830,7 +830,7 @@ void showCursor(bool b) {
|
||||
|
||||
SDL_ShowCursor(b == true ? SDL_ENABLE : SDL_DISABLE);
|
||||
//SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
//if(b) {
|
||||
//if(b == true) {
|
||||
//SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
//SDL_WarpMouse(x,y);
|
||||
//}
|
||||
|
@@ -219,7 +219,7 @@ bool Window::handleEvent() {
|
||||
}
|
||||
*/
|
||||
// Check if the program has lost window focus
|
||||
if (event.active.state == SDL_APPACTIVE) {
|
||||
if (event.active.state & SDL_APPACTIVE == SDL_APPACTIVE) {
|
||||
if (event.active.gain == 0) {
|
||||
Window::isActive = false;
|
||||
}
|
||||
@@ -249,9 +249,9 @@ bool Window::handleEvent() {
|
||||
showCursor(willShowCursor);
|
||||
}
|
||||
*/
|
||||
if (event.active.state != SDL_APPMOUSEFOCUS &&
|
||||
event.active.state != SDL_APPINPUTFOCUS &&
|
||||
event.active.state != SDL_APPACTIVE) {
|
||||
if (event.active.state & SDL_APPMOUSEFOCUS != SDL_APPMOUSEFOCUS &&
|
||||
event.active.state & SDL_APPINPUTFOCUS != SDL_APPINPUTFOCUS &&
|
||||
event.active.state & SDL_APPACTIVE != SDL_APPACTIVE) {
|
||||
if (event.active.gain == 0) {
|
||||
Window::isActive = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user