From 0ea1872d67d1775a744dd3f6be84773152b339e1 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 24 Aug 2021 18:07:23 +0600 Subject: [PATCH] Change SDL_SetWindowMouseGrab to SDL_SetRelativeMouseMode --- src/unix/unix_sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/unix_sdl.c b/src/unix/unix_sdl.c index b7f3fa075..43de3a09d 100644 --- a/src/unix/unix_sdl.c +++ b/src/unix/unix_sdl.c @@ -269,7 +269,7 @@ sdl_set_fs(int fs) sdl_enabled = 0; sdl_destroy_texture(); SDL_SetWindowFullscreen(sdl_win, fs ? SDL_WINDOW_FULLSCREEN : 0); - SDL_SetWindowMouseGrab(sdl_win, mouse_capture); + SDL_SetRelativeMouseMode((SDL_bool)mouse_capture); sdl_fs = fs; @@ -441,4 +441,4 @@ wchar_t* ui_window_title(wchar_t* str) SDL_free((void*)res); } return str; -} \ No newline at end of file +}