GB Video: Clear VRAM on reset (fixes #2152)

This commit is contained in:
Vicki Pfau 2021-05-07 00:44:49 -07:00
parent b9931de1bf
commit c633d08076
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Features:
- Tool for converting scanned pictures of e-Reader cards to raw dotcode data
- Cheat code support in homebrew ports
Emulation fixes:
- GB Video: Clear VRAM on reset (fixes mgba.io/i/2152)
- GBA Video: Revert scanline latching changes (fixes mgba.io/i/2153, mgba.io/i/2149)
Other fixes:
- Core: Fix memory leak in opening games from the library

View File

@ -80,6 +80,7 @@ void GBVideoReset(struct GBVideo* video) {
video->frameskipCounter = 0;
GBVideoSwitchBank(video, 0);
memset(video->vram, 0, GB_SIZE_VRAM);
video->renderer->vram = video->vram;
memset(&video->oam, 0, sizeof(video->oam));
video->renderer->oam = &video->oam;