summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-06-06 09:57:24 +0200
committerMarkus Wick <markus@selfnet.de>2021-06-11 17:27:17 +0200
commit5ba28325b262d44fcd7721aa00074955bd794015 (patch)
tree1c388684ccc0ef52b124145cf3dfe98d5d427980 /src/common
parentcommon/host_memory: Optimize for huge tables. (diff)
downloadyuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar.gz
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar.bz2
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar.lz
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar.xz
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.tar.zst
yuzu-5ba28325b262d44fcd7721aa00074955bd794015.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/settings.cpp8
-rw-r--r--src/common/settings.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index bcb4e4be1..360e878d6 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -90,6 +90,13 @@ bool IsGPULevelHigh() {
values.gpu_accuracy.GetValue() == GPUAccuracy::High;
}
+bool IsFastmemEnabled() {
+ if (values.cpu_accuracy.GetValue() == CPUAccuracy::DebugMode) {
+ return values.cpuopt_fastmem;
+ }
+ return true;
+}
+
float Volume() {
if (values.audio_muted) {
return 0.0f;
@@ -115,6 +122,7 @@ void RestoreGlobalState(bool is_powered_on) {
values.cpuopt_unsafe_unfuse_fma.SetGlobal(true);
values.cpuopt_unsafe_reduce_fp_error.SetGlobal(true);
values.cpuopt_unsafe_inaccurate_nan.SetGlobal(true);
+ values.cpuopt_unsafe_fastmem_check.SetGlobal(true);
// Renderer
values.renderer_backend.SetGlobal(true);
diff --git a/src/common/settings.h b/src/common/settings.h
index 48085b9a9..1af8c5ac2 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -125,10 +125,12 @@ struct Values {
bool cpuopt_const_prop;
bool cpuopt_misc_ir;
bool cpuopt_reduce_misalign_checks;
+ bool cpuopt_fastmem;
Setting<bool> cpuopt_unsafe_unfuse_fma;
Setting<bool> cpuopt_unsafe_reduce_fp_error;
Setting<bool> cpuopt_unsafe_inaccurate_nan;
+ Setting<bool> cpuopt_unsafe_fastmem_check;
// Renderer
Setting<RendererBackend> renderer_backend;
@@ -249,6 +251,8 @@ void SetConfiguringGlobal(bool is_global);
bool IsGPULevelExtreme();
bool IsGPULevelHigh();
+bool IsFastmemEnabled();
+
float Volume();
std::string GetTimeZoneString();