qt: port atomic_flag doresize from master

This commit is contained in:
ts-korhonen
2021-12-17 22:23:08 +02:00
parent 3825d5c53c
commit d3467568b0
3 changed files with 5 additions and 5 deletions

View File

@@ -80,12 +80,11 @@ main_thread_fn()
}
/* If needed, handle a screen resize. */
if (doresize && !video_fullscreen && !is_quit) {
if (!atomic_flag_test_and_set(&doresize) && !video_fullscreen && !is_quit) {
if (vid_resize & 2)
plat_resize(fixed_size_x, fixed_size_y);
else
plat_resize(scrnsz_x, scrnsz_y);
doresize = 0;
}
}