diff --git a/examples/demo.rs b/examples/demo.rs index 71bbbae3..f1c39023 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -19,7 +19,6 @@ pub fn main() { renderer.set_draw_color(Color::RGB(255, 0, 0)); renderer.clear(); renderer.present(); - let mut event_pump = sdl_context.event_pump().unwrap(); 'running: loop { diff --git a/src/sdl2/video.rs b/src/sdl2/video.rs index a883d82f..5fd8ed76 100644 --- a/src/sdl2/video.rs +++ b/src/sdl2/video.rs @@ -1145,6 +1145,10 @@ impl WindowRef { unsafe { ll::SDL_RestoreWindow(self.raw()) } } + pub fn fullscreen_state(&self) -> FullscreenType { + FullscreenType::from_window_flags(self.window_flags()) + } + pub fn set_fullscreen(&mut self, fullscreen_type: FullscreenType) -> Result<(), String> { unsafe {