Fix initial window resize on linux

This commit is contained in:
luboslenco
2025-10-12 22:31:21 +02:00
parent 91fabe7b00
commit 5e7a1f5483
2 changed files with 8 additions and 3 deletions
+3 -3
View File
@@ -1054,15 +1054,15 @@ uint64_t iron_timestamp(void) {
return (uint64_t)now.tv_sec * 1000000 + (uint64_t)now.tv_usec;
}
void iron_init(iron_window_options_t *win) {
void iron_init(iron_window_options_t *ops) {
gettimeofday(&start, NULL);
#ifdef WITH_GAMEPAD
iron_linux_initHIDGamepads();
#endif
iron_x11_init();
iron_display_init();
iron_set_app_name(win->title);
iron_window_create(win);
iron_set_app_name(ops->title);
iron_window_create(ops);
}
void iron_internal_shutdown() {
+5
View File
@@ -607,6 +607,11 @@ static void acquire_next_image() {
}
void gpu_resize_internal(int width, int height) {
// Initial window size was bigger than display size
for (int i = 0; i < GPU_FRAMEBUFFER_COUNT; ++i) {
framebuffers[i].width = width;
framebuffers[i].height = height;
}
// Newest window size is fetched in create_swapchain
}