aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/app.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/app.c b/app/src/app.c
index 6eaa3d6..10adcbd 100644
--- a/app/src/app.c
+++ b/app/src/app.c
@@ -111,6 +111,8 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) {
111 LOGE("glfwCreateWindow() failed"); 111 LOGE("glfwCreateWindow() failed");
112 goto cleanup; 112 goto cleanup;
113 } 113 }
114 int width, height;
115 glfwGetFramebufferSize(g_gfx_app.window, &width, &height);
114 glfwMakeContextCurrent(g_gfx_app.window); 116 glfwMakeContextCurrent(g_gfx_app.window);
115 117
116 // Request adaptive sync if supported. 118 // Request adaptive sync if supported.
@@ -131,8 +133,7 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) {
131 } 133 }
132 134
133 // Trigger an initial resize for convenience. 135 // Trigger an initial resize for convenience.
134 (*g_gfx_app.callbacks.resize)( 136 (*g_gfx_app.callbacks.resize)(&g_gfx_app, g_gfx_app.app_state, width, height);
135 &g_gfx_app, g_gfx_app.app_state, desc->width, desc->height);
136 137
137 // Set GLFW callbacks now that the application has been initialized. 138 // Set GLFW callbacks now that the application has been initialized.
138 glfwSetWindowSizeCallback(g_gfx_app.window, on_resize); 139 glfwSetWindowSizeCallback(g_gfx_app.window, on_resize);