mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
+7
-2
@@ -791,8 +791,13 @@ impl VideoSubsystem {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gl_set_swap_interval<S: Into<SwapInterval>>(&self, interval: S) -> bool {
|
||||
unsafe { sys::SDL_GL_SetSwapInterval(interval.into() as c_int) == 0 }
|
||||
pub fn gl_set_swap_interval<S: Into<SwapInterval>>(&self, interval: S) -> Result<(), String> {
|
||||
let result = unsafe { sys::SDL_GL_SetSwapInterval(interval.into() as c_int) };
|
||||
if result == 0{
|
||||
Ok(())
|
||||
} else {
|
||||
Err(get_error())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gl_get_swap_interval(&self) -> SwapInterval {
|
||||
|
||||
Reference in New Issue
Block a user