From 19da1011648beb324122f36e6da4cd14cc4c7217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 2 May 2020 14:39:40 +0200 Subject: [PATCH] Remove redundant Config prefix from ConfigInfo/ConfigLocation Both structs are already in the Config namespace. --- Source/Core/Common/Config/Config.cpp | 2 +- Source/Core/Common/Config/Config.h | 18 +- Source/Core/Common/Config/ConfigInfo.cpp | 6 +- Source/Core/Common/Config/ConfigInfo.h | 18 +- Source/Core/Common/Config/Layer.cpp | 12 +- Source/Core/Common/Config/Layer.h | 18 +- Source/Core/Common/Logging/LogManager.cpp | 15 +- Source/Core/Core/Config/GraphicsSettings.cpp | 213 ++++++++---------- Source/Core/Core/Config/GraphicsSettings.h | 170 +++++++------- Source/Core/Core/Config/MainSettings.cpp | 192 ++++++++-------- Source/Core/Core/Config/MainSettings.h | 168 +++++++------- Source/Core/Core/Config/NetplaySettings.cpp | 76 +++---- Source/Core/Core/Config/NetplaySettings.h | 58 ++--- Source/Core/Core/Config/SYSCONFSettings.cpp | 20 +- Source/Core/Core/Config/SYSCONFSettings.h | 22 +- Source/Core/Core/Config/UISettings.cpp | 7 +- Source/Core/Core/Config/UISettings.h | 6 +- .../Core/ConfigLoaders/BaseConfigLoader.cpp | 4 +- .../Core/ConfigLoaders/GameConfigLoader.cpp | 20 +- .../Core/ConfigLoaders/IsSettingSaveable.cpp | 6 +- .../Core/ConfigLoaders/IsSettingSaveable.h | 4 +- .../Config/Graphics/GraphicsBool.cpp | 5 +- .../DolphinQt/Config/Graphics/GraphicsBool.h | 11 +- .../Config/Graphics/GraphicsChoice.cpp | 2 +- .../Config/Graphics/GraphicsChoice.h | 4 +- .../Config/Graphics/GraphicsInteger.cpp | 2 +- .../Config/Graphics/GraphicsInteger.h | 6 +- .../Config/Graphics/GraphicsRadio.cpp | 2 +- .../DolphinQt/Config/Graphics/GraphicsRadio.h | 4 +- .../Config/Graphics/GraphicsSlider.cpp | 3 +- .../Config/Graphics/GraphicsSlider.h | 6 +- .../DualShockUDPClient/DualShockUDPClient.cpp | 10 +- .../DualShockUDPClient/DualShockUDPClient.h | 6 +- Source/Core/UICommon/CommandLineParse.cpp | 4 +- 34 files changed, 543 insertions(+), 577 deletions(-) diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp index 2587dc5aac..2211d0d5fb 100644 --- a/Source/Core/Common/Config/Config.cpp +++ b/Source/Core/Common/Config/Config.cpp @@ -159,7 +159,7 @@ const std::string& GetLayerName(LayerType layer) return layer_to_name.at(layer); } -LayerType GetActiveLayerForConfig(const ConfigLocation& config) +LayerType GetActiveLayerForConfig(const Location& config) { ReadLock lock(s_layers_rw_lock); diff --git a/Source/Core/Common/Config/Config.h b/Source/Core/Common/Config/Config.h index 2d69e0809e..fa315857bf 100644 --- a/Source/Core/Common/Config/Config.h +++ b/Source/Core/Common/Config/Config.h @@ -37,10 +37,10 @@ void ClearCurrentRunLayer(); const std::string& GetSystemName(System system); std::optional GetSystemFromName(const std::string& system); const std::string& GetLayerName(LayerType layer); -LayerType GetActiveLayerForConfig(const ConfigLocation&); +LayerType GetActiveLayerForConfig(const Location&); template -T Get(LayerType layer, const ConfigInfo& info) +T Get(LayerType layer, const Info& info) { if (layer == LayerType::Meta) return Get(info); @@ -48,44 +48,44 @@ T Get(LayerType layer, const ConfigInfo& info) } template -T Get(const ConfigInfo& info) +T Get(const Info& info) { return GetLayer(GetActiveLayerForConfig(info.location))->Get(info); } template -T GetBase(const ConfigInfo& info) +T GetBase(const Info& info) { return Get(LayerType::Base, info); } template -LayerType GetActiveLayerForConfig(const ConfigInfo& info) +LayerType GetActiveLayerForConfig(const Info& info) { return GetActiveLayerForConfig(info.location); } template -void Set(LayerType layer, const ConfigInfo& info, const std::common_type_t& value) +void Set(LayerType layer, const Info& info, const std::common_type_t& value) { GetLayer(layer)->Set(info, value); InvokeConfigChangedCallbacks(); } template -void SetBase(const ConfigInfo& info, const std::common_type_t& value) +void SetBase(const Info& info, const std::common_type_t& value) { Set(LayerType::Base, info, value); } template -void SetCurrent(const ConfigInfo& info, const std::common_type_t& value) +void SetCurrent(const Info& info, const std::common_type_t& value) { Set(LayerType::CurrentRun, info, value); } template -void SetBaseOrCurrent(const ConfigInfo& info, const std::common_type_t& value) +void SetBaseOrCurrent(const Info& info, const std::common_type_t& value) { if (GetActiveLayerForConfig(info) == LayerType::Base) Set(LayerType::Base, info, value); diff --git a/Source/Core/Common/Config/ConfigInfo.cpp b/Source/Core/Common/Config/ConfigInfo.cpp index 1d4084c3c6..76c5933e27 100644 --- a/Source/Core/Common/Config/ConfigInfo.cpp +++ b/Source/Core/Common/Config/ConfigInfo.cpp @@ -9,18 +9,18 @@ namespace Config { -bool ConfigLocation::operator==(const ConfigLocation& other) const +bool Location::operator==(const Location& other) const { return system == other.system && strcasecmp(section.c_str(), other.section.c_str()) == 0 && strcasecmp(key.c_str(), other.key.c_str()) == 0; } -bool ConfigLocation::operator!=(const ConfigLocation& other) const +bool Location::operator!=(const Location& other) const { return !(*this == other); } -bool ConfigLocation::operator<(const ConfigLocation& other) const +bool Location::operator<(const Location& other) const { if (system != other.system) return system < other.system; diff --git a/Source/Core/Common/Config/ConfigInfo.h b/Source/Core/Common/Config/ConfigInfo.h index ecea74a04b..20051c1003 100644 --- a/Source/Core/Common/Config/ConfigInfo.h +++ b/Source/Core/Common/Config/ConfigInfo.h @@ -18,36 +18,36 @@ template using UnderlyingType = typename std::enable_if_t{}, std::underlying_type>::type; } // namespace detail -struct ConfigLocation +struct Location { System system; std::string section; std::string key; - bool operator==(const ConfigLocation& other) const; - bool operator!=(const ConfigLocation& other) const; - bool operator<(const ConfigLocation& other) const; + bool operator==(const Location& other) const; + bool operator!=(const Location& other) const; + bool operator<(const Location& other) const; }; template -struct ConfigInfo +struct Info { - ConfigInfo(const ConfigLocation& location_, const T& default_value_) + Info(const Location& location_, const T& default_value_) : location{location_}, default_value{default_value_} { } - // Make it easy to convert ConfigInfo into ConfigInfo> + // Make it easy to convert Info into Info> // so that enum settings can still easily work with code that doesn't care about the enum values. template >::value>* = nullptr> - ConfigInfo(const ConfigInfo& other) + Info(const Info& other) : location{other.location}, default_value{static_cast>( other.default_value)} { } - ConfigLocation location; + Location location; T default_value; }; } // namespace Config diff --git a/Source/Core/Common/Config/Layer.cpp b/Source/Core/Common/Config/Layer.cpp index 573c79c04e..311e99ded2 100644 --- a/Source/Core/Common/Config/Layer.cpp +++ b/Source/Core/Common/Config/Layer.cpp @@ -37,13 +37,13 @@ Layer::~Layer() Save(); } -bool Layer::Exists(const ConfigLocation& location) const +bool Layer::Exists(const Location& location) const { const auto iter = m_map.find(location); return iter != m_map.end() && iter->second.has_value(); } -bool Layer::DeleteKey(const ConfigLocation& location) +bool Layer::DeleteKey(const Location& location) { m_is_dirty = true; bool had_value = false; @@ -68,14 +68,14 @@ void Layer::DeleteAllKeys() Section Layer::GetSection(System system, const std::string& section) { - return Section{m_map.lower_bound(ConfigLocation{system, section, ""}), - m_map.lower_bound(ConfigLocation{system, section + '\001', ""})}; + return Section{m_map.lower_bound(Location{system, section, ""}), + m_map.lower_bound(Location{system, section + '\001', ""})}; } ConstSection Layer::GetSection(System system, const std::string& section) const { - return ConstSection{m_map.lower_bound(ConfigLocation{system, section, ""}), - m_map.lower_bound(ConfigLocation{system, section + '\001', ""})}; + return ConstSection{m_map.lower_bound(Location{system, section, ""}), + m_map.lower_bound(Location{system, section + '\001', ""})}; } void Layer::Load() diff --git a/Source/Core/Common/Config/Layer.h b/Source/Core/Common/Config/Layer.h index 87c6b91f90..c309810719 100644 --- a/Source/Core/Common/Config/Layer.h +++ b/Source/Core/Common/Config/Layer.h @@ -45,10 +45,10 @@ inline std::optional TryParse(const std::string& str_value) } // namespace detail template -struct ConfigInfo; +struct Info; class Layer; -using LayerMap = std::map>; +using LayerMap = std::map>; class ConfigLayerLoader { @@ -98,18 +98,18 @@ public: virtual ~Layer(); // Convenience functions - bool Exists(const ConfigLocation& location) const; - bool DeleteKey(const ConfigLocation& location); + bool Exists(const Location& location) const; + bool DeleteKey(const Location& location); void DeleteAllKeys(); template - T Get(const ConfigInfo& config_info) const + T Get(const Info& config_info) const { return Get(config_info.location).value_or(config_info.default_value); } template - std::optional Get(const ConfigLocation& location) const + std::optional Get(const Location& location) const { const auto iter = m_map.find(location); if (iter == m_map.end() || !iter->second.has_value()) @@ -118,18 +118,18 @@ public: } template - void Set(const ConfigInfo& config_info, const std::common_type_t& value) + void Set(const Info& config_info, const std::common_type_t& value) { Set(config_info.location, value); } template - void Set(const ConfigLocation& location, const T& value) + void Set(const Location& location, const T& value) { Set(location, ValueToString(value)); } - void Set(const ConfigLocation& location, std::string new_value) + void Set(const Location& location, std::string new_value) { const auto iter = m_map.find(location); if (iter != m_map.end() && iter->second == new_value) diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp index 729e5cb3a8..a847b2402f 100644 --- a/Source/Core/Common/Logging/LogManager.cpp +++ b/Source/Core/Common/Logging/LogManager.cpp @@ -26,13 +26,13 @@ namespace Common::Log { constexpr size_t MAX_MSGLEN = 1024; -const Config::ConfigInfo LOGGER_WRITE_TO_FILE{ - {Config::System::Logger, "Options", "WriteToFile"}, false}; -const Config::ConfigInfo LOGGER_WRITE_TO_CONSOLE{ +const Config::Info LOGGER_WRITE_TO_FILE{{Config::System::Logger, "Options", "WriteToFile"}, + false}; +const Config::Info LOGGER_WRITE_TO_CONSOLE{ {Config::System::Logger, "Options", "WriteToConsole"}, true}; -const Config::ConfigInfo LOGGER_WRITE_TO_WINDOW{ +const Config::Info LOGGER_WRITE_TO_WINDOW{ {Config::System::Logger, "Options", "WriteToWindow"}, true}; -const Config::ConfigInfo LOGGER_VERBOSITY{{Config::System::Logger, "Options", "Verbosity"}, 0}; +const Config::Info LOGGER_VERBOSITY{{Config::System::Logger, "Options", "Verbosity"}, 0}; class FileLogListener : public LogListener { @@ -163,7 +163,7 @@ LogManager::LogManager() for (LogContainer& container : m_log) container.m_enable = Config::Get( - Config::ConfigInfo{{Config::System::Logger, "Logs", container.m_short_name}, false}); + Config::Info{{Config::System::Logger, "Logs", container.m_short_name}, false}); m_path_cutoff_point = DeterminePathCutOffPoint(); } @@ -188,8 +188,7 @@ void LogManager::SaveSettings() for (const auto& container : m_log) { - const Config::ConfigInfo info{{Config::System::Logger, "Logs", container.m_short_name}, - false}; + const Config::Info info{{Config::System::Logger, "Logs", container.m_short_name}, false}; Config::SetBaseOrCurrent(info, container.m_enable); } diff --git a/Source/Core/Core/Config/GraphicsSettings.cpp b/Source/Core/Core/Config/GraphicsSettings.cpp index 118c9cc816..f9186d3fe9 100644 --- a/Source/Core/Core/Config/GraphicsSettings.cpp +++ b/Source/Core/Core/Config/GraphicsSettings.cpp @@ -15,155 +15,140 @@ namespace Config // Graphics.Hardware -const ConfigInfo GFX_VSYNC{{System::GFX, "Hardware", "VSync"}, false}; -const ConfigInfo GFX_ADAPTER{{System::GFX, "Hardware", "Adapter"}, 0}; +const Info GFX_VSYNC{{System::GFX, "Hardware", "VSync"}, false}; +const Info GFX_ADAPTER{{System::GFX, "Hardware", "Adapter"}, 0}; // Graphics.Settings -const ConfigInfo GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false}; -const ConfigInfo GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"}, - AspectMode::Auto}; -const ConfigInfo GFX_SUGGESTED_ASPECT_RATIO{ - {System::GFX, "Settings", "SuggestedAspectRatio"}, AspectMode::Auto}; -const ConfigInfo GFX_CROP{{System::GFX, "Settings", "Crop"}, false}; -const ConfigInfo GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{ +const Info GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false}; +const Info GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"}, AspectMode::Auto}; +const Info GFX_SUGGESTED_ASPECT_RATIO{{System::GFX, "Settings", "SuggestedAspectRatio"}, + AspectMode::Auto}; +const Info GFX_CROP{{System::GFX, "Settings", "Crop"}, false}; +const Info GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{ {System::GFX, "Settings", "SafeTextureCacheColorSamples"}, 128}; -const ConfigInfo GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false}; -const ConfigInfo GFX_SHOW_NETPLAY_PING{{System::GFX, "Settings", "ShowNetPlayPing"}, false}; -const ConfigInfo GFX_SHOW_NETPLAY_MESSAGES{{System::GFX, "Settings", "ShowNetPlayMessages"}, - false}; -const ConfigInfo GFX_LOG_RENDER_TIME_TO_FILE{{System::GFX, "Settings", "LogRenderTimeToFile"}, - false}; -const ConfigInfo GFX_OVERLAY_STATS{{System::GFX, "Settings", "OverlayStats"}, false}; -const ConfigInfo GFX_OVERLAY_PROJ_STATS{{System::GFX, "Settings", "OverlayProjStats"}, false}; -const ConfigInfo GFX_DUMP_TEXTURES{{System::GFX, "Settings", "DumpTextures"}, false}; -const ConfigInfo GFX_HIRES_TEXTURES{{System::GFX, "Settings", "HiresTextures"}, false}; -const ConfigInfo GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresTextures"}, - false}; -const ConfigInfo GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false}; -const ConfigInfo GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false}; -const ConfigInfo GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"}, - false}; -const ConfigInfo GFX_FREE_LOOK{{System::GFX, "Settings", "FreeLook"}, false}; -const ConfigInfo GFX_USE_FFV1{{System::GFX, "Settings", "UseFFV1"}, false}; -const ConfigInfo GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"}; -const ConfigInfo GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""}; -const ConfigInfo GFX_DUMP_ENCODER{{System::GFX, "Settings", "DumpEncoder"}, ""}; -const ConfigInfo GFX_DUMP_PATH{{System::GFX, "Settings", "DumpPath"}, ""}; -const ConfigInfo GFX_BITRATE_KBPS{{System::GFX, "Settings", "BitrateKbps"}, 25000}; -const ConfigInfo GFX_INTERNAL_RESOLUTION_FRAME_DUMPS{ +const Info GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false}; +const Info GFX_SHOW_NETPLAY_PING{{System::GFX, "Settings", "ShowNetPlayPing"}, false}; +const Info GFX_SHOW_NETPLAY_MESSAGES{{System::GFX, "Settings", "ShowNetPlayMessages"}, false}; +const Info GFX_LOG_RENDER_TIME_TO_FILE{{System::GFX, "Settings", "LogRenderTimeToFile"}, + false}; +const Info GFX_OVERLAY_STATS{{System::GFX, "Settings", "OverlayStats"}, false}; +const Info GFX_OVERLAY_PROJ_STATS{{System::GFX, "Settings", "OverlayProjStats"}, false}; +const Info GFX_DUMP_TEXTURES{{System::GFX, "Settings", "DumpTextures"}, false}; +const Info GFX_HIRES_TEXTURES{{System::GFX, "Settings", "HiresTextures"}, false}; +const Info GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresTextures"}, false}; +const Info GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false}; +const Info GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false}; +const Info GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"}, false}; +const Info GFX_FREE_LOOK{{System::GFX, "Settings", "FreeLook"}, false}; +const Info GFX_USE_FFV1{{System::GFX, "Settings", "UseFFV1"}, false}; +const Info GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"}; +const Info GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""}; +const Info GFX_DUMP_ENCODER{{System::GFX, "Settings", "DumpEncoder"}, ""}; +const Info GFX_DUMP_PATH{{System::GFX, "Settings", "DumpPath"}, ""}; +const Info GFX_BITRATE_KBPS{{System::GFX, "Settings", "BitrateKbps"}, 25000}; +const Info GFX_INTERNAL_RESOLUTION_FRAME_DUMPS{ {System::GFX, "Settings", "InternalResolutionFrameDumps"}, false}; -const ConfigInfo GFX_ENABLE_GPU_TEXTURE_DECODING{ +const Info GFX_ENABLE_GPU_TEXTURE_DECODING{ {System::GFX, "Settings", "EnableGPUTextureDecoding"}, false}; -const ConfigInfo GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"}, - false}; -const ConfigInfo GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true}; -const ConfigInfo GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1}; -const ConfigInfo GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false}; -const ConfigInfo GFX_EFB_SCALE{{System::GFX, "Settings", "InternalResolution"}, 1}; -const ConfigInfo GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 8}; -const ConfigInfo GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"}, - false}; -const ConfigInfo GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"}, - false}; -const ConfigInfo GFX_ENABLE_WIREFRAME{{System::GFX, "Settings", "WireFrame"}, false}; -const ConfigInfo GFX_DISABLE_FOG{{System::GFX, "Settings", "DisableFog"}, false}; -const ConfigInfo GFX_BORDERLESS_FULLSCREEN{{System::GFX, "Settings", "BorderlessFullscreen"}, - false}; -const ConfigInfo GFX_ENABLE_VALIDATION_LAYER{ - {System::GFX, "Settings", "EnableValidationLayer"}, false}; +const Info GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"}, false}; +const Info GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true}; +const Info GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1}; +const Info GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false}; +const Info GFX_EFB_SCALE{{System::GFX, "Settings", "InternalResolution"}, 1}; +const Info GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 8}; +const Info GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"}, false}; +const Info GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"}, false}; +const Info GFX_ENABLE_WIREFRAME{{System::GFX, "Settings", "WireFrame"}, false}; +const Info GFX_DISABLE_FOG{{System::GFX, "Settings", "DisableFog"}, false}; +const Info GFX_BORDERLESS_FULLSCREEN{{System::GFX, "Settings", "BorderlessFullscreen"}, + false}; +const Info GFX_ENABLE_VALIDATION_LAYER{{System::GFX, "Settings", "EnableValidationLayer"}, + false}; #if defined(ANDROID) -const ConfigInfo GFX_BACKEND_MULTITHREADING{ - {System::GFX, "Settings", "BackendMultithreading"}, false}; -const ConfigInfo GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{ +const Info GFX_BACKEND_MULTITHREADING{{System::GFX, "Settings", "BackendMultithreading"}, + false}; +const Info GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{ {System::GFX, "Settings", "CommandBufferExecuteInterval"}, 0}; #else -const ConfigInfo GFX_BACKEND_MULTITHREADING{ - {System::GFX, "Settings", "BackendMultithreading"}, true}; -const ConfigInfo GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{ +const Info GFX_BACKEND_MULTITHREADING{{System::GFX, "Settings", "BackendMultithreading"}, + true}; +const Info GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{ {System::GFX, "Settings", "CommandBufferExecuteInterval"}, 100}; #endif -const ConfigInfo GFX_SHADER_CACHE{{System::GFX, "Settings", "ShaderCache"}, true}; -const ConfigInfo GFX_WAIT_FOR_SHADERS_BEFORE_STARTING{ +const Info GFX_SHADER_CACHE{{System::GFX, "Settings", "ShaderCache"}, true}; +const Info GFX_WAIT_FOR_SHADERS_BEFORE_STARTING{ {System::GFX, "Settings", "WaitForShadersBeforeStarting"}, false}; -const ConfigInfo GFX_SHADER_COMPILATION_MODE{ +const Info GFX_SHADER_COMPILATION_MODE{ {System::GFX, "Settings", "ShaderCompilationMode"}, ShaderCompilationMode::Synchronous}; -const ConfigInfo GFX_SHADER_COMPILER_THREADS{ - {System::GFX, "Settings", "ShaderCompilerThreads"}, 1}; -const ConfigInfo GFX_SHADER_PRECOMPILER_THREADS{ +const Info GFX_SHADER_COMPILER_THREADS{{System::GFX, "Settings", "ShaderCompilerThreads"}, 1}; +const Info GFX_SHADER_PRECOMPILER_THREADS{ {System::GFX, "Settings", "ShaderPrecompilerThreads"}, 1}; -const ConfigInfo GFX_SAVE_TEXTURE_CACHE_TO_STATE{ +const Info GFX_SAVE_TEXTURE_CACHE_TO_STATE{ {System::GFX, "Settings", "SaveTextureCacheToState"}, true}; -const ConfigInfo GFX_SW_ZCOMPLOC{{System::GFX, "Settings", "SWZComploc"}, true}; -const ConfigInfo GFX_SW_ZFREEZE{{System::GFX, "Settings", "SWZFreeze"}, true}; -const ConfigInfo GFX_SW_DUMP_OBJECTS{{System::GFX, "Settings", "SWDumpObjects"}, false}; -const ConfigInfo GFX_SW_DUMP_TEV_STAGES{{System::GFX, "Settings", "SWDumpTevStages"}, false}; -const ConfigInfo GFX_SW_DUMP_TEV_TEX_FETCHES{{System::GFX, "Settings", "SWDumpTevTexFetches"}, - false}; -const ConfigInfo GFX_SW_DRAW_START{{System::GFX, "Settings", "SWDrawStart"}, 0}; -const ConfigInfo GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000}; +const Info GFX_SW_ZCOMPLOC{{System::GFX, "Settings", "SWZComploc"}, true}; +const Info GFX_SW_ZFREEZE{{System::GFX, "Settings", "SWZFreeze"}, true}; +const Info GFX_SW_DUMP_OBJECTS{{System::GFX, "Settings", "SWDumpObjects"}, false}; +const Info GFX_SW_DUMP_TEV_STAGES{{System::GFX, "Settings", "SWDumpTevStages"}, false}; +const Info GFX_SW_DUMP_TEV_TEX_FETCHES{{System::GFX, "Settings", "SWDumpTevTexFetches"}, + false}; +const Info GFX_SW_DRAW_START{{System::GFX, "Settings", "SWDrawStart"}, 0}; +const Info GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000}; -const ConfigInfo GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false}; +const Info GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false}; // Graphics.Enhancements -const ConfigInfo GFX_ENHANCE_FORCE_FILTERING{{System::GFX, "Enhancements", "ForceFiltering"}, - false}; -const ConfigInfo GFX_ENHANCE_MAX_ANISOTROPY{{System::GFX, "Enhancements", "MaxAnisotropy"}, 0}; -const ConfigInfo GFX_ENHANCE_POST_SHADER{ +const Info GFX_ENHANCE_FORCE_FILTERING{{System::GFX, "Enhancements", "ForceFiltering"}, + false}; +const Info GFX_ENHANCE_MAX_ANISOTROPY{{System::GFX, "Enhancements", "MaxAnisotropy"}, 0}; +const Info GFX_ENHANCE_POST_SHADER{ {System::GFX, "Enhancements", "PostProcessingShader"}, ""}; -const ConfigInfo GFX_ENHANCE_FORCE_TRUE_COLOR{{System::GFX, "Enhancements", "ForceTrueColor"}, - true}; -const ConfigInfo GFX_ENHANCE_DISABLE_COPY_FILTER{ - {System::GFX, "Enhancements", "DisableCopyFilter"}, true}; -const ConfigInfo GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION{ +const Info GFX_ENHANCE_FORCE_TRUE_COLOR{{System::GFX, "Enhancements", "ForceTrueColor"}, + true}; +const Info GFX_ENHANCE_DISABLE_COPY_FILTER{{System::GFX, "Enhancements", "DisableCopyFilter"}, + true}; +const Info GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION{ {System::GFX, "Enhancements", "ArbitraryMipmapDetection"}, true}; -const ConfigInfo GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD{ +const Info GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD{ {System::GFX, "Enhancements", "ArbitraryMipmapDetectionThreshold"}, 14.0f}; // Graphics.Stereoscopy -const ConfigInfo GFX_STEREO_MODE{{System::GFX, "Stereoscopy", "StereoMode"}, - StereoMode::Off}; -const ConfigInfo GFX_STEREO_DEPTH{{System::GFX, "Stereoscopy", "StereoDepth"}, 20}; -const ConfigInfo GFX_STEREO_CONVERGENCE_PERCENTAGE{ +const Info GFX_STEREO_MODE{{System::GFX, "Stereoscopy", "StereoMode"}, StereoMode::Off}; +const Info GFX_STEREO_DEPTH{{System::GFX, "Stereoscopy", "StereoDepth"}, 20}; +const Info GFX_STEREO_CONVERGENCE_PERCENTAGE{ {System::GFX, "Stereoscopy", "StereoConvergencePercentage"}, 100}; -const ConfigInfo GFX_STEREO_SWAP_EYES{{System::GFX, "Stereoscopy", "StereoSwapEyes"}, false}; -const ConfigInfo GFX_STEREO_CONVERGENCE{{System::GFX, "Stereoscopy", "StereoConvergence"}, 20}; -const ConfigInfo GFX_STEREO_EFB_MONO_DEPTH{{System::GFX, "Stereoscopy", "StereoEFBMonoDepth"}, - false}; -const ConfigInfo GFX_STEREO_DEPTH_PERCENTAGE{ - {System::GFX, "Stereoscopy", "StereoDepthPercentage"}, 100}; +const Info GFX_STEREO_SWAP_EYES{{System::GFX, "Stereoscopy", "StereoSwapEyes"}, false}; +const Info GFX_STEREO_CONVERGENCE{{System::GFX, "Stereoscopy", "StereoConvergence"}, 20}; +const Info GFX_STEREO_EFB_MONO_DEPTH{{System::GFX, "Stereoscopy", "StereoEFBMonoDepth"}, + false}; +const Info GFX_STEREO_DEPTH_PERCENTAGE{{System::GFX, "Stereoscopy", "StereoDepthPercentage"}, + 100}; // Graphics.Hacks -const ConfigInfo GFX_HACK_EFB_ACCESS_ENABLE{{System::GFX, "Hacks", "EFBAccessEnable"}, true}; -const ConfigInfo GFX_HACK_EFB_DEFER_INVALIDATION{ +const Info GFX_HACK_EFB_ACCESS_ENABLE{{System::GFX, "Hacks", "EFBAccessEnable"}, true}; +const Info GFX_HACK_EFB_DEFER_INVALIDATION{ {System::GFX, "Hacks", "EFBAccessDeferInvalidation"}, false}; -const ConfigInfo GFX_HACK_EFB_ACCESS_TILE_SIZE{{System::GFX, "Hacks", "EFBAccessTileSize"}, - 64}; -const ConfigInfo GFX_HACK_BBOX_ENABLE{{System::GFX, "Hacks", "BBoxEnable"}, false}; -const ConfigInfo GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true}; -const ConfigInfo GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"}, - true}; -const ConfigInfo GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"}, - true}; -const ConfigInfo GFX_HACK_DISABLE_COPY_TO_VRAM{{System::GFX, "Hacks", "DisableCopyToVRAM"}, - false}; -const ConfigInfo GFX_HACK_DEFER_EFB_COPIES{{System::GFX, "Hacks", "DeferEFBCopies"}, true}; -const ConfigInfo GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, false}; -const ConfigInfo GFX_HACK_SKIP_DUPLICATE_XFBS{{System::GFX, "Hacks", "SkipDuplicateXFBs"}, - true}; -const ConfigInfo GFX_HACK_COPY_EFB_SCALED{{System::GFX, "Hacks", "EFBScaledCopy"}, true}; -const ConfigInfo GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{ +const Info GFX_HACK_EFB_ACCESS_TILE_SIZE{{System::GFX, "Hacks", "EFBAccessTileSize"}, 64}; +const Info GFX_HACK_BBOX_ENABLE{{System::GFX, "Hacks", "BBoxEnable"}, false}; +const Info GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true}; +const Info GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"}, true}; +const Info GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"}, true}; +const Info GFX_HACK_DISABLE_COPY_TO_VRAM{{System::GFX, "Hacks", "DisableCopyToVRAM"}, false}; +const Info GFX_HACK_DEFER_EFB_COPIES{{System::GFX, "Hacks", "DeferEFBCopies"}, true}; +const Info GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, false}; +const Info GFX_HACK_SKIP_DUPLICATE_XFBS{{System::GFX, "Hacks", "SkipDuplicateXFBs"}, true}; +const Info GFX_HACK_COPY_EFB_SCALED{{System::GFX, "Hacks", "EFBScaledCopy"}, true}; +const Info GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{ {System::GFX, "Hacks", "EFBEmulateFormatChanges"}, false}; -const ConfigInfo GFX_HACK_VERTEX_ROUDING{{System::GFX, "Hacks", "VertexRounding"}, false}; +const Info GFX_HACK_VERTEX_ROUDING{{System::GFX, "Hacks", "VertexRounding"}, false}; // Graphics.GameSpecific -const ConfigInfo GFX_PERF_QUERIES_ENABLE{{System::GFX, "GameSpecific", "PerfQueriesEnable"}, - false}; +const Info GFX_PERF_QUERIES_ENABLE{{System::GFX, "GameSpecific", "PerfQueriesEnable"}, false}; } // namespace Config diff --git a/Source/Core/Core/Config/GraphicsSettings.h b/Source/Core/Core/Config/GraphicsSettings.h index c37977d443..c7daedee27 100644 --- a/Source/Core/Core/Config/GraphicsSettings.h +++ b/Source/Core/Core/Config/GraphicsSettings.h @@ -18,87 +18,87 @@ namespace Config // Graphics.Hardware -extern const ConfigInfo GFX_VSYNC; -extern const ConfigInfo GFX_ADAPTER; +extern const Info GFX_VSYNC; +extern const Info GFX_ADAPTER; // Graphics.Settings -extern const ConfigInfo GFX_WIDESCREEN_HACK; -extern const ConfigInfo GFX_ASPECT_RATIO; -extern const ConfigInfo GFX_SUGGESTED_ASPECT_RATIO; -extern const ConfigInfo GFX_CROP; -extern const ConfigInfo GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES; -extern const ConfigInfo GFX_SHOW_FPS; -extern const ConfigInfo GFX_SHOW_NETPLAY_PING; -extern const ConfigInfo GFX_SHOW_NETPLAY_MESSAGES; -extern const ConfigInfo GFX_LOG_RENDER_TIME_TO_FILE; -extern const ConfigInfo GFX_OVERLAY_STATS; -extern const ConfigInfo GFX_OVERLAY_PROJ_STATS; -extern const ConfigInfo GFX_DUMP_TEXTURES; -extern const ConfigInfo GFX_HIRES_TEXTURES; -extern const ConfigInfo GFX_CACHE_HIRES_TEXTURES; -extern const ConfigInfo GFX_DUMP_EFB_TARGET; -extern const ConfigInfo GFX_DUMP_XFB_TARGET; -extern const ConfigInfo GFX_DUMP_FRAMES_AS_IMAGES; -extern const ConfigInfo GFX_FREE_LOOK; -extern const ConfigInfo GFX_USE_FFV1; -extern const ConfigInfo GFX_DUMP_FORMAT; -extern const ConfigInfo GFX_DUMP_CODEC; -extern const ConfigInfo GFX_DUMP_ENCODER; -extern const ConfigInfo GFX_DUMP_PATH; -extern const ConfigInfo GFX_BITRATE_KBPS; -extern const ConfigInfo GFX_INTERNAL_RESOLUTION_FRAME_DUMPS; -extern const ConfigInfo GFX_ENABLE_GPU_TEXTURE_DECODING; -extern const ConfigInfo GFX_ENABLE_PIXEL_LIGHTING; -extern const ConfigInfo GFX_FAST_DEPTH_CALC; -extern const ConfigInfo GFX_MSAA; -extern const ConfigInfo GFX_SSAA; -extern const ConfigInfo GFX_EFB_SCALE; -extern const ConfigInfo GFX_MAX_EFB_SCALE; -extern const ConfigInfo GFX_TEXFMT_OVERLAY_ENABLE; -extern const ConfigInfo GFX_TEXFMT_OVERLAY_CENTER; -extern const ConfigInfo GFX_ENABLE_WIREFRAME; -extern const ConfigInfo GFX_DISABLE_FOG; -extern const ConfigInfo GFX_BORDERLESS_FULLSCREEN; -extern const ConfigInfo GFX_ENABLE_VALIDATION_LAYER; -extern const ConfigInfo GFX_BACKEND_MULTITHREADING; -extern const ConfigInfo GFX_COMMAND_BUFFER_EXECUTE_INTERVAL; -extern const ConfigInfo GFX_SHADER_CACHE; -extern const ConfigInfo GFX_WAIT_FOR_SHADERS_BEFORE_STARTING; -extern const ConfigInfo GFX_SHADER_COMPILATION_MODE; -extern const ConfigInfo GFX_SHADER_COMPILER_THREADS; -extern const ConfigInfo GFX_SHADER_PRECOMPILER_THREADS; -extern const ConfigInfo GFX_SAVE_TEXTURE_CACHE_TO_STATE; +extern const Info GFX_WIDESCREEN_HACK; +extern const Info GFX_ASPECT_RATIO; +extern const Info GFX_SUGGESTED_ASPECT_RATIO; +extern const Info GFX_CROP; +extern const Info GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES; +extern const Info GFX_SHOW_FPS; +extern const Info GFX_SHOW_NETPLAY_PING; +extern const Info GFX_SHOW_NETPLAY_MESSAGES; +extern const Info GFX_LOG_RENDER_TIME_TO_FILE; +extern const Info GFX_OVERLAY_STATS; +extern const Info GFX_OVERLAY_PROJ_STATS; +extern const Info GFX_DUMP_TEXTURES; +extern const Info GFX_HIRES_TEXTURES; +extern const Info GFX_CACHE_HIRES_TEXTURES; +extern const Info GFX_DUMP_EFB_TARGET; +extern const Info GFX_DUMP_XFB_TARGET; +extern const Info GFX_DUMP_FRAMES_AS_IMAGES; +extern const Info GFX_FREE_LOOK; +extern const Info GFX_USE_FFV1; +extern const Info GFX_DUMP_FORMAT; +extern const Info GFX_DUMP_CODEC; +extern const Info GFX_DUMP_ENCODER; +extern const Info GFX_DUMP_PATH; +extern const Info GFX_BITRATE_KBPS; +extern const Info GFX_INTERNAL_RESOLUTION_FRAME_DUMPS; +extern const Info GFX_ENABLE_GPU_TEXTURE_DECODING; +extern const Info GFX_ENABLE_PIXEL_LIGHTING; +extern const Info GFX_FAST_DEPTH_CALC; +extern const Info GFX_MSAA; +extern const Info GFX_SSAA; +extern const Info GFX_EFB_SCALE; +extern const Info GFX_MAX_EFB_SCALE; +extern const Info GFX_TEXFMT_OVERLAY_ENABLE; +extern const Info GFX_TEXFMT_OVERLAY_CENTER; +extern const Info GFX_ENABLE_WIREFRAME; +extern const Info GFX_DISABLE_FOG; +extern const Info GFX_BORDERLESS_FULLSCREEN; +extern const Info GFX_ENABLE_VALIDATION_LAYER; +extern const Info GFX_BACKEND_MULTITHREADING; +extern const Info GFX_COMMAND_BUFFER_EXECUTE_INTERVAL; +extern const Info GFX_SHADER_CACHE; +extern const Info GFX_WAIT_FOR_SHADERS_BEFORE_STARTING; +extern const Info GFX_SHADER_COMPILATION_MODE; +extern const Info GFX_SHADER_COMPILER_THREADS; +extern const Info GFX_SHADER_PRECOMPILER_THREADS; +extern const Info GFX_SAVE_TEXTURE_CACHE_TO_STATE; -extern const ConfigInfo GFX_SW_ZCOMPLOC; -extern const ConfigInfo GFX_SW_ZFREEZE; -extern const ConfigInfo GFX_SW_DUMP_OBJECTS; -extern const ConfigInfo GFX_SW_DUMP_TEV_STAGES; -extern const ConfigInfo GFX_SW_DUMP_TEV_TEX_FETCHES; -extern const ConfigInfo GFX_SW_DRAW_START; -extern const ConfigInfo GFX_SW_DRAW_END; +extern const Info GFX_SW_ZCOMPLOC; +extern const Info GFX_SW_ZFREEZE; +extern const Info GFX_SW_DUMP_OBJECTS; +extern const Info GFX_SW_DUMP_TEV_STAGES; +extern const Info GFX_SW_DUMP_TEV_TEX_FETCHES; +extern const Info GFX_SW_DRAW_START; +extern const Info GFX_SW_DRAW_END; -extern const ConfigInfo GFX_PREFER_GLES; +extern const Info GFX_PREFER_GLES; // Graphics.Enhancements -extern const ConfigInfo GFX_ENHANCE_FORCE_FILTERING; -extern const ConfigInfo GFX_ENHANCE_MAX_ANISOTROPY; // NOTE - this is x in (1 << x) -extern const ConfigInfo GFX_ENHANCE_POST_SHADER; -extern const ConfigInfo GFX_ENHANCE_FORCE_TRUE_COLOR; -extern const ConfigInfo GFX_ENHANCE_DISABLE_COPY_FILTER; -extern const ConfigInfo GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION; -extern const ConfigInfo GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD; +extern const Info GFX_ENHANCE_FORCE_FILTERING; +extern const Info GFX_ENHANCE_MAX_ANISOTROPY; // NOTE - this is x in (1 << x) +extern const Info GFX_ENHANCE_POST_SHADER; +extern const Info GFX_ENHANCE_FORCE_TRUE_COLOR; +extern const Info GFX_ENHANCE_DISABLE_COPY_FILTER; +extern const Info GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION; +extern const Info GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD; // Graphics.Stereoscopy -extern const ConfigInfo GFX_STEREO_MODE; -extern const ConfigInfo GFX_STEREO_DEPTH; -extern const ConfigInfo GFX_STEREO_CONVERGENCE_PERCENTAGE; -extern const ConfigInfo GFX_STEREO_SWAP_EYES; -extern const ConfigInfo GFX_STEREO_CONVERGENCE; -extern const ConfigInfo GFX_STEREO_EFB_MONO_DEPTH; -extern const ConfigInfo GFX_STEREO_DEPTH_PERCENTAGE; +extern const Info GFX_STEREO_MODE; +extern const Info GFX_STEREO_DEPTH; +extern const Info GFX_STEREO_CONVERGENCE_PERCENTAGE; +extern const Info GFX_STEREO_SWAP_EYES; +extern const Info GFX_STEREO_CONVERGENCE; +extern const Info GFX_STEREO_EFB_MONO_DEPTH; +extern const Info GFX_STEREO_DEPTH_PERCENTAGE; // Stereoscopy pseudo-limits for consistent behavior between enhancements tab and hotkeys. static constexpr int GFX_STEREO_DEPTH_MAXIMUM = 100; @@ -106,23 +106,23 @@ static constexpr int GFX_STEREO_CONVERGENCE_MAXIMUM = 200; // Graphics.Hacks -extern const ConfigInfo GFX_HACK_EFB_ACCESS_ENABLE; -extern const ConfigInfo GFX_HACK_EFB_DEFER_INVALIDATION; -extern const ConfigInfo GFX_HACK_EFB_ACCESS_TILE_SIZE; -extern const ConfigInfo GFX_HACK_BBOX_ENABLE; -extern const ConfigInfo GFX_HACK_FORCE_PROGRESSIVE; -extern const ConfigInfo GFX_HACK_SKIP_EFB_COPY_TO_RAM; -extern const ConfigInfo GFX_HACK_SKIP_XFB_COPY_TO_RAM; -extern const ConfigInfo GFX_HACK_DISABLE_COPY_TO_VRAM; -extern const ConfigInfo GFX_HACK_DEFER_EFB_COPIES; -extern const ConfigInfo GFX_HACK_IMMEDIATE_XFB; -extern const ConfigInfo GFX_HACK_SKIP_DUPLICATE_XFBS; -extern const ConfigInfo GFX_HACK_COPY_EFB_SCALED; -extern const ConfigInfo GFX_HACK_EFB_EMULATE_FORMAT_CHANGES; -extern const ConfigInfo GFX_HACK_VERTEX_ROUDING; +extern const Info GFX_HACK_EFB_ACCESS_ENABLE; +extern const Info GFX_HACK_EFB_DEFER_INVALIDATION; +extern const Info GFX_HACK_EFB_ACCESS_TILE_SIZE; +extern const Info GFX_HACK_BBOX_ENABLE; +extern const Info GFX_HACK_FORCE_PROGRESSIVE; +extern const Info GFX_HACK_SKIP_EFB_COPY_TO_RAM; +extern const Info GFX_HACK_SKIP_XFB_COPY_TO_RAM; +extern const Info GFX_HACK_DISABLE_COPY_TO_VRAM; +extern const Info GFX_HACK_DEFER_EFB_COPIES; +extern const Info GFX_HACK_IMMEDIATE_XFB; +extern const Info GFX_HACK_SKIP_DUPLICATE_XFBS; +extern const Info GFX_HACK_COPY_EFB_SCALED; +extern const Info GFX_HACK_EFB_EMULATE_FORMAT_CHANGES; +extern const Info GFX_HACK_VERTEX_ROUDING; // Graphics.GameSpecific -extern const ConfigInfo GFX_PERF_QUERIES_ENABLE; +extern const Info GFX_PERF_QUERIES_ENABLE; } // namespace Config diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 577878df2b..a5594c0bd4 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -17,134 +17,126 @@ namespace Config { // Main.Core -const ConfigInfo MAIN_SKIP_IPL{{System::Main, "Core", "SkipIPL"}, true}; -const ConfigInfo MAIN_LOAD_IPL_DUMP{{System::Main, "Core", "LoadIPLDump"}, true}; -const ConfigInfo MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"}, - PowerPC::DefaultCPUCore()}; -const ConfigInfo MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true}; -const ConfigInfo MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true}; -const ConfigInfo MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true}; -const ConfigInfo MAIN_TIMING_VARIANCE{{System::Main, "Core", "TimingVariance"}, 40}; -const ConfigInfo MAIN_CPU_THREAD{{System::Main, "Core", "CPUThread"}, true}; -const ConfigInfo MAIN_SYNC_ON_SKIP_IDLE{{System::Main, "Core", "SyncOnSkipIdle"}, true}; -const ConfigInfo MAIN_DEFAULT_ISO{{System::Main, "Core", "DefaultISO"}, ""}; -const ConfigInfo MAIN_ENABLE_CHEATS{{System::Main, "Core", "EnableCheats"}, false}; -const ConfigInfo MAIN_GC_LANGUAGE{{System::Main, "Core", "SelectedLanguage"}, 0}; -const ConfigInfo MAIN_OVERRIDE_REGION_SETTINGS{ - {System::Main, "Core", "OverrideRegionSettings"}, false}; -const ConfigInfo MAIN_DPL2_DECODER{{System::Main, "Core", "DPL2Decoder"}, false}; -const ConfigInfo MAIN_DPL2_QUALITY{{System::Main, "Core", "DPL2Quality"}, - AudioCommon::GetDefaultDPL2Quality()}; -const ConfigInfo MAIN_AUDIO_LATENCY{{System::Main, "Core", "AudioLatency"}, 20}; -const ConfigInfo MAIN_AUDIO_STRETCH{{System::Main, "Core", "AudioStretch"}, false}; -const ConfigInfo MAIN_AUDIO_STRETCH_LATENCY{{System::Main, "Core", "AudioStretchMaxLatency"}, - 80}; -const ConfigInfo MAIN_MEMCARD_A_PATH{{System::Main, "Core", "MemcardAPath"}, ""}; -const ConfigInfo MAIN_MEMCARD_B_PATH{{System::Main, "Core", "MemcardBPath"}, ""}; -const ConfigInfo MAIN_AGP_CART_A_PATH{{System::Main, "Core", "AgpCartAPath"}, ""}; -const ConfigInfo MAIN_AGP_CART_B_PATH{{System::Main, "Core", "AgpCartBPath"}, ""}; -const ConfigInfo MAIN_GCI_FOLDER_A_PATH_OVERRIDE{ +const Info MAIN_SKIP_IPL{{System::Main, "Core", "SkipIPL"}, true}; +const Info MAIN_LOAD_IPL_DUMP{{System::Main, "Core", "LoadIPLDump"}, true}; +const Info MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"}, + PowerPC::DefaultCPUCore()}; +const Info MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true}; +const Info MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true}; +const Info MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true}; +const Info MAIN_TIMING_VARIANCE{{System::Main, "Core", "TimingVariance"}, 40}; +const Info MAIN_CPU_THREAD{{System::Main, "Core", "CPUThread"}, true}; +const Info MAIN_SYNC_ON_SKIP_IDLE{{System::Main, "Core", "SyncOnSkipIdle"}, true}; +const Info MAIN_DEFAULT_ISO{{System::Main, "Core", "DefaultISO"}, ""}; +const Info MAIN_ENABLE_CHEATS{{System::Main, "Core", "EnableCheats"}, false}; +const Info MAIN_GC_LANGUAGE{{System::Main, "Core", "SelectedLanguage"}, 0}; +const Info MAIN_OVERRIDE_REGION_SETTINGS{{System::Main, "Core", "OverrideRegionSettings"}, + false}; +const Info MAIN_DPL2_DECODER{{System::Main, "Core", "DPL2Decoder"}, false}; +const Info MAIN_DPL2_QUALITY{{System::Main, "Core", "DPL2Quality"}, + AudioCommon::GetDefaultDPL2Quality()}; +const Info MAIN_AUDIO_LATENCY{{System::Main, "Core", "AudioLatency"}, 20}; +const Info MAIN_AUDIO_STRETCH{{System::Main, "Core", "AudioStretch"}, false}; +const Info MAIN_AUDIO_STRETCH_LATENCY{{System::Main, "Core", "AudioStretchMaxLatency"}, 80}; +const Info MAIN_MEMCARD_A_PATH{{System::Main, "Core", "MemcardAPath"}, ""}; +const Info MAIN_MEMCARD_B_PATH{{System::Main, "Core", "MemcardBPath"}, ""}; +const Info MAIN_AGP_CART_A_PATH{{System::Main, "Core", "AgpCartAPath"}, ""}; +const Info MAIN_AGP_CART_B_PATH{{System::Main, "Core", "AgpCartBPath"}, ""}; +const Info MAIN_GCI_FOLDER_A_PATH_OVERRIDE{ {System::Main, "Core", "GCIFolderAPathOverride"}, ""}; -const ConfigInfo MAIN_GCI_FOLDER_B_PATH_OVERRIDE{ +const Info MAIN_GCI_FOLDER_B_PATH_OVERRIDE{ {System::Main, "Core", "GCIFolderBPathOverride"}, ""}; -const ConfigInfo MAIN_GCI_FOLDER_CURRENT_GAME_ONLY{ +const Info MAIN_GCI_FOLDER_CURRENT_GAME_ONLY{ {System::Main, "Core", "GCIFolderCurrentGameOnly"}, false}; -const ConfigInfo MAIN_CODE_SYNC_OVERRIDE{{System::Main, "Core", "CheatSyncOverride"}, false}; -const ConfigInfo MAIN_SLOT_A{{System::Main, "Core", "SlotA"}, - ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER}; -const ConfigInfo MAIN_SLOT_B{{System::Main, "Core", "SlotB"}, - ExpansionInterface::EXIDEVICE_NONE}; -const ConfigInfo MAIN_SERIAL_PORT_1{{System::Main, "Core", "SerialPort1"}, - ExpansionInterface::EXIDEVICE_NONE}; -const ConfigInfo MAIN_BBA_MAC{{System::Main, "Core", "BBA_MAC"}, ""}; +const Info MAIN_CODE_SYNC_OVERRIDE{{System::Main, "Core", "CheatSyncOverride"}, false}; +const Info MAIN_SLOT_A{{System::Main, "Core", "SlotA"}, + ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER}; +const Info MAIN_SLOT_B{{System::Main, "Core", "SlotB"}, ExpansionInterface::EXIDEVICE_NONE}; +const Info MAIN_SERIAL_PORT_1{{System::Main, "Core", "SerialPort1"}, + ExpansionInterface::EXIDEVICE_NONE}; +const Info MAIN_BBA_MAC{{System::Main, "Core", "BBA_MAC"}, ""}; -ConfigInfo GetInfoForSIDevice(u32 channel) +Info GetInfoForSIDevice(u32 channel) { return {{System::Main, "Core", fmt::format("SIDevice{}", channel)}, static_cast(channel == 0 ? SerialInterface::SIDEVICE_GC_CONTROLLER : SerialInterface::SIDEVICE_NONE)}; } -ConfigInfo GetInfoForAdapterRumble(u32 channel) +Info GetInfoForAdapterRumble(u32 channel) { return {{System::Main, "Core", fmt::format("AdapterRumble{}", channel)}, true}; } -ConfigInfo GetInfoForSimulateKonga(u32 channel) +Info GetInfoForSimulateKonga(u32 channel) { return {{System::Main, "Core", fmt::format("SimulateKonga{}", channel)}, false}; } -const ConfigInfo MAIN_WII_SD_CARD{{System::Main, "Core", "WiiSDCard"}, true}; -const ConfigInfo MAIN_WII_SD_CARD_WRITABLE{{System::Main, "Core", "WiiSDCardWritable"}, true}; -const ConfigInfo MAIN_WII_KEYBOARD{{System::Main, "Core", "WiiKeyboard"}, false}; -const ConfigInfo MAIN_WIIMOTE_CONTINUOUS_SCANNING{ +const Info MAIN_WII_SD_CARD{{System::Main, "Core", "WiiSDCard"}, true}; +const Info MAIN_WII_SD_CARD_WRITABLE{{System::Main, "Core", "WiiSDCardWritable"}, true}; +const Info MAIN_WII_KEYBOARD{{System::Main, "Core", "WiiKeyboard"}, false}; +const Info MAIN_WIIMOTE_CONTINUOUS_SCANNING{ {System::Main, "Core", "WiimoteContinuousScanning"}, false}; -const ConfigInfo MAIN_WIIMOTE_ENABLE_SPEAKER{{System::Main, "Core", "WiimoteEnableSpeaker"}, - false}; -const ConfigInfo MAIN_RUN_COMPARE_SERVER{{System::Main, "Core", "RunCompareServer"}, false}; -const ConfigInfo MAIN_RUN_COMPARE_CLIENT{{System::Main, "Core", "RunCompareClient"}, false}; -const ConfigInfo MAIN_MMU{{System::Main, "Core", "MMU"}, false}; -const ConfigInfo MAIN_BB_DUMP_PORT{{System::Main, "Core", "BBDumpPort"}, -1}; -const ConfigInfo MAIN_SYNC_GPU{{System::Main, "Core", "SyncGPU"}, false}; -const ConfigInfo MAIN_SYNC_GPU_MAX_DISTANCE{{System::Main, "Core", "SyncGpuMaxDistance"}, - 200000}; -const ConfigInfo MAIN_SYNC_GPU_MIN_DISTANCE{{System::Main, "Core", "SyncGpuMinDistance"}, - -200000}; -const ConfigInfo MAIN_SYNC_GPU_OVERCLOCK{{System::Main, "Core", "SyncGpuOverclock"}, 1.0f}; -const ConfigInfo MAIN_FAST_DISC_SPEED{{System::Main, "Core", "FastDiscSpeed"}, false}; -const ConfigInfo MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false}; -const ConfigInfo MAIN_FPRF{{System::Main, "Core", "FPRF"}, false}; -const ConfigInfo MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false}; -const ConfigInfo MAIN_EMULATION_SPEED{{System::Main, "Core", "EmulationSpeed"}, 1.0f}; -const ConfigInfo MAIN_OVERCLOCK{{System::Main, "Core", "Overclock"}, 1.0f}; -const ConfigInfo MAIN_OVERCLOCK_ENABLE{{System::Main, "Core", "OverclockEnable"}, false}; -const ConfigInfo MAIN_RAM_OVERRIDE_ENABLE{{System::Main, "Core", "RAMOverrideEnable"}, false}; -const ConfigInfo MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL}; -const ConfigInfo MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL}; -const ConfigInfo MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"}, ""}; -const ConfigInfo MAIN_GPU_DETERMINISM_MODE{ - {System::Main, "Core", "GPUDeterminismMode"}, "auto"}; -const ConfigInfo MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"}, ""}; -const ConfigInfo MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false}; +const Info MAIN_WIIMOTE_ENABLE_SPEAKER{{System::Main, "Core", "WiimoteEnableSpeaker"}, false}; +const Info MAIN_RUN_COMPARE_SERVER{{System::Main, "Core", "RunCompareServer"}, false}; +const Info MAIN_RUN_COMPARE_CLIENT{{System::Main, "Core", "RunCompareClient"}, false}; +const Info MAIN_MMU{{System::Main, "Core", "MMU"}, false}; +const Info MAIN_BB_DUMP_PORT{{System::Main, "Core", "BBDumpPort"}, -1}; +const Info MAIN_SYNC_GPU{{System::Main, "Core", "SyncGPU"}, false}; +const Info MAIN_SYNC_GPU_MAX_DISTANCE{{System::Main, "Core", "SyncGpuMaxDistance"}, 200000}; +const Info MAIN_SYNC_GPU_MIN_DISTANCE{{System::Main, "Core", "SyncGpuMinDistance"}, -200000}; +const Info MAIN_SYNC_GPU_OVERCLOCK{{System::Main, "Core", "SyncGpuOverclock"}, 1.0f}; +const Info MAIN_FAST_DISC_SPEED{{System::Main, "Core", "FastDiscSpeed"}, false}; +const Info MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false}; +const Info MAIN_FPRF{{System::Main, "Core", "FPRF"}, false}; +const Info MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false}; +const Info MAIN_EMULATION_SPEED{{System::Main, "Core", "EmulationSpeed"}, 1.0f}; +const Info MAIN_OVERCLOCK{{System::Main, "Core", "Overclock"}, 1.0f}; +const Info MAIN_OVERCLOCK_ENABLE{{System::Main, "Core", "OverclockEnable"}, false}; +const Info MAIN_RAM_OVERRIDE_ENABLE{{System::Main, "Core", "RAMOverrideEnable"}, false}; +const Info MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL}; +const Info MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL}; +const Info MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"}, ""}; +const Info MAIN_GPU_DETERMINISM_MODE{{System::Main, "Core", "GPUDeterminismMode"}, + "auto"}; +const Info MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"}, ""}; +const Info MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false}; // Default to seconds between 1.1.1970 and 1.1.2000 -const ConfigInfo MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800}; -const ConfigInfo MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false}; +const Info MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800}; +const Info MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false}; // Main.Display -const ConfigInfo MAIN_FULLSCREEN_DISPLAY_RES{ +const Info MAIN_FULLSCREEN_DISPLAY_RES{ {System::Main, "Display", "FullscreenDisplayRes"}, "Auto"}; -const ConfigInfo MAIN_FULLSCREEN{{System::Main, "Display", "Fullscreen"}, false}; -const ConfigInfo MAIN_RENDER_TO_MAIN{{System::Main, "Display", "RenderToMain"}, false}; -const ConfigInfo MAIN_RENDER_WINDOW_XPOS{{System::Main, "Display", "RenderWindowXPos"}, -1}; -const ConfigInfo MAIN_RENDER_WINDOW_YPOS{{System::Main, "Display", "RenderWindowYPos"}, -1}; -const ConfigInfo MAIN_RENDER_WINDOW_WIDTH{{System::Main, "Display", "RenderWindowWidth"}, 640}; -const ConfigInfo MAIN_RENDER_WINDOW_HEIGHT{{System::Main, "Display", "RenderWindowHeight"}, - 480}; -const ConfigInfo MAIN_RENDER_WINDOW_AUTOSIZE{ - {System::Main, "Display", "RenderWindowAutoSize"}, false}; -const ConfigInfo MAIN_KEEP_WINDOW_ON_TOP{{System::Main, "Display", "KeepWindowOnTop"}, false}; -const ConfigInfo MAIN_DISABLE_SCREENSAVER{{System::Main, "Display", "DisableScreenSaver"}, - false}; +const Info MAIN_FULLSCREEN{{System::Main, "Display", "Fullscreen"}, false}; +const Info MAIN_RENDER_TO_MAIN{{System::Main, "Display", "RenderToMain"}, false}; +const Info MAIN_RENDER_WINDOW_XPOS{{System::Main, "Display", "RenderWindowXPos"}, -1}; +const Info MAIN_RENDER_WINDOW_YPOS{{System::Main, "Display", "RenderWindowYPos"}, -1}; +const Info MAIN_RENDER_WINDOW_WIDTH{{System::Main, "Display", "RenderWindowWidth"}, 640}; +const Info MAIN_RENDER_WINDOW_HEIGHT{{System::Main, "Display", "RenderWindowHeight"}, 480}; +const Info MAIN_RENDER_WINDOW_AUTOSIZE{{System::Main, "Display", "RenderWindowAutoSize"}, + false}; +const Info MAIN_KEEP_WINDOW_ON_TOP{{System::Main, "Display", "KeepWindowOnTop"}, false}; +const Info MAIN_DISABLE_SCREENSAVER{{System::Main, "Display", "DisableScreenSaver"}, false}; // Main.DSP -const ConfigInfo MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false}; -const ConfigInfo MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true}; -const ConfigInfo MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false}; -const ConfigInfo MAIN_DUMP_AUDIO_SILENT{{System::Main, "DSP", "DumpAudioSilent"}, false}; -const ConfigInfo MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false}; -const ConfigInfo MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"}, - AudioCommon::GetDefaultSoundBackend()}; -const ConfigInfo MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100}; +const Info MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false}; +const Info MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true}; +const Info MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false}; +const Info MAIN_DUMP_AUDIO_SILENT{{System::Main, "DSP", "DumpAudioSilent"}, false}; +const Info MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false}; +const Info MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"}, + AudioCommon::GetDefaultSoundBackend()}; +const Info MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100}; // Main.General -const ConfigInfo MAIN_DUMP_PATH{{System::Main, "General", "DumpPath"}, ""}; -const ConfigInfo MAIN_LOAD_PATH{{System::Main, "General", "LoadPath"}, ""}; -const ConfigInfo MAIN_RESOURCEPACK_PATH{{System::Main, "General", "ResourcePackPath"}, - ""}; -const ConfigInfo MAIN_FS_PATH{{System::Main, "General", "NANDRootPath"}, ""}; -const ConfigInfo MAIN_SD_PATH{{System::Main, "General", "WiiSDCardPath"}, ""}; +const Info MAIN_DUMP_PATH{{System::Main, "General", "DumpPath"}, ""}; +const Info MAIN_LOAD_PATH{{System::Main, "General", "LoadPath"}, ""}; +const Info MAIN_RESOURCEPACK_PATH{{System::Main, "General", "ResourcePackPath"}, ""}; +const Info MAIN_FS_PATH{{System::Main, "General", "NANDRootPath"}, ""}; +const Info MAIN_SD_PATH{{System::Main, "General", "WiiSDCardPath"}, ""}; } // namespace Config diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index 60b197d784..01913f685d 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -22,99 +22,99 @@ namespace Config { // Main.Core -extern const ConfigInfo MAIN_SKIP_IPL; -extern const ConfigInfo MAIN_LOAD_IPL_DUMP; -extern const ConfigInfo MAIN_CPU_CORE; -extern const ConfigInfo MAIN_JIT_FOLLOW_BRANCH; -extern const ConfigInfo MAIN_FASTMEM; +extern const Info MAIN_SKIP_IPL; +extern const Info MAIN_LOAD_IPL_DUMP; +extern const Info MAIN_CPU_CORE; +extern const Info MAIN_JIT_FOLLOW_BRANCH; +extern const Info MAIN_FASTMEM; // Should really be in the DSP section, but we're kind of stuck with bad decisions made in the past. -extern const ConfigInfo MAIN_DSP_HLE; -extern const ConfigInfo MAIN_TIMING_VARIANCE; -extern const ConfigInfo MAIN_CPU_THREAD; -extern const ConfigInfo MAIN_SYNC_ON_SKIP_IDLE; -extern const ConfigInfo MAIN_DEFAULT_ISO; -extern const ConfigInfo MAIN_ENABLE_CHEATS; -extern const ConfigInfo MAIN_GC_LANGUAGE; -extern const ConfigInfo MAIN_OVERRIDE_REGION_SETTINGS; -extern const ConfigInfo MAIN_DPL2_DECODER; -extern const ConfigInfo MAIN_DPL2_QUALITY; -extern const ConfigInfo MAIN_AUDIO_LATENCY; -extern const ConfigInfo MAIN_AUDIO_STRETCH; -extern const ConfigInfo MAIN_AUDIO_STRETCH_LATENCY; -extern const ConfigInfo MAIN_MEMCARD_A_PATH; -extern const ConfigInfo MAIN_MEMCARD_B_PATH; -extern const ConfigInfo MAIN_AGP_CART_A_PATH; -extern const ConfigInfo MAIN_AGP_CART_B_PATH; -extern const ConfigInfo MAIN_GCI_FOLDER_A_PATH_OVERRIDE; -extern const ConfigInfo MAIN_GCI_FOLDER_B_PATH_OVERRIDE; -extern const ConfigInfo MAIN_CODE_SYNC_OVERRIDE; -extern const ConfigInfo MAIN_GCI_FOLDER_CURRENT_GAME_ONLY; -extern const ConfigInfo MAIN_SLOT_A; -extern const ConfigInfo MAIN_SLOT_B; -extern const ConfigInfo MAIN_SERIAL_PORT_1; -extern const ConfigInfo MAIN_BBA_MAC; -ConfigInfo GetInfoForSIDevice(u32 channel); -ConfigInfo GetInfoForAdapterRumble(u32 channel); -ConfigInfo GetInfoForSimulateKonga(u32 channel); -extern const ConfigInfo MAIN_WII_SD_CARD; -extern const ConfigInfo MAIN_WII_SD_CARD_WRITABLE; -extern const ConfigInfo MAIN_WII_KEYBOARD; -extern const ConfigInfo MAIN_WIIMOTE_CONTINUOUS_SCANNING; -extern const ConfigInfo MAIN_WIIMOTE_ENABLE_SPEAKER; -extern const ConfigInfo MAIN_RUN_COMPARE_SERVER; -extern const ConfigInfo MAIN_RUN_COMPARE_CLIENT; -extern const ConfigInfo MAIN_MMU; -extern const ConfigInfo MAIN_BB_DUMP_PORT; -extern const ConfigInfo MAIN_SYNC_GPU; -extern const ConfigInfo MAIN_SYNC_GPU_MAX_DISTANCE; -extern const ConfigInfo MAIN_SYNC_GPU_MIN_DISTANCE; -extern const ConfigInfo MAIN_SYNC_GPU_OVERCLOCK; -extern const ConfigInfo MAIN_FAST_DISC_SPEED; -extern const ConfigInfo MAIN_LOW_DCBZ_HACK; -extern const ConfigInfo MAIN_FPRF; -extern const ConfigInfo MAIN_ACCURATE_NANS; -extern const ConfigInfo MAIN_EMULATION_SPEED; -extern const ConfigInfo MAIN_OVERCLOCK; -extern const ConfigInfo MAIN_OVERCLOCK_ENABLE; -extern const ConfigInfo MAIN_RAM_OVERRIDE_ENABLE; -extern const ConfigInfo MAIN_MEM1_SIZE; -extern const ConfigInfo MAIN_MEM2_SIZE; +extern const Info MAIN_DSP_HLE; +extern const Info MAIN_TIMING_VARIANCE; +extern const Info MAIN_CPU_THREAD; +extern const Info MAIN_SYNC_ON_SKIP_IDLE; +extern const Info MAIN_DEFAULT_ISO; +extern const Info MAIN_ENABLE_CHEATS; +extern const Info MAIN_GC_LANGUAGE; +extern const Info MAIN_OVERRIDE_REGION_SETTINGS; +extern const Info MAIN_DPL2_DECODER; +extern const Info MAIN_DPL2_QUALITY; +extern const Info MAIN_AUDIO_LATENCY; +extern const Info MAIN_AUDIO_STRETCH; +extern const Info MAIN_AUDIO_STRETCH_LATENCY; +extern const Info MAIN_MEMCARD_A_PATH; +extern const Info MAIN_MEMCARD_B_PATH; +extern const Info MAIN_AGP_CART_A_PATH; +extern const Info MAIN_AGP_CART_B_PATH; +extern const Info MAIN_GCI_FOLDER_A_PATH_OVERRIDE; +extern const Info MAIN_GCI_FOLDER_B_PATH_OVERRIDE; +extern const Info MAIN_CODE_SYNC_OVERRIDE; +extern const Info MAIN_GCI_FOLDER_CURRENT_GAME_ONLY; +extern const Info MAIN_SLOT_A; +extern const Info MAIN_SLOT_B; +extern const Info MAIN_SERIAL_PORT_1; +extern const Info MAIN_BBA_MAC; +Info GetInfoForSIDevice(u32 channel); +Info GetInfoForAdapterRumble(u32 channel); +Info GetInfoForSimulateKonga(u32 channel); +extern const Info MAIN_WII_SD_CARD; +extern const Info MAIN_WII_SD_CARD_WRITABLE; +extern const Info MAIN_WII_KEYBOARD; +extern const Info MAIN_WIIMOTE_CONTINUOUS_SCANNING; +extern const Info MAIN_WIIMOTE_ENABLE_SPEAKER; +extern const Info MAIN_RUN_COMPARE_SERVER; +extern const Info MAIN_RUN_COMPARE_CLIENT; +extern const Info MAIN_MMU; +extern const Info MAIN_BB_DUMP_PORT; +extern const Info MAIN_SYNC_GPU; +extern const Info MAIN_SYNC_GPU_MAX_DISTANCE; +extern const Info MAIN_SYNC_GPU_MIN_DISTANCE; +extern const Info MAIN_SYNC_GPU_OVERCLOCK; +extern const Info MAIN_FAST_DISC_SPEED; +extern const Info MAIN_LOW_DCBZ_HACK; +extern const Info MAIN_FPRF; +extern const Info MAIN_ACCURATE_NANS; +extern const Info MAIN_EMULATION_SPEED; +extern const Info MAIN_OVERCLOCK; +extern const Info MAIN_OVERCLOCK_ENABLE; +extern const Info MAIN_RAM_OVERRIDE_ENABLE; +extern const Info MAIN_MEM1_SIZE; +extern const Info MAIN_MEM2_SIZE; // Should really be part of System::GFX, but again, we're stuck with past mistakes. -extern const ConfigInfo MAIN_GFX_BACKEND; -extern const ConfigInfo MAIN_GPU_DETERMINISM_MODE; -extern const ConfigInfo MAIN_PERF_MAP_DIR; -extern const ConfigInfo MAIN_CUSTOM_RTC_ENABLE; -extern const ConfigInfo MAIN_CUSTOM_RTC_VALUE; -extern const ConfigInfo MAIN_AUTO_DISC_CHANGE; +extern const Info MAIN_GFX_BACKEND; +extern const Info MAIN_GPU_DETERMINISM_MODE; +extern const Info MAIN_PERF_MAP_DIR; +extern const Info MAIN_CUSTOM_RTC_ENABLE; +extern const Info MAIN_CUSTOM_RTC_VALUE; +extern const Info MAIN_AUTO_DISC_CHANGE; // Main.DSP -extern const ConfigInfo MAIN_DSP_CAPTURE_LOG; -extern const ConfigInfo MAIN_DSP_JIT; -extern const ConfigInfo MAIN_DUMP_AUDIO; -extern const ConfigInfo MAIN_DUMP_AUDIO_SILENT; -extern const ConfigInfo MAIN_DUMP_UCODE; -extern const ConfigInfo MAIN_AUDIO_BACKEND; -extern const ConfigInfo MAIN_AUDIO_VOLUME; +extern const Info MAIN_DSP_CAPTURE_LOG; +extern const Info MAIN_DSP_JIT; +extern const Info MAIN_DUMP_AUDIO; +extern const Info MAIN_DUMP_AUDIO_SILENT; +extern const Info MAIN_DUMP_UCODE; +extern const Info MAIN_AUDIO_BACKEND; +extern const Info MAIN_AUDIO_VOLUME; // Main.Display -extern const ConfigInfo MAIN_FULLSCREEN_DISPLAY_RES; -extern const ConfigInfo MAIN_FULLSCREEN; -extern const ConfigInfo MAIN_RENDER_TO_MAIN; -extern const ConfigInfo MAIN_RENDER_WINDOW_XPOS; -extern const ConfigInfo MAIN_RENDER_WINDOW_YPOS; -extern const ConfigInfo MAIN_RENDER_WINDOW_WIDTH; -extern const ConfigInfo MAIN_RENDER_WINDOW_HEIGHT; -extern const ConfigInfo MAIN_RENDER_WINDOW_AUTOSIZE; -extern const ConfigInfo MAIN_KEEP_WINDOW_ON_TOP; -extern const ConfigInfo MAIN_DISABLE_SCREENSAVER; +extern const Info MAIN_FULLSCREEN_DISPLAY_RES; +extern const Info MAIN_FULLSCREEN; +extern const Info MAIN_RENDER_TO_MAIN; +extern const Info MAIN_RENDER_WINDOW_XPOS; +extern const Info MAIN_RENDER_WINDOW_YPOS; +extern const Info MAIN_RENDER_WINDOW_WIDTH; +extern const Info MAIN_RENDER_WINDOW_HEIGHT; +extern const Info MAIN_RENDER_WINDOW_AUTOSIZE; +extern const Info MAIN_KEEP_WINDOW_ON_TOP; +extern const Info MAIN_DISABLE_SCREENSAVER; // Main.General -extern const ConfigInfo MAIN_DUMP_PATH; -extern const ConfigInfo MAIN_LOAD_PATH; -extern const ConfigInfo MAIN_RESOURCEPACK_PATH; -extern const ConfigInfo MAIN_FS_PATH; -extern const ConfigInfo MAIN_SD_PATH; +extern const Info MAIN_DUMP_PATH; +extern const Info MAIN_LOAD_PATH; +extern const Info MAIN_RESOURCEPACK_PATH; +extern const Info MAIN_FS_PATH; +extern const Info MAIN_SD_PATH; } // namespace Config diff --git a/Source/Core/Core/Config/NetplaySettings.cpp b/Source/Core/Core/Config/NetplaySettings.cpp index d034d1d8d7..492fe5ef71 100644 --- a/Source/Core/Core/Config/NetplaySettings.cpp +++ b/Source/Core/Core/Config/NetplaySettings.cpp @@ -14,55 +14,49 @@ static constexpr u16 DEFAULT_LISTEN_PORT = 2626; // Main.NetPlay -const ConfigInfo NETPLAY_TRAVERSAL_SERVER{{System::Main, "NetPlay", "TraversalServer"}, - "stun.dolphin-emu.org"}; -const ConfigInfo NETPLAY_TRAVERSAL_PORT{{System::Main, "NetPlay", "TraversalPort"}, 6262}; -const ConfigInfo NETPLAY_TRAVERSAL_CHOICE{{System::Main, "NetPlay", "TraversalChoice"}, - "direct"}; -const ConfigInfo NETPLAY_INDEX_URL{{System::Main, "NetPlay", "IndexServer"}, - "https://lobby.dolphin-emu.org"}; +const Info NETPLAY_TRAVERSAL_SERVER{{System::Main, "NetPlay", "TraversalServer"}, + "stun.dolphin-emu.org"}; +const Info NETPLAY_TRAVERSAL_PORT{{System::Main, "NetPlay", "TraversalPort"}, 6262}; +const Info NETPLAY_TRAVERSAL_CHOICE{{System::Main, "NetPlay", "TraversalChoice"}, + "direct"}; +const Info NETPLAY_INDEX_URL{{System::Main, "NetPlay", "IndexServer"}, + "https://lobby.dolphin-emu.org"}; -const ConfigInfo NETPLAY_USE_INDEX{{System::Main, "NetPlay", "UseIndex"}, false}; -const ConfigInfo NETPLAY_INDEX_NAME{{System::Main, "NetPlay", "IndexName"}, ""}; -const ConfigInfo NETPLAY_INDEX_REGION{{System::Main, "NetPlay", "IndexRegion"}, ""}; -const ConfigInfo NETPLAY_INDEX_PASSWORD{{System::Main, "NetPlay", "IndexPassword"}, - ""}; +const Info NETPLAY_USE_INDEX{{System::Main, "NetPlay", "UseIndex"}, false}; +const Info NETPLAY_INDEX_NAME{{System::Main, "NetPlay", "IndexName"}, ""}; +const Info NETPLAY_INDEX_REGION{{System::Main, "NetPlay", "IndexRegion"}, ""}; +const Info NETPLAY_INDEX_PASSWORD{{System::Main, "NetPlay", "IndexPassword"}, ""}; -const ConfigInfo NETPLAY_HOST_CODE{{System::Main, "NetPlay", "HostCode"}, "00000000"}; +const Info NETPLAY_HOST_CODE{{System::Main, "NetPlay", "HostCode"}, "00000000"}; -const ConfigInfo NETPLAY_HOST_PORT{{System::Main, "NetPlay", "HostPort"}, DEFAULT_LISTEN_PORT}; -const ConfigInfo NETPLAY_ADDRESS{{System::Main, "NetPlay", "Address"}, "127.0.0.1"}; -const ConfigInfo NETPLAY_CONNECT_PORT{{System::Main, "NetPlay", "ConnectPort"}, - DEFAULT_LISTEN_PORT}; -const ConfigInfo NETPLAY_LISTEN_PORT{{System::Main, "NetPlay", "ListenPort"}, - DEFAULT_LISTEN_PORT}; +const Info NETPLAY_HOST_PORT{{System::Main, "NetPlay", "HostPort"}, DEFAULT_LISTEN_PORT}; +const Info NETPLAY_ADDRESS{{System::Main, "NetPlay", "Address"}, "127.0.0.1"}; +const Info NETPLAY_CONNECT_PORT{{System::Main, "NetPlay", "ConnectPort"}, DEFAULT_LISTEN_PORT}; +const Info NETPLAY_LISTEN_PORT{{System::Main, "NetPlay", "ListenPort"}, DEFAULT_LISTEN_PORT}; -const ConfigInfo NETPLAY_NICKNAME{{System::Main, "NetPlay", "Nickname"}, "Player"}; -const ConfigInfo NETPLAY_USE_UPNP{{System::Main, "NetPlay", "UseUPNP"}, false}; +const Info NETPLAY_NICKNAME{{System::Main, "NetPlay", "Nickname"}, "Player"}; +const Info NETPLAY_USE_UPNP{{System::Main, "NetPlay", "UseUPNP"}, false}; -const ConfigInfo NETPLAY_ENABLE_QOS{{System::Main, "NetPlay", "EnableQoS"}, true}; +const Info NETPLAY_ENABLE_QOS{{System::Main, "NetPlay", "EnableQoS"}, true}; -const ConfigInfo NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT{ +const Info NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT{ {System::Main, "NetPlay", "EnableChunkedUploadLimit"}, false}; -const ConfigInfo NETPLAY_CHUNKED_UPLOAD_LIMIT{{System::Main, "NetPlay", "ChunkedUploadLimit"}, - 3000}; +const Info NETPLAY_CHUNKED_UPLOAD_LIMIT{{System::Main, "NetPlay", "ChunkedUploadLimit"}, 3000}; -const ConfigInfo NETPLAY_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSize"}, 5}; -const ConfigInfo NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1}; +const Info NETPLAY_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSize"}, 5}; +const Info NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1}; -const ConfigInfo NETPLAY_WRITE_SAVE_SDCARD_DATA{ - {System::Main, "NetPlay", "WriteSaveSDCardData"}, false}; -const ConfigInfo NETPLAY_LOAD_WII_SAVE{{System::Main, "NetPlay", "LoadWiiSave"}, false}; -const ConfigInfo NETPLAY_SYNC_SAVES{{System::Main, "NetPlay", "SyncSaves"}, true}; -const ConfigInfo NETPLAY_SYNC_CODES{{System::Main, "NetPlay", "SyncCodes"}, true}; -const ConfigInfo NETPLAY_RECORD_INPUTS{{System::Main, "NetPlay", "RecordInputs"}, false}; -const ConfigInfo NETPLAY_STRICT_SETTINGS_SYNC{{System::Main, "NetPlay", "StrictSettingsSync"}, - false}; -const ConfigInfo NETPLAY_NETWORK_MODE{{System::Main, "NetPlay", "NetworkMode"}, - "fixeddelay"}; -const ConfigInfo NETPLAY_SYNC_ALL_WII_SAVES{{System::Main, "NetPlay", "SyncAllWiiSaves"}, - false}; -const ConfigInfo NETPLAY_GOLF_MODE_OVERLAY{{System::Main, "NetPlay", "GolfModeOverlay"}, - true}; +const Info NETPLAY_WRITE_SAVE_SDCARD_DATA{{System::Main, "NetPlay", "WriteSaveSDCardData"}, + false}; +const Info NETPLAY_LOAD_WII_SAVE{{System::Main, "NetPlay", "LoadWiiSave"}, false}; +const Info NETPLAY_SYNC_SAVES{{System::Main, "NetPlay", "SyncSaves"}, true}; +const Info NETPLAY_SYNC_CODES{{System::Main, "NetPlay", "SyncCodes"}, true}; +const Info NETPLAY_RECORD_INPUTS{{System::Main, "NetPlay", "RecordInputs"}, false}; +const Info NETPLAY_STRICT_SETTINGS_SYNC{{System::Main, "NetPlay", "StrictSettingsSync"}, + false}; +const Info NETPLAY_NETWORK_MODE{{System::Main, "NetPlay", "NetworkMode"}, + "fixeddelay"}; +const Info NETPLAY_SYNC_ALL_WII_SAVES{{System::Main, "NetPlay", "SyncAllWiiSaves"}, false}; +const Info NETPLAY_GOLF_MODE_OVERLAY{{System::Main, "NetPlay", "GolfModeOverlay"}, true}; } // namespace Config diff --git a/Source/Core/Core/Config/NetplaySettings.h b/Source/Core/Core/Config/NetplaySettings.h index 21e3e14843..710cf978e0 100644 --- a/Source/Core/Core/Config/NetplaySettings.h +++ b/Source/Core/Core/Config/NetplaySettings.h @@ -15,41 +15,41 @@ namespace Config // Main.NetPlay -extern const ConfigInfo NETPLAY_TRAVERSAL_SERVER; -extern const ConfigInfo NETPLAY_TRAVERSAL_PORT; -extern const ConfigInfo NETPLAY_TRAVERSAL_CHOICE; -extern const ConfigInfo NETPLAY_HOST_CODE; -extern const ConfigInfo NETPLAY_INDEX_URL; +extern const Info NETPLAY_TRAVERSAL_SERVER; +extern const Info NETPLAY_TRAVERSAL_PORT; +extern const Info NETPLAY_TRAVERSAL_CHOICE; +extern const Info NETPLAY_HOST_CODE; +extern const Info NETPLAY_INDEX_URL; -extern const ConfigInfo NETPLAY_HOST_PORT; -extern const ConfigInfo NETPLAY_ADDRESS; -extern const ConfigInfo NETPLAY_CONNECT_PORT; -extern const ConfigInfo NETPLAY_LISTEN_PORT; +extern const Info NETPLAY_HOST_PORT; +extern const Info NETPLAY_ADDRESS; +extern const Info NETPLAY_CONNECT_PORT; +extern const Info NETPLAY_LISTEN_PORT; -extern const ConfigInfo NETPLAY_NICKNAME; -extern const ConfigInfo NETPLAY_USE_UPNP; +extern const Info NETPLAY_NICKNAME; +extern const Info NETPLAY_USE_UPNP; -extern const ConfigInfo NETPLAY_ENABLE_QOS; +extern const Info NETPLAY_ENABLE_QOS; -extern const ConfigInfo NETPLAY_USE_INDEX; -extern const ConfigInfo NETPLAY_INDEX_REGION; -extern const ConfigInfo NETPLAY_INDEX_NAME; -extern const ConfigInfo NETPLAY_INDEX_PASSWORD; +extern const Info NETPLAY_USE_INDEX; +extern const Info NETPLAY_INDEX_REGION; +extern const Info NETPLAY_INDEX_NAME; +extern const Info NETPLAY_INDEX_PASSWORD; -extern const ConfigInfo NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT; -extern const ConfigInfo NETPLAY_CHUNKED_UPLOAD_LIMIT; +extern const Info NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT; +extern const Info NETPLAY_CHUNKED_UPLOAD_LIMIT; -extern const ConfigInfo NETPLAY_BUFFER_SIZE; -extern const ConfigInfo NETPLAY_CLIENT_BUFFER_SIZE; +extern const Info NETPLAY_BUFFER_SIZE; +extern const Info NETPLAY_CLIENT_BUFFER_SIZE; -extern const ConfigInfo NETPLAY_WRITE_SAVE_SDCARD_DATA; -extern const ConfigInfo NETPLAY_LOAD_WII_SAVE; -extern const ConfigInfo NETPLAY_SYNC_SAVES; -extern const ConfigInfo NETPLAY_SYNC_CODES; -extern const ConfigInfo NETPLAY_RECORD_INPUTS; -extern const ConfigInfo NETPLAY_STRICT_SETTINGS_SYNC; -extern const ConfigInfo NETPLAY_NETWORK_MODE; -extern const ConfigInfo NETPLAY_SYNC_ALL_WII_SAVES; -extern const ConfigInfo NETPLAY_GOLF_MODE_OVERLAY; +extern const Info NETPLAY_WRITE_SAVE_SDCARD_DATA; +extern const Info NETPLAY_LOAD_WII_SAVE; +extern const Info NETPLAY_SYNC_SAVES; +extern const Info NETPLAY_SYNC_CODES; +extern const Info NETPLAY_RECORD_INPUTS; +extern const Info NETPLAY_STRICT_SETTINGS_SYNC; +extern const Info NETPLAY_NETWORK_MODE; +extern const Info NETPLAY_SYNC_ALL_WII_SAVES; +extern const Info NETPLAY_GOLF_MODE_OVERLAY; } // namespace Config diff --git a/Source/Core/Core/Config/SYSCONFSettings.cpp b/Source/Core/Core/Config/SYSCONFSettings.cpp index a9eb811e24..52449b6889 100644 --- a/Source/Core/Core/Config/SYSCONFSettings.cpp +++ b/Source/Core/Core/Config/SYSCONFSettings.cpp @@ -8,19 +8,19 @@ namespace Config { // SYSCONF.IPL -const ConfigInfo SYSCONF_SCREENSAVER{{System::SYSCONF, "IPL", "SSV"}, false}; -const ConfigInfo SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, 0x01}; -const ConfigInfo SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c}; -const ConfigInfo SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true}; -const ConfigInfo SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true}; -const ConfigInfo SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01}; +const Info SYSCONF_SCREENSAVER{{System::SYSCONF, "IPL", "SSV"}, false}; +const Info SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, 0x01}; +const Info SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c}; +const Info SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true}; +const Info SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true}; +const Info SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01}; // SYSCONF.BT -const ConfigInfo SYSCONF_SENSOR_BAR_POSITION{{System::SYSCONF, "BT", "BAR"}, 0x01}; -const ConfigInfo SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, 0x03}; -const ConfigInfo SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58}; -const ConfigInfo SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true}; +const Info SYSCONF_SENSOR_BAR_POSITION{{System::SYSCONF, "BT", "BAR"}, 0x01}; +const Info SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, 0x03}; +const Info SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58}; +const Info SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true}; const std::array SYSCONF_SETTINGS{ {{SYSCONF_SCREENSAVER, SysConf::Entry::Type::Byte}, diff --git a/Source/Core/Core/Config/SYSCONFSettings.h b/Source/Core/Core/Config/SYSCONFSettings.h index 1c6d8cd5f7..9cf5d5221c 100644 --- a/Source/Core/Core/Config/SYSCONFSettings.h +++ b/Source/Core/Core/Config/SYSCONFSettings.h @@ -16,23 +16,23 @@ namespace Config // SYSCONF.IPL -extern const ConfigInfo SYSCONF_SCREENSAVER; -extern const ConfigInfo SYSCONF_LANGUAGE; -extern const ConfigInfo SYSCONF_COUNTRY; -extern const ConfigInfo SYSCONF_WIDESCREEN; -extern const ConfigInfo SYSCONF_PROGRESSIVE_SCAN; -extern const ConfigInfo SYSCONF_PAL60; +extern const Info SYSCONF_SCREENSAVER; +extern const Info SYSCONF_LANGUAGE; +extern const Info SYSCONF_COUNTRY; +extern const Info SYSCONF_WIDESCREEN; +extern const Info SYSCONF_PROGRESSIVE_SCAN; +extern const Info SYSCONF_PAL60; // SYSCONF.BT -extern const ConfigInfo SYSCONF_SENSOR_BAR_POSITION; -extern const ConfigInfo SYSCONF_SENSOR_BAR_SENSITIVITY; -extern const ConfigInfo SYSCONF_SPEAKER_VOLUME; -extern const ConfigInfo SYSCONF_WIIMOTE_MOTOR; +extern const Info SYSCONF_SENSOR_BAR_POSITION; +extern const Info SYSCONF_SENSOR_BAR_SENSITIVITY; +extern const Info SYSCONF_SPEAKER_VOLUME; +extern const Info SYSCONF_WIIMOTE_MOTOR; struct SYSCONFSetting { - std::variant, ConfigInfo> config_info; + std::variant, Info> config_info; SysConf::Entry::Type type; }; diff --git a/Source/Core/Core/Config/UISettings.cpp b/Source/Core/Core/Config/UISettings.cpp index 7209174a1b..e319ecd6e8 100644 --- a/Source/Core/Core/Config/UISettings.cpp +++ b/Source/Core/Core/Config/UISettings.cpp @@ -8,10 +8,9 @@ namespace Config { // UI.General -const ConfigInfo MAIN_USE_DISCORD_PRESENCE{{System::Main, "General", "UseDiscordPresence"}, - true}; -const ConfigInfo MAIN_USE_GAME_COVERS{{System::Main, "General", "UseGameCovers"}, false}; +const Info MAIN_USE_DISCORD_PRESENCE{{System::Main, "General", "UseDiscordPresence"}, true}; +const Info MAIN_USE_GAME_COVERS{{System::Main, "General", "UseGameCovers"}, false}; -const ConfigInfo MAIN_FOCUSED_HOTKEYS{{System::Main, "General", "HotkeysRequireFocus"}, true}; +const Info MAIN_FOCUSED_HOTKEYS{{System::Main, "General", "HotkeysRequireFocus"}, true}; } // namespace Config diff --git a/Source/Core/Core/Config/UISettings.h b/Source/Core/Core/Config/UISettings.h index aea24235ab..4dcefddf22 100644 --- a/Source/Core/Core/Config/UISettings.h +++ b/Source/Core/Core/Config/UISettings.h @@ -16,8 +16,8 @@ namespace Config // UI.General -extern const ConfigInfo MAIN_USE_DISCORD_PRESENCE; -extern const ConfigInfo MAIN_USE_GAME_COVERS; -extern const ConfigInfo MAIN_FOCUSED_HOTKEYS; +extern const Info MAIN_USE_DISCORD_PRESENCE; +extern const Info MAIN_USE_GAME_COVERS; +extern const Info MAIN_FOCUSED_HOTKEYS; } // namespace Config diff --git a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp index e8ac86b423..1b502bf4f4 100644 --- a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp @@ -113,7 +113,7 @@ public: for (const auto& value : section_map) { - const Config::ConfigLocation location{system.first, section_name, value.first}; + const Config::Location location{system.first, section_name, value.first}; layer->Set(location, value.second); } } @@ -133,7 +133,7 @@ public: for (const auto& config : layer->GetLayerMap()) { - const Config::ConfigLocation& location = config.first; + const Config::Location& location = config.first; const std::optional& value = config.second; // Done by SaveToSYSCONF diff --git a/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp index 418a2c83d2..ba1cb37abc 100644 --- a/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp @@ -59,11 +59,11 @@ std::vector GetGameIniFilenames(const std::string& id, std::optiona return filenames; } -using ConfigLocation = Config::ConfigLocation; -using INIToLocationMap = std::map, ConfigLocation>; +using Location = Config::Location; +using INIToLocationMap = std::map, Location>; using INIToSectionMap = std::map>; -// This is a mapping from the legacy section-key pairs to ConfigLocations. +// This is a mapping from the legacy section-key pairs to Locations. // New settings do not need to be added to this mapping. // See also: MapINIToRealLocation and GetINILocationFromConfig. static const INIToLocationMap& GetINIToLocationMap() @@ -95,11 +95,11 @@ static const INIToSectionMap& GetINIToSectionMap() return ini_to_section; } -// Converts from a legacy GameINI section-key tuple to a ConfigLocation. +// Converts from a legacy GameINI section-key tuple to a Location. // Also supports the following format: // [System.Section] // Key = Value -static ConfigLocation MapINIToRealLocation(const std::string& section, const std::string& key) +static Location MapINIToRealLocation(const std::string& section, const std::string& key) { static const INIToLocationMap& ini_to_location = GetINIToLocationMap(); const auto it = ini_to_location.find({section, key}); @@ -130,7 +130,7 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std return {Config::System::Main, "", ""}; } -static std::pair GetINILocationFromConfig(const ConfigLocation& location) +static std::pair GetINILocationFromConfig(const Location& location) { static const INIToLocationMap& ini_to_location = GetINIToLocationMap(); const auto it = std::find_if(ini_to_location.begin(), ini_to_location.end(), @@ -205,7 +205,7 @@ private: std::string path = "Profiles/" + std::get<1>(use_data) + "/"; const auto control_section = [&](std::string key) { - return Config::ConfigLocation{std::get<2>(use_data), "Controls", key}; + return Config::Location{std::get<2>(use_data), "Controls", key}; }; for (const char num : nums) @@ -227,8 +227,8 @@ private: const IniFile::Section::SectionMap& section_map = ini_section->GetValues(); for (const auto& value : section_map) { - Config::ConfigLocation location{std::get<2>(use_data), std::get<1>(use_data) + num, - value.first}; + Config::Location location{std::get<2>(use_data), std::get<1>(use_data) + num, + value.first}; layer->Set(location, value.second); } } @@ -269,7 +269,7 @@ void INIGameConfigLayerLoader::Save(Config::Layer* layer) for (const auto& config : layer->GetLayerMap()) { - const Config::ConfigLocation& location = config.first; + const Config::Location& location = config.first; const std::optional& value = config.second; if (!IsSettingSaveable(location)) diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index 8e62ccfcce..f75fec2f9d 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -14,7 +14,7 @@ namespace ConfigLoaders { -bool IsSettingSaveable(const Config::ConfigLocation& config_location) +bool IsSettingSaveable(const Config::Location& config_location) { if (config_location.system == Config::System::DualShockUDPClient) return true; @@ -28,7 +28,7 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location) return true; } - static constexpr std::array s_setting_saveable = { + static constexpr std::array s_setting_saveable = { // Main.Core &Config::MAIN_DEFAULT_ISO.location, @@ -155,7 +155,7 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location) }; return std::any_of(s_setting_saveable.cbegin(), s_setting_saveable.cend(), - [&config_location](const Config::ConfigLocation* location) { + [&config_location](const Config::Location* location) { return *location == config_location; }); } diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.h b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.h index b0d52863fb..34ccf00fa1 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.h +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.h @@ -6,7 +6,7 @@ namespace Config { -struct ConfigLocation; +struct Location; } namespace ConfigLoaders @@ -14,5 +14,5 @@ namespace ConfigLoaders // This is a temporary function that allows for both the new and old configuration // systems to co-exist without trampling on each other while saving. // This function shall be removed when the old configuration system retires. -bool IsSettingSaveable(const Config::ConfigLocation& config_location); +bool IsSettingSaveable(const Config::Location& config_location); } // namespace ConfigLoaders diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp index 6a4f25b20f..efd761416e 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp @@ -12,8 +12,7 @@ #include -GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo& setting, - bool reverse) +GraphicsBool::GraphicsBool(const QString& label, const Config::Info& setting, bool reverse) : QCheckBox(label), m_setting(setting), m_reverse(reverse) { connect(this, &QCheckBox::toggled, this, &GraphicsBool::Update); @@ -34,7 +33,7 @@ void GraphicsBool::Update() Config::SetBaseOrCurrent(m_setting, static_cast(isChecked() ^ m_reverse)); } -GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::ConfigInfo& setting, +GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::Info& setting, bool reverse) : QRadioButton(label), m_setting(setting), m_reverse(reverse) { diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.h index d79757d28e..bb772e4c77 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.h +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.h @@ -10,19 +10,19 @@ namespace Config { template -struct ConfigInfo; +struct Info; } class GraphicsBool : public QCheckBox { Q_OBJECT public: - GraphicsBool(const QString& label, const Config::ConfigInfo& setting, bool reverse = false); + GraphicsBool(const QString& label, const Config::Info& setting, bool reverse = false); private: void Update(); - const Config::ConfigInfo& m_setting; + const Config::Info& m_setting; bool m_reverse; }; @@ -30,12 +30,11 @@ class GraphicsBoolEx : public QRadioButton { Q_OBJECT public: - GraphicsBoolEx(const QString& label, const Config::ConfigInfo& setting, - bool reverse = false); + GraphicsBoolEx(const QString& label, const Config::Info& setting, bool reverse = false); private: void Update(); - const Config::ConfigInfo& m_setting; + const Config::Info& m_setting; bool m_reverse; }; diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp index 8be984db06..923921ab15 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp @@ -10,7 +10,7 @@ #include "DolphinQt/Settings.h" -GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigInfo& setting) +GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::Info& setting) : m_setting(setting) { addItems(options); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.h index 81c44c5ad2..fc2116c123 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.h +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.h @@ -12,10 +12,10 @@ class GraphicsChoice : public QComboBox { Q_OBJECT public: - GraphicsChoice(const QStringList& options, const Config::ConfigInfo& setting); + GraphicsChoice(const QStringList& options, const Config::Info& setting); private: void Update(int choice); - Config::ConfigInfo m_setting; + Config::Info m_setting; }; diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp index 6fd1049e86..7c81634248 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp @@ -10,7 +10,7 @@ #include "DolphinQt/Settings.h" -GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::ConfigInfo& setting, +GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info& setting, int step) : QSpinBox(), m_setting(setting) { diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.h index 84de36d406..dda8737f02 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.h +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.h @@ -9,16 +9,16 @@ namespace Config { template -struct ConfigInfo; +struct Info; } class GraphicsInteger : public QSpinBox { Q_OBJECT public: - GraphicsInteger(int minimum, int maximum, const Config::ConfigInfo& setting, int step = 1); + GraphicsInteger(int minimum, int maximum, const Config::Info& setting, int step = 1); void Update(int value); private: - const Config::ConfigInfo& m_setting; + const Config::Info& m_setting; }; diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp index 9d1d93413b..6da089321f 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp @@ -10,7 +10,7 @@ #include "DolphinQt/Settings.h" -GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInfo& setting, +GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::Info& setting, int value) : QRadioButton(label), m_setting(setting), m_value(value) { diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.h index ff74600ad4..288acc16c1 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.h +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.h @@ -12,11 +12,11 @@ class GraphicsRadioInt : public QRadioButton { Q_OBJECT public: - GraphicsRadioInt(const QString& label, const Config::ConfigInfo& setting, int value); + GraphicsRadioInt(const QString& label, const Config::Info& setting, int value); private: void Update(); - Config::ConfigInfo m_setting; + Config::Info m_setting; int m_value; }; diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp index 85f519dbd4..48d1c59b8b 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp @@ -10,8 +10,7 @@ #include "DolphinQt/Settings.h" -GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::ConfigInfo& setting, - int tick) +GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info& setting, int tick) : QSlider(Qt::Horizontal), m_setting(setting) { setMinimum(minimum); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.h index 8047eb90c9..96fdcfda4e 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.h +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.h @@ -9,16 +9,16 @@ namespace Config { template -struct ConfigInfo; +struct Info; } class GraphicsSlider : public QSlider { Q_OBJECT public: - GraphicsSlider(int minimum, int maximum, const Config::ConfigInfo& setting, int tick = 0); + GraphicsSlider(int minimum, int maximum, const Config::Info& setting, int tick = 0); void Update(int value); private: - const Config::ConfigInfo& m_setting; + const Config::Info& m_setting; }; diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index 3dff8cf309..c398225bfe 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -31,12 +31,12 @@ namespace Settings constexpr char DEFAULT_SERVER_ADDRESS[] = "127.0.0.1"; constexpr u16 DEFAULT_SERVER_PORT = 26760; -const Config::ConfigInfo SERVER_ENABLED{ - {Config::System::DualShockUDPClient, "Server", "Enabled"}, false}; -const Config::ConfigInfo SERVER_ADDRESS{ +const Config::Info SERVER_ENABLED{{Config::System::DualShockUDPClient, "Server", "Enabled"}, + false}; +const Config::Info SERVER_ADDRESS{ {Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS}; -const Config::ConfigInfo SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"}, - DEFAULT_SERVER_PORT}; +const Config::Info SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"}, + DEFAULT_SERVER_PORT}; } // namespace Settings // Clock type used for querying timeframes diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h index e694cb622d..1b51a2e1b9 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h @@ -10,9 +10,9 @@ namespace ciface::DualShockUDPClient { namespace Settings { -extern const Config::ConfigInfo SERVER_ENABLED; -extern const Config::ConfigInfo SERVER_ADDRESS; -extern const Config::ConfigInfo SERVER_PORT; +extern const Config::Info SERVER_ENABLED; +extern const Config::Info SERVER_ADDRESS; +extern const Config::Info SERVER_PORT; } // namespace Settings void Init(); diff --git a/Source/Core/UICommon/CommandLineParse.cpp b/Source/Core/UICommon/CommandLineParse.cpp index bf3a556a29..8051393e4d 100644 --- a/Source/Core/UICommon/CommandLineParse.cpp +++ b/Source/Core/UICommon/CommandLineParse.cpp @@ -49,7 +49,7 @@ public: if (system) { m_values.emplace_back( - Config::ConfigLocation{std::move(*system), std::move(section), std::move(key)}, + Config::Location{std::move(*system), std::move(section), std::move(key)}, std::move(value)); } } @@ -69,7 +69,7 @@ public: } private: - std::list> m_values; + std::list> m_values; }; std::unique_ptr CreateParser(ParserOptions options)