Fix initial window resize on linux
This commit is contained in:
@@ -1054,15 +1054,15 @@ uint64_t iron_timestamp(void) {
|
|||||||
return (uint64_t)now.tv_sec * 1000000 + (uint64_t)now.tv_usec;
|
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);
|
gettimeofday(&start, NULL);
|
||||||
#ifdef WITH_GAMEPAD
|
#ifdef WITH_GAMEPAD
|
||||||
iron_linux_initHIDGamepads();
|
iron_linux_initHIDGamepads();
|
||||||
#endif
|
#endif
|
||||||
iron_x11_init();
|
iron_x11_init();
|
||||||
iron_display_init();
|
iron_display_init();
|
||||||
iron_set_app_name(win->title);
|
iron_set_app_name(ops->title);
|
||||||
iron_window_create(win);
|
iron_window_create(ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iron_internal_shutdown() {
|
void iron_internal_shutdown() {
|
||||||
|
|||||||
@@ -607,6 +607,11 @@ static void acquire_next_image() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void gpu_resize_internal(int width, int height) {
|
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
|
// Newest window size is fetched in create_swapchain
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user