Fixed crash when loading multiple roms while keeping the emulator paused

This commit is contained in:
Sour 2020-05-02 11:49:38 -04:00
parent dbe7e0dec8
commit f7c170bd9b
2 changed files with 5 additions and 1 deletions

View file

@ -283,7 +283,7 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile, bool forP
if(mapper) {
bool isDifferentGame = _romFilepath != (string)romFile || _patchFilename != (string)patchFile;
if(_mapper) {
if(isDifferentGame) {
if(isDifferentGame && _ppu->GetFrameCount() > 1) {
//Save current game state before loading another one
_saveStateManager->SaveRecentGame(GetRomInfo().RomName, _romFilepath, _patchFilename);
}

View file

@ -255,6 +255,10 @@ void VideoDecoder::TakeScreenshot()
void VideoDecoder::TakeScreenshot(std::stringstream &stream, bool rawScreenshot)
{
if(!_ppuOutputBuffer) {
return;
}
if(rawScreenshot) {
//Take screenshot without NTSC filter on
DefaultVideoFilter filter(_console);