From: Toni Wilen Date: Wed, 2 Apr 2025 17:09:51 +0000 (+0300) Subject: Lock and unlock output texture in same line as rendering is done. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4657aa49d405b6f1a37ba9d8fa8966fd56472d20;p=francis%2Fwinuae.git Lock and unlock output texture in same line as rendering is done. --- diff --git a/custom.cpp b/custom.cpp index 85428f4a..3c6db2d1 100644 --- a/custom.cpp +++ b/custom.cpp @@ -4967,7 +4967,13 @@ static void vsync_display_render(void) { if (!vsync_display_rendered) { vsyncmintimepre = read_processor_time(); + if (has_draw_denise()) { + end_draw_denise(); + } vsync_handler_render(); + if (!custom_disabled) { + start_draw_denise(); + } vsync_display_rendered = true; } } @@ -6492,6 +6498,8 @@ void custom_cpuchange(void) void custom_reset(bool hardreset, bool keyboardreset) { + custom_end_drawing(); + if (hardreset) { board_prefs_changed(-1, -1); initial_frame = true; @@ -11147,12 +11155,6 @@ static void custom_trigger_start_nosync(void) if (linear_vpos >= maxvpos + lof_store) { nosignal_trigger = true; linear_vpos = 0; - if (has_draw_denise()) { - end_draw_denise(); - } - if (!custom_disabled) { - start_draw_denise(); - } vsync_handler_post(); devices_vsync_pre(); inputdevice_read_msg(true); @@ -11196,10 +11198,6 @@ static void custom_trigger_start(void) if (vpos == vsync_startline) { - if (has_draw_denise()) { - end_draw_denise(); - } - linear_vpos_prev[2] = linear_vpos_prev[1]; linear_vpos_prev[1] = linear_vpos_prev[0]; linear_vpos_prev[0] = linear_vpos; @@ -11207,9 +11205,6 @@ static void custom_trigger_start(void) virtual_vsync_check(); - if (!custom_disabled) { - start_draw_denise(); - } } bool vposzero = false;