settings.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <algorithm>
  5. #include <array>
  6. #include <map>
  7. #include <memory>
  8. #include <stdexcept>
  9. #include <string>
  10. #include <utility>
  11. #include <vector>
  12. #include "common/common_types.h"
  13. #include "common/settings_common.h"
  14. #include "common/settings_enums.h"
  15. #include "common/settings_input.h"
  16. #include "common/settings_setting.h"
  17. namespace Settings {
  18. const char* TranslateCategory(Settings::Category category);
  19. struct ResolutionScalingInfo {
  20. u32 up_scale{1};
  21. u32 down_shift{0};
  22. f32 up_factor{1.0f};
  23. f32 down_factor{1.0f};
  24. bool active{};
  25. bool downscale{};
  26. s32 ScaleUp(s32 value) const {
  27. if (value == 0) {
  28. return 0;
  29. }
  30. return std::max((value * static_cast<s32>(up_scale)) >> static_cast<s32>(down_shift), 1);
  31. }
  32. u32 ScaleUp(u32 value) const {
  33. if (value == 0U) {
  34. return 0U;
  35. }
  36. return std::max((value * up_scale) >> down_shift, 1U);
  37. }
  38. };
  39. #ifndef CANNOT_EXPLICITLY_INSTANTIATE
  40. // Instantiate the classes elsewhere (settings.cpp) to reduce compiler/linker work
  41. #define SETTING(TYPE, RANGED) extern template class Setting<TYPE, RANGED>
  42. #define SWITCHABLE(TYPE, RANGED) extern template class SwitchableSetting<TYPE, RANGED>
  43. SETTING(AudioEngine, false);
  44. SETTING(bool, false);
  45. SETTING(int, false);
  46. SETTING(s32, false);
  47. SETTING(std::string, false);
  48. SETTING(std::string, false);
  49. SETTING(u16, false);
  50. SWITCHABLE(AnisotropyMode, true);
  51. SWITCHABLE(AntiAliasing, false);
  52. SWITCHABLE(AspectRatio, true);
  53. SWITCHABLE(AstcDecodeMode, true);
  54. SWITCHABLE(AstcRecompression, true);
  55. SWITCHABLE(AudioMode, true);
  56. SWITCHABLE(CpuAccuracy, true);
  57. SWITCHABLE(FullscreenMode, true);
  58. SWITCHABLE(GpuAccuracy, true);
  59. SWITCHABLE(Language, true);
  60. SWITCHABLE(NvdecEmulation, false);
  61. SWITCHABLE(Region, true);
  62. SWITCHABLE(RendererBackend, true);
  63. SWITCHABLE(ScalingFilter, false);
  64. SWITCHABLE(ShaderBackend, true);
  65. SWITCHABLE(TimeZone, true);
  66. SETTING(VSyncMode, true);
  67. SWITCHABLE(bool, false);
  68. SWITCHABLE(int, false);
  69. SWITCHABLE(int, true);
  70. SWITCHABLE(s64, false);
  71. SWITCHABLE(u16, true);
  72. SWITCHABLE(u32, false);
  73. SWITCHABLE(u8, false);
  74. SWITCHABLE(u8, true);
  75. #undef SETTING
  76. #undef SWITCHABLE
  77. #endif
  78. /**
  79. * The InputSetting class allows for getting a reference to either the global or custom members.
  80. * This is required as we cannot easily modify the values of user-defined types within containers
  81. * using the SetValue() member function found in the Setting class. The primary purpose of this
  82. * class is to store an array of 10 PlayerInput structs for both the global and custom setting and
  83. * allows for easily accessing and modifying both settings.
  84. */
  85. template <typename Type>
  86. class InputSetting final {
  87. public:
  88. InputSetting() = default;
  89. explicit InputSetting(Type val) : Setting<Type>(val) {}
  90. ~InputSetting() = default;
  91. void SetGlobal(bool to_global) {
  92. use_global = to_global;
  93. }
  94. [[nodiscard]] bool UsingGlobal() const {
  95. return use_global;
  96. }
  97. [[nodiscard]] Type& GetValue(bool need_global = false) {
  98. if (use_global || need_global) {
  99. return global;
  100. }
  101. return custom;
  102. }
  103. private:
  104. bool use_global{true}; ///< The setting's global state
  105. Type global{}; ///< The setting
  106. Type custom{}; ///< The custom setting value
  107. };
  108. struct TouchFromButtonMap {
  109. std::string name;
  110. std::vector<std::string> buttons;
  111. };
  112. struct Values {
  113. Linkage linkage{};
  114. // Audio
  115. Setting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio};
  116. Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio};
  117. Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio};
  118. SwitchableSetting<AudioMode, true> sound_index{linkage, AudioMode::Stereo,
  119. AudioMode::Mono, AudioMode::Surround,
  120. "sound_index", Category::SystemAudio};
  121. SwitchableSetting<u8, true> volume{linkage, 100, 0, 200, "volume", Category::Audio, true, true};
  122. Setting<bool, false> audio_muted{linkage, false, "audio_muted", Category::Audio, false};
  123. Setting<bool, false> dump_audio_commands{linkage, false, "dump_audio_commands", Category::Audio,
  124. false};
  125. // Core
  126. SwitchableSetting<bool> use_multi_core{linkage, true, "use_multi_core", Category::Core};
  127. SwitchableSetting<bool> use_unsafe_extended_memory_layout{
  128. linkage, false, "use_unsafe_extended_memory_layout", Category::Core};
  129. SwitchableSetting<bool> use_speed_limit{linkage, true, "use_speed_limit",
  130. Category::Core, false, true};
  131. SwitchableSetting<u16, true> speed_limit{linkage, 100, 0, 9999, "speed_limit",
  132. Category::Core, true, true};
  133. // Cpu
  134. SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto,
  135. CpuAccuracy::Auto, CpuAccuracy::Paranoid,
  136. "cpu_accuracy", Category::Cpu};
  137. Setting<bool> cpu_debug_mode{linkage, false, "cpu_debug_mode", Category::CpuDebug};
  138. Setting<bool> cpuopt_page_tables{linkage, true, "cpuopt_page_tables", Category::CpuDebug};
  139. Setting<bool> cpuopt_block_linking{linkage, true, "cpuopt_block_linking", Category::CpuDebug};
  140. Setting<bool> cpuopt_return_stack_buffer{linkage, true, "cpuopt_return_stack_buffer",
  141. Category::CpuDebug};
  142. Setting<bool> cpuopt_fast_dispatcher{linkage, true, "cpuopt_fast_dispatcher",
  143. Category::CpuDebug};
  144. Setting<bool> cpuopt_context_elimination{linkage, true, "cpuopt_context_elimination",
  145. Category::CpuDebug};
  146. Setting<bool> cpuopt_const_prop{linkage, true, "cpuopt_const_prop", Category::CpuDebug};
  147. Setting<bool> cpuopt_misc_ir{linkage, true, "cpuopt_misc_ir", Category::CpuDebug};
  148. Setting<bool> cpuopt_reduce_misalign_checks{linkage, true, "cpuopt_reduce_misalign_checks",
  149. Category::CpuDebug};
  150. Setting<bool> cpuopt_fastmem{linkage, true, "cpuopt_fastmem", Category::CpuDebug};
  151. Setting<bool> cpuopt_fastmem_exclusives{linkage, true, "cpuopt_fastmem_exclusives",
  152. Category::CpuDebug};
  153. Setting<bool> cpuopt_recompile_exclusives{linkage, true, "cpuopt_recompile_exclusives",
  154. Category::CpuDebug};
  155. Setting<bool> cpuopt_ignore_memory_aborts{linkage, true, "cpuopt_ignore_memory_aborts",
  156. Category::CpuDebug};
  157. SwitchableSetting<bool> cpuopt_unsafe_unfuse_fma{linkage, true, "cpuopt_unsafe_unfuse_fma",
  158. Category::CpuUnsafe};
  159. SwitchableSetting<bool> cpuopt_unsafe_reduce_fp_error{
  160. linkage, true, "cpuopt_unsafe_reduce_fp_error", Category::CpuUnsafe};
  161. SwitchableSetting<bool> cpuopt_unsafe_ignore_standard_fpcr{
  162. linkage, true, "cpuopt_unsafe_ignore_standard_fpcr", Category::CpuUnsafe};
  163. SwitchableSetting<bool> cpuopt_unsafe_inaccurate_nan{
  164. linkage, true, "cpuopt_unsafe_inaccurate_nan", Category::CpuUnsafe};
  165. SwitchableSetting<bool> cpuopt_unsafe_fastmem_check{
  166. linkage, true, "cpuopt_unsafe_fastmem_check", Category::CpuUnsafe};
  167. SwitchableSetting<bool> cpuopt_unsafe_ignore_global_monitor{
  168. linkage, true, "cpuopt_unsafe_ignore_global_monitor", Category::CpuUnsafe};
  169. // Renderer
  170. SwitchableSetting<RendererBackend, true> renderer_backend{
  171. linkage, RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null,
  172. "backend", Category::Renderer};
  173. SwitchableSetting<ShaderBackend, true> shader_backend{
  174. linkage, ShaderBackend::Glsl, ShaderBackend::Glsl, ShaderBackend::SpirV,
  175. "shader_backend", Category::Renderer};
  176. SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer};
  177. SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache",
  178. Category::Renderer};
  179. SwitchableSetting<bool> use_asynchronous_gpu_emulation{
  180. linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer};
  181. SwitchableSetting<AstcDecodeMode, true> accelerate_astc{linkage,
  182. AstcDecodeMode::Cpu,
  183. AstcDecodeMode::Cpu,
  184. AstcDecodeMode::CpuAsynchronous,
  185. "accelerate_astc",
  186. Category::Renderer};
  187. Setting<VSyncMode, true> vsync_mode{linkage,
  188. VSyncMode::Fifo,
  189. VSyncMode::Immediate,
  190. VSyncMode::FifoRelaxed,
  191. "use_vsync",
  192. Category::Renderer,
  193. true,
  194. true};
  195. SwitchableSetting<NvdecEmulation> nvdec_emulation{linkage, NvdecEmulation::Gpu,
  196. "nvdec_emulation", Category::Renderer};
  197. // *nix platforms may have issues with the borderless windowed fullscreen mode.
  198. // Default to exclusive fullscreen on these platforms for now.
  199. SwitchableSetting<FullscreenMode, true> fullscreen_mode{linkage,
  200. #ifdef _WIN32
  201. FullscreenMode::Borderless,
  202. #else
  203. FullscreenMode::Exclusive,
  204. #endif
  205. FullscreenMode::Borderless,
  206. FullscreenMode::Exclusive,
  207. "fullscreen_mode",
  208. Category::Renderer,
  209. true,
  210. true};
  211. SwitchableSetting<AspectRatio, true> aspect_ratio{linkage,
  212. AspectRatio::R16_9,
  213. AspectRatio::R16_9,
  214. AspectRatio::Stretch,
  215. "aspect_ratio",
  216. Category::Renderer,
  217. true,
  218. true};
  219. ResolutionScalingInfo resolution_info{};
  220. SwitchableSetting<ResolutionSetup> resolution_setup{linkage, ResolutionSetup::Res1X,
  221. "resolution_setup", Category::Renderer};
  222. SwitchableSetting<ScalingFilter> scaling_filter{
  223. linkage, ScalingFilter::Bilinear, "scaling_filter", Category::Renderer, true, true};
  224. SwitchableSetting<AntiAliasing> anti_aliasing{
  225. linkage, AntiAliasing::None, "anti_aliasing", Category::Renderer, true, true};
  226. SwitchableSetting<int, true> fsr_sharpening_slider{
  227. linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer, true, true};
  228. SwitchableSetting<u8, false> bg_red{linkage, 0, "bg_red", Category::Renderer, true, true};
  229. SwitchableSetting<u8, false> bg_green{linkage, 0, "bg_green", Category::Renderer, true, true};
  230. SwitchableSetting<u8, false> bg_blue{linkage, 0, "bg_blue", Category::Renderer, true, true};
  231. SwitchableSetting<GpuAccuracy, true> gpu_accuracy{linkage,
  232. GpuAccuracy::High,
  233. GpuAccuracy::Normal,
  234. GpuAccuracy::Extreme,
  235. "gpu_accuracy",
  236. Category::RendererAdvanced,
  237. true,
  238. true};
  239. SwitchableSetting<AnisotropyMode, true> max_anisotropy{
  240. linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16,
  241. "max_anisotropy", Category::RendererAdvanced};
  242. SwitchableSetting<AstcRecompression, true> astc_recompression{linkage,
  243. AstcRecompression::Uncompressed,
  244. AstcRecompression::Uncompressed,
  245. AstcRecompression::Bc3,
  246. "astc_recompression",
  247. Category::RendererAdvanced};
  248. SwitchableSetting<bool> async_presentation{linkage, false, "async_presentation",
  249. Category::RendererAdvanced};
  250. SwitchableSetting<bool> renderer_force_max_clock{linkage, false, "force_max_clock",
  251. Category::RendererAdvanced};
  252. SwitchableSetting<bool> use_reactive_flushing{linkage, true, "use_reactive_flushing",
  253. Category::RendererAdvanced};
  254. SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
  255. Category::RendererAdvanced};
  256. SwitchableSetting<bool> use_fast_gpu_time{
  257. linkage, true, "use_fast_gpu_time", Category::RendererAdvanced, true, true};
  258. SwitchableSetting<bool> use_vulkan_driver_pipeline_cache{
  259. linkage, true, "use_vulkan_driver_pipeline_cache", Category::RendererAdvanced, true, true};
  260. SwitchableSetting<bool> enable_compute_pipelines{linkage, false, "enable_compute_pipelines",
  261. Category::RendererAdvanced};
  262. SwitchableSetting<bool> use_video_framerate{linkage, false, "use_video_framerate",
  263. Category::RendererAdvanced};
  264. SwitchableSetting<bool> barrier_feedback_loops{linkage, true, "barrier_feedback_loops",
  265. Category::RendererAdvanced};
  266. Setting<bool> renderer_debug{linkage, false, "debug", Category::RendererDebug};
  267. Setting<bool> renderer_shader_feedback{linkage, false, "shader_feedback",
  268. Category::RendererDebug};
  269. Setting<bool> enable_nsight_aftermath{linkage, false, "nsight_aftermath",
  270. Category::RendererDebug};
  271. Setting<bool> disable_shader_loop_safety_checks{
  272. linkage, false, "disable_shader_loop_safety_checks", Category::RendererDebug};
  273. // System
  274. SwitchableSetting<Language, true> language_index{linkage,
  275. Language::EnglishAmerican,
  276. Language::Japanese,
  277. Language::PortugueseBrazilian,
  278. "language_index",
  279. Category::System};
  280. SwitchableSetting<Region, true> region_index{linkage, Region::Usa, Region::Japan,
  281. Region::Taiwan, "region_index", Category::System};
  282. SwitchableSetting<TimeZone, true> time_zone_index{linkage, TimeZone::Auto,
  283. TimeZone::Auto, TimeZone::Zulu,
  284. "time_zone_index", Category::System};
  285. // Measured in seconds since epoch
  286. SwitchableSetting<bool> custom_rtc_enabled{linkage, false, "custom_rtc_enabled",
  287. Category::System, true, true};
  288. SwitchableSetting<s64> custom_rtc{linkage, 0, "custom_rtc", Category::System, true, true};
  289. // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
  290. s64 custom_rtc_differential;
  291. SwitchableSetting<bool> rng_seed_enabled{linkage, false, "rng_seed_enabled",
  292. Category::System, true, true};
  293. SwitchableSetting<u32> rng_seed{linkage, 0, "rng_seed", Category::System, true, true};
  294. Setting<std::string> device_name{linkage, "yuzu", "device_name", Category::System, true, true};
  295. Setting<s32> current_user{linkage, 0, "current_user", Category::System};
  296. SwitchableSetting<bool> use_docked_mode{linkage, true, "use_docked_mode", Category::System};
  297. // Controls
  298. InputSetting<std::array<PlayerInput, 10>> players;
  299. Setting<bool> enable_raw_input{linkage, false, "enable_raw_input", Category::Controls,
  300. // Only read/write enable_raw_input on Windows platforms
  301. #ifdef _WIN32
  302. true
  303. #else
  304. false
  305. #endif
  306. };
  307. Setting<bool> controller_navigation{linkage, true, "controller_navigation", Category::Controls};
  308. Setting<bool> enable_joycon_driver{linkage, true, "enable_joycon_driver", Category::Controls};
  309. Setting<bool> enable_procon_driver{linkage, false, "enable_procon_driver", Category::Controls};
  310. SwitchableSetting<bool> vibration_enabled{linkage, true, "vibration_enabled",
  311. Category::Controls};
  312. SwitchableSetting<bool> enable_accurate_vibrations{linkage, false, "enable_accurate_vibrations",
  313. Category::Controls};
  314. SwitchableSetting<bool> motion_enabled{linkage, true, "motion_enabled", Category::Controls};
  315. Setting<std::string> udp_input_servers{linkage, "127.0.0.1:26760", "udp_input_servers",
  316. Category::Controls};
  317. Setting<bool> enable_udp_controller{linkage, false, "enable_udp_controller",
  318. Category::Controls};
  319. Setting<bool> pause_tas_on_load{linkage, true, "pause_tas_on_load", Category::Controls};
  320. Setting<bool> tas_enable{linkage, false, "tas_enable", Category::Controls};
  321. Setting<bool> tas_loop{linkage, false, "tas_loop", Category::Controls};
  322. Setting<bool> mouse_panning{linkage, false, "mouse_panning", Category::Controls, false};
  323. Setting<u8, true> mouse_panning_sensitivity{
  324. linkage, 50, 1, 100, "mouse_panning_sensitivity", Category::Controls};
  325. Setting<bool> mouse_enabled{linkage, false, "mouse_enabled", Category::Controls};
  326. Setting<u8, true> mouse_panning_x_sensitivity{
  327. linkage, 50, 1, 100, "mouse_panning_x_sensitivity", Category::Controls};
  328. Setting<u8, true> mouse_panning_y_sensitivity{
  329. linkage, 50, 1, 100, "mouse_panning_y_sensitivity", Category::Controls};
  330. Setting<u8, true> mouse_panning_deadzone_counterweight{
  331. linkage, 20, 0, 100, "mouse_panning_deadzone_counterweight", Category::Controls};
  332. Setting<u8, true> mouse_panning_decay_strength{
  333. linkage, 18, 0, 100, "mouse_panning_decay_strength", Category::Controls};
  334. Setting<u8, true> mouse_panning_min_decay{
  335. linkage, 6, 0, 100, "mouse_panning_min_decay", Category::Controls};
  336. Setting<bool> emulate_analog_keyboard{linkage, false, "emulate_analog_keyboard",
  337. Category::Controls};
  338. Setting<bool> keyboard_enabled{linkage, false, "keyboard_enabled", Category::Controls};
  339. Setting<bool> debug_pad_enabled{linkage, false, "debug_pad_enabled", Category::Controls};
  340. ButtonsRaw debug_pad_buttons;
  341. AnalogsRaw debug_pad_analogs;
  342. TouchscreenInput touchscreen;
  343. Setting<std::string> touch_device{linkage, "min_x:100,min_y:50,max_x:1800,max_y:850",
  344. "touch_device", Category::Controls};
  345. Setting<int> touch_from_button_map_index{linkage, 0, "touch_from_button_map",
  346. Category::Controls};
  347. std::vector<TouchFromButtonMap> touch_from_button_maps;
  348. Setting<bool> enable_ring_controller{linkage, true, "enable_ring_controller",
  349. Category::Controls};
  350. RingconRaw ringcon_analogs;
  351. Setting<bool> enable_ir_sensor{linkage, false, "enable_ir_sensor", Category::Controls};
  352. Setting<std::string> ir_sensor_device{linkage, "auto", "ir_sensor_device", Category::Controls};
  353. Setting<bool> random_amiibo_id{linkage, false, "random_amiibo_id", Category::Controls};
  354. // Data Storage
  355. Setting<bool> use_virtual_sd{linkage, true, "use_virtual_sd", Category::DataStorage};
  356. Setting<bool> gamecard_inserted{linkage, false, "gamecard_inserted", Category::DataStorage};
  357. Setting<bool> gamecard_current_game{linkage, false, "gamecard_current_game",
  358. Category::DataStorage};
  359. Setting<std::string> gamecard_path{linkage, std::string(), "gamecard_path",
  360. Category::DataStorage};
  361. // Debugging
  362. bool record_frame_times;
  363. Setting<bool> use_gdbstub{linkage, false, "use_gdbstub", Category::Debugging};
  364. Setting<u16> gdbstub_port{linkage, 6543, "gdbstub_port", Category::Debugging};
  365. Setting<std::string> program_args{linkage, std::string(), "program_args", Category::Debugging};
  366. Setting<bool> dump_exefs{linkage, false, "dump_exefs", Category::Debugging};
  367. Setting<bool> dump_nso{linkage, false, "dump_nso", Category::Debugging};
  368. Setting<bool> dump_shaders{linkage, false, "dump_shaders", Category::DebuggingGraphics, false};
  369. Setting<bool> dump_macros{linkage, false, "dump_macros", Category::DebuggingGraphics, false};
  370. Setting<bool> enable_fs_access_log{linkage, false, "enable_fs_access_log", Category::Debugging};
  371. Setting<bool> reporting_services{linkage, false, "reporting_services", Category::Debugging,
  372. false};
  373. Setting<bool> quest_flag{linkage, false, "quest_flag", Category::Debugging};
  374. Setting<bool> disable_macro_jit{linkage, false, "disable_macro_jit",
  375. Category::DebuggingGraphics};
  376. Setting<bool> disable_macro_hle{linkage, false, "disable_macro_hle",
  377. Category::DebuggingGraphics};
  378. Setting<bool> extended_logging{linkage, false, "extended_logging", Category::Debugging, false};
  379. Setting<bool> use_debug_asserts{linkage, false, "use_debug_asserts", Category::Debugging};
  380. Setting<bool> use_auto_stub{linkage, false, "use_auto_stub", Category::Debugging, false};
  381. Setting<bool> enable_all_controllers{linkage, false, "enable_all_controllers",
  382. Category::Debugging};
  383. Setting<bool> create_crash_dumps{linkage, false, "create_crash_dumps", Category::Debugging};
  384. Setting<bool> perform_vulkan_check{linkage, true, "perform_vulkan_check", Category::Debugging};
  385. // Miscellaneous
  386. Setting<std::string> log_filter{linkage, "*:Info", "log_filter", Category::Miscellaneous};
  387. Setting<bool> use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous};
  388. // Network
  389. Setting<std::string> network_interface{linkage, std::string(), "network_interface",
  390. Category::Network};
  391. // WebService
  392. Setting<bool> enable_telemetry{linkage, true, "enable_telemetry", Category::WebService};
  393. Setting<std::string> web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url",
  394. Category::WebService};
  395. Setting<std::string> yuzu_username{linkage, std::string(), "yuzu_username",
  396. Category::WebService};
  397. Setting<std::string> yuzu_token{linkage, std::string(), "yuzu_token", Category::WebService};
  398. // Add-Ons
  399. std::map<u64, std::vector<std::string>> disabled_addons;
  400. };
  401. extern Values values;
  402. bool IsGPULevelExtreme();
  403. bool IsGPULevelHigh();
  404. bool IsFastmemEnabled();
  405. float Volume();
  406. std::string GetTimeZoneString();
  407. void LogSettings();
  408. void UpdateRescalingInfo();
  409. // Restore the global state of all applicable settings in the Values struct
  410. void RestoreGlobalState(bool is_powered_on);
  411. } // namespace Settings