mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Merge pull request #10144 from malleoz/dsp-onion
Port Main.DSP to MainSettings
This commit is contained in:
@ -82,22 +82,18 @@ private:
|
||||
bool bMMU = false;
|
||||
bool bLowDCBZHack = false;
|
||||
bool bDisableICache = false;
|
||||
bool m_EnableJIT = false;
|
||||
bool bSyncGPU = false;
|
||||
int iSyncGpuMaxDistance = 0;
|
||||
int iSyncGpuMinDistance = 0;
|
||||
float fSyncGpuOverclock = 0;
|
||||
bool bFastDiscSpeed = false;
|
||||
bool bDSPHLE = false;
|
||||
bool bHLE_BS2 = false;
|
||||
int iSelectedLanguage = 0;
|
||||
PowerPC::CPUCore cpu_core = PowerPC::CPUCore::Interpreter;
|
||||
int Volume = 0;
|
||||
float m_EmulationSpeed = 0;
|
||||
float m_OCFactor = 0;
|
||||
bool m_OCEnable = false;
|
||||
bool m_bt_passthrough_enabled = false;
|
||||
std::string sBackend;
|
||||
std::string m_strGPUDeterminismMode;
|
||||
std::array<WiimoteSource, MAX_BBMOTES> iWiimoteSource{};
|
||||
std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS> Pads{};
|
||||
@ -117,19 +113,15 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||
bAccurateNaNs = config.bAccurateNaNs;
|
||||
bDisableICache = config.bDisableICache;
|
||||
bMMU = config.bMMU;
|
||||
m_EnableJIT = config.m_DSPEnableJIT;
|
||||
bSyncGPU = config.bSyncGPU;
|
||||
iSyncGpuMaxDistance = config.iSyncGpuMaxDistance;
|
||||
iSyncGpuMinDistance = config.iSyncGpuMinDistance;
|
||||
fSyncGpuOverclock = config.fSyncGpuOverclock;
|
||||
bFastDiscSpeed = config.bFastDiscSpeed;
|
||||
bDSPHLE = config.bDSPHLE;
|
||||
bHLE_BS2 = config.bHLE_BS2;
|
||||
iSelectedLanguage = config.SelectedLanguage;
|
||||
cpu_core = config.cpu_core;
|
||||
Volume = config.m_Volume;
|
||||
m_EmulationSpeed = config.m_EmulationSpeed;
|
||||
sBackend = config.sBackend;
|
||||
m_strGPUDeterminismMode = config.m_strGPUDeterminismMode;
|
||||
m_OCFactor = config.m_OCFactor;
|
||||
m_OCEnable = config.m_OCEnable;
|
||||
@ -165,22 +157,17 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||
config->bDisableICache = bDisableICache;
|
||||
config->bMMU = bMMU;
|
||||
config->bLowDCBZHack = bLowDCBZHack;
|
||||
config->m_DSPEnableJIT = m_EnableJIT;
|
||||
config->bSyncGPU = bSyncGPU;
|
||||
config->iSyncGpuMaxDistance = iSyncGpuMaxDistance;
|
||||
config->iSyncGpuMinDistance = iSyncGpuMinDistance;
|
||||
config->fSyncGpuOverclock = fSyncGpuOverclock;
|
||||
config->bFastDiscSpeed = bFastDiscSpeed;
|
||||
config->bDSPHLE = bDSPHLE;
|
||||
config->bHLE_BS2 = bHLE_BS2;
|
||||
config->SelectedLanguage = iSelectedLanguage;
|
||||
config->cpu_core = cpu_core;
|
||||
|
||||
// Only change these back if they were actually set by game ini, since they can be changed while a
|
||||
// game is running.
|
||||
if (bSetVolume)
|
||||
config->m_Volume = Volume;
|
||||
|
||||
if (config->bWii)
|
||||
{
|
||||
for (unsigned int i = 0; i < MAX_BBMOTES; ++i)
|
||||
@ -205,7 +192,6 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||
config->m_EXIDevice[i] = m_EXIDevice[i];
|
||||
}
|
||||
|
||||
config->sBackend = sBackend;
|
||||
config->m_strGPUDeterminismMode = m_strGPUDeterminismMode;
|
||||
config->m_OCFactor = m_OCFactor;
|
||||
config->m_OCEnable = m_OCEnable;
|
||||
@ -255,7 +241,6 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
|
||||
// General settings
|
||||
IniFile::Section* core_section = game_ini.GetOrCreateSection("Core");
|
||||
IniFile::Section* dsp_section = game_ini.GetOrCreateSection("DSP");
|
||||
IniFile::Section* controls_section = game_ini.GetOrCreateSection("Controls");
|
||||
|
||||
core_section->Get("CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||
@ -272,17 +257,12 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
core_section->Get("LowDCBZHack", &StartUp.bLowDCBZHack, StartUp.bLowDCBZHack);
|
||||
core_section->Get("SyncGPU", &StartUp.bSyncGPU, StartUp.bSyncGPU);
|
||||
core_section->Get("FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
|
||||
core_section->Get("DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
|
||||
core_section->Get("CPUCore", &StartUp.cpu_core, StartUp.cpu_core);
|
||||
core_section->Get("HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2);
|
||||
core_section->Get("GameCubeLanguage", &StartUp.SelectedLanguage, StartUp.SelectedLanguage);
|
||||
if (core_section->Get("EmulationSpeed", &StartUp.m_EmulationSpeed, StartUp.m_EmulationSpeed))
|
||||
config_cache.bSetEmulationSpeed = true;
|
||||
|
||||
if (dsp_section->Get("Volume", &StartUp.m_Volume, StartUp.m_Volume))
|
||||
config_cache.bSetVolume = true;
|
||||
dsp_section->Get("EnableJIT", &StartUp.m_DSPEnableJIT, StartUp.m_DSPEnableJIT);
|
||||
dsp_section->Get("Backend", &StartUp.sBackend, StartUp.sBackend);
|
||||
core_section->Get("GPUDeterminismMode", &StartUp.m_strGPUDeterminismMode,
|
||||
StartUp.m_strGPUDeterminismMode);
|
||||
core_section->Get("Overclock", &StartUp.m_OCFactor, StartUp.m_OCFactor);
|
||||
@ -334,7 +314,6 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
// TODO: remove this once ConfigManager starts using OnionConfig.
|
||||
StartUp.bCPUThread = Config::Get(Config::MAIN_CPU_THREAD);
|
||||
StartUp.bJITFollowBranch = Config::Get(Config::MAIN_JIT_FOLLOW_BRANCH);
|
||||
StartUp.bDSPHLE = Config::Get(Config::MAIN_DSP_HLE);
|
||||
StartUp.bFastDiscSpeed = Config::Get(Config::MAIN_FAST_DISC_SPEED);
|
||||
StartUp.cpu_core = Config::Get(Config::MAIN_CPU_CORE);
|
||||
StartUp.bSyncGPU = Config::Get(Config::MAIN_SYNC_GPU);
|
||||
@ -361,12 +340,10 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
const NetPlay::NetSettings& netplay_settings = NetPlay::GetNetSettings();
|
||||
Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(netplay_settings));
|
||||
StartUp.bCPUThread = netplay_settings.m_CPUthread;
|
||||
StartUp.bDSPHLE = netplay_settings.m_DSPHLE;
|
||||
StartUp.bCopyWiiSaveNetplay = netplay_settings.m_CopyWiiSave;
|
||||
StartUp.cpu_core = netplay_settings.m_CPUcore;
|
||||
StartUp.SelectedLanguage = netplay_settings.m_SelectedLanguage;
|
||||
StartUp.bOverrideRegionSettings = netplay_settings.m_OverrideRegionSettings;
|
||||
StartUp.m_DSPEnableJIT = netplay_settings.m_DSPEnableJIT;
|
||||
StartUp.m_OCEnable = netplay_settings.m_OCEnable;
|
||||
StartUp.m_OCFactor = netplay_settings.m_OCFactor;
|
||||
StartUp.m_EXIDevice[0] = netplay_settings.m_EXIDevice[0];
|
||||
|
@ -131,6 +131,7 @@ const Info<bool> MAIN_DISABLE_SCREENSAVER{{System::Main, "Display", "DisableScre
|
||||
|
||||
// Main.DSP
|
||||
|
||||
const Info<bool> MAIN_DSP_THREAD{{System::Main, "DSP", "DSPThread"}, false};
|
||||
const Info<bool> MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false};
|
||||
const Info<bool> MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true};
|
||||
const Info<bool> MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false};
|
||||
@ -139,6 +140,15 @@ const Info<bool> MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false};
|
||||
const Info<std::string> MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"},
|
||||
AudioCommon::GetDefaultSoundBackend()};
|
||||
const Info<int> MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100};
|
||||
const Info<bool> MAIN_AUDIO_MUTED{{System::Main, "DSP", "Muted"}, false};
|
||||
#ifdef _WIN32
|
||||
const Info<std::string> MAIN_WASAPI_DEVICE{{System::Main, "DSP", "WASAPIDevice"}, "Default"};
|
||||
#endif
|
||||
|
||||
bool ShouldUseDPL2Decoder()
|
||||
{
|
||||
return Get(MAIN_DPL2_DECODER) && !Get(MAIN_DSP_HLE);
|
||||
}
|
||||
|
||||
// Main.General
|
||||
|
||||
|
@ -6,9 +6,19 @@
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
|
||||
// DSP Backend Types
|
||||
#define BACKEND_NULLSOUND _trans("No Audio Output")
|
||||
#define BACKEND_ALSA "ALSA"
|
||||
#define BACKEND_CUBEB "Cubeb"
|
||||
#define BACKEND_OPENAL "OpenAL"
|
||||
#define BACKEND_PULSEAUDIO "Pulse"
|
||||
#define BACKEND_OPENSLES "OpenSLES"
|
||||
#define BACKEND_WASAPI _trans("WASAPI (Exclusive Mode)")
|
||||
|
||||
namespace PowerPC
|
||||
{
|
||||
enum class CPUCore;
|
||||
@ -93,6 +103,7 @@ extern const Info<bool> MAIN_REAL_WII_REMOTE_REPEAT_REPORTS;
|
||||
|
||||
// Main.DSP
|
||||
|
||||
extern const Info<bool> MAIN_DSP_THREAD;
|
||||
extern const Info<bool> MAIN_DSP_CAPTURE_LOG;
|
||||
extern const Info<bool> MAIN_DSP_JIT;
|
||||
extern const Info<bool> MAIN_DUMP_AUDIO;
|
||||
@ -100,6 +111,12 @@ extern const Info<bool> MAIN_DUMP_AUDIO_SILENT;
|
||||
extern const Info<bool> MAIN_DUMP_UCODE;
|
||||
extern const Info<std::string> MAIN_AUDIO_BACKEND;
|
||||
extern const Info<int> MAIN_AUDIO_VOLUME;
|
||||
extern const Info<bool> MAIN_AUDIO_MUTED;
|
||||
#ifdef _WIN32
|
||||
extern const Info<std::string> MAIN_WASAPI_DEVICE;
|
||||
#endif
|
||||
|
||||
bool ShouldUseDPL2Decoder();
|
||||
|
||||
// Main.Display
|
||||
|
||||
|
@ -25,8 +25,8 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
||||
|
||||
if (config_location.system == Config::System::Main)
|
||||
{
|
||||
for (const std::string_view section :
|
||||
{"NetPlay", "General", "GBA", "Display", "Network", "Analytics", "AndroidOverlayButtons"})
|
||||
for (const std::string_view section : {"NetPlay", "General", "GBA", "Display", "Network",
|
||||
"Analytics", "AndroidOverlayButtons", "DSP"})
|
||||
{
|
||||
if (config_location.section == section)
|
||||
return true;
|
||||
@ -57,6 +57,9 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
||||
&Config::MAIN_ALLOW_SD_WRITES.GetLocation(),
|
||||
&Config::MAIN_DPL2_DECODER.GetLocation(),
|
||||
&Config::MAIN_DPL2_QUALITY.GetLocation(),
|
||||
&Config::MAIN_AUDIO_LATENCY.GetLocation(),
|
||||
&Config::MAIN_AUDIO_STRETCH.GetLocation(),
|
||||
&Config::MAIN_AUDIO_STRETCH_LATENCY.GetLocation(),
|
||||
&Config::MAIN_RAM_OVERRIDE_ENABLE.GetLocation(),
|
||||
&Config::MAIN_MEM1_SIZE.GetLocation(),
|
||||
&Config::MAIN_MEM2_SIZE.GetLocation(),
|
||||
@ -64,6 +67,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
||||
&Config::MAIN_ENABLE_SAVESTATES.GetLocation(),
|
||||
&Config::MAIN_FALLBACK_REGION.GetLocation(),
|
||||
&Config::MAIN_REAL_WII_REMOTE_REPEAT_REPORTS.GetLocation(),
|
||||
&Config::MAIN_DSP_HLE.GetLocation(),
|
||||
|
||||
// Main.Interface
|
||||
|
||||
|
@ -93,7 +93,6 @@ void SConfig::SaveSettings()
|
||||
SaveGameListSettings(ini);
|
||||
SaveCoreSettings(ini);
|
||||
SaveMovieSettings(ini);
|
||||
SaveDSPSettings(ini);
|
||||
SaveInputSettings(ini);
|
||||
SaveFifoPlayerSettings(ini);
|
||||
SaveBluetoothPassthroughSettings(ini);
|
||||
@ -207,7 +206,6 @@ void SConfig::SaveCoreSettings(IniFile& ini)
|
||||
core->Set("CPUCore", cpu_core);
|
||||
core->Set("Fastmem", bFastmem);
|
||||
core->Set("CPUThread", bCPUThread);
|
||||
core->Set("DSPHLE", bDSPHLE);
|
||||
core->Set("SyncOnSkipIdle", bSyncGPUOnSkipIdleHack);
|
||||
core->Set("SyncGPU", bSyncGPU);
|
||||
core->Set("SyncGpuMaxDistance", iSyncGpuMaxDistance);
|
||||
@ -219,10 +217,6 @@ void SConfig::SaveCoreSettings(IniFile& ini)
|
||||
core->Set("AccurateNaNs", bAccurateNaNs);
|
||||
core->Set("SelectedLanguage", SelectedLanguage);
|
||||
core->Set("OverrideRegionSettings", bOverrideRegionSettings);
|
||||
core->Set("DPL2Decoder", bDPL2Decoder);
|
||||
core->Set("AudioLatency", iLatency);
|
||||
core->Set("AudioStretch", m_audio_stretch);
|
||||
core->Set("AudioStretchMaxLatency", m_audio_stretch_max_latency);
|
||||
core->Set("AgpCartAPath", m_strGbaCartA);
|
||||
core->Set("AgpCartBPath", m_strGbaCartB);
|
||||
core->Set("SlotA", m_EXIDevice[0]);
|
||||
@ -266,23 +260,6 @@ void SConfig::SaveMovieSettings(IniFile& ini)
|
||||
movie->Set("ShowRTC", m_ShowRTC);
|
||||
}
|
||||
|
||||
void SConfig::SaveDSPSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
||||
|
||||
dsp->Set("EnableJIT", m_DSPEnableJIT);
|
||||
dsp->Set("DumpAudio", m_DumpAudio);
|
||||
dsp->Set("DumpAudioSilent", m_DumpAudioSilent);
|
||||
dsp->Set("DumpUCode", m_DumpUCode);
|
||||
dsp->Set("Backend", sBackend);
|
||||
dsp->Set("Volume", m_Volume);
|
||||
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
||||
|
||||
#ifdef _WIN32
|
||||
dsp->Set("WASAPIDevice", sWASAPIDevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SConfig::SaveInputSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
||||
@ -358,7 +335,6 @@ void SConfig::LoadSettings()
|
||||
LoadGameListSettings(ini);
|
||||
LoadCoreSettings(ini);
|
||||
LoadMovieSettings(ini);
|
||||
LoadDSPSettings(ini);
|
||||
LoadInputSettings(ini);
|
||||
LoadFifoPlayerSettings(ini);
|
||||
LoadBluetoothPassthroughSettings(ini);
|
||||
@ -470,17 +446,12 @@ void SConfig::LoadCoreSettings(IniFile& ini)
|
||||
#endif
|
||||
core->Get("JITFollowBranch", &bJITFollowBranch, true);
|
||||
core->Get("Fastmem", &bFastmem, true);
|
||||
core->Get("DSPHLE", &bDSPHLE, true);
|
||||
core->Get("TimingVariance", &iTimingVariance, 40);
|
||||
core->Get("CPUThread", &bCPUThread, true);
|
||||
core->Get("SyncOnSkipIdle", &bSyncGPUOnSkipIdleHack, true);
|
||||
core->Get("SelectedLanguage", &SelectedLanguage,
|
||||
DiscIO::ToGameCubeLanguage(Config::GetDefaultLanguage()));
|
||||
core->Get("OverrideRegionSettings", &bOverrideRegionSettings, false);
|
||||
core->Get("DPL2Decoder", &bDPL2Decoder, false);
|
||||
core->Get("AudioLatency", &iLatency, 20);
|
||||
core->Get("AudioStretch", &m_audio_stretch, false);
|
||||
core->Get("AudioStretchMaxLatency", &m_audio_stretch_max_latency, 80);
|
||||
core->Get("AgpCartAPath", &m_strGbaCartA);
|
||||
core->Get("AgpCartBPath", &m_strGbaCartB);
|
||||
core->Get("SlotA", (int*)&m_EXIDevice[0], ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER);
|
||||
@ -538,25 +509,6 @@ void SConfig::LoadMovieSettings(IniFile& ini)
|
||||
movie->Get("ShowRTC", &m_ShowRTC, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadDSPSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
||||
|
||||
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
||||
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
||||
dsp->Get("DumpAudioSilent", &m_DumpAudioSilent, false);
|
||||
dsp->Get("DumpUCode", &m_DumpUCode, false);
|
||||
dsp->Get("Backend", &sBackend, AudioCommon::GetDefaultSoundBackend());
|
||||
dsp->Get("Volume", &m_Volume, 100);
|
||||
dsp->Get("CaptureLog", &m_DSPCaptureLog, false);
|
||||
|
||||
#ifdef _WIN32
|
||||
dsp->Get("WASAPIDevice", &sWASAPIDevice, "default");
|
||||
#endif
|
||||
|
||||
m_IsMuted = false;
|
||||
}
|
||||
|
||||
void SConfig::LoadInputSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
||||
@ -749,7 +701,6 @@ void SConfig::LoadDefaults()
|
||||
bCPUThread = false;
|
||||
bSyncGPUOnSkipIdleHack = true;
|
||||
bRunCompareServer = false;
|
||||
bDSPHLE = true;
|
||||
bFastmem = true;
|
||||
bFloatExceptions = false;
|
||||
bDivideByZeroExceptions = false;
|
||||
@ -764,10 +715,6 @@ void SConfig::LoadDefaults()
|
||||
SelectedLanguage = 0;
|
||||
bOverrideRegionSettings = false;
|
||||
bWii = false;
|
||||
bDPL2Decoder = false;
|
||||
iLatency = 20;
|
||||
m_audio_stretch = false;
|
||||
m_audio_stretch_max_latency = 80;
|
||||
|
||||
bLoopFifoReplay = true;
|
||||
|
||||
@ -1057,8 +1004,3 @@ IniFile SConfig::LoadGameIni(const std::string& id, std::optional<u16> revision)
|
||||
game_ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + filename, true);
|
||||
return game_ini;
|
||||
}
|
||||
|
||||
bool SConfig::ShouldUseDPL2Decoder() const
|
||||
{
|
||||
return bDPL2Decoder && !bDSPHLE;
|
||||
}
|
||||
|
@ -47,15 +47,6 @@ enum SIDevices : int;
|
||||
|
||||
struct BootParameters;
|
||||
|
||||
// DSP Backend Types
|
||||
#define BACKEND_NULLSOUND _trans("No Audio Output")
|
||||
#define BACKEND_ALSA "ALSA"
|
||||
#define BACKEND_CUBEB "Cubeb"
|
||||
#define BACKEND_OPENAL "OpenAL"
|
||||
#define BACKEND_PULSEAUDIO "Pulse"
|
||||
#define BACKEND_OPENSLES "OpenSLES"
|
||||
#define BACKEND_WASAPI _trans("WASAPI (Exclusive Mode)")
|
||||
|
||||
enum class GPUDeterminismMode
|
||||
{
|
||||
Auto,
|
||||
@ -116,17 +107,10 @@ struct SConfig
|
||||
|
||||
int iTimingVariance = 40; // in milli secounds
|
||||
bool bCPUThread = true;
|
||||
bool bDSPThread = false;
|
||||
bool bDSPHLE = true;
|
||||
bool bSyncGPUOnSkipIdleHack = true;
|
||||
bool bHLE_BS2 = true;
|
||||
bool bCopyWiiSaveNetplay = true;
|
||||
|
||||
bool bDPL2Decoder = false;
|
||||
int iLatency = 20;
|
||||
bool m_audio_stretch = false;
|
||||
int m_audio_stretch_max_latency = 80;
|
||||
|
||||
bool bRunCompareServer = false;
|
||||
bool bRunCompareClient = false;
|
||||
|
||||
@ -176,9 +160,6 @@ struct SConfig
|
||||
bool bEnableCustomRTC;
|
||||
u32 m_customRTCValue;
|
||||
|
||||
// DPL2
|
||||
bool ShouldUseDPL2Decoder() const;
|
||||
|
||||
DiscIO::Region m_region;
|
||||
|
||||
std::string m_strGPUDeterminismMode;
|
||||
@ -299,21 +280,6 @@ struct SConfig
|
||||
|
||||
bool m_PauseOnFocusLost;
|
||||
|
||||
// DSP settings
|
||||
bool m_DSPEnableJIT;
|
||||
bool m_DSPCaptureLog;
|
||||
bool m_DumpAudio;
|
||||
bool m_DumpAudioSilent;
|
||||
bool m_IsMuted;
|
||||
bool m_DumpUCode;
|
||||
int m_Volume;
|
||||
std::string sBackend;
|
||||
|
||||
#ifdef _WIN32
|
||||
// WSAPI settings
|
||||
std::string sWASAPIDevice;
|
||||
#endif
|
||||
|
||||
// Input settings
|
||||
bool m_BackgroundInput;
|
||||
bool m_AdapterRumble[4];
|
||||
@ -347,7 +313,6 @@ private:
|
||||
void SaveInterfaceSettings(IniFile& ini);
|
||||
void SaveGameListSettings(IniFile& ini);
|
||||
void SaveCoreSettings(IniFile& ini);
|
||||
void SaveDSPSettings(IniFile& ini);
|
||||
void SaveInputSettings(IniFile& ini);
|
||||
void SaveMovieSettings(IniFile& ini);
|
||||
void SaveFifoPlayerSettings(IniFile& ini);
|
||||
@ -360,7 +325,6 @@ private:
|
||||
void LoadInterfaceSettings(IniFile& ini);
|
||||
void LoadGameListSettings(IniFile& ini);
|
||||
void LoadCoreSettings(IniFile& ini);
|
||||
void LoadDSPSettings(IniFile& ini);
|
||||
void LoadInputSettings(IniFile& ini);
|
||||
void LoadMovieSettings(IniFile& ini);
|
||||
void LoadFifoPlayerSettings(IniFile& ini);
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/BootManager.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/DSPEmulator.h"
|
||||
@ -565,11 +566,11 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
|
||||
g_renderer->EndUIFrame();
|
||||
|
||||
if (cpu_info.HTT)
|
||||
SConfig::GetInstance().bDSPThread = cpu_info.num_cores > 4;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_DSP_THREAD, cpu_info.num_cores > 4);
|
||||
else
|
||||
SConfig::GetInstance().bDSPThread = cpu_info.num_cores > 2;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_DSP_THREAD, cpu_info.num_cores > 2);
|
||||
|
||||
if (!DSP::GetDSPEmulator()->Initialize(core_parameter.bWii, core_parameter.bDSPThread))
|
||||
if (!DSP::GetDSPEmulator()->Initialize(core_parameter.bWii, Config::Get(Config::MAIN_DSP_THREAD)))
|
||||
{
|
||||
PanicAlertFmt("Failed to initialize DSP emulation!");
|
||||
return;
|
||||
@ -921,9 +922,9 @@ void UpdateTitle(u32 ElapseTime)
|
||||
(VideoInterface::GetTargetRefreshRate() * ElapseTime));
|
||||
|
||||
// Settings are shown the same for both extended and summary info
|
||||
const std::string SSettings =
|
||||
fmt::format("{} {} | {} | {}", PowerPC::GetCPUName(), _CoreParameter.bCPUThread ? "DC" : "SC",
|
||||
g_video_backend->GetDisplayName(), _CoreParameter.bDSPHLE ? "HLE" : "LLE");
|
||||
const std::string SSettings = fmt::format(
|
||||
"{} {} | {} | {}", PowerPC::GetCPUName(), _CoreParameter.bCPUThread ? "DC" : "SC",
|
||||
g_video_backend->GetDisplayName(), Config::Get(Config::MAIN_DSP_HLE) ? "HLE" : "LLE");
|
||||
|
||||
std::string SFPS;
|
||||
if (Movie::IsPlayingInput())
|
||||
|
@ -353,13 +353,13 @@ void DolphinAnalytics::MakePerGameBuilder()
|
||||
builder.AddData("id", MakeUniqueId(SConfig::GetInstance().GetGameID()));
|
||||
|
||||
// Configuration.
|
||||
builder.AddData("cfg-dsp-hle", SConfig::GetInstance().bDSPHLE);
|
||||
builder.AddData("cfg-dsp-jit", SConfig::GetInstance().m_DSPEnableJIT);
|
||||
builder.AddData("cfg-dsp-thread", SConfig::GetInstance().bDSPThread);
|
||||
builder.AddData("cfg-dsp-hle", Config::Get(Config::MAIN_DSP_HLE));
|
||||
builder.AddData("cfg-dsp-jit", Config::Get(Config::MAIN_DSP_JIT));
|
||||
builder.AddData("cfg-dsp-thread", Config::Get(Config::MAIN_DSP_THREAD));
|
||||
builder.AddData("cfg-cpu-thread", SConfig::GetInstance().bCPUThread);
|
||||
builder.AddData("cfg-fastmem", SConfig::GetInstance().bFastmem);
|
||||
builder.AddData("cfg-syncgpu", SConfig::GetInstance().bSyncGPU);
|
||||
builder.AddData("cfg-audio-backend", SConfig::GetInstance().sBackend);
|
||||
builder.AddData("cfg-audio-backend", Config::Get(Config::MAIN_AUDIO_BACKEND));
|
||||
builder.AddData("cfg-oc-enable", SConfig::GetInstance().m_OCEnable);
|
||||
builder.AddData("cfg-oc-factor", SConfig::GetInstance().m_OCFactor);
|
||||
builder.AddData("cfg-render-to-main", Config::Get(Config::MAIN_RENDER_TO_MAIN));
|
||||
|
@ -13,6 +13,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/DSPCodeUtil.h"
|
||||
#include "Core/HW/DSPHLE/DSPHLE.h"
|
||||
@ -102,7 +103,7 @@ void ROMUCode::BootUCode()
|
||||
Common::HashEctor(static_cast<u8*>(HLEMemory_Get_Pointer(m_current_ucode.m_ram_address)),
|
||||
m_current_ucode.m_length);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
if (Config::Get(Config::MAIN_DUMP_UCODE))
|
||||
{
|
||||
DSP::DumpDSPCode(static_cast<u8*>(HLEMemory_Get_Pointer(m_current_ucode.m_ram_address)),
|
||||
m_current_ucode.m_length, ector_crc);
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/DSP/DSPCodeUtil.h"
|
||||
#include "Core/HW/DSPHLE/DSPHLE.h"
|
||||
@ -183,7 +184,7 @@ void UCodeInterface::PrepareBootUCode(u32 mail)
|
||||
Common::HashEctor(static_cast<u8*>(HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr)),
|
||||
m_next_ucode.iram_size);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
if (Config::Get(Config::MAIN_DUMP_UCODE))
|
||||
{
|
||||
DSP::DumpDSPCode(Memory::GetPointer(m_next_ucode.iram_mram_addr), m_next_ucode.iram_size,
|
||||
ector_crc);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
@ -42,7 +43,7 @@ void Init()
|
||||
ExpansionInterface::Init(); // Needs to be initialized before Memory
|
||||
Memory::Init(); // Needs to be initialized before AddressSpace
|
||||
AddressSpace::Init();
|
||||
DSP::Init(SConfig::GetInstance().bDSPHLE);
|
||||
DSP::Init(Config::Get(Config::MAIN_DSP_HLE));
|
||||
DVDInterface::Init();
|
||||
GPFifo::Init();
|
||||
CPU::Init(SConfig::GetInstance().cpu_core);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/DSPEmulator.h"
|
||||
@ -40,8 +41,9 @@ static void ReinitHardware()
|
||||
PowerPC::Reset();
|
||||
Wiimote::ResetAllWiimotes();
|
||||
// Note: this is specific to Dolphin and is required because we initialised it in Wii mode.
|
||||
DSP::Reinit(SConfig::GetInstance().bDSPHLE);
|
||||
DSP::GetDSPEmulator()->Initialize(SConfig::GetInstance().bWii, SConfig::GetInstance().bDSPThread);
|
||||
DSP::Reinit(Config::Get(Config::MAIN_DSP_HLE));
|
||||
DSP::GetDSPEmulator()->Initialize(SConfig::GetInstance().bWii,
|
||||
Config::Get(Config::MAIN_DSP_THREAD));
|
||||
|
||||
SystemTimers::ChangePPCClock(SystemTimers::Mode::GC);
|
||||
}
|
||||
|
Reference in New Issue
Block a user