Skip to content

Commit

Permalink
Stop GBE+ from complaining about missing cheats file if it was never …
Browse files Browse the repository at this point in the history
…specified
  • Loading branch information
shonumi committed Dec 22, 2016
1 parent 8f0bd25 commit 9b0917a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/config.cpp
Expand Up @@ -2363,6 +2363,8 @@ bool save_ini_file()
/****** Parse the cheats file ******/
bool parse_cheats_file()
{
if(config::cheats_path.empty()) { return false; }

std::ifstream file(config::cheats_path.c_str(), std::ios::in);
std::string input_line = "";
std::string line_char = "";
Expand Down Expand Up @@ -2491,6 +2493,8 @@ bool parse_cheats_file()
/****** Saves the cheat file ******/
bool save_cheats_file()
{
if(config::cheats_path.empty()) { return false; }

std::ofstream file(config::cheats_path.c_str(), std::ios::out);

if(!file.is_open())
Expand Down

1 comment on commit 9b0917a

@shonumi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GBE+ should only complain if it cannot find one when a path is provided. Otherwise, it should assume the user doesn't want to use a cheat file.

Please sign in to comment.