mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-19 07:37:12 +00:00
Card: cleanup interface. (PR #1059)
1) Remove Init() 2) Call Reset() via CardManager 3) Call Destroy() via CardManager (only used by Disks/Harddisk) on WM_DESTROY The only "real" changes are in CSuperSerialCard: ensure destructor cleans up and remove Destroy().
This commit is contained in:
+6
-16
@@ -126,6 +126,10 @@ void CSuperSerialCard::InternalReset()
|
||||
|
||||
CSuperSerialCard::~CSuperSerialCard()
|
||||
{
|
||||
CloseComm();
|
||||
|
||||
delete [] m_pExpansionRom;
|
||||
m_pExpansionRom = NULL;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@@ -959,19 +963,15 @@ void CSuperSerialCard::InitializeIO(LPBYTE pCxRomPeripheral)
|
||||
if (m_pExpansionRom == NULL)
|
||||
{
|
||||
m_pExpansionRom = new BYTE [SSC_FW_SIZE];
|
||||
|
||||
if (m_pExpansionRom)
|
||||
memcpy(m_pExpansionRom, pData, SSC_FW_SIZE);
|
||||
memcpy(m_pExpansionRom, pData, SSC_FW_SIZE);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
RegisterIoHandler(m_slot, &CSuperSerialCard::SSC_IORead, &CSuperSerialCard::SSC_IOWrite, NULL, NULL, this, m_pExpansionRom);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void CSuperSerialCard::CommReset()
|
||||
void CSuperSerialCard::Reset(const bool /* powerCycle */)
|
||||
{
|
||||
CloseComm();
|
||||
|
||||
@@ -980,16 +980,6 @@ void CSuperSerialCard::CommReset()
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void CSuperSerialCard::CommDestroy()
|
||||
{
|
||||
CommReset();
|
||||
|
||||
delete [] m_pExpansionRom;
|
||||
m_pExpansionRom = NULL;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
// dwNewSerialPortItem is the drop-down list item
|
||||
void CSuperSerialCard::CommSetSerialPort(DWORD dwNewSerialPortItem)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user