]> git.jsancho.org Git - lugaru.git/commitdiff
Don't lock mouse if video mode couldn't be set. Fixes i.o Bugzilla #2344.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 23 Aug 2005 03:45:48 +0000 (03:45 +0000)
committerRyan C. Gordon <icculus@icculus.org>
Tue, 23 Aug 2005 03:45:48 +0000 (03:45 +0000)
Source/OpenGL_Windows.cpp

index 30b0312670ba367bb8248a17105cc0dc19318be1..cb74c6ceaca7a92741a39c1e78606cd5d274d0cc 100644 (file)
@@ -891,9 +891,6 @@ Boolean SetUp (Game & game)
 
     SDL_WM_SetCaption("Lugaru", "lugaru");
 
-    if (!cmdline("nomousegrab"))
-        SDL_WM_GrabInput(SDL_GRAB_ON);
-
     SDL_ShowCursor(0);
 
     if (SDL_SetVideoMode(kContextWidth, kContextHeight, 0, sdlflags) == NULL)
@@ -902,6 +899,8 @@ Boolean SetUp (Game & game)
         return false;
     }
 
+    if (!cmdline("nomousegrab"))
+        SDL_WM_GrabInput(SDL_GRAB_ON);
 
 #elif (defined WIN32)
        //------------------------------------------------------------------