Technical support > Bugs in stable version (2.5)
Fullscreen mouse grab
Grug:
Is there any reason that mouse grab is disabled in fullscreen mode?
I have multiple monitors, but run the game in full screen on a single monitor. In order to enable mouse grab after starting the game, I need to go into the options, disable fullscreen, enable mouse grab and just don't restart. I also re-enable fullscreen (also without restarting) otherwise the next time I restart the game it will appear windowed.
I have commented out the code stopping input grabbing in fullscreen mode and done some initial testing without any noticeable problems. I'll post if I come across any.
Mattn:
ctrl+g might be a shortcut.
there was a reason afair - but I don't remember the background of it. I would rather not change this for 2.5 before we release. But we can either talk about 2.5.1 or 2.6 to change that.
Grug:
Ctrl+G doesn't work in fullscreen so you still have to go to the options to disable fullscreen to toggle it with Ctrl+G.
Mattn:
well, that is something i would accept a patch for even for 2.5. let ctrl+g work in fullscreen might be useful.
Grug:
--- Quote from: Mattn on December 27, 2013, 12:17:42 pm ---well, that is something i would accept a patch for even for 2.5. let ctrl+g work in fullscreen might be useful.
--- End quote ---
This just removes the else block containing the warning and turns the full screen test into the else block. Works for me so far.
--- Code: ---diff --git a/src/client/input/cl_input.cpp b/src/client/input/cl_input.cpp
index 4407034..ad15cf2 100644
--- a/src/client/input/cl_input.cpp
+++ b/src/client/input/cl_input.cpp
@@ -941,8 +941,7 @@ void IN_Frame (void)
#else
SDL_WM_GrabInput(SDL_GRAB_OFF);
#endif
- /* don't allow grabbing the input in fullscreen mode */
- } else if (!vid_fullscreen->integer) {
+ } else {
/* grab the pointer */
Com_Printf("Switch grab input on\n");
#if SDL_VERSION_ATLEAST(2,0,0)
@@ -950,9 +949,6 @@ void IN_Frame (void)
#else
SDL_WM_GrabInput(SDL_GRAB_ON);
#endif
- } else {
- Com_Printf("No input grabbing in fullscreen mode!\n");
- Cvar_SetValue("vid_grabmouse", 0);
}
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version