From eec1f6928aada03c4d417ccafccf88ff6ccd8a99 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sun, 5 Dec 2004 15:28:39 +0000 Subject: [PATCH] add --cdboot command line option akin to MoL's --- BasiliskII/src/Windows/main_windows.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BasiliskII/src/Windows/main_windows.cpp b/BasiliskII/src/Windows/main_windows.cpp index 52b09214..07794e4e 100755 --- a/BasiliskII/src/Windows/main_windows.cpp +++ b/BasiliskII/src/Windows/main_windows.cpp @@ -38,6 +38,7 @@ using std::string; #include "xpram.h" #include "timer.h" #include "video.h" +#include "cdrom.h" #include "emul_op.h" #include "prefs.h" #include "prefs_editor.h" @@ -210,6 +211,7 @@ static void usage(const char *prg_name) int main(int argc, char **argv) { char str[256]; + bool cd_boot = false; // Initialize variables RAMBaseHost = NULL; @@ -241,6 +243,9 @@ int main(int argc, char **argv) } else if (strcmp(argv[i], "--rominfo") == 0) { argv[i] = NULL; PrintROMInfo = true; + } else if (strcmp(argv[i], "--cdboot") == 0) { + argv[i] = NULL; + cd_boot = true; } } @@ -261,6 +266,10 @@ int main(int argc, char **argv) // Read preferences PrefsInit(argc, argv); + // Boot MacOS from CD-ROM? + if (cd_boot) + PrefsReplaceInt32("bootdriver", CDROMRefNum); + // Any command line arguments left? for (int i=1; i