Added fullscreen_state to Window

* Solves #457
This commit is contained in:
Cobrand
2016-06-03 14:14:45 +02:00
parent 834237f80d
commit 01f03cc4fc
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -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 {
+4
View File
@@ -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 {