Mousecard: fix persisting card in slot-4 after a VM restart. (Fixes #993)

This commit is contained in:
tomcw
2021-10-19 21:56:19 +01:00
parent fa18382757
commit ca611eaa64
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -292,7 +292,7 @@ void CPageInput::DlgOK(HWND hWnd)
UINT uNewJoyType1 = SendDlgItemMessage(hWnd, IDC_JOYSTICK1, CB_GETCURSEL, 0, 0);
if (uNewJoyType1 >= J1C_MAX) uNewJoyType1 = 0; // GH#434
const bool bIsSlot4Mouse = m_PropertySheetHelper.GetConfigNew().m_Slot[4] == CT_MouseInterface;
const bool bIsSlot4Mouse = m_PropertySheetHelper.GetConfigNew().m_Slot[SLOT4] == CT_MouseInterface;
if (JoySetEmulationType(hWnd, m_nJoy0ChoiceTranlationTbl[uNewJoyType0], JN_JOYSTICK0, bIsSlot4Mouse))
{
@@ -381,7 +381,7 @@ void CPageInput::InitJoystickChoices(HWND hWnd, int nJoyNum, int nIdcValue)
pszMem += strlen(ppszJoyChoices[nJC_JOYSTICK])+1;
pnJoyTranslationTbl[nIdx++] = nJC_JOYSTICK;
const bool bIsSlot4Mouse = m_PropertySheetHelper.GetConfigNew().m_Slot[4] == CT_MouseInterface;
const bool bIsSlot4Mouse = m_PropertySheetHelper.GetConfigNew().m_Slot[SLOT4] == CT_MouseInterface;
// Now exclude:
// . the other Joystick type (if it exists) from this new list