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

Commit eb3078b

Browse files
committed
another major bug fix
1 parent 29a72dc commit eb3078b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

gui/source/main.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,10 +1212,13 @@ static void LoadPerGameSettings(void)
12121212
if (settings.twl.romtype == 0) {
12131213
inifilename = ReplaceAll(rom, ".nds", ".ini");
12141214
inifilename = ReplaceAll(rom, ".cia", ".ini");
1215-
} else {
1215+
} else if (settings.twl.romtype == 1) {
12161216
inifilename = ReplaceAll(rom, ".gb", ".ini");
12171217
inifilename = ReplaceAll(rom, ".gbc", ".ini");
12181218
inifilename = ReplaceAll(rom, ".sgb", ".ini");
1219+
} else if (settings.twl.romtype == 2) {
1220+
inifilename = ReplaceAll(rom, ".nes", ".ini");
1221+
inifilename = ReplaceAll(rom, ".fds", ".ini");
12191222
}
12201223
} else {
12211224
char path[256];
@@ -7280,12 +7283,18 @@ int main(){
72807283
rom = matching_files.at(settings.ui.cursorPosition).c_str();
72817284
}
72827285
}
7283-
} else {
7286+
} else if (settings.twl.romtype == 1) {
72847287
if(matching_files.size() == 0){
72857288
rom = gbfiles.at(settings.ui.cursorPosition).c_str();
72867289
} else {
72877290
rom = matching_files.at(settings.ui.cursorPosition).c_str();
72887291
}
7292+
} else if (settings.twl.romtype == 2) {
7293+
if(matching_files.size() == 0){
7294+
rom = nesfiles.at(settings.ui.cursorPosition).c_str();
7295+
} else {
7296+
rom = matching_files.at(settings.ui.cursorPosition).c_str();
7297+
}
72897298
}
72907299
LoadPerGameSettings();
72917300
}

0 commit comments

Comments
 (0)