Version 4.8a - Fixed CHEAT database handling.

This commit is contained in:
Dave Bernazzani 2024-01-27 17:16:45 -05:00
parent 66b40d4a41
commit 12bdfdf9cf
5 changed files with 13 additions and 10 deletions

View File

@ -14,7 +14,7 @@ include $(DEVKITARM)/ds_rules
export TARGET := NINTV-DS
export TOPDIR := $(CURDIR)
export VERSION := 4.8
export VERSION := 4.8a
ICON := -b $(CURDIR)/logo.bmp "NINTV-DS $(VERSION);wavemotion-dave;https://github.com/wavemotion-dave/NINTV-DS"

Binary file not shown.

View File

@ -161,7 +161,7 @@ void Emulator::Reset()
memoryBus.reset();
}
void Emulator::SetRip(Rip* rip)
void Emulator::SetRip(Rip* rip, BOOL bDeleteROMs)
{
if (this->currentRip != NULL) {
processorBus.removeAll();
@ -170,14 +170,17 @@ void Emulator::SetRip(Rip* rip)
audioMixer->removeAll();
inputConsumerBus.removeAll();
// If there are any ROMS attached to the old RIP, delete them now
for (UINT16 i = 0; i < this->currentRip->GetROMCount(); i++)
if (bDeleteROMs)
{
if (this->currentRip->GetROM(i))
// If there are any ROMS attached to the old RIP, delete them now
for (UINT16 i = 0; i < this->currentRip->GetROMCount(); i++)
{
delete this->currentRip->GetROM(i);
if (this->currentRip->GetROM(i))
{
delete this->currentRip->GetROM(i);
}
}
}
}
}
currentRip = rip;

View File

@ -46,7 +46,7 @@ class Emulator : public Peripheral
void UsePeripheral(UINT8, BOOL);
void SetRip(Rip* rip);
void SetRip(Rip* rip, BOOL bDeleteROMs);
void InitVideo(VideoBus* video, UINT32 width, UINT32 height);
void ReleaseVideo();

View File

@ -228,7 +228,7 @@ BOOL InitializeEmulator(void)
audioMixer->resetProcessor();
//put the RIP in the currentEmulator
currentEmu->SetRip(currentRip);
currentEmu->SetRip(currentRip, TRUE);
// Read out any Cheats from disk...
LoadCheats();
@ -522,7 +522,7 @@ void ds_handle_meta(int meta_key)
bCheatChanged = false;
//put the RIP in the currentEmulator
currentEmu->SetRip(currentRip);
currentEmu->SetRip(currentRip, FALSE);
// Apply any cheats/hacks to the current game (do this before loading Fast Memory)
currentEmu->ApplyCheats();