mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Another small fix for ":" character
This commit is contained in:
parent
fc1a8fc1f3
commit
83549aa43e
1 changed files with 4 additions and 0 deletions
|
@ -20,12 +20,16 @@ void trim2(std::string& str);
|
|||
void __CheatInit() {
|
||||
//Moved createFullPath to CheatInit from the constructor because it spams the log and constantly checks if exists. In here, only checks once.
|
||||
std::string gameTitle = g_paramSFO.GetValueString("DISC_ID") + " - " + g_paramSFO.GetValueString("TITLE");
|
||||
//These 3 statements clean up the title, which sometimes contain characters that will cause problems when creating the .ini
|
||||
if (gameTitle.find("™")!= std::string::npos) {
|
||||
gameTitle.erase (gameTitle.find("™"), std::string::npos);
|
||||
}
|
||||
while (gameTitle.find("/")!= std::string::npos) {
|
||||
gameTitle.replace (gameTitle.find("/"),1," ");
|
||||
}
|
||||
if (gameTitle.find(":")!= std::string::npos) {
|
||||
gameTitle.replace (gameTitle.find(":"),1," ");
|
||||
}
|
||||
activeCheatFile = CHEATS_DIR + "/" + gameTitle +".ini";
|
||||
|
||||
File::CreateFullPath(CHEATS_DIR);
|
||||
|
|
Loading…
Add table
Reference in a new issue