aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/win.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/win.go b/win/win.go
index ef6c832..3a06ea9 100644
--- a/win/win.go
+++ b/win/win.go
@@ -143,12 +143,12 @@ func makeGLFWWin(o *options) (*glfw.Window, error) {
glfw.WindowHint(glfw.Maximized, glfw.True)
}
w, err := glfw.CreateWindow(o.width, o.height, o.title, nil, nil)
- if o.maximized {
- o.width, o.height = w.GetFramebufferSize() // set o.width and o.height to the window size due to the window being maximized
- }
if err != nil {
return nil, err
}
+ if o.maximized {
+ o.width, o.height = w.GetFramebufferSize() // set o.width and o.height to the window size due to the window being maximized
+ }
return w, nil
}