Fixed crash when loading multiple roms while keeping the emulator paused
This commit is contained in:
parent
dbe7e0dec8
commit
f7c170bd9b
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue