]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Multimonitor visible monitor check fix
authorToni Wilen <twilen@winuae.net>
Tue, 23 Apr 2024 17:34:15 +0000 (20:34 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 23 Apr 2024 17:34:15 +0000 (20:34 +0300)
gfxboard.cpp

index d18c439912ec5a7dbedbb5001ae5df3172d1b696..f712ee27a7d2c97b8b68db1093ab9610508b9ed7 100644 (file)
@@ -838,7 +838,7 @@ void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
                struct rtggfxboard *gb = &rtggfxboards[i];
                if (gb->pcemdev && gb->pcemobject) {
                        pcem_flush(gb, i);
-                       if (rtg_visible[gb->monitor_id] >= 0 && gb->monswitch_delay == 0 && gb->monswitch_current == gb->monswitch_new) {
+                       if (rtg_visible[gb->monitor_id] == i && gb->monswitch_delay == 0 && gb->monswitch_current == gb->monswitch_new) {
                                if (gb->gfxboard_surface == NULL) {
                                        gb->gfxboard_surface = gfx_lock_picasso(gb->monitor_id, false);
                                }
@@ -1703,6 +1703,8 @@ void gfxboard_vsync_handler(bool full_redraw_required, bool redraw_required)
                                }
                        }
 
+                       gfxboard_unlock(gb);
+
                        if (gb->monswitch_keep_trying) {
                                vga_update_size_ext(gb);
                                if (gb->vga_width > 16 && gb->vga_height > 16) {