Fix wrong homebrew name generation

This commit is contained in:
Henrik Rydgård 2024-11-29 14:03:46 +01:00
parent 720e0561b5
commit 14815d9330

View file

@ -441,13 +441,11 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
std::string homebrewName = PSP_CoreParameter().fileToStart.ToVisualString();
std::size_t lslash = homebrewName.find_last_of('/');
#if PPSSPP_PLATFORM(UWP)
if (lslash == homebrewName.npos) {
lslash = homebrewName.find_last_of("\\");
}
#endif
std::size_t rslash = homebrewName.find_last_of('\\');
if (lslash != homebrewName.npos)
homebrewName = homebrewName.substr(lslash + 1);
if (rslash != homebrewName.npos)
homebrewName = homebrewName.substr(rslash + 1);
std::string homebrewTitle = g_paramSFO.GetValueString("TITLE");
if (homebrewTitle.empty())
homebrewTitle = homebrewName;