The better option

This commit is contained in:
Prokop Randacek
2021-10-24 13:07:13 +02:00
parent cac8582de1
commit b77e2f59ed
2 changed files with 2 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ foreign glfw {
WindowHint :: proc(hint, value: c.int) ---
DefaultWindowHints :: proc() ---
WindowHintString :: proc(hint: c.int, value: cstring) ---
WindowShouldClose :: proc(window: WindowHandle) -> c.int ---
WindowShouldClose :: proc(window: WindowHandle) -> b32 ---
SwapInterval :: proc(interval: c.int) ---
SwapBuffers :: proc(window: WindowHandle) ---

View File

@@ -52,9 +52,7 @@ DestroyWindow :: glfw.DestroyWindow
WindowHint :: glfw.WindowHint
DefaultWindowHints :: glfw.DefaultWindowHints
WindowHintString :: glfw.WindowHintString
WindowShouldClose :: proc "c" (window: WindowHandle) -> bool {
return glfw.WindowShouldClose(window) != 0
}
WindowShouldClose :: glfw.WindowShouldClose
SwapInterval :: glfw.SwapInterval
SwapBuffers :: glfw.SwapBuffers