diff options
-rw-r--r-- | src/doom/d_main.c | 4 | ||||
-rw-r--r-- | src/heretic/d_main.c | 8 | ||||
-rw-r--r-- | src/hexen/h2_main.c | 8 | ||||
-rw-r--r-- | src/i_video.c | 5 |
4 files changed, 10 insertions, 15 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c index eb36f4bb..931c50a8 100644 --- a/src/doom/d_main.c +++ b/src/doom/d_main.c @@ -409,7 +409,7 @@ boolean D_GrabMouseCallback(void) // only grab mouse when playing levels (but not demos) - return (gamestate == GS_LEVEL) && !demoplayback; + return (gamestate == GS_LEVEL) && !demoplayback && !advancedemo; } // @@ -426,9 +426,9 @@ void D_DoomLoop (void) I_SetWindowTitle(gamedescription); I_GraphicsCheckCommandLine(); + I_SetGrabMouseCallback(D_GrabMouseCallback); I_InitGraphics(); I_EnableLoadingDisk(); - I_SetGrabMouseCallback(D_GrabMouseCallback); V_RestoreBuffer(); R_ExecuteSetViewSize(); diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 5d9def79..d43c4994 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -226,14 +226,14 @@ void D_Display(void) boolean D_GrabMouseCallback(void) { - // when menu is active or game is paused, release the mouse - + // when menu is active or game is paused, release the mouse + if (MenuActive || paused) return false; // only grab mouse when playing levels (but not demos) - return (gamestate == GS_LEVEL) && !demoplayback; + return (gamestate == GS_LEVEL) && !demoplayback && !advancedemo; } //--------------------------------------------------------------------------- @@ -251,8 +251,8 @@ void D_DoomLoop(void) debugfile = fopen(filename, "w"); } I_GraphicsCheckCommandLine(); - I_InitGraphics(); I_SetGrabMouseCallback(D_GrabMouseCallback); + I_InitGraphics(); main_loop_started = true; diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c index 33d345e8..f1a22cd7 100644 --- a/src/hexen/h2_main.c +++ b/src/hexen/h2_main.c @@ -202,14 +202,14 @@ static void D_SetDefaultSavePath(void) static boolean D_GrabMouseCallback(void) { - // when menu is active or game is paused, release the mouse - + // when menu is active or game is paused, release the mouse + if (MenuActive || paused) return false; // only grab mouse when playing levels (but not demos) - return (gamestate == GS_LEVEL) && !demoplayback; + return (gamestate == GS_LEVEL) && !advancedemo && !demoplayback; } // Message displayed when quitting Hexen @@ -620,8 +620,8 @@ void H2_GameLoop(void) } I_SetWindowTitle("Hexen"); I_GraphicsCheckCommandLine(); - I_InitGraphics(); I_SetGrabMouseCallback(D_GrabMouseCallback); + I_InitGraphics(); while (1) { diff --git a/src/i_video.c b/src/i_video.c index 46264fdf..07c5b3b7 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -2203,11 +2203,6 @@ void I_InitGraphics(void) while (SDL_PollEvent(&dummy)); - if (usemouse && !nomouse && (fullscreen || grabmouse)) - { - CenterMouse(); - } - initialized = true; // Call I_ShutdownGraphics on quit |