Enable SDL hint to workaround SDL_SetRelativeMouseMode broken on Linux

Fixes https://github.com/Thinkofname/steven/issues/73
See https://bugzilla.libsdl.org/show_bug.cgi?id=2150
This commit is contained in:
iceiix 2018-09-29 13:39:20 -07:00
parent 2e99712cc8
commit 743aaac4cd
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ fn main() {
.resizable()
.build()
.expect("Could not create sdl window.");
sdl2::hint::set_with_priority("SDL_MOUSE_RELATIVE_MODE_WARP", "1", sdl2::hint::Hint::Override);
let gl_attr = sdl_video.gl_attr();
gl_attr.set_stencil_size(0);
gl_attr.set_depth_size(24);