mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
convert SPU to OOP
This commit is contained in:
14
src/SPI.cpp
14
src/SPI.cpp
@ -533,7 +533,11 @@ SPIHost::SPIHost()
|
||||
|
||||
Devices[SPIDevice_FirmwareMem] = new FirmwareMem(this);
|
||||
Devices[SPIDevice_PowerMan] = new PowerMan(this);
|
||||
Devices[SPIDevice_TSC] = nullptr;
|
||||
|
||||
if (NDS::ConsoleType == 1)
|
||||
Devices[SPIDevice_TSC] = new DSi_TSC(this);
|
||||
else
|
||||
Devices[SPIDevice_TSC] = new TSC(this);
|
||||
}
|
||||
|
||||
SPIHost::~SPIHost()
|
||||
@ -553,14 +557,6 @@ void SPIHost::Reset()
|
||||
{
|
||||
Cnt = 0;
|
||||
|
||||
if (Devices[SPIDevice_TSC])
|
||||
delete Devices[SPIDevice_TSC];
|
||||
|
||||
if (NDS::ConsoleType == 1)
|
||||
Devices[SPIDevice_TSC] = new DSi_TSC(this);
|
||||
else
|
||||
Devices[SPIDevice_TSC] = new TSC(this);
|
||||
|
||||
for (int i = 0; i < SPIDevice_MAX; i++)
|
||||
{
|
||||
Devices[i]->Reset();
|
||||
|
Reference in New Issue
Block a user