From 70c3d36536ad98a5569d51f1d0f68a6f01890f11 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 10 Dec 2023 20:10:36 -0500 Subject: android: Refactor settings to expose more options In AbstractSetting, this removes the category, androidDefault, and valueAsString properties as they are no longer needed and have replacements. isSwitchable, global, and getValueAsString are all exposed and give better options for working with global/per-game settings. --- src/common/settings_setting.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/settings_setting.h b/src/common/settings_setting.h index 3175ab07d..0b18ca5ec 100644 --- a/src/common/settings_setting.h +++ b/src/common/settings_setting.h @@ -81,6 +81,9 @@ public: [[nodiscard]] virtual const Type& GetValue() const { return value; } + [[nodiscard]] virtual const Type& GetValue(bool need_global) const { + return value; + } /** * Sets the setting to the given value. @@ -353,7 +356,7 @@ public: } return custom; } - [[nodiscard]] const Type& GetValue(bool need_global) const { + [[nodiscard]] const Type& GetValue(bool need_global) const override final { if (use_global || need_global) { return this->value; } -- cgit v1.2.3 From f2eb3c579f2de15410681014b47779d44d77fd48 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 10 Dec 2023 20:45:02 -0500 Subject: android: Add per-game drivers --- src/common/settings.cpp | 2 ++ src/common/settings_common.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 88f509ba7..ea52bbfa6 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -211,6 +211,8 @@ const char* TranslateCategory(Category category) { case Category::Debugging: case Category::DebuggingGraphics: return "Debugging"; + case Category::GpuDriver: + return "GpuDriver"; case Category::Miscellaneous: return "Miscellaneous"; case Category::Network: diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 344c04439..c82e17495 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -26,6 +26,7 @@ enum class Category : u32 { DataStorage, Debugging, DebuggingGraphics, + GpuDriver, Miscellaneous, Network, WebService, -- cgit v1.2.3 From 62fc386bb4fa5c07edfe07b8735772f37f188bd7 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 10 Dec 2023 20:45:45 -0500 Subject: settings: Allow CPU Debug and Fastmem to be changed per-game --- src/common/settings.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index 7dc18fffe..25086d388 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -197,7 +197,7 @@ struct Values { SwitchableSetting cpu_accuracy{linkage, CpuAccuracy::Auto, CpuAccuracy::Auto, CpuAccuracy::Paranoid, "cpu_accuracy", Category::Cpu}; - Setting cpu_debug_mode{linkage, false, "cpu_debug_mode", Category::CpuDebug}; + SwitchableSetting cpu_debug_mode{linkage, false, "cpu_debug_mode", Category::CpuDebug}; Setting cpuopt_page_tables{linkage, true, "cpuopt_page_tables", Category::CpuDebug}; Setting cpuopt_block_linking{linkage, true, "cpuopt_block_linking", Category::CpuDebug}; @@ -211,9 +211,9 @@ struct Values { Setting cpuopt_misc_ir{linkage, true, "cpuopt_misc_ir", Category::CpuDebug}; Setting cpuopt_reduce_misalign_checks{linkage, true, "cpuopt_reduce_misalign_checks", Category::CpuDebug}; - Setting cpuopt_fastmem{linkage, true, "cpuopt_fastmem", Category::CpuDebug}; - Setting cpuopt_fastmem_exclusives{linkage, true, "cpuopt_fastmem_exclusives", - Category::CpuDebug}; + SwitchableSetting cpuopt_fastmem{linkage, true, "cpuopt_fastmem", Category::CpuDebug}; + SwitchableSetting cpuopt_fastmem_exclusives{linkage, true, "cpuopt_fastmem_exclusives", + Category::CpuDebug}; Setting cpuopt_recompile_exclusives{linkage, true, "cpuopt_recompile_exclusives", Category::CpuDebug}; Setting cpuopt_ignore_memory_aborts{linkage, true, "cpuopt_ignore_memory_aborts", -- cgit v1.2.3 From 6c6e8b8de02cadf86ffbdcbf81e11183344899cd Mon Sep 17 00:00:00 2001 From: t895 Date: Tue, 12 Dec 2023 13:39:16 -0500 Subject: settings: Allow vsync to be changed per-game --- src/common/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index 25086d388..07dba53ab 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -256,7 +256,7 @@ struct Values { AstcDecodeMode::CpuAsynchronous, "accelerate_astc", Category::Renderer}; - Setting vsync_mode{ + SwitchableSetting vsync_mode{ linkage, VSyncMode::Fifo, VSyncMode::Immediate, VSyncMode::FifoRelaxed, "use_vsync", Category::Renderer, Specialization::RuntimeList, true, true}; -- cgit v1.2.3