DSPEmulator: Make CreateDSPEmulator return a unique_ptr
This commit is contained in:
1 parent
24c228c6e9
commit
2ff5923334
3 files changed
+15
-14
No files matched your search
@@ -23,11 +23,11 @@
|
||||
// the just used buffer through the AXList (or whatever it might be called in
|
||||
// Nintendo games).
|
||||
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include <memory>
|
||||
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/DSPEmulator.h"
|
||||
@@ -167,7 +167,7 @@ static ARAM_Info g_ARAM_Info;
|
||||
static u16 g_AR_MODE;
|
||||
static u16 g_AR_REFRESH;
|
||||
|
||||
static DSPEmulator *dsp_emulator;
|
||||
static std::unique_ptr<DSPEmulator> dsp_emulator;
|
||||
|
||||
static int dsp_slice = 0;
|
||||
static bool dsp_is_lle = false;
|
||||
@@ -230,9 +230,9 @@ void FlushInstantDMA(u32 address)
|
||||
}
|
||||
}
|
||||
|
||||
DSPEmulator *GetDSPEmulator()
|
||||
DSPEmulator* GetDSPEmulator()
|
||||
{
|
||||
return dsp_emulator;
|
||||
return dsp_emulator.get();
|
||||
}
|
||||
|
||||
void Init(bool hle)
|
||||
@@ -284,8 +284,7 @@ void Shutdown()
|
||||
}
|
||||
|
||||
dsp_emulator->Shutdown();
|
||||
delete dsp_emulator;
|
||||
dsp_emulator = nullptr;
|
||||
dsp_emulator.reset();
|
||||
}
|
||||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
|
||||
Reference in new issue
Block a user