From c108288ccfacef1e604a25d348adbc5632d6e802 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 23 Apr 2024 20:34:15 +0300 Subject: [PATCH] Multimonitor visible monitor check fix --- gfxboard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfxboard.cpp b/gfxboard.cpp index d18c4399..f712ee27 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -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) { -- 2.47.3