Pad: Fix loading save state issues with memory cards

This commit is contained in:
Connor McLaughlin
2019-09-30 14:22:30 +10:00
parent 9fc608aa34
commit 1667da66dd
6 changed files with 35 additions and 16 deletions

View File

@ -61,13 +61,18 @@ static int Run(int argc, char* argv[])
}
// create system
if (!host_interface->InitializeSystem(filename, exp1_filename, state_filename.IsEmpty() ? nullptr : state_filename.GetCharArray()))
if (!host_interface->InitializeSystem(filename, exp1_filename))
{
host_interface.reset();
SDL_Quit();
return -1;
}
host_interface->ConnectDevices();
if (!state_filename.IsEmpty())
host_interface->LoadState(state_filename);
// run
host_interface->Run();