CommonHostInterface: Fix crash booting exe/psf from file
This commit is contained in:
parent
f8bbade9bf
commit
e8fece60cf
|
@ -2904,8 +2904,10 @@ void CommonHostInterface::GetGameInfo(const char* path, CDImage* image, std::str
|
|||
{
|
||||
*code = list_entry->code;
|
||||
*title = list_entry->title;
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
if (image)
|
||||
{
|
||||
GameDatabase database;
|
||||
GameDatabaseEntry database_entry;
|
||||
|
@ -2913,14 +2915,15 @@ void CommonHostInterface::GetGameInfo(const char* path, CDImage* image, std::str
|
|||
{
|
||||
*code = std::move(database_entry.serial);
|
||||
*title = std::move(database_entry.title);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
*title = FileSystem::GetFileTitleFromPath(std::string(path));
|
||||
if (image)
|
||||
*code = System::GetGameCodeForImage(image, true);
|
||||
}
|
||||
}
|
||||
|
||||
*title = FileSystem::GetFileTitleFromPath(path);
|
||||
}
|
||||
|
||||
bool CommonHostInterface::SaveResumeSaveState()
|
||||
|
|
Loading…
Reference in New Issue