From da14c7b8e47fcd5456d88a033a1fb154a0dcfa39 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 12 Nov 2023 02:03:01 -0500 Subject: config: Unify config handling under frontend_common Replaces every way of handling config for each frontend with SimpleIni. frontend_common's Config class is at the center where it saves and loads all of the cross-platform settings and provides a set of pure virtual functions for platform specific settings. As a result of making config handling platform specific, several parts had to be moved to each platform's own config class or to other parts. Default keys were put in platform specific config classes and translatable strings for Qt were moved to shared_translation. Default hotkeys, default_theme, window geometry, and qt metatypes were moved to uisettings. Additionally, to reduce dependence on Qt, QStrings were converted to std::strings where applicable. --- src/common/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 51717be06..a10131eb2 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -206,9 +206,9 @@ const char* TranslateCategory(Category category) { case Category::UiAudio: return "UiAudio"; case Category::UiLayout: - return "UiLayout"; + return "UILayout"; case Category::UiGameList: - return "UiGameList"; + return "UIGameList"; case Category::Screenshots: return "Screenshots"; case Category::Shortcuts: -- cgit v1.2.3 From ac522db857d35d7903b5c9eb754ca0f6227e6d3f Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 12 Nov 2023 02:04:43 -0500 Subject: common: settings: Add ifdefs to define android's default settings --- src/common/settings.h | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'src/common') diff --git a/src/common/settings.h b/src/common/settings.h index e899f1ae6..e75099b89 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -232,7 +232,11 @@ struct Values { SwitchableSetting use_asynchronous_gpu_emulation{ linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer}; SwitchableSetting accelerate_astc{linkage, +#ifdef ANDROID + AstcDecodeMode::Cpu, +#else AstcDecodeMode::Gpu, +#endif AstcDecodeMode::Cpu, AstcDecodeMode::CpuAsynchronous, "accelerate_astc", @@ -304,7 +308,11 @@ struct Values { linkage, 0, "bg_blue", Category::Renderer, Specialization::Default, true, true}; SwitchableSetting gpu_accuracy{linkage, +#ifdef ANDROID + GpuAccuracy::Normal, +#else GpuAccuracy::High, +#endif GpuAccuracy::Normal, GpuAccuracy::Extreme, "gpu_accuracy", @@ -313,20 +321,38 @@ struct Values { true, true}; GpuAccuracy current_gpu_accuracy{GpuAccuracy::High}; - SwitchableSetting max_anisotropy{ - linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16, - "max_anisotropy", Category::RendererAdvanced}; + SwitchableSetting max_anisotropy{linkage, +#ifdef ANDROID + AnisotropyMode::Default, +#else + AnisotropyMode::Automatic, +#endif + AnisotropyMode::Automatic, + AnisotropyMode::X16, + "max_anisotropy", + Category::RendererAdvanced}; SwitchableSetting astc_recompression{linkage, AstcRecompression::Uncompressed, AstcRecompression::Uncompressed, AstcRecompression::Bc3, "astc_recompression", Category::RendererAdvanced}; - SwitchableSetting async_presentation{linkage, false, "async_presentation", - Category::RendererAdvanced}; + SwitchableSetting async_presentation{linkage, +#ifdef ANDROID + true, +#else + false, +#endif + "async_presentation", Category::RendererAdvanced}; SwitchableSetting renderer_force_max_clock{linkage, false, "force_max_clock", Category::RendererAdvanced}; - SwitchableSetting use_reactive_flushing{linkage, true, "use_reactive_flushing", + SwitchableSetting use_reactive_flushing{linkage, +#ifdef ANDROID + false, +#else + true, +#endif + "use_reactive_flushing", Category::RendererAdvanced}; SwitchableSetting use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders", Category::RendererAdvanced}; @@ -390,7 +416,11 @@ struct Values { Setting current_user{linkage, 0, "current_user", Category::System}; SwitchableSetting use_docked_mode{linkage, +#ifdef ANDROID + ConsoleMode::Handheld, +#else ConsoleMode::Docked, +#endif "use_docked_mode", Category::System, Specialization::Radio, -- cgit v1.2.3