diff --git a/AppleWin/source/Applewin.cpp b/AppleWin/source/Applewin.cpp index 190ed894..2a52db41 100644 --- a/AppleWin/source/Applewin.cpp +++ b/AppleWin/source/Applewin.cpp @@ -868,7 +868,10 @@ int APIENTRY WinMain (HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int) { g_bEnableSpeech = true; } - + else if(strcmp(lpCmdLine,"-multimon") == 0) + { + g_bMultiMon = true; + } lpCmdLine = lpNextArg; } diff --git a/AppleWin/source/Frame.cpp b/AppleWin/source/Frame.cpp index c15e620a..6a6efa96 100644 --- a/AppleWin/source/Frame.cpp +++ b/AppleWin/source/Frame.cpp @@ -96,6 +96,7 @@ static RECT framerect = {0,0,0,0}; HWND g_hFrameWindow = (HWND)0; BOOL g_bIsFullScreen = 0; + BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is static BOOL helpquit = 0; static BOOL g_bPaintingWindow = 0; @@ -1839,7 +1840,7 @@ void FrameCreateWindow () + GetSystemMetrics(SM_CYCAPTION) + MAGICY; - // + // Restore Window X Position int nXPos = -1; { @@ -1847,15 +1848,15 @@ void FrameCreateWindow () if (RegLoadValue(TEXT(REG_PREFS), TEXT("Window X-Position"), 1, (DWORD*)&nXPos)) { - if (nXPos > nXScreen) + if ((nXPos > nXScreen) && !g_bMultiMon) nXPos = -1; // Not fully visible, so default to centre position } - if (nXPos == -1) + if ((nXPos == -1) && !g_bMultiMon) nXPos = nXScreen / 2; } - // + // Restore Window Y Position int nYPos = -1; { @@ -1863,11 +1864,11 @@ void FrameCreateWindow () if (RegLoadValue(TEXT(REG_PREFS), TEXT("Window Y-Position"), 1, (DWORD*)&nYPos)) { - if (nYPos > nYScreen) + if ((nYPos > nYScreen) && !g_bMultiMon) nYPos = -1; // Not fully visible, so default to centre position } - if (nYPos == -1) + if ((nYPos == -1) && g_bMultiMon) nYPos = nYScreen / 2; } diff --git a/AppleWin/source/Frame.h b/AppleWin/source/Frame.h index 161474f7..af1a8e2c 100644 --- a/AppleWin/source/Frame.h +++ b/AppleWin/source/Frame.h @@ -24,6 +24,7 @@ extern HWND g_hFrameWindow; extern HDC g_hFrameDC; extern BOOL g_bIsFullScreen; + extern BOOL g_bMultiMon; // Emulator extern bool g_bFreshReset;