summaryrefslogtreecommitdiffstats
path: root/src/common/settings.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/settings.h64
1 files changed, 51 insertions, 13 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 80b2eeabc..ae5ed93d8 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -16,6 +16,13 @@
namespace Settings {
+enum class VSyncMode : u32 {
+ Immediate = 0,
+ Mailbox = 1,
+ FIFO = 2,
+ FIFORelaxed = 3,
+};
+
enum class RendererBackend : u32 {
OpenGL = 0,
Vulkan = 1,
@@ -83,6 +90,12 @@ enum class AntiAliasing : u32 {
LastAA = Smaa,
};
+enum class AstcRecompression : u32 {
+ Uncompressed = 0,
+ Bc1 = 1,
+ Bc3 = 2,
+};
+
struct ResolutionScalingInfo {
u32 up_scale{1};
u32 down_shift{0};
@@ -128,23 +141,25 @@ public:
/**
* Sets a default value, label, and setting value.
*
- * @param default_val Intial value of the setting, and default value of the setting
+ * @param default_val Initial value of the setting, and default value of the setting
* @param name Label for the setting
*/
- explicit Setting(const Type& default_val, const std::string& name) requires(!ranged)
+ explicit Setting(const Type& default_val, const std::string& name)
+ requires(!ranged)
: value{default_val}, default_value{default_val}, label{name} {}
virtual ~Setting() = default;
/**
* Sets a default value, minimum value, maximum value, and label.
*
- * @param default_val Intial value of the setting, and default value of the setting
+ * @param default_val Initial value of the setting, and default value of the setting
* @param min_val Sets the minimum allowed value of the setting
* @param max_val Sets the maximum allowed value of the setting
* @param name Label for the setting
*/
explicit Setting(const Type& default_val, const Type& min_val, const Type& max_val,
- const std::string& name) requires(ranged)
+ const std::string& name)
+ requires(ranged)
: value{default_val},
default_value{default_val}, maximum{max_val}, minimum{min_val}, label{name} {}
@@ -229,23 +244,25 @@ public:
/**
* Sets a default value, label, and setting value.
*
- * @param default_val Intial value of the setting, and default value of the setting
+ * @param default_val Initial value of the setting, and default value of the setting
* @param name Label for the setting
*/
- explicit SwitchableSetting(const Type& default_val, const std::string& name) requires(!ranged)
+ explicit SwitchableSetting(const Type& default_val, const std::string& name)
+ requires(!ranged)
: Setting<Type>{default_val, name} {}
virtual ~SwitchableSetting() = default;
/**
* Sets a default value, minimum value, maximum value, and label.
*
- * @param default_val Intial value of the setting, and default value of the setting
+ * @param default_val Initial value of the setting, and default value of the setting
* @param min_val Sets the minimum allowed value of the setting
* @param max_val Sets the maximum allowed value of the setting
* @param name Label for the setting
*/
explicit SwitchableSetting(const Type& default_val, const Type& min_val, const Type& max_val,
- const std::string& name) requires(ranged)
+ const std::string& name)
+ requires(ranged)
: Setting<Type, true>{default_val, min_val, max_val, name} {}
/**
@@ -384,7 +401,8 @@ struct Values {
// Core
SwitchableSetting<bool> use_multi_core{true, "use_multi_core"};
- SwitchableSetting<bool> use_extended_memory_layout{false, "use_extended_memory_layout"};
+ SwitchableSetting<bool> use_unsafe_extended_memory_layout{false,
+ "use_unsafe_extended_memory_layout"};
// Cpu
SwitchableSetting<CPUAccuracy, true> cpu_accuracy{CPUAccuracy::Auto, CPUAccuracy::Auto,
@@ -418,6 +436,7 @@ struct Values {
// Renderer
SwitchableSetting<RendererBackend, true> renderer_backend{
RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null, "backend"};
+ SwitchableSetting<bool> async_presentation{false, "async_presentation"};
SwitchableSetting<bool> renderer_force_max_clock{false, "force_max_clock"};
Setting<bool> renderer_debug{false, "debug"};
Setting<bool> renderer_shader_feedback{false, "shader_feedback"};
@@ -449,14 +468,22 @@ struct Values {
SwitchableSetting<bool> use_asynchronous_gpu_emulation{true, "use_asynchronous_gpu_emulation"};
SwitchableSetting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"};
SwitchableSetting<bool> accelerate_astc{true, "accelerate_astc"};
- SwitchableSetting<bool> use_vsync{true, "use_vsync"};
+ SwitchableSetting<bool> async_astc{false, "async_astc"};
+ Setting<VSyncMode, true> vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate,
+ VSyncMode::FIFORelaxed, "use_vsync"};
+ SwitchableSetting<bool> use_reactive_flushing{true, "use_reactive_flushing"};
SwitchableSetting<ShaderBackend, true> shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL,
ShaderBackend::SPIRV, "shader_backend"};
SwitchableSetting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"};
SwitchableSetting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"};
- SwitchableSetting<bool> use_pessimistic_flushes{false, "use_pessimistic_flushes"};
SwitchableSetting<bool> use_vulkan_driver_pipeline_cache{true,
"use_vulkan_driver_pipeline_cache"};
+ SwitchableSetting<bool> enable_compute_pipelines{false, "enable_compute_pipelines"};
+ SwitchableSetting<AstcRecompression, true> astc_recompression{
+ AstcRecompression::Uncompressed, AstcRecompression::Uncompressed, AstcRecompression::Bc3,
+ "astc_recompression"};
+ SwitchableSetting<bool> use_video_framerate{false, "use_video_framerate"};
+ SwitchableSetting<bool> barrier_feedback_loops{true, "barrier_feedback_loops"};
SwitchableSetting<u8> bg_red{0, "bg_red"};
SwitchableSetting<u8> bg_green{0, "bg_green"};
@@ -483,6 +510,8 @@ struct Values {
Setting<bool> enable_raw_input{false, "enable_raw_input"};
Setting<bool> controller_navigation{true, "controller_navigation"};
+ Setting<bool> enable_joycon_driver{true, "enable_joycon_driver"};
+ Setting<bool> enable_procon_driver{false, "enable_procon_driver"};
SwitchableSetting<bool> vibration_enabled{true, "vibration_enabled"};
SwitchableSetting<bool> enable_accurate_vibrations{false, "enable_accurate_vibrations"};
@@ -496,9 +525,16 @@ struct Values {
Setting<bool> tas_loop{false, "tas_loop"};
Setting<bool> mouse_panning{false, "mouse_panning"};
- Setting<u8, true> mouse_panning_sensitivity{10, 1, 100, "mouse_panning_sensitivity"};
- Setting<bool> mouse_enabled{false, "mouse_enabled"};
+ Setting<u8, true> mouse_panning_x_sensitivity{50, 1, 100, "mouse_panning_x_sensitivity"};
+ Setting<u8, true> mouse_panning_y_sensitivity{50, 1, 100, "mouse_panning_y_sensitivity"};
+ Setting<u8, true> mouse_panning_deadzone_x_counterweight{
+ 0, 0, 100, "mouse_panning_deadzone_x_counterweight"};
+ Setting<u8, true> mouse_panning_deadzone_y_counterweight{
+ 0, 0, 100, "mouse_panning_deadzone_y_counterweight"};
+ Setting<u8, true> mouse_panning_decay_strength{22, 0, 100, "mouse_panning_decay_strength"};
+ Setting<u8, true> mouse_panning_min_decay{5, 0, 100, "mouse_panning_min_decay"};
+ Setting<bool> mouse_enabled{false, "mouse_enabled"};
Setting<bool> emulate_analog_keyboard{false, "emulate_analog_keyboard"};
Setting<bool> keyboard_enabled{false, "keyboard_enabled"};
@@ -518,6 +554,8 @@ struct Values {
Setting<bool> enable_ir_sensor{false, "enable_ir_sensor"};
Setting<std::string> ir_sensor_device{"auto", "ir_sensor_device"};
+ Setting<bool> random_amiibo_id{false, "random_amiibo_id"};
+
// Data Storage
Setting<bool> use_virtual_sd{true, "use_virtual_sd"};
Setting<bool> gamecard_inserted{false, "gamecard_inserted"};