From 42c51887bf556c0a2108c0871a216972395ad348 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 5 Nov 2017 01:00:53 +0100 Subject: viewgfx: fix tilemap live updates regression (nw) --- src/frontend/mame/ui/viewgfx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp index d1734b172af..560dc30d0f9 100644 --- a/src/frontend/mame/ui/viewgfx.cpp +++ b/src/frontend/mame/ui/viewgfx.cpp @@ -1300,7 +1300,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state &state, std::swap(width, height); // realloc the bitmap if it is too small - if (state.bitmap_dirty || state.bitmap == nullptr || state.texture == nullptr || state.bitmap->width() != width || state.bitmap->height() != height) + if (state.bitmap == nullptr || state.texture == nullptr || state.bitmap->width() != width || state.bitmap->height() != height) { // free the old stuff machine.render().texture_free(state.texture); @@ -1318,6 +1318,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state &state, // handle the redraw if (state.bitmap_dirty) { + state.bitmap->fill(0); tilemap_t *tilemap = machine.tilemap().find(state.tilemap.which); tilemap->draw_debug(*machine.first_screen(), *state.bitmap, state.tilemap.xoffs, state.tilemap.yoffs, state.tilemap.flags); -- cgit v1.2.3