Skip to content

Commit

Permalink
mustard: Check glfw error before using the handle.
Browse files Browse the repository at this point in the history
Issue danfragoso#24 references some issues on Windows that this might have helped
debug.
  • Loading branch information
ajzaff committed Apr 26, 2021
1 parent 655eac9 commit d6f3215
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mustard/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func SetGLFWHints() {

func CreateNewWindow(title string, width int, height int, hiDPI bool) *Window {
glw, err := glfw.CreateWindow(width, height, title, nil, nil)
if err != nil {
log.Fatal(err)
}
glw.SetSizeLimits(300, 200, glfw.DontCare, glfw.DontCare)

if err != nil {
Expand Down

0 comments on commit d6f3215

Please sign in to comment.