settings.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <algorithm>
  6. #include <array>
  7. #include <atomic>
  8. #include <chrono>
  9. #include <map>
  10. #include <optional>
  11. #include <string>
  12. #include <utility>
  13. #include <vector>
  14. #include "common/common_types.h"
  15. #include "common/settings_input.h"
  16. namespace Settings {
  17. enum class RendererBackend : u32 {
  18. OpenGL = 0,
  19. Vulkan = 1,
  20. };
  21. enum class ShaderBackend : u32 {
  22. GLSL = 0,
  23. GLASM = 1,
  24. SPIRV = 2,
  25. };
  26. enum class GPUAccuracy : u32 {
  27. Normal = 0,
  28. High = 1,
  29. Extreme = 2,
  30. };
  31. enum class CPUAccuracy : u32 {
  32. Auto = 0,
  33. Accurate = 1,
  34. Unsafe = 2,
  35. };
  36. enum class FullscreenMode : u32 {
  37. Borderless = 0,
  38. Exclusive = 1,
  39. };
  40. enum class NvdecEmulation : u32 {
  41. Off = 0,
  42. CPU = 1,
  43. GPU = 2,
  44. };
  45. /** The BasicSetting class is a simple resource manager. It defines a label and default value
  46. * alongside the actual value of the setting for simpler and less-error prone use with frontend
  47. * configurations. Setting a default value and label is required, though subclasses may deviate from
  48. * this requirement.
  49. */
  50. template <typename Type>
  51. class BasicSetting {
  52. protected:
  53. BasicSetting() = default;
  54. /**
  55. * Only sets the setting to the given initializer, leaving the other members to their default
  56. * initializers.
  57. *
  58. * @param global_val Initial value of the setting
  59. */
  60. explicit BasicSetting(const Type& global_val) : global{global_val} {}
  61. public:
  62. /**
  63. * Sets a default value, label, and setting value.
  64. *
  65. * @param default_val Intial value of the setting, and default value of the setting
  66. * @param name Label for the setting
  67. */
  68. explicit BasicSetting(const Type& default_val, const std::string& name)
  69. : default_value{default_val}, global{default_val}, label{name} {}
  70. virtual ~BasicSetting() = default;
  71. /**
  72. * Returns a reference to the setting's value.
  73. *
  74. * @returns A reference to the setting
  75. */
  76. [[nodiscard]] virtual const Type& GetValue() const {
  77. return global;
  78. }
  79. /**
  80. * Sets the setting to the given value.
  81. *
  82. * @param value The desired value
  83. */
  84. virtual void SetValue(const Type& value) {
  85. Type temp{value};
  86. std::swap(global, temp);
  87. }
  88. /**
  89. * Returns the value that this setting was created with.
  90. *
  91. * @returns A reference to the default value
  92. */
  93. [[nodiscard]] const Type& GetDefault() const {
  94. return default_value;
  95. }
  96. /**
  97. * Returns the label this setting was created with.
  98. *
  99. * @returns A reference to the label
  100. */
  101. [[nodiscard]] const std::string& GetLabel() const {
  102. return label;
  103. }
  104. /**
  105. * Assigns a value to the setting.
  106. *
  107. * @param value The desired setting value
  108. *
  109. * @returns A reference to the setting
  110. */
  111. virtual const Type& operator=(const Type& value) {
  112. Type temp{value};
  113. std::swap(global, temp);
  114. return global;
  115. }
  116. /**
  117. * Returns a reference to the setting.
  118. *
  119. * @returns A reference to the setting
  120. */
  121. explicit virtual operator const Type&() const {
  122. return global;
  123. }
  124. protected:
  125. const Type default_value{}; ///< The default value
  126. Type global{}; ///< The setting
  127. const std::string label{}; ///< The setting's label
  128. };
  129. /**
  130. * BasicRangedSetting class is intended for use with quantifiable settings that need a more
  131. * restrictive range than implicitly defined by its type. Implements a minimum and maximum that is
  132. * simply used to sanitize SetValue and the assignment overload.
  133. */
  134. template <typename Type>
  135. class BasicRangedSetting : virtual public BasicSetting<Type> {
  136. public:
  137. /**
  138. * Sets a default value, minimum value, maximum value, and label.
  139. *
  140. * @param default_val Intial value of the setting, and default value of the setting
  141. * @param min_val Sets the minimum allowed value of the setting
  142. * @param max_val Sets the maximum allowed value of the setting
  143. * @param name Label for the setting
  144. */
  145. explicit BasicRangedSetting(const Type& default_val, const Type& min_val, const Type& max_val,
  146. const std::string& name)
  147. : BasicSetting<Type>{default_val, name}, minimum{min_val}, maximum{max_val} {}
  148. virtual ~BasicRangedSetting() = default;
  149. /**
  150. * Like BasicSetting's SetValue, except value is clamped to the range of the setting.
  151. *
  152. * @param value The desired value
  153. */
  154. void SetValue(const Type& value) override {
  155. this->global = std::clamp(value, minimum, maximum);
  156. }
  157. /**
  158. * Like BasicSetting's assignment overload, except value is clamped to the range of the setting.
  159. *
  160. * @param value The desired value
  161. * @returns A reference to the setting's value
  162. */
  163. const Type& operator=(const Type& value) override {
  164. this->global = std::clamp(value, minimum, maximum);
  165. return this->global;
  166. }
  167. const Type minimum; ///< Minimum allowed value of the setting
  168. const Type maximum; ///< Maximum allowed value of the setting
  169. };
  170. /**
  171. * The Setting class is a slightly more complex version of the BasicSetting class. This adds a
  172. * custom setting to switch to when a guest application specifically requires it. The effect is that
  173. * other components of the emulator can access the setting's intended value without any need for the
  174. * component to ask whether the custom or global setting is needed at the moment.
  175. *
  176. * By default, the global setting is used.
  177. *
  178. * Like the BasicSetting, this requires setting a default value and label to use.
  179. */
  180. template <typename Type>
  181. class Setting : virtual public BasicSetting<Type> {
  182. public:
  183. /**
  184. * Sets a default value, label, and setting value.
  185. *
  186. * @param default_val Intial value of the setting, and default value of the setting
  187. * @param name Label for the setting
  188. */
  189. explicit Setting(const Type& default_val, const std::string& name)
  190. : BasicSetting<Type>(default_val, name) {}
  191. virtual ~Setting() = default;
  192. /**
  193. * Tells this setting to represent either the global or custom setting when other member
  194. * functions are used.
  195. *
  196. * @param to_global Whether to use the global or custom setting.
  197. */
  198. void SetGlobal(bool to_global) {
  199. use_global = to_global;
  200. }
  201. /**
  202. * Returns whether this setting is using the global setting or not.
  203. *
  204. * @returns The global state
  205. */
  206. [[nodiscard]] bool UsingGlobal() const {
  207. return use_global;
  208. }
  209. /**
  210. * Returns either the global or custom setting depending on the values of this setting's global
  211. * state or if the global value was specifically requested.
  212. *
  213. * @param need_global Request global value regardless of setting's state; defaults to false
  214. *
  215. * @returns The required value of the setting
  216. */
  217. [[nodiscard]] virtual const Type& GetValue() const override {
  218. if (use_global) {
  219. return this->global;
  220. }
  221. return custom;
  222. }
  223. [[nodiscard]] virtual const Type& GetValue(bool need_global) const {
  224. if (use_global || need_global) {
  225. return this->global;
  226. }
  227. return custom;
  228. }
  229. /**
  230. * Sets the current setting value depending on the global state.
  231. *
  232. * @param value The new value
  233. */
  234. void SetValue(const Type& value) override {
  235. Type temp{value};
  236. if (use_global) {
  237. std::swap(this->global, temp);
  238. } else {
  239. std::swap(custom, temp);
  240. }
  241. }
  242. /**
  243. * Assigns the current setting value depending on the global state.
  244. *
  245. * @param value The new value
  246. *
  247. * @returns A reference to the current setting value
  248. */
  249. const Type& operator=(const Type& value) override {
  250. Type temp{value};
  251. if (use_global) {
  252. std::swap(this->global, temp);
  253. return this->global;
  254. }
  255. std::swap(custom, temp);
  256. return custom;
  257. }
  258. /**
  259. * Returns the current setting value depending on the global state.
  260. *
  261. * @returns A reference to the current setting value
  262. */
  263. virtual explicit operator const Type&() const override {
  264. if (use_global) {
  265. return this->global;
  266. }
  267. return custom;
  268. }
  269. protected:
  270. bool use_global{true}; ///< The setting's global state
  271. Type custom{}; ///< The custom value of the setting
  272. };
  273. /**
  274. * RangedSetting is a Setting that implements a maximum and minimum value for its setting. Intended
  275. * for use with quantifiable settings.
  276. */
  277. template <typename Type>
  278. class RangedSetting final : public BasicRangedSetting<Type>, public Setting<Type> {
  279. public:
  280. /**
  281. * Sets a default value, minimum value, maximum value, and label.
  282. *
  283. * @param default_val Intial value of the setting, and default value of the setting
  284. * @param min_val Sets the minimum allowed value of the setting
  285. * @param max_val Sets the maximum allowed value of the setting
  286. * @param name Label for the setting
  287. */
  288. explicit RangedSetting(const Type& default_val, const Type& min_val, const Type& max_val,
  289. const std::string& name)
  290. : BasicSetting<Type>{default_val, name},
  291. BasicRangedSetting<Type>{default_val, min_val, max_val, name}, Setting<Type>{default_val,
  292. name} {}
  293. virtual ~RangedSetting() = default;
  294. // The following are needed to avoid a MSVC bug
  295. // (source: https://stackoverflow.com/questions/469508)
  296. [[nodiscard]] const Type& GetValue() const override {
  297. return Setting<Type>::GetValue();
  298. }
  299. [[nodiscard]] const Type& GetValue(bool need_global) const override {
  300. return Setting<Type>::GetValue(need_global);
  301. }
  302. explicit operator const Type&() const override {
  303. if (this->use_global) {
  304. return this->global;
  305. }
  306. return this->custom;
  307. }
  308. /**
  309. * Like BasicSetting's SetValue, except value is clamped to the range of the setting. Sets the
  310. * appropriate value depending on the global state.
  311. *
  312. * @param value The desired value
  313. */
  314. void SetValue(const Type& value) override {
  315. const Type temp = std::clamp(value, this->minimum, this->maximum);
  316. if (this->use_global) {
  317. this->global = temp;
  318. }
  319. this->custom = temp;
  320. }
  321. /**
  322. * Like BasicSetting's assignment overload, except value is clamped to the range of the setting.
  323. * Uses the appropriate value depending on the global state.
  324. *
  325. * @param value The desired value
  326. * @returns A reference to the setting's value
  327. */
  328. const Type& operator=(const Type& value) override {
  329. const Type temp = std::clamp(value, this->minimum, this->maximum);
  330. if (this->use_global) {
  331. this->global = temp;
  332. return this->global;
  333. }
  334. this->custom = temp;
  335. return this->custom;
  336. }
  337. };
  338. /**
  339. * The InputSetting class allows for getting a reference to either the global or custom members.
  340. * This is required as we cannot easily modify the values of user-defined types within containers
  341. * using the SetValue() member function found in the Setting class. The primary purpose of this
  342. * class is to store an array of 10 PlayerInput structs for both the global and custom setting and
  343. * allows for easily accessing and modifying both settings.
  344. */
  345. template <typename Type>
  346. class InputSetting final {
  347. public:
  348. InputSetting() = default;
  349. explicit InputSetting(Type val) : BasicSetting<Type>(val) {}
  350. ~InputSetting() = default;
  351. void SetGlobal(bool to_global) {
  352. use_global = to_global;
  353. }
  354. [[nodiscard]] bool UsingGlobal() const {
  355. return use_global;
  356. }
  357. [[nodiscard]] Type& GetValue(bool need_global = false) {
  358. if (use_global || need_global) {
  359. return global;
  360. }
  361. return custom;
  362. }
  363. private:
  364. bool use_global{true}; ///< The setting's global state
  365. Type global{}; ///< The setting
  366. Type custom{}; ///< The custom setting value
  367. };
  368. struct TouchFromButtonMap {
  369. std::string name;
  370. std::vector<std::string> buttons;
  371. };
  372. struct Values {
  373. // Audio
  374. BasicSetting<std::string> audio_device_id{"auto", "output_device"};
  375. BasicSetting<std::string> sink_id{"auto", "output_engine"};
  376. BasicSetting<bool> audio_muted{false, "audio_muted"};
  377. RangedSetting<u8> volume{100, 0, 100, "volume"};
  378. // Core
  379. Setting<bool> use_multi_core{true, "use_multi_core"};
  380. // Cpu
  381. RangedSetting<CPUAccuracy> cpu_accuracy{CPUAccuracy::Auto, CPUAccuracy::Auto,
  382. CPUAccuracy::Unsafe, "cpu_accuracy"};
  383. // TODO: remove cpu_accuracy_first_time, migration setting added 8 July 2021
  384. BasicSetting<bool> cpu_accuracy_first_time{true, "cpu_accuracy_first_time"};
  385. BasicSetting<bool> cpu_debug_mode{false, "cpu_debug_mode"};
  386. BasicSetting<bool> cpuopt_page_tables{true, "cpuopt_page_tables"};
  387. BasicSetting<bool> cpuopt_block_linking{true, "cpuopt_block_linking"};
  388. BasicSetting<bool> cpuopt_return_stack_buffer{true, "cpuopt_return_stack_buffer"};
  389. BasicSetting<bool> cpuopt_fast_dispatcher{true, "cpuopt_fast_dispatcher"};
  390. BasicSetting<bool> cpuopt_context_elimination{true, "cpuopt_context_elimination"};
  391. BasicSetting<bool> cpuopt_const_prop{true, "cpuopt_const_prop"};
  392. BasicSetting<bool> cpuopt_misc_ir{true, "cpuopt_misc_ir"};
  393. BasicSetting<bool> cpuopt_reduce_misalign_checks{true, "cpuopt_reduce_misalign_checks"};
  394. BasicSetting<bool> cpuopt_fastmem{true, "cpuopt_fastmem"};
  395. Setting<bool> cpuopt_unsafe_unfuse_fma{true, "cpuopt_unsafe_unfuse_fma"};
  396. Setting<bool> cpuopt_unsafe_reduce_fp_error{true, "cpuopt_unsafe_reduce_fp_error"};
  397. Setting<bool> cpuopt_unsafe_ignore_standard_fpcr{true, "cpuopt_unsafe_ignore_standard_fpcr"};
  398. Setting<bool> cpuopt_unsafe_inaccurate_nan{true, "cpuopt_unsafe_inaccurate_nan"};
  399. Setting<bool> cpuopt_unsafe_fastmem_check{true, "cpuopt_unsafe_fastmem_check"};
  400. // Renderer
  401. RangedSetting<RendererBackend> renderer_backend{
  402. RendererBackend::OpenGL, RendererBackend::OpenGL, RendererBackend::Vulkan, "backend"};
  403. BasicSetting<bool> renderer_debug{false, "debug"};
  404. BasicSetting<bool> renderer_shader_feedback{false, "shader_feedback"};
  405. BasicSetting<bool> enable_nsight_aftermath{false, "nsight_aftermath"};
  406. BasicSetting<bool> disable_shader_loop_safety_checks{false,
  407. "disable_shader_loop_safety_checks"};
  408. Setting<int> vulkan_device{0, "vulkan_device"};
  409. Setting<u16> resolution_factor{1, "resolution_factor"};
  410. // *nix platforms may have issues with the borderless windowed fullscreen mode.
  411. // Default to exclusive fullscreen on these platforms for now.
  412. RangedSetting<FullscreenMode> fullscreen_mode{
  413. #ifdef _WIN32
  414. FullscreenMode::Borderless,
  415. #else
  416. FullscreenMode::Exclusive,
  417. #endif
  418. FullscreenMode::Borderless, FullscreenMode::Exclusive, "fullscreen_mode"};
  419. RangedSetting<int> aspect_ratio{0, 0, 3, "aspect_ratio"};
  420. RangedSetting<int> max_anisotropy{0, 0, 4, "max_anisotropy"};
  421. Setting<bool> use_speed_limit{true, "use_speed_limit"};
  422. RangedSetting<u16> speed_limit{100, 0, 9999, "speed_limit"};
  423. Setting<bool> use_disk_shader_cache{true, "use_disk_shader_cache"};
  424. RangedSetting<GPUAccuracy> gpu_accuracy{GPUAccuracy::High, GPUAccuracy::Normal,
  425. GPUAccuracy::Extreme, "gpu_accuracy"};
  426. Setting<bool> use_asynchronous_gpu_emulation{true, "use_asynchronous_gpu_emulation"};
  427. Setting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"};
  428. Setting<bool> accelerate_astc{true, "accelerate_astc"};
  429. Setting<bool> use_vsync{true, "use_vsync"};
  430. BasicRangedSetting<u16> fps_cap{1000, 1, 1000, "fps_cap"};
  431. BasicSetting<bool> disable_fps_limit{false, "disable_fps_limit"};
  432. RangedSetting<ShaderBackend> shader_backend{ShaderBackend::GLASM, ShaderBackend::GLSL,
  433. ShaderBackend::SPIRV, "shader_backend"};
  434. Setting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"};
  435. Setting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"};
  436. Setting<u8> bg_red{0, "bg_red"};
  437. Setting<u8> bg_green{0, "bg_green"};
  438. Setting<u8> bg_blue{0, "bg_blue"};
  439. // System
  440. Setting<std::optional<u32>> rng_seed{std::optional<u32>(), "rng_seed"};
  441. // Measured in seconds since epoch
  442. std::optional<std::chrono::seconds> custom_rtc;
  443. // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
  444. std::chrono::seconds custom_rtc_differential;
  445. BasicSetting<s32> current_user{0, "current_user"};
  446. RangedSetting<s32> language_index{1, 0, 17, "language_index"};
  447. RangedSetting<s32> region_index{1, 0, 6, "region_index"};
  448. RangedSetting<s32> time_zone_index{0, 0, 45, "time_zone_index"};
  449. RangedSetting<s32> sound_index{1, 0, 2, "sound_index"};
  450. // Controls
  451. InputSetting<std::array<PlayerInput, 10>> players;
  452. Setting<bool> use_docked_mode{true, "use_docked_mode"};
  453. BasicSetting<bool> enable_raw_input{false, "enable_raw_input"};
  454. Setting<bool> vibration_enabled{true, "vibration_enabled"};
  455. Setting<bool> enable_accurate_vibrations{false, "enable_accurate_vibrations"};
  456. Setting<bool> motion_enabled{true, "motion_enabled"};
  457. BasicSetting<std::string> motion_device{"engine:motion_emu,update_period:100,sensitivity:0.01",
  458. "motion_device"};
  459. BasicSetting<std::string> udp_input_servers{"127.0.0.1:26760", "udp_input_servers"};
  460. BasicSetting<bool> pause_tas_on_load{true, "pause_tas_on_load"};
  461. BasicSetting<bool> tas_enable{false, "tas_enable"};
  462. BasicSetting<bool> tas_loop{false, "tas_loop"};
  463. BasicSetting<bool> tas_swap_controllers{true, "tas_swap_controllers"};
  464. BasicSetting<bool> mouse_panning{false, "mouse_panning"};
  465. BasicRangedSetting<u8> mouse_panning_sensitivity{10, 1, 100, "mouse_panning_sensitivity"};
  466. BasicSetting<bool> mouse_enabled{false, "mouse_enabled"};
  467. std::string mouse_device;
  468. MouseButtonsRaw mouse_buttons;
  469. BasicSetting<bool> emulate_analog_keyboard{false, "emulate_analog_keyboard"};
  470. BasicSetting<bool> keyboard_enabled{false, "keyboard_enabled"};
  471. KeyboardKeysRaw keyboard_keys;
  472. KeyboardModsRaw keyboard_mods;
  473. BasicSetting<bool> debug_pad_enabled{false, "debug_pad_enabled"};
  474. ButtonsRaw debug_pad_buttons;
  475. AnalogsRaw debug_pad_analogs;
  476. TouchscreenInput touchscreen;
  477. BasicSetting<bool> use_touch_from_button{false, "use_touch_from_button"};
  478. BasicSetting<std::string> touch_device{"min_x:100,min_y:50,max_x:1800,max_y:850",
  479. "touch_device"};
  480. BasicSetting<int> touch_from_button_map_index{0, "touch_from_button_map"};
  481. std::vector<TouchFromButtonMap> touch_from_button_maps;
  482. std::atomic_bool is_device_reload_pending{true};
  483. // Data Storage
  484. BasicSetting<bool> use_virtual_sd{true, "use_virtual_sd"};
  485. BasicSetting<bool> gamecard_inserted{false, "gamecard_inserted"};
  486. BasicSetting<bool> gamecard_current_game{false, "gamecard_current_game"};
  487. BasicSetting<std::string> gamecard_path{std::string(), "gamecard_path"};
  488. // Debugging
  489. bool record_frame_times;
  490. BasicSetting<bool> use_gdbstub{false, "use_gdbstub"};
  491. BasicSetting<u16> gdbstub_port{0, "gdbstub_port"};
  492. BasicSetting<std::string> program_args{std::string(), "program_args"};
  493. BasicSetting<bool> dump_exefs{false, "dump_exefs"};
  494. BasicSetting<bool> dump_nso{false, "dump_nso"};
  495. BasicSetting<bool> enable_fs_access_log{false, "enable_fs_access_log"};
  496. BasicSetting<bool> reporting_services{false, "reporting_services"};
  497. BasicSetting<bool> quest_flag{false, "quest_flag"};
  498. BasicSetting<bool> disable_macro_jit{false, "disable_macro_jit"};
  499. BasicSetting<bool> extended_logging{false, "extended_logging"};
  500. BasicSetting<bool> use_debug_asserts{false, "use_debug_asserts"};
  501. BasicSetting<bool> use_auto_stub{false, "use_auto_stub"};
  502. // Miscellaneous
  503. BasicSetting<std::string> log_filter{"*:Info", "log_filter"};
  504. BasicSetting<bool> use_dev_keys{false, "use_dev_keys"};
  505. // Network
  506. BasicSetting<std::string> bcat_backend{"none", "bcat_backend"};
  507. BasicSetting<bool> bcat_boxcat_local{false, "bcat_boxcat_local"};
  508. BasicSetting<std::string> network_interface{std::string(), "network_interface"};
  509. // WebService
  510. BasicSetting<bool> enable_telemetry{true, "enable_telemetry"};
  511. BasicSetting<std::string> web_api_url{"https://api.yuzu-emu.org", "web_api_url"};
  512. BasicSetting<std::string> yuzu_username{std::string(), "yuzu_username"};
  513. BasicSetting<std::string> yuzu_token{std::string(), "yuzu_token"};
  514. // Add-Ons
  515. std::map<u64, std::vector<std::string>> disabled_addons;
  516. };
  517. extern Values values;
  518. bool IsConfiguringGlobal();
  519. void SetConfiguringGlobal(bool is_global);
  520. bool IsGPULevelExtreme();
  521. bool IsGPULevelHigh();
  522. bool IsFastmemEnabled();
  523. float Volume();
  524. std::string GetTimeZoneString();
  525. void LogSettings();
  526. // Restore the global state of all applicable settings in the Values struct
  527. void RestoreGlobalState(bool is_powered_on);
  528. } // namespace Settings