From 2c54fbbbedc03dfc028472c32489b11b7059c4b3 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 1 Nov 2020 12:32:25 -0800 Subject: Fix a regression in sprite rendering that could cause garbage to be displayed on first line --- vdp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 81c7eec..b4c0448 100644 --- a/vdp.c +++ b/vdp.c @@ -3369,6 +3369,8 @@ static void check_switch_inactive(vdp_context *context, uint8_t is_h40) //technically the second hcounter check should be different for H40, but this is probably close enough for now if (context->state == ACTIVE && context->vcounter == context->inactive_start && (context->hslot >= (is_h40 ? 167 : 135) || context->hslot < 133)) { context->state = INACTIVE; + context->cur_slot = MAX_SPRITES_LINE-1; + context->sprite_x_offset = 0; } } -- cgit v1.2.3