Skip to content
This repository was archived by the owner on Dec 24, 2018. It is now read-only.

Commit

Permalink
another major bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Feb 26, 2018
1 parent 29a72dc commit eb3078b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions gui/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,10 +1212,13 @@ static void LoadPerGameSettings(void)
if (settings.twl.romtype == 0) {
inifilename = ReplaceAll(rom, ".nds", ".ini");
inifilename = ReplaceAll(rom, ".cia", ".ini");
} else {
} else if (settings.twl.romtype == 1) {
inifilename = ReplaceAll(rom, ".gb", ".ini");
inifilename = ReplaceAll(rom, ".gbc", ".ini");
inifilename = ReplaceAll(rom, ".sgb", ".ini");
} else if (settings.twl.romtype == 2) {
inifilename = ReplaceAll(rom, ".nes", ".ini");
inifilename = ReplaceAll(rom, ".fds", ".ini");
}
} else {
char path[256];
Expand Down Expand Up @@ -7280,12 +7283,18 @@ int main(){
rom = matching_files.at(settings.ui.cursorPosition).c_str();
}
}
} else {
} else if (settings.twl.romtype == 1) {
if(matching_files.size() == 0){
rom = gbfiles.at(settings.ui.cursorPosition).c_str();
} else {
rom = matching_files.at(settings.ui.cursorPosition).c_str();
}
} else if (settings.twl.romtype == 2) {
if(matching_files.size() == 0){
rom = nesfiles.at(settings.ui.cursorPosition).c_str();
} else {
rom = matching_files.at(settings.ui.cursorPosition).c_str();
}
}
LoadPerGameSettings();
}
Expand Down

0 comments on commit eb3078b

Please sign in to comment.