Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu
Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option A text label notes that modifying the 'Lock mouse' check box requires a restart
This commit is contained in:
@@ -62,6 +62,9 @@ namespace OpenRA.Renderer.Sdl2
|
||||
|
||||
window = SDL.SDL_CreateWindow("OpenRA", SDL.SDL_WINDOWPOS_CENTERED, SDL.SDL_WINDOWPOS_CENTERED, size.Width, size.Height, SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL);
|
||||
|
||||
var lockWindow = Game.Settings.Game.LockMouseWindow ? SDL.SDL_bool.SDL_TRUE : SDL.SDL_bool.SDL_FALSE;
|
||||
SDL.SDL_SetWindowGrab(window, lockWindow);
|
||||
|
||||
if (windowMode == WindowMode.Fullscreen)
|
||||
SDL.SDL_SetWindowFullscreen(window, (uint)SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN);
|
||||
else if (windowMode == WindowMode.PseudoFullscreen)
|
||||
|
||||
Reference in New Issue
Block a user