summaryrefslogtreecommitdiff
path: root/src/win.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/win.rs')
-rw-r--r--src/win.rs23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/win.rs b/src/win.rs
index 3f64892..1622b82 100644
--- a/src/win.rs
+++ b/src/win.rs
@@ -1000,7 +1000,12 @@ impl Default for WindowProperties {
}
impl Window {
- pub fn new(title: &str, width: i32, height: i32, properties: &WindowProperties) -> Result<Self, String> {
+ pub fn new(
+ title: &str,
+ width: i32,
+ height: i32,
+ properties: &WindowProperties,
+ ) -> Result<Self, String> {
{
static WINDOW_CREATED: Mutex<bool> = Mutex::new(false);
let guard = WINDOW_CREATED.lock();
@@ -1065,16 +1070,18 @@ impl Window {
sdl::gl_set_swap_interval(vsync.into());
}
}
-
+
pub fn set_fullscreen(&mut self, fullscreen: bool) {
unsafe {
// i dont care if going fullscreen fails
- let _ = sdl::set_window_fullscreen(self.sdlwin,
- if fullscreen {
- sdl::SDL_WINDOW_FULLSCREEN_DESKTOP
- } else {
- 0
- });
+ let _ = sdl::set_window_fullscreen(
+ self.sdlwin,
+ if fullscreen {
+ sdl::SDL_WINDOW_FULLSCREEN_DESKTOP
+ } else {
+ 0
+ },
+ );
}
}