mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-23 21:34:06 +00:00
Exit with a non-0 exit code if there are errors
More correct behavior (and makes the Infinite Mac wrapper not close the emulated Mac, which it does when it thinks there was a graceful shutdown).
This commit is contained in:
parent
838ccdd7b4
commit
5a5ae9fd16
8
main.cpp
8
main.cpp
@ -140,7 +140,7 @@ int main(int argc, char** argv) {
|
||||
machine_str = MachineFactory::machine_name_from_rom(bootrom_path);
|
||||
if (machine_str.empty()) {
|
||||
LOG_F(ERROR, "Could not autodetect machine");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
LOG_F(INFO, "Machine was autodetected as: %s", machine_str.c_str());
|
||||
@ -150,7 +150,7 @@ int main(int argc, char** argv) {
|
||||
/* handle overriding of machine settings from command line */
|
||||
map<string, string> settings;
|
||||
if (MachineFactory::get_machine_settings(machine_str, settings) < 0) {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
CLI::App sa;
|
||||
@ -168,7 +168,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO)) {
|
||||
LOG_F(ERROR, "SDL_Init error: %s", SDL_GetError());
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// initialize global profiler object
|
||||
@ -206,7 +206,7 @@ int main(int argc, char** argv) {
|
||||
break;
|
||||
default:
|
||||
LOG_F(ERROR, "Invalid EXECUTION MODE");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bail:
|
||||
|
Loading…
x
Reference in New Issue
Block a user