Skip to content

Commit

Permalink
Support starting without a file
Browse files Browse the repository at this point in the history
  • Loading branch information
emoon committed Feb 21, 2024
1 parent 2134e72 commit e01df20
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/quaesar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ int main(int argc, char** argv) {
default_prefs(&currprefs, true, 0);
fixup_prefs(&currprefs, true);

// TODO: cleanup
if (ends_with(options.input.c_str(), ".exe") || !ends_with(options.input.c_str(), ".adf")) {
Adf::create_for_exefile(options.input.c_str());
strcpy(currprefs.floppyslots[0].df, "dummy.adf");
} else {
strcpy(currprefs.floppyslots[0].df, options.input.c_str());
if (!options.input.empty()) {
// TODO: cleanup
if (ends_with(options.input.c_str(), ".exe") || !ends_with(options.input.c_str(), ".adf")) {
Adf::create_for_exefile(options.input.c_str());
strcpy(currprefs.floppyslots[0].df, "dummy.adf");
} else {
strcpy(currprefs.floppyslots[0].df, options.input.c_str());
}
}

// Most compatible mode
Expand Down

0 comments on commit e01df20

Please sign in to comment.