mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Port Main.DSP to MainSettings
While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature. This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings.
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/DSP/DSPAnalyzer.h"
|
||||
#include "Core/DSP/DSPCodeUtil.h"
|
||||
@ -53,7 +54,7 @@ void OSD_AddMessage(std::string str, u32 ms)
|
||||
|
||||
bool OnThread()
|
||||
{
|
||||
return SConfig::GetInstance().bDSPThread;
|
||||
return Config::Get(Config::MAIN_DSP_THREAD);
|
||||
}
|
||||
|
||||
bool IsWiiHost()
|
||||
@ -78,7 +79,7 @@ void CodeLoaded(DSPCore& dsp, const u8* ptr, size_t size)
|
||||
const u32 iram_crc = Common::HashEctor(ptr, size);
|
||||
state.SetIRAMCRC(iram_crc);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
if (Config::Get(Config::MAIN_DUMP_UCODE))
|
||||
{
|
||||
DSP::DumpDSPCode(ptr, size, iram_crc);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/DSP/DSPAccelerator.h"
|
||||
@ -120,11 +121,11 @@ static bool FillDSPInitOptions(DSPInitOptions* opts)
|
||||
|
||||
opts->core_type = DSPInitOptions::CoreType::Interpreter;
|
||||
#ifdef _M_X86
|
||||
if (SConfig::GetInstance().m_DSPEnableJIT)
|
||||
if (Config::Get(Config::MAIN_DSP_JIT))
|
||||
opts->core_type = DSPInitOptions::CoreType::JIT64;
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_DSPCaptureLog)
|
||||
if (Config::Get(Config::MAIN_DSP_CAPTURE_LOG))
|
||||
{
|
||||
const std::string pcap_path = File::GetUserPath(D_DUMPDSP_IDX) + "dsp.pcap";
|
||||
opts->capture_logger = new PCAPDSPCaptureLogger(pcap_path);
|
||||
@ -263,7 +264,7 @@ void DSPLLE::DSP_Update(int cycles)
|
||||
DSP_StopSoundStream();
|
||||
m_is_dsp_on_thread = false;
|
||||
m_request_disable_thread = false;
|
||||
SConfig::GetInstance().bDSPThread = false;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_DSP_THREAD, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user