mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 04:29:13 +12:00
Make DSP backends properly configurable
This commit is contained in:
parent
33eb096ef8
commit
7a5bb2859e
8 changed files with 58 additions and 7 deletions
|
@ -62,6 +62,16 @@ void EmulatorConfig::load() {
|
|||
}
|
||||
}
|
||||
|
||||
if (data.contains("Audio")) {
|
||||
auto audioResult = toml::expect<toml::value>(data.at("Audio"));
|
||||
if (audioResult.is_ok()) {
|
||||
auto audio = audioResult.unwrap();
|
||||
|
||||
auto dspCoreName = toml::find_or<std::string>(audio, "DSPEmulation", "Null");
|
||||
dspType = Audio::DSPCore::typeFromString(dspCoreName);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.contains("Battery")) {
|
||||
auto batteryResult = toml::expect<toml::value>(data.at("Battery"));
|
||||
if (batteryResult.is_ok()) {
|
||||
|
@ -109,6 +119,7 @@ void EmulatorConfig::save() {
|
|||
data["General"]["UsePortableBuild"] = usePortableBuild;
|
||||
data["GPU"]["EnableShaderJIT"] = shaderJitEnabled;
|
||||
data["GPU"]["Renderer"] = std::string(Renderer::typeToString(rendererType));
|
||||
data["Audio"]["DSPEmulation"] = std::string(Audio::DSPCore::typeToString(dspType));
|
||||
|
||||
data["Battery"]["ChargerPlugged"] = chargerPlugged;
|
||||
data["Battery"]["BatteryPercentage"] = batteryPercentage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue