Skip to content

Commit

Permalink
Fix #8448 properly, in case we fail to generate ID.
Browse files Browse the repository at this point in the history
Limit homebrew ini file generation to UI.
  • Loading branch information
LunaMoo committed Jun 20, 2016
1 parent 778c518 commit 6c14b82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/CwCheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ static void __CheatStart() {

gameTitle = g_paramSFO.GetValueString("DISC_ID");

cheatEngine->CreateCheatFile();
if (gameTitle != "") { //this only generates ini files on boot, let's leave homebrew ini file for UI
cheatEngine->CreateCheatFile();
}

cheatEngine = new CWCheatEngine();
cheatEngine->CreateCodeList();
Expand Down
4 changes: 4 additions & 0 deletions UI/CwCheatScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ UI::EventReturn CwCheatScreen::OnEditCheatFile(UI::EventParams &params) {
}

UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams &params) {
if (gameTitle.length() != 9) {
WARN_LOG(COMMON, "CWCHEAT: Incorrect ID(%s) - can't import cheats.", gameTitle.c_str());
return UI::EVENT_DONE;
}
std::string line;
std::vector<std::string> title;
bool finished = false, skip = false;
Expand Down

0 comments on commit 6c14b82

Please sign in to comment.