diff --git a/src/emu/video.c b/src/emu/video.c index b593d46819d..bd5bf8b9c4c 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -754,10 +754,11 @@ void video_screen_set_visarea(const device_config *screen, int min_x, int max_x, including the specified scanline -------------------------------------------------*/ -void video_screen_update_partial(const device_config *screen, int scanline) +int video_screen_update_partial(const device_config *screen, int scanline) { screen_state *state = get_safe_token(screen); rectangle clip = state->visarea; + int result = FALSE; /* validate arguments */ assert(scanline >= 0); @@ -771,14 +772,14 @@ void video_screen_update_partial(const device_config *screen, int scanline) if (global.skipping_this_frame) { LOG_PARTIAL_UPDATES(("skipped due to frameskipping\n")); - return; + return FALSE; } /* skip if this screen is not visible anywhere */ if (!render_is_live_screen(screen)) { LOG_PARTIAL_UPDATES(("skipped because screen not live\n")); - return; + return FALSE; } } @@ -786,7 +787,7 @@ void video_screen_update_partial(const device_config *screen, int scanline) if (scanline < state->last_partial_scan) { LOG_PARTIAL_UPDATES(("skipped because less than previous\n")); - return; + return FALSE; } /* set the start/end scanlines */ @@ -810,10 +811,12 @@ void video_screen_update_partial(const device_config *screen, int scanline) /* if we modified the bitmap, we have to commit */ state->changed |= ~flags & UPDATE_HAS_NOT_CHANGED; + result = TRUE; } /* remember where we left off */ state->last_partial_scan = scanline + 1; + return result; } diff --git a/src/emu/video.h b/src/emu/video.h index 65945d46109..450027b2039 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -164,7 +164,7 @@ void video_screen_configure(const device_config *screen, int width, int height, void video_screen_set_visarea(const device_config *screen, int min_x, int max_x, int min_y, int max_y); /* force a partial update of the screen up to and including the requested scanline */ -void video_screen_update_partial(const device_config *screen, int scanline); +int video_screen_update_partial(const device_config *screen, int scanline); /* force an update from the last beam position up to the current beam position */ void video_screen_update_now(const device_config *screen); diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index f1aaa39716a..3646c49016c 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -386,10 +386,8 @@ static TIMER_CALLBACK( scanline_callback ) cia_clock_tod(1); /* render up to this scanline */ - if (scanline < video_screen_get_visible_area(machine->primary_screen)->min_y) + if (!video_screen_update_partial(machine->primary_screen, scanline)) amiga_render_scanline(machine, NULL, scanline); - else - video_screen_update_partial(machine->primary_screen, scanline); /* force a sound update */ amiga_audio_update();