Merge pull request #381 from SamuelFontes/issues/361
361: Game directory window appears every time
This commit is contained in:
commit
c96854f1f1
|
@ -21,8 +21,11 @@ int main(int argc, char* argv[]) {
|
||||||
Config::load(user_dir / "config.toml");
|
Config::load(user_dir / "config.toml");
|
||||||
std::filesystem::create_directory(user_dir / "game_data");
|
std::filesystem::create_directory(user_dir / "game_data");
|
||||||
|
|
||||||
|
// Check if elf or eboot.bin path was passed as a command line argument
|
||||||
|
bool has_command_line_argument = argc > 1;
|
||||||
|
|
||||||
// Check if the game install directory is set
|
// Check if the game install directory is set
|
||||||
if (Config::getGameInstallDir() == "") {
|
if (Config::getGameInstallDir() == "" && !has_command_line_argument) {
|
||||||
GameInstallDialog dlg;
|
GameInstallDialog dlg;
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
@ -35,7 +38,7 @@ int main(int argc, char* argv[]) {
|
||||||
m_main_window->Init();
|
m_main_window->Init();
|
||||||
|
|
||||||
// Check for command line arguments
|
// Check for command line arguments
|
||||||
if (argc > 1) {
|
if (has_command_line_argument) {
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
emulator.Run(argv[1]);
|
emulator.Run(argv[1]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue