mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-23 16:30:23 +00:00
Added new command line: -multimon
By default, when AppleWin starts, if the emulator is off the primary screen it will reset the position to re-center it. If -multimon is specified AppleWin will keep the existing X, and Y position so that it starts up on the secondary monitor.
This commit is contained in:
parent
a7781fc89c
commit
817261d0e8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user