Add new format to CWC as well, don't think it's worth auto-rename.

This commit is contained in:
LunaMoo committed 2017-05-30 12:20:33 +02:00
1 parent 12dc7163f6
commit 5cebcba356
2 files changed
+5 -13

No files matched your search

+4 -12
View File
@@ -53,19 +53,11 @@ void CwCheatScreen::CreateCodeList() {
if (info && info->paramSFOLoaded) {
gameTitle = info->paramSFO.GetValueString("DISC_ID");
}
std::size_t lslash = gamePath_.find_last_of("/");
std::size_t lastdot = gamePath_.find_last_of(".");
std::string extension = gamePath_.substr(lastdot + 1);
for (size_t i = 0; i < extension.size(); i++) {
extension[i] = tolower(extension[i]);
}
if ((extension != "iso" && extension != "cso" && extension != "pbp") || gameTitle == "") {
if (extension == "elf") {
gameTitle = "ELF000000";
} else {
gameTitle = gamePath_.substr(lslash + 1);
}
if ((info->id.empty() || !info->disc_total)
&& gamePath_.find("/PSP/GAME/") != std::string::npos) {
gameTitle = g_paramSFO.GenerateFakeID(gamePath_);
}
cheatEngine2 = new CWCheatEngine();
cheatEngine2->CreateCheatFile();
cheatList = cheatEngine2->GetCodesList();
+1 -1
View File
@@ -407,7 +407,7 @@ public:
info_->ParseParamSFO();
// Assuming PSP_PBP_DIRECTORY without ID or with disc_total < 1 in GAME dir must be homebrew
if ((info_->id.empty() || info_->disc_total < 1)
if ((info_->id.empty() || !info_->disc_total)
&& gamePath_.find("/PSP/GAME/") != std::string::npos
&& info_->fileType == IdentifiedFileType::PSP_PBP_DIRECTORY) {
info_->id = g_paramSFO.GenerateFakeID(gamePath_);