add: an option to turn fast math off

This commit is contained in:
Samuliak 2024-10-02 17:18:20 +02:00
parent 6ba6157bae
commit ebcb62a785
6 changed files with 52 additions and 19 deletions

View file

@ -32,7 +32,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
mlc_path = mlc;
permanent_storage = parser.get("permanent_storage", permanent_storage);
language = parser.get<sint32>("language", wxLANGUAGE_DEFAULT);
use_discord_presence = parser.get("use_discord_presence", true);
fullscreen_menubar = parser.get("fullscreen_menubar", false);
@ -102,7 +102,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
cemuLog_log(LogType::Force, "config load error: can't load recently launched game file: {}", path);
}
}
recent_nfc_files.clear();
auto nfc_parser = parser.get("RecentNFCFiles");
for (auto element = nfc_parser.get("Entry"); element.valid(); element = nfc_parser.get("Entry", element))
@ -198,7 +198,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
{
graphic_pack_entries[path].try_emplace("_disabled", "true");
}
for (auto preset = element.get("Preset"); preset.valid(); preset = element.get("Preset", preset))
{
const std::string category = preset.get("category", "");
@ -206,7 +206,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
graphic_pack_entries[path].try_emplace(category, active_preset);
}
}
}
// graphics
@ -219,6 +219,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
downscale_filter = graphic.get("DownscaleFilter", kLinearFilter);
fullscreen_scaling = graphic.get("FullscreenScaling", kKeepAspectRatio);
async_compile = graphic.get("AsyncCompile", async_compile);
fast_math = graphic.get("FastMath", fast_math);
vk_accurate_barriers = graphic.get("vkAccurateBarriers", true); // this used to be "VulkanAccurateBarriers" but because we changed the default to true in 1.27.1 the option name had to be changed
auto overlay_node = graphic.get("Overlay");
@ -373,7 +374,7 @@ void CemuConfig::Save(XMLConfigParser& parser)
// config.set("cpu_mode", cpu_mode.GetValue());
//config.set("console_region", console_region.GetValue());
config.set("console_language", console_language.GetValue());
auto wpos = config.set("window_position");
wpos.set<sint32>("x", window_position.x);
wpos.set<sint32>("y", window_position.y);
@ -408,13 +409,13 @@ void CemuConfig::Save(XMLConfigParser& parser)
{
launch_files_parser.set("Entry", entry.c_str());
}
auto nfc_files_parser = config.set("RecentNFCFiles");
for (const auto& entry : recent_nfc_files)
{
nfc_files_parser.set("Entry", entry.c_str());
}
// game paths
auto game_path_parser = config.set("GamePaths");
for (const auto& entry : game_paths)
@ -455,11 +456,11 @@ void CemuConfig::Save(XMLConfigParser& parser)
entry.set_attribute("disabled", true);
continue;
}
auto preset = entry.set("Preset");
if(!kv.first.empty())
preset.set("category", kv.first.c_str());
preset.set("preset", kv.second.c_str());
}
}
@ -475,6 +476,7 @@ void CemuConfig::Save(XMLConfigParser& parser)
graphic.set("DownscaleFilter", downscale_filter);
graphic.set("FullscreenScaling", fullscreen_scaling);
graphic.set("AsyncCompile", async_compile.GetValue());
graphic.set("FastMath", fast_math.GetValue());
graphic.set("vkAccurateBarriers", vk_accurate_barriers);
auto overlay_node = graphic.set("Overlay");