summaryrefslogtreecommitdiff
path: root/src/sdl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdl.rs')
-rw-r--r--src/sdl.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sdl.rs b/src/sdl.rs
index 11873aa..1124a53 100644
--- a/src/sdl.rs
+++ b/src/sdl.rs
@@ -678,6 +678,7 @@ extern "C" {
fn SDL_GetWindowID(window: *mut SDL_Window) -> u32;
fn SDL_SetWindowResizable(window: *mut SDL_Window, resizable: SDL_bool);
fn SDL_SetWindowSize(window: *mut SDL_Window, w: c_int, h: c_int);
+ fn SDL_SetRelativeMouseMode(enabled: SDL_bool) -> c_int;
fn SDL_GetError() -> *const c_char;
fn SDL_SetHint(name: *const c_char, value: *const c_char) -> SDL_bool;
fn SDL_GL_SetAttribute(attr: SDL_GLattr, value: c_int);
@@ -1049,6 +1050,10 @@ pub unsafe fn show_window(window: *mut SDL_Window) {
SDL_ShowWindow(window);
}
+pub unsafe fn set_relative_mouse_mode(relative: bool) {
+ SDL_SetRelativeMouseMode(relative.into());
+}
+
pub unsafe fn gl_swap_window(window: *mut SDL_Window) {
SDL_GL_SwapWindow(window);
}