diff --git a/source/CardManager.cpp b/source/CardManager.cpp index f04545e2..e18be6a5 100644 --- a/source/CardManager.cpp +++ b/source/CardManager.cpp @@ -399,13 +399,10 @@ void CardManager::GetCardChoicesForSlot(const UINT slot, const SS_CARDTYPE currC BYTE haveCard[CT_NUM_CARDS]; memset(haveCard, kInvalidSlot, sizeof(haveCard)); - for (UINT i = SLOT0; i < NUM_SLOTS; i++) + for (int i = SLOT0; i < NUM_SLOTS; i++) { if (IsSingleInstanceCard(currConfig[i])) - { haveCard[currConfig[i]] = i; - break; - } } for (UINT i = 0; i < sizeof(cards) / sizeof(cards[0]); i++) @@ -415,6 +412,12 @@ void CardManager::GetCardChoicesForSlot(const UINT slot, const SS_CARDTYPE currC if (thisCard == CT_VidHD && slot != SLOT3) continue; + // Prevent both Uthernet & Uthernet2 cards being plugged in at the same time + if (thisCard == CT_Uthernet && haveCard[CT_Uthernet2] != kInvalidSlot && haveCard[CT_Uthernet2] != slot) + continue; // Already have a Uthernet2 card selected in another slot, so prevent Uthernet + if (thisCard == CT_Uthernet2 && haveCard[CT_Uthernet] != kInvalidSlot && haveCard[CT_Uthernet] != slot) + continue; // Already have a Uthernet card selected in another slot, so prevent Uthernet2 + if (IsSingleInstanceCard(thisCard) && haveCard[thisCard] != kInvalidSlot && haveCard[thisCard] != slot) continue; diff --git a/source/Configuration/PageSound.cpp b/source/Configuration/PageSound.cpp index 2b08842d..9363cb2f 100644 --- a/source/Configuration/PageSound.cpp +++ b/source/Configuration/PageSound.cpp @@ -209,7 +209,7 @@ int CPageSound::CardTypeToComboItem(UINT slot) void CPageSound::InitOptions(HWND hWnd) { SS_CARDTYPE currConfig[NUM_SLOTS]; - for (UINT i = SLOT0; i < NUM_SLOTS; i++) + for (int i = SLOT0; i < NUM_SLOTS; i++) currConfig[i] = m_PropertySheetHelper.GetConfigNew().m_Slot[i]; if (IsApple2PlusOrClone(GetApple2Type()))