@ -101,15 +101,15 @@ struct ResolutionScalingInfo {
}
}
} ;
} ;
/** The Basic Setting class is a simple resource manager. It defines a label and default value
/** The Setting class is a simple resource manager. It defines a label and default value alongsid e
* alongside the actual value of the setting for simpler and less - error prone use with frontend
* the actual value of the setting for simpler and less - error prone use with frontend
* configurations . S ett ing a default value and label is required , though subclasses may deviate from
* configurations . S pecify ing a default value and label is required . A minimum and maximum range can
* this requirement .
* be specified for sanitization .
*/
*/
template < typename Type >
template < typename Type >
class Basic Setting {
class Setting {
protected :
protected :
Basic Setting( ) = default ;
Setting( ) = default ;
/**
/**
* Only sets the setting to the given initializer , leaving the other members to their default
* Only sets the setting to the given initializer , leaving the other members to their default
@ -117,7 +117,7 @@ protected:
*
*
* @ param global_val Initial value of the setting
* @ param global_val Initial value of the setting
*/
*/
explicit Basic Setting( const Type & global_val) : global { global_ val} { }
explicit Setting( const Type & val) : value { val} { }
public :
public :
/**
/**
@ -126,9 +126,22 @@ public:
* @ param default_val Intial value of the setting , and default value of the setting
* @ param default_val Intial value of the setting , and default value of the setting
* @ param name Label for the setting
* @ param name Label for the setting
*/
*/
explicit BasicSetting ( const Type & default_val , const std : : string & name )
explicit Setting ( const Type & default_val , const std : : string & name )
: default_value { default_val } , global { default_val } , label { name } { }
: value { default_val } , default_value { default_val } , ranged { false } , label { name } { }
virtual ~ BasicSetting ( ) = default ;
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 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 )
: value { default_val } , default_value { default_val } , maximum { max_val } , minimum { min_val } ,
ranged { true } , label { name } { }
/**
/**
* Returns a reference to the setting ' s value .
* Returns a reference to the setting ' s value .
@ -136,17 +149,17 @@ public:
* @ returns A reference to the setting
* @ returns A reference to the setting
*/
*/
[[nodiscard]] virtual const Type & GetValue ( ) const {
[[nodiscard]] virtual const Type & GetValue ( ) const {
return global ;
return value ;
}
}
/**
/**
* Sets the setting to the given value .
* Sets the setting to the given value .
*
*
* @ param val ue The desired value
* @ param val The desired value
*/
*/
virtual void SetValue ( const Type & val ue ) {
virtual void SetValue ( const Type & val ) {
Type temp { value } ;
Type temp { ( ranged ) ? std : : clamp ( val , minimum , maximum ) : val } ;
std : : swap ( global , temp ) ;
std : : swap ( value , temp ) ;
}
}
/**
/**
@ -170,14 +183,14 @@ public:
/**
/**
* Assigns a value to the setting .
* Assigns a value to the setting .
*
*
* @ param val ue The desired setting value
* @ param val The desired setting value
*
*
* @ returns A reference to the setting
* @ returns A reference to the setting
*/
*/
virtual const Type & operator = ( const Type & val ue ) {
virtual const Type & operator = ( const Type & val ) {
Type temp { value } ;
Type temp { ( ranged ) ? std : : clamp ( val , minimum , maximum ) : val } ;
std : : swap ( global , temp ) ;
std : : swap ( value , temp ) ;
return global ;
return value ;
}
}
/**
/**
@ -186,23 +199,39 @@ public:
* @ returns A reference to the setting
* @ returns A reference to the setting
*/
*/
explicit virtual operator const Type & ( ) const {
explicit virtual operator const Type & ( ) const {
return global ;
return value ;
}
}
protected :
protected :
Type value { } ; ///< The setting
const Type default_value { } ; ///< The default value
const Type default_value { } ; ///< The default value
Type global { } ; ///< The setting
const Type maximum { } ; ///< Maximum allowed value of the setting
const Type minimum { } ; ///< Minimum allowed value of the setting
const bool ranged ; ///< The setting has sanitization ranges
const std : : string label { } ; ///< The setting's label
const std : : string label { } ; ///< The setting's label
} ;
} ;
/**
/**
* BasicRangedSetting class is intended for use with quantifiable settings that need a more
* The SwitchableSetting class is a slightly more complex version of the Setting class . This adds a
* restrictive range than implicitly defined by its type . Implements a minimum and maximum that is
* custom setting to switch to when a guest application specifically requires it . The effect is that
* simply used to sanitize SetValue and the assignment overload .
* other components of the emulator can access the setting ' s intended value without any need for the
* component to ask whether the custom or global setting is needed at the moment .
*
* By default , the global setting is used .
*/
*/
template < typename Type >
template < typename Type >
class BasicRangedSetting : virtual public BasicSetting < Type > {
class Switchable Setting : virtual public Setting< Type > {
public :
public :
/**
* Sets a default value , label , and setting value .
*
* @ param default_val Intial 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 )
: Setting < Type > { default_val , name } { }
virtual ~ SwitchableSetting ( ) = default ;
/**
/**
* Sets a default value , minimum value , maximum value , and label .
* Sets a default value , minimum value , maximum value , and label .
*
*
@ -211,57 +240,9 @@ public:
* @ param max_val Sets the maximum allowed value of the setting
* @ param max_val Sets the maximum allowed value of the setting
* @ param name Label for the setting
* @ param name Label for the setting
*/
*/
explicit BasicRangedSetting ( const Type & default_val , const Type & min_val , const Type & max_val ,
explicit SwitchableSetting ( const Type & default_val , const Type & min_val , const Type & max_val ,
const std : : string & name )
const std : : string & name )
: BasicSetting < Type > { default_val , name } , minimum { min_val } , maximum { max_val } { }
: Setting < Type > { default_val , min_val , max_val , name } { }
virtual ~ BasicRangedSetting ( ) = default ;
/**
* Like BasicSetting ' s SetValue , except value is clamped to the range of the setting .
*
* @ param value The desired value
*/
void SetValue ( const Type & value ) override {
this - > global = std : : clamp ( value , minimum , maximum ) ;
}
/**
* Like BasicSetting ' s assignment overload , except value is clamped to the range of the setting .
*
* @ param value The desired value
* @ returns A reference to the setting ' s value
*/
const Type & operator = ( const Type & value ) override {
this - > global = std : : clamp ( value , minimum , maximum ) ;
return this - > global ;
}
const Type minimum ; ///< Minimum allowed value of the setting
const Type maximum ; ///< Maximum allowed value of the setting
} ;
/**
* The Setting class is a slightly more complex version of the BasicSetting class . This adds a
* custom setting to switch to when a guest application specifically requires it . The effect is that
* other components of the emulator can access the setting ' s intended value without any need for the
* component to ask whether the custom or global setting is needed at the moment .
*
* By default , the global setting is used .
*
* Like the BasicSetting , this requires setting a default value and label to use .
*/
template < typename Type >
class Setting : virtual public BasicSetting < Type > {
public :
/**
* Sets a default value , label , and setting value .
*
* @ param default_val Intial 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 )
: BasicSetting < Type > ( default_val , name ) { }
virtual ~ Setting ( ) = default ;
/**
/**
* Tells this setting to represent either the global or custom setting when other member
* Tells this setting to represent either the global or custom setting when other member
@ -292,13 +273,13 @@ public:
*/
*/
[[nodiscard]] virtual const Type & GetValue ( ) const override {
[[nodiscard]] virtual const Type & GetValue ( ) const override {
if ( use_global ) {
if ( use_global ) {
return this - > global ;
return this - > value ;
}
}
return custom ;
return custom ;
}
}
[[nodiscard]] virtual const Type & GetValue ( bool need_global ) const {
[[nodiscard]] virtual const Type & GetValue ( bool need_global ) const {
if ( use_global | | need_global ) {
if ( use_global | | need_global ) {
return this - > global ;
return this - > value ;
}
}
return custom ;
return custom ;
}
}
@ -306,12 +287,12 @@ public:
/**
/**
* Sets the current setting value depending on the global state .
* Sets the current setting value depending on the global state .
*
*
* @ param val ue The new value
* @ param val The new value
*/
*/
void SetValue ( const Type & val ue ) override {
void SetValue ( const Type & val ) override {
Type temp { value } ;
Type temp { ( this - > ranged ) ? std : : clamp ( val , this - > minimum , this - > maximum ) : val } ;
if ( use_global ) {
if ( use_global ) {
std : : swap ( this - > global , temp ) ;
std : : swap ( this - > value , temp ) ;
} else {
} else {
std : : swap ( custom , temp ) ;
std : : swap ( custom , temp ) ;
}
}
@ -320,15 +301,15 @@ public:
/**
/**
* Assigns the current setting value depending on the global state .
* Assigns the current setting value depending on the global state .
*
*
* @ param val ue The new value
* @ param val The new value
*
*
* @ returns A reference to the current setting value
* @ returns A reference to the current setting value
*/
*/
const Type & operator = ( const Type & val ue ) override {
const Type & operator = ( const Type & val ) override {
Type temp { value } ;
Type temp { ( this - > ranged ) ? std : : clamp ( val , this - > minimum , this - > maximum ) : val } ;
if ( use_global ) {
if ( use_global ) {
std : : swap ( this - > global , temp ) ;
std : : swap ( this - > value , temp ) ;
return this - > global ;
return this - > value ;
}
}
std : : swap ( custom , temp ) ;
std : : swap ( custom , temp ) ;
return custom ;
return custom ;
@ -341,7 +322,7 @@ public:
*/
*/
virtual explicit operator const Type & ( ) const override {
virtual explicit operator const Type & ( ) const override {
if ( use_global ) {
if ( use_global ) {
return this - > global ;
return this - > value ;
}
}
return custom ;
return custom ;
}
}
@ -351,75 +332,6 @@ protected:
Type custom { } ; ///< The custom value of the setting
Type custom { } ; ///< The custom value of the setting
} ;
} ;
/**
* RangedSetting is a Setting that implements a maximum and minimum value for its setting . Intended
* for use with quantifiable settings .
*/
template < typename Type >
class RangedSetting final : public BasicRangedSetting < Type > , public Setting < Type > {
public :
/**
* 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 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 RangedSetting ( const Type & default_val , const Type & min_val , const Type & max_val ,
const std : : string & name )
: BasicSetting < Type > { default_val , name } ,
BasicRangedSetting < Type > { default_val , min_val , max_val , name } , Setting < Type > { default_val ,
name } { }
virtual ~ RangedSetting ( ) = default ;
// The following are needed to avoid a MSVC bug
// (source: https://stackoverflow.com/questions/469508)
[[nodiscard]] const Type & GetValue ( ) const override {
return Setting < Type > : : GetValue ( ) ;
}
[[nodiscard]] const Type & GetValue ( bool need_global ) const override {
return Setting < Type > : : GetValue ( need_global ) ;
}
explicit operator const Type & ( ) const override {
if ( this - > use_global ) {
return this - > global ;
}
return this - > custom ;
}
/**
* Like BasicSetting ' s SetValue , except value is clamped to the range of the setting . Sets the
* appropriate value depending on the global state .
*
* @ param value The desired value
*/
void SetValue ( const Type & value ) override {
const Type temp = std : : clamp ( value , this - > minimum , this - > maximum ) ;
if ( this - > use_global ) {
this - > global = temp ;
}
this - > custom = temp ;
}
/**
* Like BasicSetting ' s assignment overload , except value is clamped to the range of the setting .
* Uses the appropriate value depending on the global state .
*
* @ param value The desired value
* @ returns A reference to the setting ' s value
*/
const Type & operator = ( const Type & value ) override {
const Type temp = std : : clamp ( value , this - > minimum , this - > maximum ) ;
if ( this - > use_global ) {
this - > global = temp ;
return this - > global ;
}
this - > custom = temp ;
return this - > custom ;
}
} ;
/**
/**
* The InputSetting class allows for getting a reference to either the global or custom members .
* The InputSetting class allows for getting a reference to either the global or custom members .
* This is required as we cannot easily modify the values of user - defined types within containers
* This is required as we cannot easily modify the values of user - defined types within containers
@ -431,7 +343,7 @@ template <typename Type>
class InputSetting final {
class InputSetting final {
public :
public :
InputSetting ( ) = default ;
InputSetting ( ) = default ;
explicit InputSetting ( Type val ) : Basic Setting< Type > ( val ) { }
explicit InputSetting ( Type val ) : Setting< Type > ( val ) { }
~ InputSetting ( ) = default ;
~ InputSetting ( ) = default ;
void SetGlobal ( bool to_global ) {
void SetGlobal ( bool to_global ) {
use_global = to_global ;
use_global = to_global ;
@ -459,175 +371,175 @@ struct TouchFromButtonMap {
struct Values {
struct Values {
// Audio
// Audio
Basic Setting< std : : string > audio_device_id { " auto " , " output_device " } ;
Setting< std : : string > audio_device_id { " auto " , " output_device " } ;
Basic Setting< std : : string > sink_id { " auto " , " output_engine " } ;
Setting< std : : string > sink_id { " auto " , " output_engine " } ;
Basic Setting< bool > audio_muted { false , " audio_muted " } ;
Setting< bool > audio_muted { false , " audio_muted " } ;
Ranged Setting< u8 > volume { 100 , 0 , 100 , " volume " } ;
Switchable Setting< u8 > volume { 100 , 0 , 100 , " volume " } ;
// Core
// Core
S etting< bool > use_multi_core { true , " use_multi_core " } ;
S witchableS etting< bool > use_multi_core { true , " use_multi_core " } ;
S etting< bool > use_extended_memory_layout { false , " use_extended_memory_layout " } ;
S witchableS etting< bool > use_extended_memory_layout { false , " use_extended_memory_layout " } ;
// Cpu
// Cpu
Ranged Setting< CPUAccuracy > cpu_accuracy { CPUAccuracy : : Auto , CPUAccuracy : : Auto ,
Switchable Setting< CPUAccuracy > cpu_accuracy { CPUAccuracy : : Auto , CPUAccuracy : : Auto ,
CPUAccuracy : : Paranoid , " cpu_accuracy " } ;
CPUAccuracy : : Paranoid , " cpu_accuracy " } ;
// TODO: remove cpu_accuracy_first_time, migration setting added 8 July 2021
// TODO: remove cpu_accuracy_first_time, migration setting added 8 July 2021
Basic Setting< bool > cpu_accuracy_first_time { true , " cpu_accuracy_first_time " } ;
Setting< bool > cpu_accuracy_first_time { true , " cpu_accuracy_first_time " } ;
Basic Setting< bool > cpu_debug_mode { false , " cpu_debug_mode " } ;
Setting< bool > cpu_debug_mode { false , " cpu_debug_mode " } ;
Basic Setting< bool > cpuopt_page_tables { true , " cpuopt_page_tables " } ;
Setting< bool > cpuopt_page_tables { true , " cpuopt_page_tables " } ;
Basic Setting< bool > cpuopt_block_linking { true , " cpuopt_block_linking " } ;
Setting< bool > cpuopt_block_linking { true , " cpuopt_block_linking " } ;
Basic Setting< bool > cpuopt_return_stack_buffer { true , " cpuopt_return_stack_buffer " } ;
Setting< bool > cpuopt_return_stack_buffer { true , " cpuopt_return_stack_buffer " } ;
Basic Setting< bool > cpuopt_fast_dispatcher { true , " cpuopt_fast_dispatcher " } ;
Setting< bool > cpuopt_fast_dispatcher { true , " cpuopt_fast_dispatcher " } ;
Basic Setting< bool > cpuopt_context_elimination { true , " cpuopt_context_elimination " } ;
Setting< bool > cpuopt_context_elimination { true , " cpuopt_context_elimination " } ;
Basic Setting< bool > cpuopt_const_prop { true , " cpuopt_const_prop " } ;
Setting< bool > cpuopt_const_prop { true , " cpuopt_const_prop " } ;
Basic Setting< bool > cpuopt_misc_ir { true , " cpuopt_misc_ir " } ;
Setting< bool > cpuopt_misc_ir { true , " cpuopt_misc_ir " } ;
Basic Setting< bool > cpuopt_reduce_misalign_checks { true , " cpuopt_reduce_misalign_checks " } ;
Setting< bool > cpuopt_reduce_misalign_checks { true , " cpuopt_reduce_misalign_checks " } ;
Basic Setting< bool > cpuopt_fastmem { true , " cpuopt_fastmem " } ;
Setting< bool > cpuopt_fastmem { true , " cpuopt_fastmem " } ;
Basic Setting< bool > cpuopt_fastmem_exclusives { true , " cpuopt_fastmem_exclusives " } ;
Setting< bool > cpuopt_fastmem_exclusives { true , " cpuopt_fastmem_exclusives " } ;
Basic Setting< bool > cpuopt_recompile_exclusives { true , " cpuopt_recompile_exclusives " } ;
Setting< bool > cpuopt_recompile_exclusives { true , " cpuopt_recompile_exclusives " } ;
Setting < bool > cpuopt_unsafe_unfuse_fma { true , " cpuopt_unsafe_unfuse_fma " } ;
SwitchableSetting < bool > cpuopt_unsafe_unfuse_fma { true , " cpuopt_unsafe_unfuse_fma " } ;
Setting < bool > cpuopt_unsafe_reduce_fp_error { true , " cpuopt_unsafe_reduce_fp_error " } ;
SwitchableSetting < bool > cpuopt_unsafe_reduce_fp_error { true , " cpuopt_unsafe_reduce_fp_error " } ;
Setting < bool > cpuopt_unsafe_ignore_standard_fpcr { true , " cpuopt_unsafe_ignore_standard_fpcr " } ;
SwitchableSetting < bool > cpuopt_unsafe_ignore_standard_fpcr {
Setting < bool > cpuopt_unsafe_inaccurate_nan { true , " cpuopt_unsafe_inaccurate_nan " } ;
true , " cpuopt_unsafe_ignore_standard_fpcr " } ;
Setting < bool > cpuopt_unsafe_fastmem_check { true , " cpuopt_unsafe_fastmem_check " } ;
SwitchableSetting < bool > cpuopt_unsafe_inaccurate_nan { true , " cpuopt_unsafe_inaccurate_nan " } ;
Setting < bool > cpuopt_unsafe_ignore_global_monitor { true , " cpuopt_unsafe_ignore_global_monitor " } ;
SwitchableSetting < bool > cpuopt_unsafe_fastmem_check { true , " cpuopt_unsafe_fastmem_check " } ;
SwitchableSetting < bool > cpuopt_unsafe_ignore_global_monitor {
true , " cpuopt_unsafe_ignore_global_monitor " } ;
// Renderer
// Renderer
Ranged Setting< RendererBackend > renderer_backend {
Switchable Setting< RendererBackend > renderer_backend {
RendererBackend : : Vulkan , RendererBackend : : OpenGL , RendererBackend : : Vulkan , " backend " } ;
RendererBackend : : Vulkan , RendererBackend : : OpenGL , RendererBackend : : Vulkan , " backend " } ;
BasicSetting < bool > renderer_debug { false , " debug " } ;
Setting < bool > renderer_debug { false , " debug " } ;
BasicSetting < bool > renderer_shader_feedback { false , " shader_feedback " } ;
Setting < bool > renderer_shader_feedback { false , " shader_feedback " } ;
BasicSetting < bool > enable_nsight_aftermath { false , " nsight_aftermath " } ;
Setting < bool > enable_nsight_aftermath { false , " nsight_aftermath " } ;
BasicSetting < bool > disable_shader_loop_safety_checks { false ,
Setting < bool > disable_shader_loop_safety_checks { false , " disable_shader_loop_safety_checks " } ;
" disable_shader_loop_safety_checks " } ;
SwitchableSetting < int > vulkan_device { 0 , " vulkan_device " } ;
Setting < int > vulkan_device { 0 , " vulkan_device " } ;
ResolutionScalingInfo resolution_info { } ;
ResolutionScalingInfo resolution_info { } ;
S etting< ResolutionSetup > resolution_setup { ResolutionSetup : : Res1X , " resolution_setup " } ;
S witchableS etting< ResolutionSetup > resolution_setup { ResolutionSetup : : Res1X , " resolution_setup " } ;
S etting< ScalingFilter > scaling_filter { ScalingFilter : : Bilinear , " scaling_filter " } ;
S witchableS etting< ScalingFilter > scaling_filter { ScalingFilter : : Bilinear , " scaling_filter " } ;
S etting< AntiAliasing > anti_aliasing { AntiAliasing : : None , " anti_aliasing " } ;
S witchableS etting< AntiAliasing > anti_aliasing { AntiAliasing : : None , " anti_aliasing " } ;
// *nix platforms may have issues with the borderless windowed fullscreen mode.
// *nix platforms may have issues with the borderless windowed fullscreen mode.
// Default to exclusive fullscreen on these platforms for now.
// Default to exclusive fullscreen on these platforms for now.
Ranged Setting< FullscreenMode > fullscreen_mode {
Switchable Setting< FullscreenMode > fullscreen_mode {
# ifdef _WIN32
# ifdef _WIN32
FullscreenMode : : Borderless ,
FullscreenMode : : Borderless ,
# else
# else
FullscreenMode : : Exclusive ,
FullscreenMode : : Exclusive ,
# endif
# endif
FullscreenMode : : Borderless , FullscreenMode : : Exclusive , " fullscreen_mode " } ;
FullscreenMode : : Borderless , FullscreenMode : : Exclusive , " fullscreen_mode " } ;
Ranged Setting< int > aspect_ratio { 0 , 0 , 3 , " aspect_ratio " } ;
Switchable Setting< int > aspect_ratio { 0 , 0 , 3 , " aspect_ratio " } ;
Ranged Setting< int > max_anisotropy { 0 , 0 , 5 , " max_anisotropy " } ;
Switchable Setting< int > max_anisotropy { 0 , 0 , 5 , " max_anisotropy " } ;
S etting< bool > use_speed_limit { true , " use_speed_limit " } ;
S witchableS etting< bool > use_speed_limit { true , " use_speed_limit " } ;
Ranged Setting< u16 > speed_limit { 100 , 0 , 9999 , " speed_limit " } ;
Switchable Setting< u16 > speed_limit { 100 , 0 , 9999 , " speed_limit " } ;
S etting< bool > use_disk_shader_cache { true , " use_disk_shader_cache " } ;
S witchableS etting< bool > use_disk_shader_cache { true , " use_disk_shader_cache " } ;
Ranged Setting< GPUAccuracy > gpu_accuracy { GPUAccuracy : : High , GPUAccuracy : : Normal ,
Switchable Setting< GPUAccuracy > gpu_accuracy { GPUAccuracy : : High , GPUAccuracy : : Normal ,
GPUAccuracy : : Extreme , " gpu_accuracy " } ;
GPUAccuracy : : Extreme , " gpu_accuracy " } ;
S etting< bool > use_asynchronous_gpu_emulation { true , " use_asynchronous_gpu_emulation " } ;
S witchableS etting< bool > use_asynchronous_gpu_emulation { true , " use_asynchronous_gpu_emulation " } ;
S etting< NvdecEmulation > nvdec_emulation { NvdecEmulation : : GPU , " nvdec_emulation " } ;
S witchableS etting< NvdecEmulation > nvdec_emulation { NvdecEmulation : : GPU , " nvdec_emulation " } ;
S etting< bool > accelerate_astc { true , " accelerate_astc " } ;
S witchableS etting< bool > accelerate_astc { true , " accelerate_astc " } ;
S etting< bool > use_vsync { true , " use_vsync " } ;
S witchableS etting< bool > use_vsync { true , " use_vsync " } ;
Ranged Setting< u16 > fps_cap { 1000 , 1 , 1000 , " fps_cap " } ;
Switchable Setting< u16 > fps_cap { 1000 , 1 , 1000 , " fps_cap " } ;
Basic Setting< bool > disable_fps_limit { false , " disable_fps_limit " } ;
Setting< bool > disable_fps_limit { false , " disable_fps_limit " } ;
Ranged Setting< ShaderBackend > shader_backend { ShaderBackend : : GLASM , ShaderBackend : : GLSL ,
Switchable Setting< ShaderBackend > shader_backend { ShaderBackend : : GLASM , ShaderBackend : : GLSL ,
ShaderBackend : : SPIRV , " shader_backend " } ;
ShaderBackend : : SPIRV , " shader_backend " } ;
S etting< bool > use_asynchronous_shaders { false , " use_asynchronous_shaders " } ;
S witchableS etting< bool > use_asynchronous_shaders { false , " use_asynchronous_shaders " } ;
S etting< bool > use_fast_gpu_time { true , " use_fast_gpu_time " } ;
S witchableS etting< bool > use_fast_gpu_time { true , " use_fast_gpu_time " } ;
S etting< u8 > bg_red { 0 , " bg_red " } ;
S witchableS etting< u8 > bg_red { 0 , " bg_red " } ;
S etting< u8 > bg_green { 0 , " bg_green " } ;
S witchableS etting< u8 > bg_green { 0 , " bg_green " } ;
S etting< u8 > bg_blue { 0 , " bg_blue " } ;
S witchableS etting< u8 > bg_blue { 0 , " bg_blue " } ;
// System
// System
S etting< std : : optional < u32 > > rng_seed { std : : optional < u32 > ( ) , " rng_seed " } ;
S witchableS etting< std : : optional < u32 > > rng_seed { std : : optional < u32 > ( ) , " rng_seed " } ;
// Measured in seconds since epoch
// Measured in seconds since epoch
std : : optional < s64 > custom_rtc ;
std : : optional < s64 > custom_rtc ;
// Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
// Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
s64 custom_rtc_differential ;
s64 custom_rtc_differential ;
Basic Setting< s32 > current_user { 0 , " current_user " } ;
Setting< s32 > current_user { 0 , " current_user " } ;
Ranged Setting< s32 > language_index { 1 , 0 , 17 , " language_index " } ;
Switchable Setting< s32 > language_index { 1 , 0 , 17 , " language_index " } ;
Ranged Setting< s32 > region_index { 1 , 0 , 6 , " region_index " } ;
Switchable Setting< s32 > region_index { 1 , 0 , 6 , " region_index " } ;
Ranged Setting< s32 > time_zone_index { 0 , 0 , 45 , " time_zone_index " } ;
Switchable Setting< s32 > time_zone_index { 0 , 0 , 45 , " time_zone_index " } ;
Ranged Setting< s32 > sound_index { 1 , 0 , 2 , " sound_index " } ;
Switchable Setting< s32 > sound_index { 1 , 0 , 2 , " sound_index " } ;
// Controls
// Controls
InputSetting < std : : array < PlayerInput , 10 > > players ;
InputSetting < std : : array < PlayerInput , 10 > > players ;
S etting< bool > use_docked_mode { true , " use_docked_mode " } ;
S witchableS etting< bool > use_docked_mode { true , " use_docked_mode " } ;
Basic Setting< bool > enable_raw_input { false , " enable_raw_input " } ;
Setting< bool > enable_raw_input { false , " enable_raw_input " } ;
Basic Setting< bool > controller_navigation { true , " controller_navigation " } ;
Setting< bool > controller_navigation { true , " controller_navigation " } ;
S etting< bool > vibration_enabled { true , " vibration_enabled " } ;
S witchableS etting< bool > vibration_enabled { true , " vibration_enabled " } ;
S etting< bool > enable_accurate_vibrations { false , " enable_accurate_vibrations " } ;
S witchableS etting< bool > enable_accurate_vibrations { false , " enable_accurate_vibrations " } ;
S etting< bool > motion_enabled { true , " motion_enabled " } ;
S witchableS etting< bool > motion_enabled { true , " motion_enabled " } ;
Basic Setting< std : : string > udp_input_servers { " 127.0.0.1:26760 " , " udp_input_servers " } ;
Setting< std : : string > udp_input_servers { " 127.0.0.1:26760 " , " udp_input_servers " } ;
Basic Setting< bool > enable_udp_controller { false , " enable_udp_controller " } ;
Setting< bool > enable_udp_controller { false , " enable_udp_controller " } ;
Basic Setting< bool > pause_tas_on_load { true , " pause_tas_on_load " } ;
Setting< bool > pause_tas_on_load { true , " pause_tas_on_load " } ;
Basic Setting< bool > tas_enable { false , " tas_enable " } ;
Setting< bool > tas_enable { false , " tas_enable " } ;
Basic Setting< bool > tas_loop { false , " tas_loop " } ;
Setting< bool > tas_loop { false , " tas_loop " } ;
Basic Setting< bool > mouse_panning { false , " mouse_panning " } ;
Setting< bool > mouse_panning { false , " mouse_panning " } ;
BasicRanged Setting< u8 > mouse_panning_sensitivity { 10 , 1 , 100 , " mouse_panning_sensitivity " } ;
Setting< u8 > mouse_panning_sensitivity { 10 , 1 , 100 , " mouse_panning_sensitivity " } ;
Basic Setting< bool > mouse_enabled { false , " mouse_enabled " } ;
Setting< bool > mouse_enabled { false , " mouse_enabled " } ;
Basic Setting< bool > emulate_analog_keyboard { false , " emulate_analog_keyboard " } ;
Setting< bool > emulate_analog_keyboard { false , " emulate_analog_keyboard " } ;
Basic Setting< bool > keyboard_enabled { false , " keyboard_enabled " } ;
Setting< bool > keyboard_enabled { false , " keyboard_enabled " } ;
Basic Setting< bool > debug_pad_enabled { false , " debug_pad_enabled " } ;
Setting< bool > debug_pad_enabled { false , " debug_pad_enabled " } ;
ButtonsRaw debug_pad_buttons ;
ButtonsRaw debug_pad_buttons ;
AnalogsRaw debug_pad_analogs ;
AnalogsRaw debug_pad_analogs ;
TouchscreenInput touchscreen ;
TouchscreenInput touchscreen ;
BasicSetting < std : : string > touch_device { " min_x:100,min_y:50,max_x:1800,max_y:850 " ,
Setting < std : : string > touch_device { " min_x:100,min_y:50,max_x:1800,max_y:850 " , " touch_device " } ;
" touch_device " } ;
Setting < int > touch_from_button_map_index { 0 , " touch_from_button_map " } ;
BasicSetting < int > touch_from_button_map_index { 0 , " touch_from_button_map " } ;
std : : vector < TouchFromButtonMap > touch_from_button_maps ;
std : : vector < TouchFromButtonMap > touch_from_button_maps ;
Basic Setting< bool > enable_ring_controller { true , " enable_ring_controller " } ;
Setting< bool > enable_ring_controller { true , " enable_ring_controller " } ;
RingconRaw ringcon_analogs ;
RingconRaw ringcon_analogs ;
// Data Storage
// Data Storage
Basic Setting< bool > use_virtual_sd { true , " use_virtual_sd " } ;
Setting< bool > use_virtual_sd { true , " use_virtual_sd " } ;
Basic Setting< bool > gamecard_inserted { false , " gamecard_inserted " } ;
Setting< bool > gamecard_inserted { false , " gamecard_inserted " } ;
Basic Setting< bool > gamecard_current_game { false , " gamecard_current_game " } ;
Setting< bool > gamecard_current_game { false , " gamecard_current_game " } ;
Basic Setting< std : : string > gamecard_path { std : : string ( ) , " gamecard_path " } ;
Setting< std : : string > gamecard_path { std : : string ( ) , " gamecard_path " } ;
// Debugging
// Debugging
bool record_frame_times ;
bool record_frame_times ;
Basic Setting< bool > use_gdbstub { false , " use_gdbstub " } ;
Setting< bool > use_gdbstub { false , " use_gdbstub " } ;
Basic Setting< u16 > gdbstub_port { 6543 , " gdbstub_port " } ;
Setting< u16 > gdbstub_port { 6543 , " gdbstub_port " } ;
Basic Setting< std : : string > program_args { std : : string ( ) , " program_args " } ;
Setting< std : : string > program_args { std : : string ( ) , " program_args " } ;
Basic Setting< bool > dump_exefs { false , " dump_exefs " } ;
Setting< bool > dump_exefs { false , " dump_exefs " } ;
Basic Setting< bool > dump_nso { false , " dump_nso " } ;
Setting< bool > dump_nso { false , " dump_nso " } ;
Basic Setting< bool > dump_shaders { false , " dump_shaders " } ;
Setting< bool > dump_shaders { false , " dump_shaders " } ;
Basic Setting< bool > dump_macros { false , " dump_macros " } ;
Setting< bool > dump_macros { false , " dump_macros " } ;
Basic Setting< bool > enable_fs_access_log { false , " enable_fs_access_log " } ;
Setting< bool > enable_fs_access_log { false , " enable_fs_access_log " } ;
Basic Setting< bool > reporting_services { false , " reporting_services " } ;
Setting< bool > reporting_services { false , " reporting_services " } ;
Basic Setting< bool > quest_flag { false , " quest_flag " } ;
Setting< bool > quest_flag { false , " quest_flag " } ;
Basic Setting< bool > disable_macro_jit { false , " disable_macro_jit " } ;
Setting< bool > disable_macro_jit { false , " disable_macro_jit " } ;
Basic Setting< bool > extended_logging { false , " extended_logging " } ;
Setting< bool > extended_logging { false , " extended_logging " } ;
Basic Setting< bool > use_debug_asserts { false , " use_debug_asserts " } ;
Setting< bool > use_debug_asserts { false , " use_debug_asserts " } ;
Basic Setting< bool > use_auto_stub { false , " use_auto_stub " } ;
Setting< bool > use_auto_stub { false , " use_auto_stub " } ;
Basic Setting< bool > enable_all_controllers { false , " enable_all_controllers " } ;
Setting< bool > enable_all_controllers { false , " enable_all_controllers " } ;
// Miscellaneous
// Miscellaneous
Basic Setting< std : : string > log_filter { " *:Info " , " log_filter " } ;
Setting< std : : string > log_filter { " *:Info " , " log_filter " } ;
Basic Setting< bool > use_dev_keys { false , " use_dev_keys " } ;
Setting< bool > use_dev_keys { false , " use_dev_keys " } ;
// Network
// Network
Basic Setting< std : : string > network_interface { std : : string ( ) , " network_interface " } ;
Setting< std : : string > network_interface { std : : string ( ) , " network_interface " } ;
// WebService
// WebService
Basic Setting< bool > enable_telemetry { true , " enable_telemetry " } ;
Setting< bool > enable_telemetry { true , " enable_telemetry " } ;
Basic Setting< std : : string > web_api_url { " https://api.yuzu-emu.org " , " web_api_url " } ;
Setting< std : : string > web_api_url { " https://api.yuzu-emu.org " , " web_api_url " } ;
Basic Setting< std : : string > yuzu_username { std : : string ( ) , " yuzu_username " } ;
Setting< std : : string > yuzu_username { std : : string ( ) , " yuzu_username " } ;
Basic Setting< std : : string > yuzu_token { std : : string ( ) , " yuzu_token " } ;
Setting< std : : string > yuzu_token { std : : string ( ) , " yuzu_token " } ;
// Add-Ons
// Add-Ons
std : : map < u64 , std : : vector < std : : string > > disabled_addons ;
std : : map < u64 , std : : vector < std : : string > > disabled_addons ;