diff options
| author | 3gg <3gg@shellblade.net> | 2026-03-06 14:42:08 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2026-03-06 14:42:08 -0800 |
| commit | 03982dfd3a7ea0ff4bd3d84aae779de12d96fb5f (patch) | |
| tree | 03121e7c494a970e5a04b0900cb473bb4e9f784d /app | |
| parent | 2d604425277f56c98a5c8351914178480f68bc23 (diff) | |
Diffstat (limited to 'app')
| -rw-r--r-- | app/src/app.c | 5 |
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); |
