diff --git a/help/CommandLine.html b/help/CommandLine.html index 68e3294a..1c09c7b2 100644 --- a/help/CommandLine.html +++ b/help/CommandLine.html @@ -64,15 +64,18 @@ -load-state <savestate>
Load a save-state file (and auto power-on the Apple II).
NB. This takes precedent over the -d1, -d2, -s#d#, -h1, -h2, s0-7, -model and -r switches.

- -f
- Start in full-screen mode

+ -f or -full-screen
+ Start in full-screen mode.

+ -no-full-screen
+ Start in Windowed mode (default).

-fs-height=<best|nnnn>
- Use to select a better resolution for full-screen mode.
+ Use to select a better resolution for full-screen or Windowed mode.
- NB. This changes the display resolution (and restores on exit).

+ NB. This changes the display resolution (and restores on exit).
+ NB. Specify -no-full-screen after this switch for Windowed mode. Without this it'll just default to full-screen.

-rom <file>
Use custom 12K ROM (at $D000) for Apple II machine, or 16K ROM (at $C000) for Apple //e machine.

-f8rom <file>
diff --git a/source/CmdLine.cpp b/source/CmdLine.cpp index 416e8051..37c370fc 100644 --- a/source/CmdLine.cpp +++ b/source/CmdLine.cpp @@ -189,14 +189,18 @@ bool ProcessCmdLine(LPSTR lpCmdLine) lpNextArg = GetNextArg(lpNextArg); g_cmdLine.szSnapshotName = lpCmdLine; } - else if (strcmp(lpCmdLine, "-f") == 0) + else if (strcmp(lpCmdLine, "-f") == 0 || strcmp(lpCmdLine, "-full-screen") == 0) { g_cmdLine.bSetFullScreen = true; } + else if (strcmp(lpCmdLine, "-no-full-screen") == 0) + { + g_cmdLine.bSetFullScreen = false; + } #define CMD_FS_HEIGHT "-fs-height=" else if (strncmp(lpCmdLine, CMD_FS_HEIGHT, sizeof(CMD_FS_HEIGHT)-1) == 0) { - g_cmdLine.bSetFullScreen = true; // Implied + g_cmdLine.bSetFullScreen = true; // Implied. Can be overridden by "-no-full-screen" LPSTR lpTmp = lpCmdLine + sizeof(CMD_FS_HEIGHT)-1; bool bRes = false; diff --git a/source/Windows/AppleWin.cpp b/source/Windows/AppleWin.cpp index dd35cca7..151c6688 100644 --- a/source/Windows/AppleWin.cpp +++ b/source/Windows/AppleWin.cpp @@ -989,23 +989,23 @@ static void RepeatInitialization(void) } else { + if (g_cmdLine.bestWidth && g_cmdLine.bestHeight) + { + DEVMODE devMode; + memset(&devMode, 0, sizeof(devMode)); + devMode.dmSize = sizeof(devMode); + devMode.dmPelsWidth = g_cmdLine.bestWidth; + devMode.dmPelsHeight = g_cmdLine.bestHeight; + devMode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; + + DWORD dwFlags = 0; + LONG res = ChangeDisplaySettings(&devMode, dwFlags); + if (res == 0) + g_cmdLine.bChangedDisplayResolution = true; + } + if (g_cmdLine.bSetFullScreen) { - if (g_cmdLine.bestWidth && g_cmdLine.bestHeight) - { - DEVMODE devMode; - memset(&devMode, 0, sizeof(devMode)); - devMode.dmSize = sizeof(devMode); - devMode.dmPelsWidth = g_cmdLine.bestWidth; - devMode.dmPelsHeight = g_cmdLine.bestHeight; - devMode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; - - DWORD dwFlags = 0; - LONG res = ChangeDisplaySettings(&devMode, dwFlags); - if (res == 0) - g_cmdLine.bChangedDisplayResolution = true; - } - PostMessage(g_hFrameWindow, WM_USER_FULLSCREEN, 0, 0); g_cmdLine.bSetFullScreen = false; }