summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/parent_of_member.h3
-rw-r--r--src/common/settings.cpp9
-rw-r--r--src/common/settings.h10
3 files changed, 14 insertions, 8 deletions
diff --git a/src/common/parent_of_member.h b/src/common/parent_of_member.h
index e0f8ab5c8..58c70b0e7 100644
--- a/src/common/parent_of_member.h
+++ b/src/common/parent_of_member.h
@@ -109,7 +109,8 @@ struct OffsetOfCalculator {
109 } 109 }
110 } 110 }
111 111
112 return (next - start) * sizeof(MemberType) + Offset; 112 return static_cast<ptrdiff_t>(static_cast<size_t>(next - start) * sizeof(MemberType) +
113 Offset);
113 } 114 }
114 115
115 static constexpr std::ptrdiff_t OffsetOf(MemberType ParentType::*member) { 116 static constexpr std::ptrdiff_t OffsetOf(MemberType ParentType::*member) {
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 702b6598d..e29cbf506 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -42,7 +42,7 @@ void LogSettings() {
42 log_setting("System_RegionIndex", values.region_index.GetValue()); 42 log_setting("System_RegionIndex", values.region_index.GetValue());
43 log_setting("System_TimeZoneIndex", values.time_zone_index.GetValue()); 43 log_setting("System_TimeZoneIndex", values.time_zone_index.GetValue());
44 log_setting("Core_UseMultiCore", values.use_multi_core.GetValue()); 44 log_setting("Core_UseMultiCore", values.use_multi_core.GetValue());
45 log_setting("CPU_Accuracy", values.cpu_accuracy); 45 log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue());
46 log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); 46 log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue());
47 log_setting("Renderer_UseFrameLimit", values.use_frame_limit.GetValue()); 47 log_setting("Renderer_UseFrameLimit", values.use_frame_limit.GetValue());
48 log_setting("Renderer_FrameLimit", values.frame_limit.GetValue()); 48 log_setting("Renderer_FrameLimit", values.frame_limit.GetValue());
@@ -106,6 +106,12 @@ void RestoreGlobalState(bool is_powered_on) {
106 // Core 106 // Core
107 values.use_multi_core.SetGlobal(true); 107 values.use_multi_core.SetGlobal(true);
108 108
109 // CPU
110 values.cpu_accuracy.SetGlobal(true);
111 values.cpuopt_unsafe_unfuse_fma.SetGlobal(true);
112 values.cpuopt_unsafe_reduce_fp_error.SetGlobal(true);
113 values.cpuopt_unsafe_inaccurate_nan.SetGlobal(true);
114
109 // Renderer 115 // Renderer
110 values.renderer_backend.SetGlobal(true); 116 values.renderer_backend.SetGlobal(true);
111 values.vulkan_device.SetGlobal(true); 117 values.vulkan_device.SetGlobal(true);
@@ -130,7 +136,6 @@ void RestoreGlobalState(bool is_powered_on) {
130 values.region_index.SetGlobal(true); 136 values.region_index.SetGlobal(true);
131 values.time_zone_index.SetGlobal(true); 137 values.time_zone_index.SetGlobal(true);
132 values.rng_seed.SetGlobal(true); 138 values.rng_seed.SetGlobal(true);
133 values.custom_rtc.SetGlobal(true);
134 values.sound_index.SetGlobal(true); 139 values.sound_index.SetGlobal(true);
135 140
136 // Controls 141 // Controls
diff --git a/src/common/settings.h b/src/common/settings.h
index d39b4aa45..48085b9a9 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -115,7 +115,7 @@ struct Values {
115 Setting<bool> use_multi_core; 115 Setting<bool> use_multi_core;
116 116
117 // Cpu 117 // Cpu
118 CPUAccuracy cpu_accuracy; 118 Setting<CPUAccuracy> cpu_accuracy;
119 119
120 bool cpuopt_page_tables; 120 bool cpuopt_page_tables;
121 bool cpuopt_block_linking; 121 bool cpuopt_block_linking;
@@ -126,9 +126,9 @@ struct Values {
126 bool cpuopt_misc_ir; 126 bool cpuopt_misc_ir;
127 bool cpuopt_reduce_misalign_checks; 127 bool cpuopt_reduce_misalign_checks;
128 128
129 bool cpuopt_unsafe_unfuse_fma; 129 Setting<bool> cpuopt_unsafe_unfuse_fma;
130 bool cpuopt_unsafe_reduce_fp_error; 130 Setting<bool> cpuopt_unsafe_reduce_fp_error;
131 bool cpuopt_unsafe_inaccurate_nan; 131 Setting<bool> cpuopt_unsafe_inaccurate_nan;
132 132
133 // Renderer 133 // Renderer
134 Setting<RendererBackend> renderer_backend; 134 Setting<RendererBackend> renderer_backend;
@@ -157,7 +157,7 @@ struct Values {
157 // System 157 // System
158 Setting<std::optional<u32>> rng_seed; 158 Setting<std::optional<u32>> rng_seed;
159 // Measured in seconds since epoch 159 // Measured in seconds since epoch
160 Setting<std::optional<std::chrono::seconds>> custom_rtc; 160 std::optional<std::chrono::seconds> custom_rtc;
161 // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc` 161 // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
162 std::chrono::seconds custom_rtc_differential; 162 std::chrono::seconds custom_rtc_differential;
163 163