diff options
author | Mike Pavone <pavone@retrodev.com> | 2020-11-01 12:32:25 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2020-11-01 12:32:25 -0800 |
commit | 2c54fbbbedc03dfc028472c32489b11b7059c4b3 (patch) | |
tree | e1ecf82e82468c948d04ce8e7b081e829ba10651 | |
parent | 581cca6792fd7e68e15c8268c8384e769584d50a (diff) |
Fix a regression in sprite rendering that could cause garbage to be displayed on first line
-rw-r--r-- | vdp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } } |