mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Add a new Registry Configuration interface: "Game I/O Connector" (like Slots).
Change Config->Advanced to show 'Game I/O Connector' (instead of 'Copy Protection Dongle').
This commit is contained in:
@@ -155,6 +155,9 @@ void RegSaveValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD value) {
|
||||
//===========================================================================
|
||||
static inline std::string RegGetSlotSection(UINT slot)
|
||||
{
|
||||
if (slot == GAME_IO_CONNECTOR)
|
||||
return std::string(REG_CONFIG_GAME_IO_CONNECTOR);
|
||||
|
||||
return (slot == SLOT_AUX)
|
||||
? std::string(REG_CONFIG_SLOT_AUX)
|
||||
: (std::string(REG_CONFIG_SLOT) + (char)('0' + slot));
|
||||
@@ -197,6 +200,8 @@ void RegDeleteConfigSlotSection(UINT slot)
|
||||
|
||||
void RegSetConfigSlotNewCardType(UINT slot, SS_CARDTYPE type)
|
||||
{
|
||||
_ASSERT(slot != GAME_IO_CONNECTOR);
|
||||
|
||||
RegDeleteConfigSlotSection(slot);
|
||||
|
||||
std::string regSection;
|
||||
@@ -204,3 +209,17 @@ void RegSetConfigSlotNewCardType(UINT slot, SS_CARDTYPE type)
|
||||
|
||||
RegSaveValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, type);
|
||||
}
|
||||
|
||||
void RegSetConfigGameIOConnectorNewDongleType(UINT slot, DONGLETYPE type)
|
||||
{
|
||||
_ASSERT(slot == GAME_IO_CONNECTOR);
|
||||
if (slot != GAME_IO_CONNECTOR)
|
||||
return;
|
||||
|
||||
RegDeleteConfigSlotSection(slot);
|
||||
|
||||
std::string regSection;
|
||||
regSection = RegGetConfigSlotSection(slot);
|
||||
|
||||
RegSaveValue(regSection.c_str(), REGVALUE_GAME_IO_TYPE, TRUE, type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user