mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
Cmd line: Ensure that -swap-buttons takes priority over Registry
This commit is contained in:
parent
7d147d4e89
commit
84e0ef4ef8
@ -1250,6 +1250,7 @@ struct CmdLine
|
|||||||
bChangedDisplayResolution = false;
|
bChangedDisplayResolution = false;
|
||||||
bSlot0LanguageCard = false;
|
bSlot0LanguageCard = false;
|
||||||
bSlot7EmptyOnExit = false;
|
bSlot7EmptyOnExit = false;
|
||||||
|
bSwapButtons0and1 = false;
|
||||||
bestWidth = 0;
|
bestWidth = 0;
|
||||||
bestHeight = 0;
|
bestHeight = 0;
|
||||||
szImageName_harddisk[HARDDISK_1] = NULL;
|
szImageName_harddisk[HARDDISK_1] = NULL;
|
||||||
@ -1281,6 +1282,7 @@ struct CmdLine
|
|||||||
bool bSlot0LanguageCard;
|
bool bSlot0LanguageCard;
|
||||||
bool bSlotEmpty[NUM_SLOTS];
|
bool bSlotEmpty[NUM_SLOTS];
|
||||||
bool bSlot7EmptyOnExit;
|
bool bSlot7EmptyOnExit;
|
||||||
|
bool bSwapButtons0and1;
|
||||||
SS_CARDTYPE slotInsert[NUM_SLOTS];
|
SS_CARDTYPE slotInsert[NUM_SLOTS];
|
||||||
UINT bestWidth;
|
UINT bestWidth;
|
||||||
UINT bestHeight;
|
UINT bestHeight;
|
||||||
@ -1593,7 +1595,7 @@ static bool ProcessCmdLine(LPSTR lpCmdLine)
|
|||||||
}
|
}
|
||||||
else if (strcmp(lpCmdLine, "-swap-buttons") == 0)
|
else if (strcmp(lpCmdLine, "-swap-buttons") == 0)
|
||||||
{
|
{
|
||||||
sg_PropertySheet.SetButtonsSwapState(true);
|
g_cmdLine.bSwapButtons0and1 = true;
|
||||||
}
|
}
|
||||||
else if (strcmp(lpCmdLine, "-spkr-inc") == 0)
|
else if (strcmp(lpCmdLine, "-spkr-inc") == 0)
|
||||||
{
|
{
|
||||||
@ -1856,6 +1858,12 @@ static void RepeatInitialization(void)
|
|||||||
g_cmdLine.bSlot0LanguageCard = false; // Don't reapply after a restart
|
g_cmdLine.bSlot0LanguageCard = false; // Don't reapply after a restart
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_cmdLine.bSwapButtons0and1)
|
||||||
|
{
|
||||||
|
sg_PropertySheet.SetButtonsSwapState(true);
|
||||||
|
// Reapply after a restart - TODO: grey-out the Config UI for "Swap 0/1" when this cmd line is passed in
|
||||||
|
}
|
||||||
|
|
||||||
DebugInitialize();
|
DebugInitialize();
|
||||||
LogFileOutput("Main: DebugInitialize()\n");
|
LogFileOutput("Main: DebugInitialize()\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user