syncing
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 31 Dec 2021 22:17:37 +0000 (16:17 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 31 Dec 2021 22:17:37 +0000 (16:17 -0600)
src/main.onyx

index 135d1e63cfe5c3f88c03b7a62e08dcc78ec7799a..62b2bbdb427cc5a1fbfd1356ee43a1f945c741c7 100644 (file)
@@ -19,7 +19,7 @@ selected_block: Vector3i;
 window: GLFWwindow_p;
 
 create_window :: () => {
-    #if runtime.OS == runtime.OS_Linux {
+    #if runtime.compiler_os == .Linux {
         glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
         glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
         glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
@@ -177,6 +177,7 @@ main_loop :: () {
         now = glfwGetTime();
         dt := now - last;
         last = now;
+        dt = math.clamp(dt, 0, 0.5);
 
         seconds += dt;
         frame_count += 1;