qt: Don't resize non-existent monitors
This commit is contained in:
@@ -290,6 +290,7 @@ int main(int argc, char* argv[]) {
|
|||||||
{
|
{
|
||||||
/* If needed, handle a screen resize. */
|
/* If needed, handle a screen resize. */
|
||||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||||
|
if (!monitors[i].target_buffer) continue;
|
||||||
if (!atomic_flag_test_and_set(&doresize_monitors[i]) && !video_fullscreen && !is_quit) {
|
if (!atomic_flag_test_and_set(&doresize_monitors[i]) && !video_fullscreen && !is_quit) {
|
||||||
if (vid_resize & 2)
|
if (vid_resize & 2)
|
||||||
plat_resize_monitor(fixed_size_x, fixed_size_y, i);
|
plat_resize_monitor(fixed_size_x, fixed_size_y, i);
|
||||||
|
@@ -1617,7 +1617,7 @@ static void update_scaled_checkboxes(Ui::MainWindow* ui, QAction* selected) {
|
|||||||
device_force_redraw();
|
device_force_redraw();
|
||||||
video_force_resize_set(1);
|
video_force_resize_set(1);
|
||||||
for (int i = 0; i < MONITORS_NUM; i++)
|
for (int i = 0; i < MONITORS_NUM; i++)
|
||||||
atomic_flag_clear(&doresize_monitors[i]);
|
if (monitors[i].target_buffer) atomic_flag_clear(&doresize_monitors[i]);
|
||||||
config_save();
|
config_save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user