aboutsummaryrefslogtreecommitdiff
path: root/src/common/settings.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-30 09:20:55 -0500
committerGitHub <noreply@github.com>2023-11-30 09:20:55 -0500
commitda8676dda146ab13e14d90ee262fb26fead10ea0 (patch)
tree0b4223de40a2d77598ac9095b1374353c2e9da7c /src/common/settings.cpp
parent32380366f7cbf186a6471d83beb3f34d17deb4f7 (diff)
parente6e15d2d108edad44f5a77395ac837809638c891 (diff)
Merge pull request #12074 from GPUCode/yuwu-on-the-metal
Implement Native Code Execution (NCE)
Diffstat (limited to 'src/common/settings.cpp')
-rw-r--r--src/common/settings.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 3e829253fe..4666bd0a0b 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -41,6 +41,7 @@ SWITCHABLE(AspectRatio, true);
SWITCHABLE(AstcDecodeMode, true);
SWITCHABLE(AstcRecompression, true);
SWITCHABLE(AudioMode, true);
+SWITCHABLE(CpuBackend, true);
SWITCHABLE(CpuAccuracy, true);
SWITCHABLE(FullscreenMode, true);
SWITCHABLE(GpuAccuracy, true);
@@ -155,6 +156,22 @@ bool IsFastmemEnabled() {
return true;
}
+static bool is_nce_enabled = false;
+
+void SetNceEnabled(bool is_39bit) {
+ const bool is_nce_selected = values.cpu_backend.GetValue() == CpuBackend::Nce;
+ is_nce_enabled = IsFastmemEnabled() && is_nce_selected && is_39bit;
+ if (is_nce_selected && !is_nce_enabled) {
+ LOG_WARNING(
+ Common,
+ "Program does not utilize 39-bit address space, unable to natively execute code");
+ }
+}
+
+bool IsNceEnabled() {
+ return is_nce_enabled;
+}
+
bool IsDockedMode() {
return values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked;
}