SCUMM: Use OSystem::fillScreen when clearing the screen in MM NES

The previous code was allocating a temporary surface on the stack which
was causing the stack to overflow on the 3DS.

Fixes #11505.
This commit is contained in:
Bastien Bouclet 2020-06-21 16:43:14 +02:00
parent 57cb344396
commit c777d66f92

View File

@ -641,9 +641,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
// In MM NES If we're repainting the entire screen, just make everything black
if ((_game.platform == Common::kPlatformNES) && width == 256 && height == 240) {
byte blackbuf[256 * 240];
memset(blackbuf, 0x1d, 256 * 240);
_system->copyRectToScreen(blackbuf, pitch, x, y, width, height);
_system->fillScreen(0x1d);
return;
}