Merge pull request #8787 from leoetlino/config-config
Remove redundant Config prefix from ConfigInfo/ConfigLocation
This commit is contained in:
commit
90ba73c6c2
|
@ -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);
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ void ClearCurrentRunLayer();
|
|||
const std::string& GetSystemName(System system);
|
||||
std::optional<System> GetSystemFromName(const std::string& system);
|
||||
const std::string& GetLayerName(LayerType layer);
|
||||
LayerType GetActiveLayerForConfig(const ConfigLocation&);
|
||||
LayerType GetActiveLayerForConfig(const Location&);
|
||||
|
||||
template <typename T>
|
||||
T Get(LayerType layer, const ConfigInfo<T>& info)
|
||||
T Get(LayerType layer, const Info<T>& info)
|
||||
{
|
||||
if (layer == LayerType::Meta)
|
||||
return Get(info);
|
||||
|
@ -48,44 +48,44 @@ T Get(LayerType layer, const ConfigInfo<T>& info)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
T Get(const ConfigInfo<T>& info)
|
||||
T Get(const Info<T>& info)
|
||||
{
|
||||
return GetLayer(GetActiveLayerForConfig(info.location))->Get(info);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T GetBase(const ConfigInfo<T>& info)
|
||||
T GetBase(const Info<T>& info)
|
||||
{
|
||||
return Get(LayerType::Base, info);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
LayerType GetActiveLayerForConfig(const ConfigInfo<T>& info)
|
||||
LayerType GetActiveLayerForConfig(const Info<T>& info)
|
||||
{
|
||||
return GetActiveLayerForConfig(info.location);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Set(LayerType layer, const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void Set(LayerType layer, const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
GetLayer(layer)->Set(info, value);
|
||||
InvokeConfigChangedCallbacks();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetBase(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetBase(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set<T>(LayerType::Base, info, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetCurrent(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetCurrent(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set<T>(LayerType::CurrentRun, info, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetBaseOrCurrent(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetBaseOrCurrent(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
if (GetActiveLayerForConfig(info) == LayerType::Base)
|
||||
Set<T>(LayerType::Base, info, value);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -18,36 +18,36 @@ template <typename T>
|
|||
using UnderlyingType = typename std::enable_if_t<std::is_enum<T>{}, std::underlying_type<T>>::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 <typename T>
|
||||
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<Enum> into ConfigInfo<UnderlyingType<Enum>>
|
||||
// Make it easy to convert Info<Enum> into Info<UnderlyingType<Enum>>
|
||||
// so that enum settings can still easily work with code that doesn't care about the enum values.
|
||||
template <typename Enum,
|
||||
std::enable_if_t<std::is_same<T, detail::UnderlyingType<Enum>>::value>* = nullptr>
|
||||
ConfigInfo(const ConfigInfo<Enum>& other)
|
||||
Info(const Info<Enum>& other)
|
||||
: location{other.location}, default_value{static_cast<detail::UnderlyingType<Enum>>(
|
||||
other.default_value)}
|
||||
{
|
||||
}
|
||||
|
||||
ConfigLocation location;
|
||||
Location location;
|
||||
T default_value;
|
||||
};
|
||||
} // namespace Config
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -45,10 +45,10 @@ inline std::optional<std::string> TryParse(const std::string& str_value)
|
|||
} // namespace detail
|
||||
|
||||
template <typename T>
|
||||
struct ConfigInfo;
|
||||
struct Info;
|
||||
|
||||
class Layer;
|
||||
using LayerMap = std::map<ConfigLocation, std::optional<std::string>>;
|
||||
using LayerMap = std::map<Location, std::optional<std::string>>;
|
||||
|
||||
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 <typename T>
|
||||
T Get(const ConfigInfo<T>& config_info) const
|
||||
T Get(const Info<T>& config_info) const
|
||||
{
|
||||
return Get<T>(config_info.location).value_or(config_info.default_value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::optional<T> Get(const ConfigLocation& location) const
|
||||
std::optional<T> 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 <typename T>
|
||||
void Set(const ConfigInfo<T>& config_info, const std::common_type_t<T>& value)
|
||||
void Set(const Info<T>& config_info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set(config_info.location, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
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)
|
||||
|
|
|
@ -26,13 +26,13 @@ namespace Common::Log
|
|||
{
|
||||
constexpr size_t MAX_MSGLEN = 1024;
|
||||
|
||||
const Config::ConfigInfo<bool> LOGGER_WRITE_TO_FILE{
|
||||
{Config::System::Logger, "Options", "WriteToFile"}, false};
|
||||
const Config::ConfigInfo<bool> LOGGER_WRITE_TO_CONSOLE{
|
||||
const Config::Info<bool> LOGGER_WRITE_TO_FILE{{Config::System::Logger, "Options", "WriteToFile"},
|
||||
false};
|
||||
const Config::Info<bool> LOGGER_WRITE_TO_CONSOLE{
|
||||
{Config::System::Logger, "Options", "WriteToConsole"}, true};
|
||||
const Config::ConfigInfo<bool> LOGGER_WRITE_TO_WINDOW{
|
||||
const Config::Info<bool> LOGGER_WRITE_TO_WINDOW{
|
||||
{Config::System::Logger, "Options", "WriteToWindow"}, true};
|
||||
const Config::ConfigInfo<int> LOGGER_VERBOSITY{{Config::System::Logger, "Options", "Verbosity"}, 0};
|
||||
const Config::Info<int> 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<bool>{{Config::System::Logger, "Logs", container.m_short_name}, false});
|
||||
Config::Info<bool>{{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<bool> info{{Config::System::Logger, "Logs", container.m_short_name},
|
||||
false};
|
||||
const Config::Info<bool> info{{Config::System::Logger, "Logs", container.m_short_name}, false};
|
||||
Config::SetBaseOrCurrent(info, container.m_enable);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,155 +15,140 @@ namespace Config
|
|||
|
||||
// Graphics.Hardware
|
||||
|
||||
const ConfigInfo<bool> GFX_VSYNC{{System::GFX, "Hardware", "VSync"}, false};
|
||||
const ConfigInfo<int> GFX_ADAPTER{{System::GFX, "Hardware", "Adapter"}, 0};
|
||||
const Info<bool> GFX_VSYNC{{System::GFX, "Hardware", "VSync"}, false};
|
||||
const Info<int> GFX_ADAPTER{{System::GFX, "Hardware", "Adapter"}, 0};
|
||||
|
||||
// Graphics.Settings
|
||||
|
||||
const ConfigInfo<bool> GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false};
|
||||
const ConfigInfo<AspectMode> GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"},
|
||||
AspectMode::Auto};
|
||||
const ConfigInfo<AspectMode> GFX_SUGGESTED_ASPECT_RATIO{
|
||||
{System::GFX, "Settings", "SuggestedAspectRatio"}, AspectMode::Auto};
|
||||
const ConfigInfo<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false};
|
||||
const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{
|
||||
const Info<bool> GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false};
|
||||
const Info<AspectMode> GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"}, AspectMode::Auto};
|
||||
const Info<AspectMode> GFX_SUGGESTED_ASPECT_RATIO{{System::GFX, "Settings", "SuggestedAspectRatio"},
|
||||
AspectMode::Auto};
|
||||
const Info<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false};
|
||||
const Info<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{
|
||||
{System::GFX, "Settings", "SafeTextureCacheColorSamples"}, 128};
|
||||
const ConfigInfo<bool> GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false};
|
||||
const ConfigInfo<bool> GFX_SHOW_NETPLAY_PING{{System::GFX, "Settings", "ShowNetPlayPing"}, false};
|
||||
const ConfigInfo<bool> GFX_SHOW_NETPLAY_MESSAGES{{System::GFX, "Settings", "ShowNetPlayMessages"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_LOG_RENDER_TIME_TO_FILE{{System::GFX, "Settings", "LogRenderTimeToFile"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_OVERLAY_STATS{{System::GFX, "Settings", "OverlayStats"}, false};
|
||||
const ConfigInfo<bool> GFX_OVERLAY_PROJ_STATS{{System::GFX, "Settings", "OverlayProjStats"}, false};
|
||||
const ConfigInfo<bool> GFX_DUMP_TEXTURES{{System::GFX, "Settings", "DumpTextures"}, false};
|
||||
const ConfigInfo<bool> GFX_HIRES_TEXTURES{{System::GFX, "Settings", "HiresTextures"}, false};
|
||||
const ConfigInfo<bool> GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresTextures"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false};
|
||||
const ConfigInfo<bool> GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false};
|
||||
const ConfigInfo<bool> GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_FREE_LOOK{{System::GFX, "Settings", "FreeLook"}, false};
|
||||
const ConfigInfo<bool> GFX_USE_FFV1{{System::GFX, "Settings", "UseFFV1"}, false};
|
||||
const ConfigInfo<std::string> GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"};
|
||||
const ConfigInfo<std::string> GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""};
|
||||
const ConfigInfo<std::string> GFX_DUMP_ENCODER{{System::GFX, "Settings", "DumpEncoder"}, ""};
|
||||
const ConfigInfo<std::string> GFX_DUMP_PATH{{System::GFX, "Settings", "DumpPath"}, ""};
|
||||
const ConfigInfo<int> GFX_BITRATE_KBPS{{System::GFX, "Settings", "BitrateKbps"}, 25000};
|
||||
const ConfigInfo<bool> GFX_INTERNAL_RESOLUTION_FRAME_DUMPS{
|
||||
const Info<bool> GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false};
|
||||
const Info<bool> GFX_SHOW_NETPLAY_PING{{System::GFX, "Settings", "ShowNetPlayPing"}, false};
|
||||
const Info<bool> GFX_SHOW_NETPLAY_MESSAGES{{System::GFX, "Settings", "ShowNetPlayMessages"}, false};
|
||||
const Info<bool> GFX_LOG_RENDER_TIME_TO_FILE{{System::GFX, "Settings", "LogRenderTimeToFile"},
|
||||
false};
|
||||
const Info<bool> GFX_OVERLAY_STATS{{System::GFX, "Settings", "OverlayStats"}, false};
|
||||
const Info<bool> GFX_OVERLAY_PROJ_STATS{{System::GFX, "Settings", "OverlayProjStats"}, false};
|
||||
const Info<bool> GFX_DUMP_TEXTURES{{System::GFX, "Settings", "DumpTextures"}, false};
|
||||
const Info<bool> GFX_HIRES_TEXTURES{{System::GFX, "Settings", "HiresTextures"}, false};
|
||||
const Info<bool> GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresTextures"}, false};
|
||||
const Info<bool> GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false};
|
||||
const Info<bool> GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false};
|
||||
const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"}, false};
|
||||
const Info<bool> GFX_FREE_LOOK{{System::GFX, "Settings", "FreeLook"}, false};
|
||||
const Info<bool> GFX_USE_FFV1{{System::GFX, "Settings", "UseFFV1"}, false};
|
||||
const Info<std::string> GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"};
|
||||
const Info<std::string> GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""};
|
||||
const Info<std::string> GFX_DUMP_ENCODER{{System::GFX, "Settings", "DumpEncoder"}, ""};
|
||||
const Info<std::string> GFX_DUMP_PATH{{System::GFX, "Settings", "DumpPath"}, ""};
|
||||
const Info<int> GFX_BITRATE_KBPS{{System::GFX, "Settings", "BitrateKbps"}, 25000};
|
||||
const Info<bool> GFX_INTERNAL_RESOLUTION_FRAME_DUMPS{
|
||||
{System::GFX, "Settings", "InternalResolutionFrameDumps"}, false};
|
||||
const ConfigInfo<bool> GFX_ENABLE_GPU_TEXTURE_DECODING{
|
||||
const Info<bool> GFX_ENABLE_GPU_TEXTURE_DECODING{
|
||||
{System::GFX, "Settings", "EnableGPUTextureDecoding"}, false};
|
||||
const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true};
|
||||
const ConfigInfo<u32> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1};
|
||||
const ConfigInfo<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false};
|
||||
const ConfigInfo<int> GFX_EFB_SCALE{{System::GFX, "Settings", "InternalResolution"}, 1};
|
||||
const ConfigInfo<int> GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 8};
|
||||
const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_ENABLE_WIREFRAME{{System::GFX, "Settings", "WireFrame"}, false};
|
||||
const ConfigInfo<bool> GFX_DISABLE_FOG{{System::GFX, "Settings", "DisableFog"}, false};
|
||||
const ConfigInfo<bool> GFX_BORDERLESS_FULLSCREEN{{System::GFX, "Settings", "BorderlessFullscreen"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_ENABLE_VALIDATION_LAYER{
|
||||
{System::GFX, "Settings", "EnableValidationLayer"}, false};
|
||||
const Info<bool> GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "EnablePixelLighting"}, false};
|
||||
const Info<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true};
|
||||
const Info<u32> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1};
|
||||
const Info<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false};
|
||||
const Info<int> GFX_EFB_SCALE{{System::GFX, "Settings", "InternalResolution"}, 1};
|
||||
const Info<int> GFX_MAX_EFB_SCALE{{System::GFX, "Settings", "MaxInternalResolution"}, 8};
|
||||
const Info<bool> GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"}, false};
|
||||
const Info<bool> GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"}, false};
|
||||
const Info<bool> GFX_ENABLE_WIREFRAME{{System::GFX, "Settings", "WireFrame"}, false};
|
||||
const Info<bool> GFX_DISABLE_FOG{{System::GFX, "Settings", "DisableFog"}, false};
|
||||
const Info<bool> GFX_BORDERLESS_FULLSCREEN{{System::GFX, "Settings", "BorderlessFullscreen"},
|
||||
false};
|
||||
const Info<bool> GFX_ENABLE_VALIDATION_LAYER{{System::GFX, "Settings", "EnableValidationLayer"},
|
||||
false};
|
||||
|
||||
#if defined(ANDROID)
|
||||
const ConfigInfo<bool> GFX_BACKEND_MULTITHREADING{
|
||||
{System::GFX, "Settings", "BackendMultithreading"}, false};
|
||||
const ConfigInfo<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{
|
||||
const Info<bool> GFX_BACKEND_MULTITHREADING{{System::GFX, "Settings", "BackendMultithreading"},
|
||||
false};
|
||||
const Info<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{
|
||||
{System::GFX, "Settings", "CommandBufferExecuteInterval"}, 0};
|
||||
#else
|
||||
const ConfigInfo<bool> GFX_BACKEND_MULTITHREADING{
|
||||
{System::GFX, "Settings", "BackendMultithreading"}, true};
|
||||
const ConfigInfo<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{
|
||||
const Info<bool> GFX_BACKEND_MULTITHREADING{{System::GFX, "Settings", "BackendMultithreading"},
|
||||
true};
|
||||
const Info<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL{
|
||||
{System::GFX, "Settings", "CommandBufferExecuteInterval"}, 100};
|
||||
#endif
|
||||
|
||||
const ConfigInfo<bool> GFX_SHADER_CACHE{{System::GFX, "Settings", "ShaderCache"}, true};
|
||||
const ConfigInfo<bool> GFX_WAIT_FOR_SHADERS_BEFORE_STARTING{
|
||||
const Info<bool> GFX_SHADER_CACHE{{System::GFX, "Settings", "ShaderCache"}, true};
|
||||
const Info<bool> GFX_WAIT_FOR_SHADERS_BEFORE_STARTING{
|
||||
{System::GFX, "Settings", "WaitForShadersBeforeStarting"}, false};
|
||||
const ConfigInfo<ShaderCompilationMode> GFX_SHADER_COMPILATION_MODE{
|
||||
const Info<ShaderCompilationMode> GFX_SHADER_COMPILATION_MODE{
|
||||
{System::GFX, "Settings", "ShaderCompilationMode"}, ShaderCompilationMode::Synchronous};
|
||||
const ConfigInfo<int> GFX_SHADER_COMPILER_THREADS{
|
||||
{System::GFX, "Settings", "ShaderCompilerThreads"}, 1};
|
||||
const ConfigInfo<int> GFX_SHADER_PRECOMPILER_THREADS{
|
||||
const Info<int> GFX_SHADER_COMPILER_THREADS{{System::GFX, "Settings", "ShaderCompilerThreads"}, 1};
|
||||
const Info<int> GFX_SHADER_PRECOMPILER_THREADS{
|
||||
{System::GFX, "Settings", "ShaderPrecompilerThreads"}, 1};
|
||||
const ConfigInfo<bool> GFX_SAVE_TEXTURE_CACHE_TO_STATE{
|
||||
const Info<bool> GFX_SAVE_TEXTURE_CACHE_TO_STATE{
|
||||
{System::GFX, "Settings", "SaveTextureCacheToState"}, true};
|
||||
|
||||
const ConfigInfo<bool> GFX_SW_ZCOMPLOC{{System::GFX, "Settings", "SWZComploc"}, true};
|
||||
const ConfigInfo<bool> GFX_SW_ZFREEZE{{System::GFX, "Settings", "SWZFreeze"}, true};
|
||||
const ConfigInfo<bool> GFX_SW_DUMP_OBJECTS{{System::GFX, "Settings", "SWDumpObjects"}, false};
|
||||
const ConfigInfo<bool> GFX_SW_DUMP_TEV_STAGES{{System::GFX, "Settings", "SWDumpTevStages"}, false};
|
||||
const ConfigInfo<bool> GFX_SW_DUMP_TEV_TEX_FETCHES{{System::GFX, "Settings", "SWDumpTevTexFetches"},
|
||||
false};
|
||||
const ConfigInfo<int> GFX_SW_DRAW_START{{System::GFX, "Settings", "SWDrawStart"}, 0};
|
||||
const ConfigInfo<int> GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000};
|
||||
const Info<bool> GFX_SW_ZCOMPLOC{{System::GFX, "Settings", "SWZComploc"}, true};
|
||||
const Info<bool> GFX_SW_ZFREEZE{{System::GFX, "Settings", "SWZFreeze"}, true};
|
||||
const Info<bool> GFX_SW_DUMP_OBJECTS{{System::GFX, "Settings", "SWDumpObjects"}, false};
|
||||
const Info<bool> GFX_SW_DUMP_TEV_STAGES{{System::GFX, "Settings", "SWDumpTevStages"}, false};
|
||||
const Info<bool> GFX_SW_DUMP_TEV_TEX_FETCHES{{System::GFX, "Settings", "SWDumpTevTexFetches"},
|
||||
false};
|
||||
const Info<int> GFX_SW_DRAW_START{{System::GFX, "Settings", "SWDrawStart"}, 0};
|
||||
const Info<int> GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000};
|
||||
|
||||
const ConfigInfo<bool> GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false};
|
||||
const Info<bool> GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false};
|
||||
|
||||
// Graphics.Enhancements
|
||||
|
||||
const ConfigInfo<bool> GFX_ENHANCE_FORCE_FILTERING{{System::GFX, "Enhancements", "ForceFiltering"},
|
||||
false};
|
||||
const ConfigInfo<int> GFX_ENHANCE_MAX_ANISOTROPY{{System::GFX, "Enhancements", "MaxAnisotropy"}, 0};
|
||||
const ConfigInfo<std::string> GFX_ENHANCE_POST_SHADER{
|
||||
const Info<bool> GFX_ENHANCE_FORCE_FILTERING{{System::GFX, "Enhancements", "ForceFiltering"},
|
||||
false};
|
||||
const Info<int> GFX_ENHANCE_MAX_ANISOTROPY{{System::GFX, "Enhancements", "MaxAnisotropy"}, 0};
|
||||
const Info<std::string> GFX_ENHANCE_POST_SHADER{
|
||||
{System::GFX, "Enhancements", "PostProcessingShader"}, ""};
|
||||
const ConfigInfo<bool> GFX_ENHANCE_FORCE_TRUE_COLOR{{System::GFX, "Enhancements", "ForceTrueColor"},
|
||||
true};
|
||||
const ConfigInfo<bool> GFX_ENHANCE_DISABLE_COPY_FILTER{
|
||||
{System::GFX, "Enhancements", "DisableCopyFilter"}, true};
|
||||
const ConfigInfo<bool> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION{
|
||||
const Info<bool> GFX_ENHANCE_FORCE_TRUE_COLOR{{System::GFX, "Enhancements", "ForceTrueColor"},
|
||||
true};
|
||||
const Info<bool> GFX_ENHANCE_DISABLE_COPY_FILTER{{System::GFX, "Enhancements", "DisableCopyFilter"},
|
||||
true};
|
||||
const Info<bool> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION{
|
||||
{System::GFX, "Enhancements", "ArbitraryMipmapDetection"}, true};
|
||||
const ConfigInfo<float> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD{
|
||||
const Info<float> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD{
|
||||
{System::GFX, "Enhancements", "ArbitraryMipmapDetectionThreshold"}, 14.0f};
|
||||
|
||||
// Graphics.Stereoscopy
|
||||
|
||||
const ConfigInfo<StereoMode> GFX_STEREO_MODE{{System::GFX, "Stereoscopy", "StereoMode"},
|
||||
StereoMode::Off};
|
||||
const ConfigInfo<int> GFX_STEREO_DEPTH{{System::GFX, "Stereoscopy", "StereoDepth"}, 20};
|
||||
const ConfigInfo<int> GFX_STEREO_CONVERGENCE_PERCENTAGE{
|
||||
const Info<StereoMode> GFX_STEREO_MODE{{System::GFX, "Stereoscopy", "StereoMode"}, StereoMode::Off};
|
||||
const Info<int> GFX_STEREO_DEPTH{{System::GFX, "Stereoscopy", "StereoDepth"}, 20};
|
||||
const Info<int> GFX_STEREO_CONVERGENCE_PERCENTAGE{
|
||||
{System::GFX, "Stereoscopy", "StereoConvergencePercentage"}, 100};
|
||||
const ConfigInfo<bool> GFX_STEREO_SWAP_EYES{{System::GFX, "Stereoscopy", "StereoSwapEyes"}, false};
|
||||
const ConfigInfo<int> GFX_STEREO_CONVERGENCE{{System::GFX, "Stereoscopy", "StereoConvergence"}, 20};
|
||||
const ConfigInfo<bool> GFX_STEREO_EFB_MONO_DEPTH{{System::GFX, "Stereoscopy", "StereoEFBMonoDepth"},
|
||||
false};
|
||||
const ConfigInfo<int> GFX_STEREO_DEPTH_PERCENTAGE{
|
||||
{System::GFX, "Stereoscopy", "StereoDepthPercentage"}, 100};
|
||||
const Info<bool> GFX_STEREO_SWAP_EYES{{System::GFX, "Stereoscopy", "StereoSwapEyes"}, false};
|
||||
const Info<int> GFX_STEREO_CONVERGENCE{{System::GFX, "Stereoscopy", "StereoConvergence"}, 20};
|
||||
const Info<bool> GFX_STEREO_EFB_MONO_DEPTH{{System::GFX, "Stereoscopy", "StereoEFBMonoDepth"},
|
||||
false};
|
||||
const Info<int> GFX_STEREO_DEPTH_PERCENTAGE{{System::GFX, "Stereoscopy", "StereoDepthPercentage"},
|
||||
100};
|
||||
|
||||
// Graphics.Hacks
|
||||
|
||||
const ConfigInfo<bool> GFX_HACK_EFB_ACCESS_ENABLE{{System::GFX, "Hacks", "EFBAccessEnable"}, true};
|
||||
const ConfigInfo<bool> GFX_HACK_EFB_DEFER_INVALIDATION{
|
||||
const Info<bool> GFX_HACK_EFB_ACCESS_ENABLE{{System::GFX, "Hacks", "EFBAccessEnable"}, true};
|
||||
const Info<bool> GFX_HACK_EFB_DEFER_INVALIDATION{
|
||||
{System::GFX, "Hacks", "EFBAccessDeferInvalidation"}, false};
|
||||
const ConfigInfo<int> GFX_HACK_EFB_ACCESS_TILE_SIZE{{System::GFX, "Hacks", "EFBAccessTileSize"},
|
||||
64};
|
||||
const ConfigInfo<bool> GFX_HACK_BBOX_ENABLE{{System::GFX, "Hacks", "BBoxEnable"}, false};
|
||||
const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true};
|
||||
const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"},
|
||||
true};
|
||||
const ConfigInfo<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"},
|
||||
true};
|
||||
const ConfigInfo<bool> GFX_HACK_DISABLE_COPY_TO_VRAM{{System::GFX, "Hacks", "DisableCopyToVRAM"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_HACK_DEFER_EFB_COPIES{{System::GFX, "Hacks", "DeferEFBCopies"}, true};
|
||||
const ConfigInfo<bool> GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, false};
|
||||
const ConfigInfo<bool> GFX_HACK_SKIP_DUPLICATE_XFBS{{System::GFX, "Hacks", "SkipDuplicateXFBs"},
|
||||
true};
|
||||
const ConfigInfo<bool> GFX_HACK_COPY_EFB_SCALED{{System::GFX, "Hacks", "EFBScaledCopy"}, true};
|
||||
const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{
|
||||
const Info<int> GFX_HACK_EFB_ACCESS_TILE_SIZE{{System::GFX, "Hacks", "EFBAccessTileSize"}, 64};
|
||||
const Info<bool> GFX_HACK_BBOX_ENABLE{{System::GFX, "Hacks", "BBoxEnable"}, false};
|
||||
const Info<bool> GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true};
|
||||
const Info<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"}, true};
|
||||
const Info<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"}, true};
|
||||
const Info<bool> GFX_HACK_DISABLE_COPY_TO_VRAM{{System::GFX, "Hacks", "DisableCopyToVRAM"}, false};
|
||||
const Info<bool> GFX_HACK_DEFER_EFB_COPIES{{System::GFX, "Hacks", "DeferEFBCopies"}, true};
|
||||
const Info<bool> GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, false};
|
||||
const Info<bool> GFX_HACK_SKIP_DUPLICATE_XFBS{{System::GFX, "Hacks", "SkipDuplicateXFBs"}, true};
|
||||
const Info<bool> GFX_HACK_COPY_EFB_SCALED{{System::GFX, "Hacks", "EFBScaledCopy"}, true};
|
||||
const Info<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{
|
||||
{System::GFX, "Hacks", "EFBEmulateFormatChanges"}, false};
|
||||
const ConfigInfo<bool> GFX_HACK_VERTEX_ROUDING{{System::GFX, "Hacks", "VertexRounding"}, false};
|
||||
const Info<bool> GFX_HACK_VERTEX_ROUDING{{System::GFX, "Hacks", "VertexRounding"}, false};
|
||||
|
||||
// Graphics.GameSpecific
|
||||
|
||||
const ConfigInfo<bool> GFX_PERF_QUERIES_ENABLE{{System::GFX, "GameSpecific", "PerfQueriesEnable"},
|
||||
false};
|
||||
const Info<bool> GFX_PERF_QUERIES_ENABLE{{System::GFX, "GameSpecific", "PerfQueriesEnable"}, false};
|
||||
} // namespace Config
|
||||
|
|
|
@ -18,87 +18,87 @@ namespace Config
|
|||
|
||||
// Graphics.Hardware
|
||||
|
||||
extern const ConfigInfo<bool> GFX_VSYNC;
|
||||
extern const ConfigInfo<int> GFX_ADAPTER;
|
||||
extern const Info<bool> GFX_VSYNC;
|
||||
extern const Info<int> GFX_ADAPTER;
|
||||
|
||||
// Graphics.Settings
|
||||
|
||||
extern const ConfigInfo<bool> GFX_WIDESCREEN_HACK;
|
||||
extern const ConfigInfo<AspectMode> GFX_ASPECT_RATIO;
|
||||
extern const ConfigInfo<AspectMode> GFX_SUGGESTED_ASPECT_RATIO;
|
||||
extern const ConfigInfo<bool> GFX_CROP;
|
||||
extern const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES;
|
||||
extern const ConfigInfo<bool> GFX_SHOW_FPS;
|
||||
extern const ConfigInfo<bool> GFX_SHOW_NETPLAY_PING;
|
||||
extern const ConfigInfo<bool> GFX_SHOW_NETPLAY_MESSAGES;
|
||||
extern const ConfigInfo<bool> GFX_LOG_RENDER_TIME_TO_FILE;
|
||||
extern const ConfigInfo<bool> GFX_OVERLAY_STATS;
|
||||
extern const ConfigInfo<bool> GFX_OVERLAY_PROJ_STATS;
|
||||
extern const ConfigInfo<bool> GFX_DUMP_TEXTURES;
|
||||
extern const ConfigInfo<bool> GFX_HIRES_TEXTURES;
|
||||
extern const ConfigInfo<bool> GFX_CACHE_HIRES_TEXTURES;
|
||||
extern const ConfigInfo<bool> GFX_DUMP_EFB_TARGET;
|
||||
extern const ConfigInfo<bool> GFX_DUMP_XFB_TARGET;
|
||||
extern const ConfigInfo<bool> GFX_DUMP_FRAMES_AS_IMAGES;
|
||||
extern const ConfigInfo<bool> GFX_FREE_LOOK;
|
||||
extern const ConfigInfo<bool> GFX_USE_FFV1;
|
||||
extern const ConfigInfo<std::string> GFX_DUMP_FORMAT;
|
||||
extern const ConfigInfo<std::string> GFX_DUMP_CODEC;
|
||||
extern const ConfigInfo<std::string> GFX_DUMP_ENCODER;
|
||||
extern const ConfigInfo<std::string> GFX_DUMP_PATH;
|
||||
extern const ConfigInfo<int> GFX_BITRATE_KBPS;
|
||||
extern const ConfigInfo<bool> GFX_INTERNAL_RESOLUTION_FRAME_DUMPS;
|
||||
extern const ConfigInfo<bool> GFX_ENABLE_GPU_TEXTURE_DECODING;
|
||||
extern const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING;
|
||||
extern const ConfigInfo<bool> GFX_FAST_DEPTH_CALC;
|
||||
extern const ConfigInfo<u32> GFX_MSAA;
|
||||
extern const ConfigInfo<bool> GFX_SSAA;
|
||||
extern const ConfigInfo<int> GFX_EFB_SCALE;
|
||||
extern const ConfigInfo<int> GFX_MAX_EFB_SCALE;
|
||||
extern const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_ENABLE;
|
||||
extern const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_CENTER;
|
||||
extern const ConfigInfo<bool> GFX_ENABLE_WIREFRAME;
|
||||
extern const ConfigInfo<bool> GFX_DISABLE_FOG;
|
||||
extern const ConfigInfo<bool> GFX_BORDERLESS_FULLSCREEN;
|
||||
extern const ConfigInfo<bool> GFX_ENABLE_VALIDATION_LAYER;
|
||||
extern const ConfigInfo<bool> GFX_BACKEND_MULTITHREADING;
|
||||
extern const ConfigInfo<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL;
|
||||
extern const ConfigInfo<bool> GFX_SHADER_CACHE;
|
||||
extern const ConfigInfo<bool> GFX_WAIT_FOR_SHADERS_BEFORE_STARTING;
|
||||
extern const ConfigInfo<ShaderCompilationMode> GFX_SHADER_COMPILATION_MODE;
|
||||
extern const ConfigInfo<int> GFX_SHADER_COMPILER_THREADS;
|
||||
extern const ConfigInfo<int> GFX_SHADER_PRECOMPILER_THREADS;
|
||||
extern const ConfigInfo<bool> GFX_SAVE_TEXTURE_CACHE_TO_STATE;
|
||||
extern const Info<bool> GFX_WIDESCREEN_HACK;
|
||||
extern const Info<AspectMode> GFX_ASPECT_RATIO;
|
||||
extern const Info<AspectMode> GFX_SUGGESTED_ASPECT_RATIO;
|
||||
extern const Info<bool> GFX_CROP;
|
||||
extern const Info<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES;
|
||||
extern const Info<bool> GFX_SHOW_FPS;
|
||||
extern const Info<bool> GFX_SHOW_NETPLAY_PING;
|
||||
extern const Info<bool> GFX_SHOW_NETPLAY_MESSAGES;
|
||||
extern const Info<bool> GFX_LOG_RENDER_TIME_TO_FILE;
|
||||
extern const Info<bool> GFX_OVERLAY_STATS;
|
||||
extern const Info<bool> GFX_OVERLAY_PROJ_STATS;
|
||||
extern const Info<bool> GFX_DUMP_TEXTURES;
|
||||
extern const Info<bool> GFX_HIRES_TEXTURES;
|
||||
extern const Info<bool> GFX_CACHE_HIRES_TEXTURES;
|
||||
extern const Info<bool> GFX_DUMP_EFB_TARGET;
|
||||
extern const Info<bool> GFX_DUMP_XFB_TARGET;
|
||||
extern const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES;
|
||||
extern const Info<bool> GFX_FREE_LOOK;
|
||||
extern const Info<bool> GFX_USE_FFV1;
|
||||
extern const Info<std::string> GFX_DUMP_FORMAT;
|
||||
extern const Info<std::string> GFX_DUMP_CODEC;
|
||||
extern const Info<std::string> GFX_DUMP_ENCODER;
|
||||
extern const Info<std::string> GFX_DUMP_PATH;
|
||||
extern const Info<int> GFX_BITRATE_KBPS;
|
||||
extern const Info<bool> GFX_INTERNAL_RESOLUTION_FRAME_DUMPS;
|
||||
extern const Info<bool> GFX_ENABLE_GPU_TEXTURE_DECODING;
|
||||
extern const Info<bool> GFX_ENABLE_PIXEL_LIGHTING;
|
||||
extern const Info<bool> GFX_FAST_DEPTH_CALC;
|
||||
extern const Info<u32> GFX_MSAA;
|
||||
extern const Info<bool> GFX_SSAA;
|
||||
extern const Info<int> GFX_EFB_SCALE;
|
||||
extern const Info<int> GFX_MAX_EFB_SCALE;
|
||||
extern const Info<bool> GFX_TEXFMT_OVERLAY_ENABLE;
|
||||
extern const Info<bool> GFX_TEXFMT_OVERLAY_CENTER;
|
||||
extern const Info<bool> GFX_ENABLE_WIREFRAME;
|
||||
extern const Info<bool> GFX_DISABLE_FOG;
|
||||
extern const Info<bool> GFX_BORDERLESS_FULLSCREEN;
|
||||
extern const Info<bool> GFX_ENABLE_VALIDATION_LAYER;
|
||||
extern const Info<bool> GFX_BACKEND_MULTITHREADING;
|
||||
extern const Info<int> GFX_COMMAND_BUFFER_EXECUTE_INTERVAL;
|
||||
extern const Info<bool> GFX_SHADER_CACHE;
|
||||
extern const Info<bool> GFX_WAIT_FOR_SHADERS_BEFORE_STARTING;
|
||||
extern const Info<ShaderCompilationMode> GFX_SHADER_COMPILATION_MODE;
|
||||
extern const Info<int> GFX_SHADER_COMPILER_THREADS;
|
||||
extern const Info<int> GFX_SHADER_PRECOMPILER_THREADS;
|
||||
extern const Info<bool> GFX_SAVE_TEXTURE_CACHE_TO_STATE;
|
||||
|
||||
extern const ConfigInfo<bool> GFX_SW_ZCOMPLOC;
|
||||
extern const ConfigInfo<bool> GFX_SW_ZFREEZE;
|
||||
extern const ConfigInfo<bool> GFX_SW_DUMP_OBJECTS;
|
||||
extern const ConfigInfo<bool> GFX_SW_DUMP_TEV_STAGES;
|
||||
extern const ConfigInfo<bool> GFX_SW_DUMP_TEV_TEX_FETCHES;
|
||||
extern const ConfigInfo<int> GFX_SW_DRAW_START;
|
||||
extern const ConfigInfo<int> GFX_SW_DRAW_END;
|
||||
extern const Info<bool> GFX_SW_ZCOMPLOC;
|
||||
extern const Info<bool> GFX_SW_ZFREEZE;
|
||||
extern const Info<bool> GFX_SW_DUMP_OBJECTS;
|
||||
extern const Info<bool> GFX_SW_DUMP_TEV_STAGES;
|
||||
extern const Info<bool> GFX_SW_DUMP_TEV_TEX_FETCHES;
|
||||
extern const Info<int> GFX_SW_DRAW_START;
|
||||
extern const Info<int> GFX_SW_DRAW_END;
|
||||
|
||||
extern const ConfigInfo<bool> GFX_PREFER_GLES;
|
||||
extern const Info<bool> GFX_PREFER_GLES;
|
||||
|
||||
// Graphics.Enhancements
|
||||
|
||||
extern const ConfigInfo<bool> GFX_ENHANCE_FORCE_FILTERING;
|
||||
extern const ConfigInfo<int> GFX_ENHANCE_MAX_ANISOTROPY; // NOTE - this is x in (1 << x)
|
||||
extern const ConfigInfo<std::string> GFX_ENHANCE_POST_SHADER;
|
||||
extern const ConfigInfo<bool> GFX_ENHANCE_FORCE_TRUE_COLOR;
|
||||
extern const ConfigInfo<bool> GFX_ENHANCE_DISABLE_COPY_FILTER;
|
||||
extern const ConfigInfo<bool> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION;
|
||||
extern const ConfigInfo<float> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD;
|
||||
extern const Info<bool> GFX_ENHANCE_FORCE_FILTERING;
|
||||
extern const Info<int> GFX_ENHANCE_MAX_ANISOTROPY; // NOTE - this is x in (1 << x)
|
||||
extern const Info<std::string> GFX_ENHANCE_POST_SHADER;
|
||||
extern const Info<bool> GFX_ENHANCE_FORCE_TRUE_COLOR;
|
||||
extern const Info<bool> GFX_ENHANCE_DISABLE_COPY_FILTER;
|
||||
extern const Info<bool> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION;
|
||||
extern const Info<float> GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION_THRESHOLD;
|
||||
|
||||
// Graphics.Stereoscopy
|
||||
|
||||
extern const ConfigInfo<StereoMode> GFX_STEREO_MODE;
|
||||
extern const ConfigInfo<int> GFX_STEREO_DEPTH;
|
||||
extern const ConfigInfo<int> GFX_STEREO_CONVERGENCE_PERCENTAGE;
|
||||
extern const ConfigInfo<bool> GFX_STEREO_SWAP_EYES;
|
||||
extern const ConfigInfo<int> GFX_STEREO_CONVERGENCE;
|
||||
extern const ConfigInfo<bool> GFX_STEREO_EFB_MONO_DEPTH;
|
||||
extern const ConfigInfo<int> GFX_STEREO_DEPTH_PERCENTAGE;
|
||||
extern const Info<StereoMode> GFX_STEREO_MODE;
|
||||
extern const Info<int> GFX_STEREO_DEPTH;
|
||||
extern const Info<int> GFX_STEREO_CONVERGENCE_PERCENTAGE;
|
||||
extern const Info<bool> GFX_STEREO_SWAP_EYES;
|
||||
extern const Info<int> GFX_STEREO_CONVERGENCE;
|
||||
extern const Info<bool> GFX_STEREO_EFB_MONO_DEPTH;
|
||||
extern const Info<int> 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<bool> GFX_HACK_EFB_ACCESS_ENABLE;
|
||||
extern const ConfigInfo<bool> GFX_HACK_EFB_DEFER_INVALIDATION;
|
||||
extern const ConfigInfo<int> GFX_HACK_EFB_ACCESS_TILE_SIZE;
|
||||
extern const ConfigInfo<bool> GFX_HACK_BBOX_ENABLE;
|
||||
extern const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE;
|
||||
extern const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM;
|
||||
extern const ConfigInfo<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM;
|
||||
extern const ConfigInfo<bool> GFX_HACK_DISABLE_COPY_TO_VRAM;
|
||||
extern const ConfigInfo<bool> GFX_HACK_DEFER_EFB_COPIES;
|
||||
extern const ConfigInfo<bool> GFX_HACK_IMMEDIATE_XFB;
|
||||
extern const ConfigInfo<bool> GFX_HACK_SKIP_DUPLICATE_XFBS;
|
||||
extern const ConfigInfo<bool> GFX_HACK_COPY_EFB_SCALED;
|
||||
extern const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES;
|
||||
extern const ConfigInfo<bool> GFX_HACK_VERTEX_ROUDING;
|
||||
extern const Info<bool> GFX_HACK_EFB_ACCESS_ENABLE;
|
||||
extern const Info<bool> GFX_HACK_EFB_DEFER_INVALIDATION;
|
||||
extern const Info<int> GFX_HACK_EFB_ACCESS_TILE_SIZE;
|
||||
extern const Info<bool> GFX_HACK_BBOX_ENABLE;
|
||||
extern const Info<bool> GFX_HACK_FORCE_PROGRESSIVE;
|
||||
extern const Info<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM;
|
||||
extern const Info<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM;
|
||||
extern const Info<bool> GFX_HACK_DISABLE_COPY_TO_VRAM;
|
||||
extern const Info<bool> GFX_HACK_DEFER_EFB_COPIES;
|
||||
extern const Info<bool> GFX_HACK_IMMEDIATE_XFB;
|
||||
extern const Info<bool> GFX_HACK_SKIP_DUPLICATE_XFBS;
|
||||
extern const Info<bool> GFX_HACK_COPY_EFB_SCALED;
|
||||
extern const Info<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES;
|
||||
extern const Info<bool> GFX_HACK_VERTEX_ROUDING;
|
||||
|
||||
// Graphics.GameSpecific
|
||||
|
||||
extern const ConfigInfo<bool> GFX_PERF_QUERIES_ENABLE;
|
||||
extern const Info<bool> GFX_PERF_QUERIES_ENABLE;
|
||||
|
||||
} // namespace Config
|
||||
|
|
|
@ -17,134 +17,126 @@ namespace Config
|
|||
{
|
||||
// Main.Core
|
||||
|
||||
const ConfigInfo<bool> MAIN_SKIP_IPL{{System::Main, "Core", "SkipIPL"}, true};
|
||||
const ConfigInfo<bool> MAIN_LOAD_IPL_DUMP{{System::Main, "Core", "LoadIPLDump"}, true};
|
||||
const ConfigInfo<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
|
||||
PowerPC::DefaultCPUCore()};
|
||||
const ConfigInfo<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
|
||||
const ConfigInfo<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true};
|
||||
const ConfigInfo<bool> MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true};
|
||||
const ConfigInfo<int> MAIN_TIMING_VARIANCE{{System::Main, "Core", "TimingVariance"}, 40};
|
||||
const ConfigInfo<bool> MAIN_CPU_THREAD{{System::Main, "Core", "CPUThread"}, true};
|
||||
const ConfigInfo<bool> MAIN_SYNC_ON_SKIP_IDLE{{System::Main, "Core", "SyncOnSkipIdle"}, true};
|
||||
const ConfigInfo<std::string> MAIN_DEFAULT_ISO{{System::Main, "Core", "DefaultISO"}, ""};
|
||||
const ConfigInfo<bool> MAIN_ENABLE_CHEATS{{System::Main, "Core", "EnableCheats"}, false};
|
||||
const ConfigInfo<int> MAIN_GC_LANGUAGE{{System::Main, "Core", "SelectedLanguage"}, 0};
|
||||
const ConfigInfo<bool> MAIN_OVERRIDE_REGION_SETTINGS{
|
||||
{System::Main, "Core", "OverrideRegionSettings"}, false};
|
||||
const ConfigInfo<bool> MAIN_DPL2_DECODER{{System::Main, "Core", "DPL2Decoder"}, false};
|
||||
const ConfigInfo<AudioCommon::DPL2Quality> MAIN_DPL2_QUALITY{{System::Main, "Core", "DPL2Quality"},
|
||||
AudioCommon::GetDefaultDPL2Quality()};
|
||||
const ConfigInfo<int> MAIN_AUDIO_LATENCY{{System::Main, "Core", "AudioLatency"}, 20};
|
||||
const ConfigInfo<bool> MAIN_AUDIO_STRETCH{{System::Main, "Core", "AudioStretch"}, false};
|
||||
const ConfigInfo<int> MAIN_AUDIO_STRETCH_LATENCY{{System::Main, "Core", "AudioStretchMaxLatency"},
|
||||
80};
|
||||
const ConfigInfo<std::string> MAIN_MEMCARD_A_PATH{{System::Main, "Core", "MemcardAPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_MEMCARD_B_PATH{{System::Main, "Core", "MemcardBPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_AGP_CART_A_PATH{{System::Main, "Core", "AgpCartAPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_AGP_CART_B_PATH{{System::Main, "Core", "AgpCartBPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_GCI_FOLDER_A_PATH_OVERRIDE{
|
||||
const Info<bool> MAIN_SKIP_IPL{{System::Main, "Core", "SkipIPL"}, true};
|
||||
const Info<bool> MAIN_LOAD_IPL_DUMP{{System::Main, "Core", "LoadIPLDump"}, true};
|
||||
const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
|
||||
PowerPC::DefaultCPUCore()};
|
||||
const Info<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
|
||||
const Info<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true};
|
||||
const Info<bool> MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true};
|
||||
const Info<int> MAIN_TIMING_VARIANCE{{System::Main, "Core", "TimingVariance"}, 40};
|
||||
const Info<bool> MAIN_CPU_THREAD{{System::Main, "Core", "CPUThread"}, true};
|
||||
const Info<bool> MAIN_SYNC_ON_SKIP_IDLE{{System::Main, "Core", "SyncOnSkipIdle"}, true};
|
||||
const Info<std::string> MAIN_DEFAULT_ISO{{System::Main, "Core", "DefaultISO"}, ""};
|
||||
const Info<bool> MAIN_ENABLE_CHEATS{{System::Main, "Core", "EnableCheats"}, false};
|
||||
const Info<int> MAIN_GC_LANGUAGE{{System::Main, "Core", "SelectedLanguage"}, 0};
|
||||
const Info<bool> MAIN_OVERRIDE_REGION_SETTINGS{{System::Main, "Core", "OverrideRegionSettings"},
|
||||
false};
|
||||
const Info<bool> MAIN_DPL2_DECODER{{System::Main, "Core", "DPL2Decoder"}, false};
|
||||
const Info<AudioCommon::DPL2Quality> MAIN_DPL2_QUALITY{{System::Main, "Core", "DPL2Quality"},
|
||||
AudioCommon::GetDefaultDPL2Quality()};
|
||||
const Info<int> MAIN_AUDIO_LATENCY{{System::Main, "Core", "AudioLatency"}, 20};
|
||||
const Info<bool> MAIN_AUDIO_STRETCH{{System::Main, "Core", "AudioStretch"}, false};
|
||||
const Info<int> MAIN_AUDIO_STRETCH_LATENCY{{System::Main, "Core", "AudioStretchMaxLatency"}, 80};
|
||||
const Info<std::string> MAIN_MEMCARD_A_PATH{{System::Main, "Core", "MemcardAPath"}, ""};
|
||||
const Info<std::string> MAIN_MEMCARD_B_PATH{{System::Main, "Core", "MemcardBPath"}, ""};
|
||||
const Info<std::string> MAIN_AGP_CART_A_PATH{{System::Main, "Core", "AgpCartAPath"}, ""};
|
||||
const Info<std::string> MAIN_AGP_CART_B_PATH{{System::Main, "Core", "AgpCartBPath"}, ""};
|
||||
const Info<std::string> MAIN_GCI_FOLDER_A_PATH_OVERRIDE{
|
||||
{System::Main, "Core", "GCIFolderAPathOverride"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_GCI_FOLDER_B_PATH_OVERRIDE{
|
||||
const Info<std::string> MAIN_GCI_FOLDER_B_PATH_OVERRIDE{
|
||||
{System::Main, "Core", "GCIFolderBPathOverride"}, ""};
|
||||
const ConfigInfo<bool> MAIN_GCI_FOLDER_CURRENT_GAME_ONLY{
|
||||
const Info<bool> MAIN_GCI_FOLDER_CURRENT_GAME_ONLY{
|
||||
{System::Main, "Core", "GCIFolderCurrentGameOnly"}, false};
|
||||
const ConfigInfo<bool> MAIN_CODE_SYNC_OVERRIDE{{System::Main, "Core", "CheatSyncOverride"}, false};
|
||||
const ConfigInfo<int> MAIN_SLOT_A{{System::Main, "Core", "SlotA"},
|
||||
ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER};
|
||||
const ConfigInfo<int> MAIN_SLOT_B{{System::Main, "Core", "SlotB"},
|
||||
ExpansionInterface::EXIDEVICE_NONE};
|
||||
const ConfigInfo<int> MAIN_SERIAL_PORT_1{{System::Main, "Core", "SerialPort1"},
|
||||
ExpansionInterface::EXIDEVICE_NONE};
|
||||
const ConfigInfo<std::string> MAIN_BBA_MAC{{System::Main, "Core", "BBA_MAC"}, ""};
|
||||
const Info<bool> MAIN_CODE_SYNC_OVERRIDE{{System::Main, "Core", "CheatSyncOverride"}, false};
|
||||
const Info<int> MAIN_SLOT_A{{System::Main, "Core", "SlotA"},
|
||||
ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER};
|
||||
const Info<int> MAIN_SLOT_B{{System::Main, "Core", "SlotB"}, ExpansionInterface::EXIDEVICE_NONE};
|
||||
const Info<int> MAIN_SERIAL_PORT_1{{System::Main, "Core", "SerialPort1"},
|
||||
ExpansionInterface::EXIDEVICE_NONE};
|
||||
const Info<std::string> MAIN_BBA_MAC{{System::Main, "Core", "BBA_MAC"}, ""};
|
||||
|
||||
ConfigInfo<u32> GetInfoForSIDevice(u32 channel)
|
||||
Info<u32> GetInfoForSIDevice(u32 channel)
|
||||
{
|
||||
return {{System::Main, "Core", fmt::format("SIDevice{}", channel)},
|
||||
static_cast<u32>(channel == 0 ? SerialInterface::SIDEVICE_GC_CONTROLLER :
|
||||
SerialInterface::SIDEVICE_NONE)};
|
||||
}
|
||||
|
||||
ConfigInfo<bool> GetInfoForAdapterRumble(u32 channel)
|
||||
Info<bool> GetInfoForAdapterRumble(u32 channel)
|
||||
{
|
||||
return {{System::Main, "Core", fmt::format("AdapterRumble{}", channel)}, true};
|
||||
}
|
||||
|
||||
ConfigInfo<bool> GetInfoForSimulateKonga(u32 channel)
|
||||
Info<bool> GetInfoForSimulateKonga(u32 channel)
|
||||
{
|
||||
return {{System::Main, "Core", fmt::format("SimulateKonga{}", channel)}, false};
|
||||
}
|
||||
|
||||
const ConfigInfo<bool> MAIN_WII_SD_CARD{{System::Main, "Core", "WiiSDCard"}, true};
|
||||
const ConfigInfo<bool> MAIN_WII_SD_CARD_WRITABLE{{System::Main, "Core", "WiiSDCardWritable"}, true};
|
||||
const ConfigInfo<bool> MAIN_WII_KEYBOARD{{System::Main, "Core", "WiiKeyboard"}, false};
|
||||
const ConfigInfo<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING{
|
||||
const Info<bool> MAIN_WII_SD_CARD{{System::Main, "Core", "WiiSDCard"}, true};
|
||||
const Info<bool> MAIN_WII_SD_CARD_WRITABLE{{System::Main, "Core", "WiiSDCardWritable"}, true};
|
||||
const Info<bool> MAIN_WII_KEYBOARD{{System::Main, "Core", "WiiKeyboard"}, false};
|
||||
const Info<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING{
|
||||
{System::Main, "Core", "WiimoteContinuousScanning"}, false};
|
||||
const ConfigInfo<bool> MAIN_WIIMOTE_ENABLE_SPEAKER{{System::Main, "Core", "WiimoteEnableSpeaker"},
|
||||
false};
|
||||
const ConfigInfo<bool> MAIN_RUN_COMPARE_SERVER{{System::Main, "Core", "RunCompareServer"}, false};
|
||||
const ConfigInfo<bool> MAIN_RUN_COMPARE_CLIENT{{System::Main, "Core", "RunCompareClient"}, false};
|
||||
const ConfigInfo<bool> MAIN_MMU{{System::Main, "Core", "MMU"}, false};
|
||||
const ConfigInfo<int> MAIN_BB_DUMP_PORT{{System::Main, "Core", "BBDumpPort"}, -1};
|
||||
const ConfigInfo<bool> MAIN_SYNC_GPU{{System::Main, "Core", "SyncGPU"}, false};
|
||||
const ConfigInfo<int> MAIN_SYNC_GPU_MAX_DISTANCE{{System::Main, "Core", "SyncGpuMaxDistance"},
|
||||
200000};
|
||||
const ConfigInfo<int> MAIN_SYNC_GPU_MIN_DISTANCE{{System::Main, "Core", "SyncGpuMinDistance"},
|
||||
-200000};
|
||||
const ConfigInfo<float> MAIN_SYNC_GPU_OVERCLOCK{{System::Main, "Core", "SyncGpuOverclock"}, 1.0f};
|
||||
const ConfigInfo<bool> MAIN_FAST_DISC_SPEED{{System::Main, "Core", "FastDiscSpeed"}, false};
|
||||
const ConfigInfo<bool> MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false};
|
||||
const ConfigInfo<bool> MAIN_FPRF{{System::Main, "Core", "FPRF"}, false};
|
||||
const ConfigInfo<bool> MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false};
|
||||
const ConfigInfo<float> MAIN_EMULATION_SPEED{{System::Main, "Core", "EmulationSpeed"}, 1.0f};
|
||||
const ConfigInfo<float> MAIN_OVERCLOCK{{System::Main, "Core", "Overclock"}, 1.0f};
|
||||
const ConfigInfo<bool> MAIN_OVERCLOCK_ENABLE{{System::Main, "Core", "OverclockEnable"}, false};
|
||||
const ConfigInfo<bool> MAIN_RAM_OVERRIDE_ENABLE{{System::Main, "Core", "RAMOverrideEnable"}, false};
|
||||
const ConfigInfo<u32> MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL};
|
||||
const ConfigInfo<u32> MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL};
|
||||
const ConfigInfo<std::string> MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_GPU_DETERMINISM_MODE{
|
||||
{System::Main, "Core", "GPUDeterminismMode"}, "auto"};
|
||||
const ConfigInfo<std::string> MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"}, ""};
|
||||
const ConfigInfo<bool> MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false};
|
||||
const Info<bool> MAIN_WIIMOTE_ENABLE_SPEAKER{{System::Main, "Core", "WiimoteEnableSpeaker"}, false};
|
||||
const Info<bool> MAIN_RUN_COMPARE_SERVER{{System::Main, "Core", "RunCompareServer"}, false};
|
||||
const Info<bool> MAIN_RUN_COMPARE_CLIENT{{System::Main, "Core", "RunCompareClient"}, false};
|
||||
const Info<bool> MAIN_MMU{{System::Main, "Core", "MMU"}, false};
|
||||
const Info<int> MAIN_BB_DUMP_PORT{{System::Main, "Core", "BBDumpPort"}, -1};
|
||||
const Info<bool> MAIN_SYNC_GPU{{System::Main, "Core", "SyncGPU"}, false};
|
||||
const Info<int> MAIN_SYNC_GPU_MAX_DISTANCE{{System::Main, "Core", "SyncGpuMaxDistance"}, 200000};
|
||||
const Info<int> MAIN_SYNC_GPU_MIN_DISTANCE{{System::Main, "Core", "SyncGpuMinDistance"}, -200000};
|
||||
const Info<float> MAIN_SYNC_GPU_OVERCLOCK{{System::Main, "Core", "SyncGpuOverclock"}, 1.0f};
|
||||
const Info<bool> MAIN_FAST_DISC_SPEED{{System::Main, "Core", "FastDiscSpeed"}, false};
|
||||
const Info<bool> MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false};
|
||||
const Info<bool> MAIN_FPRF{{System::Main, "Core", "FPRF"}, false};
|
||||
const Info<bool> MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false};
|
||||
const Info<float> MAIN_EMULATION_SPEED{{System::Main, "Core", "EmulationSpeed"}, 1.0f};
|
||||
const Info<float> MAIN_OVERCLOCK{{System::Main, "Core", "Overclock"}, 1.0f};
|
||||
const Info<bool> MAIN_OVERCLOCK_ENABLE{{System::Main, "Core", "OverclockEnable"}, false};
|
||||
const Info<bool> MAIN_RAM_OVERRIDE_ENABLE{{System::Main, "Core", "RAMOverrideEnable"}, false};
|
||||
const Info<u32> MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL};
|
||||
const Info<u32> MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL};
|
||||
const Info<std::string> MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"}, ""};
|
||||
const Info<std::string> MAIN_GPU_DETERMINISM_MODE{{System::Main, "Core", "GPUDeterminismMode"},
|
||||
"auto"};
|
||||
const Info<std::string> MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"}, ""};
|
||||
const Info<bool> MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false};
|
||||
// Default to seconds between 1.1.1970 and 1.1.2000
|
||||
const ConfigInfo<u32> MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800};
|
||||
const ConfigInfo<bool> MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false};
|
||||
const Info<u32> MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800};
|
||||
const Info<bool> MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false};
|
||||
|
||||
// Main.Display
|
||||
|
||||
const ConfigInfo<std::string> MAIN_FULLSCREEN_DISPLAY_RES{
|
||||
const Info<std::string> MAIN_FULLSCREEN_DISPLAY_RES{
|
||||
{System::Main, "Display", "FullscreenDisplayRes"}, "Auto"};
|
||||
const ConfigInfo<bool> MAIN_FULLSCREEN{{System::Main, "Display", "Fullscreen"}, false};
|
||||
const ConfigInfo<bool> MAIN_RENDER_TO_MAIN{{System::Main, "Display", "RenderToMain"}, false};
|
||||
const ConfigInfo<int> MAIN_RENDER_WINDOW_XPOS{{System::Main, "Display", "RenderWindowXPos"}, -1};
|
||||
const ConfigInfo<int> MAIN_RENDER_WINDOW_YPOS{{System::Main, "Display", "RenderWindowYPos"}, -1};
|
||||
const ConfigInfo<int> MAIN_RENDER_WINDOW_WIDTH{{System::Main, "Display", "RenderWindowWidth"}, 640};
|
||||
const ConfigInfo<int> MAIN_RENDER_WINDOW_HEIGHT{{System::Main, "Display", "RenderWindowHeight"},
|
||||
480};
|
||||
const ConfigInfo<bool> MAIN_RENDER_WINDOW_AUTOSIZE{
|
||||
{System::Main, "Display", "RenderWindowAutoSize"}, false};
|
||||
const ConfigInfo<bool> MAIN_KEEP_WINDOW_ON_TOP{{System::Main, "Display", "KeepWindowOnTop"}, false};
|
||||
const ConfigInfo<bool> MAIN_DISABLE_SCREENSAVER{{System::Main, "Display", "DisableScreenSaver"},
|
||||
false};
|
||||
const Info<bool> MAIN_FULLSCREEN{{System::Main, "Display", "Fullscreen"}, false};
|
||||
const Info<bool> MAIN_RENDER_TO_MAIN{{System::Main, "Display", "RenderToMain"}, false};
|
||||
const Info<int> MAIN_RENDER_WINDOW_XPOS{{System::Main, "Display", "RenderWindowXPos"}, -1};
|
||||
const Info<int> MAIN_RENDER_WINDOW_YPOS{{System::Main, "Display", "RenderWindowYPos"}, -1};
|
||||
const Info<int> MAIN_RENDER_WINDOW_WIDTH{{System::Main, "Display", "RenderWindowWidth"}, 640};
|
||||
const Info<int> MAIN_RENDER_WINDOW_HEIGHT{{System::Main, "Display", "RenderWindowHeight"}, 480};
|
||||
const Info<bool> MAIN_RENDER_WINDOW_AUTOSIZE{{System::Main, "Display", "RenderWindowAutoSize"},
|
||||
false};
|
||||
const Info<bool> MAIN_KEEP_WINDOW_ON_TOP{{System::Main, "Display", "KeepWindowOnTop"}, false};
|
||||
const Info<bool> MAIN_DISABLE_SCREENSAVER{{System::Main, "Display", "DisableScreenSaver"}, false};
|
||||
|
||||
// Main.DSP
|
||||
|
||||
const ConfigInfo<bool> MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false};
|
||||
const ConfigInfo<bool> MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true};
|
||||
const ConfigInfo<bool> MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false};
|
||||
const ConfigInfo<bool> MAIN_DUMP_AUDIO_SILENT{{System::Main, "DSP", "DumpAudioSilent"}, false};
|
||||
const ConfigInfo<bool> MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false};
|
||||
const ConfigInfo<std::string> MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"},
|
||||
AudioCommon::GetDefaultSoundBackend()};
|
||||
const ConfigInfo<int> MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100};
|
||||
const Info<bool> MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false};
|
||||
const Info<bool> MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true};
|
||||
const Info<bool> MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false};
|
||||
const Info<bool> MAIN_DUMP_AUDIO_SILENT{{System::Main, "DSP", "DumpAudioSilent"}, false};
|
||||
const Info<bool> MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false};
|
||||
const Info<std::string> MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"},
|
||||
AudioCommon::GetDefaultSoundBackend()};
|
||||
const Info<int> MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100};
|
||||
|
||||
// Main.General
|
||||
|
||||
const ConfigInfo<std::string> MAIN_DUMP_PATH{{System::Main, "General", "DumpPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_LOAD_PATH{{System::Main, "General", "LoadPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_RESOURCEPACK_PATH{{System::Main, "General", "ResourcePackPath"},
|
||||
""};
|
||||
const ConfigInfo<std::string> MAIN_FS_PATH{{System::Main, "General", "NANDRootPath"}, ""};
|
||||
const ConfigInfo<std::string> MAIN_SD_PATH{{System::Main, "General", "WiiSDCardPath"}, ""};
|
||||
const Info<std::string> MAIN_DUMP_PATH{{System::Main, "General", "DumpPath"}, ""};
|
||||
const Info<std::string> MAIN_LOAD_PATH{{System::Main, "General", "LoadPath"}, ""};
|
||||
const Info<std::string> MAIN_RESOURCEPACK_PATH{{System::Main, "General", "ResourcePackPath"}, ""};
|
||||
const Info<std::string> MAIN_FS_PATH{{System::Main, "General", "NANDRootPath"}, ""};
|
||||
const Info<std::string> MAIN_SD_PATH{{System::Main, "General", "WiiSDCardPath"}, ""};
|
||||
} // namespace Config
|
||||
|
|
|
@ -22,99 +22,99 @@ namespace Config
|
|||
{
|
||||
// Main.Core
|
||||
|
||||
extern const ConfigInfo<bool> MAIN_SKIP_IPL;
|
||||
extern const ConfigInfo<bool> MAIN_LOAD_IPL_DUMP;
|
||||
extern const ConfigInfo<PowerPC::CPUCore> MAIN_CPU_CORE;
|
||||
extern const ConfigInfo<bool> MAIN_JIT_FOLLOW_BRANCH;
|
||||
extern const ConfigInfo<bool> MAIN_FASTMEM;
|
||||
extern const Info<bool> MAIN_SKIP_IPL;
|
||||
extern const Info<bool> MAIN_LOAD_IPL_DUMP;
|
||||
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
|
||||
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
|
||||
extern const Info<bool> 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<bool> MAIN_DSP_HLE;
|
||||
extern const ConfigInfo<int> MAIN_TIMING_VARIANCE;
|
||||
extern const ConfigInfo<bool> MAIN_CPU_THREAD;
|
||||
extern const ConfigInfo<bool> MAIN_SYNC_ON_SKIP_IDLE;
|
||||
extern const ConfigInfo<std::string> MAIN_DEFAULT_ISO;
|
||||
extern const ConfigInfo<bool> MAIN_ENABLE_CHEATS;
|
||||
extern const ConfigInfo<int> MAIN_GC_LANGUAGE;
|
||||
extern const ConfigInfo<bool> MAIN_OVERRIDE_REGION_SETTINGS;
|
||||
extern const ConfigInfo<bool> MAIN_DPL2_DECODER;
|
||||
extern const ConfigInfo<AudioCommon::DPL2Quality> MAIN_DPL2_QUALITY;
|
||||
extern const ConfigInfo<int> MAIN_AUDIO_LATENCY;
|
||||
extern const ConfigInfo<bool> MAIN_AUDIO_STRETCH;
|
||||
extern const ConfigInfo<int> MAIN_AUDIO_STRETCH_LATENCY;
|
||||
extern const ConfigInfo<std::string> MAIN_MEMCARD_A_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_MEMCARD_B_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_AGP_CART_A_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_AGP_CART_B_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_GCI_FOLDER_A_PATH_OVERRIDE;
|
||||
extern const ConfigInfo<std::string> MAIN_GCI_FOLDER_B_PATH_OVERRIDE;
|
||||
extern const ConfigInfo<bool> MAIN_CODE_SYNC_OVERRIDE;
|
||||
extern const ConfigInfo<bool> MAIN_GCI_FOLDER_CURRENT_GAME_ONLY;
|
||||
extern const ConfigInfo<int> MAIN_SLOT_A;
|
||||
extern const ConfigInfo<int> MAIN_SLOT_B;
|
||||
extern const ConfigInfo<int> MAIN_SERIAL_PORT_1;
|
||||
extern const ConfigInfo<std::string> MAIN_BBA_MAC;
|
||||
ConfigInfo<u32> GetInfoForSIDevice(u32 channel);
|
||||
ConfigInfo<bool> GetInfoForAdapterRumble(u32 channel);
|
||||
ConfigInfo<bool> GetInfoForSimulateKonga(u32 channel);
|
||||
extern const ConfigInfo<bool> MAIN_WII_SD_CARD;
|
||||
extern const ConfigInfo<bool> MAIN_WII_SD_CARD_WRITABLE;
|
||||
extern const ConfigInfo<bool> MAIN_WII_KEYBOARD;
|
||||
extern const ConfigInfo<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING;
|
||||
extern const ConfigInfo<bool> MAIN_WIIMOTE_ENABLE_SPEAKER;
|
||||
extern const ConfigInfo<bool> MAIN_RUN_COMPARE_SERVER;
|
||||
extern const ConfigInfo<bool> MAIN_RUN_COMPARE_CLIENT;
|
||||
extern const ConfigInfo<bool> MAIN_MMU;
|
||||
extern const ConfigInfo<int> MAIN_BB_DUMP_PORT;
|
||||
extern const ConfigInfo<bool> MAIN_SYNC_GPU;
|
||||
extern const ConfigInfo<int> MAIN_SYNC_GPU_MAX_DISTANCE;
|
||||
extern const ConfigInfo<int> MAIN_SYNC_GPU_MIN_DISTANCE;
|
||||
extern const ConfigInfo<float> MAIN_SYNC_GPU_OVERCLOCK;
|
||||
extern const ConfigInfo<bool> MAIN_FAST_DISC_SPEED;
|
||||
extern const ConfigInfo<bool> MAIN_LOW_DCBZ_HACK;
|
||||
extern const ConfigInfo<bool> MAIN_FPRF;
|
||||
extern const ConfigInfo<bool> MAIN_ACCURATE_NANS;
|
||||
extern const ConfigInfo<float> MAIN_EMULATION_SPEED;
|
||||
extern const ConfigInfo<float> MAIN_OVERCLOCK;
|
||||
extern const ConfigInfo<bool> MAIN_OVERCLOCK_ENABLE;
|
||||
extern const ConfigInfo<bool> MAIN_RAM_OVERRIDE_ENABLE;
|
||||
extern const ConfigInfo<u32> MAIN_MEM1_SIZE;
|
||||
extern const ConfigInfo<u32> MAIN_MEM2_SIZE;
|
||||
extern const Info<bool> MAIN_DSP_HLE;
|
||||
extern const Info<int> MAIN_TIMING_VARIANCE;
|
||||
extern const Info<bool> MAIN_CPU_THREAD;
|
||||
extern const Info<bool> MAIN_SYNC_ON_SKIP_IDLE;
|
||||
extern const Info<std::string> MAIN_DEFAULT_ISO;
|
||||
extern const Info<bool> MAIN_ENABLE_CHEATS;
|
||||
extern const Info<int> MAIN_GC_LANGUAGE;
|
||||
extern const Info<bool> MAIN_OVERRIDE_REGION_SETTINGS;
|
||||
extern const Info<bool> MAIN_DPL2_DECODER;
|
||||
extern const Info<AudioCommon::DPL2Quality> MAIN_DPL2_QUALITY;
|
||||
extern const Info<int> MAIN_AUDIO_LATENCY;
|
||||
extern const Info<bool> MAIN_AUDIO_STRETCH;
|
||||
extern const Info<int> MAIN_AUDIO_STRETCH_LATENCY;
|
||||
extern const Info<std::string> MAIN_MEMCARD_A_PATH;
|
||||
extern const Info<std::string> MAIN_MEMCARD_B_PATH;
|
||||
extern const Info<std::string> MAIN_AGP_CART_A_PATH;
|
||||
extern const Info<std::string> MAIN_AGP_CART_B_PATH;
|
||||
extern const Info<std::string> MAIN_GCI_FOLDER_A_PATH_OVERRIDE;
|
||||
extern const Info<std::string> MAIN_GCI_FOLDER_B_PATH_OVERRIDE;
|
||||
extern const Info<bool> MAIN_CODE_SYNC_OVERRIDE;
|
||||
extern const Info<bool> MAIN_GCI_FOLDER_CURRENT_GAME_ONLY;
|
||||
extern const Info<int> MAIN_SLOT_A;
|
||||
extern const Info<int> MAIN_SLOT_B;
|
||||
extern const Info<int> MAIN_SERIAL_PORT_1;
|
||||
extern const Info<std::string> MAIN_BBA_MAC;
|
||||
Info<u32> GetInfoForSIDevice(u32 channel);
|
||||
Info<bool> GetInfoForAdapterRumble(u32 channel);
|
||||
Info<bool> GetInfoForSimulateKonga(u32 channel);
|
||||
extern const Info<bool> MAIN_WII_SD_CARD;
|
||||
extern const Info<bool> MAIN_WII_SD_CARD_WRITABLE;
|
||||
extern const Info<bool> MAIN_WII_KEYBOARD;
|
||||
extern const Info<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING;
|
||||
extern const Info<bool> MAIN_WIIMOTE_ENABLE_SPEAKER;
|
||||
extern const Info<bool> MAIN_RUN_COMPARE_SERVER;
|
||||
extern const Info<bool> MAIN_RUN_COMPARE_CLIENT;
|
||||
extern const Info<bool> MAIN_MMU;
|
||||
extern const Info<int> MAIN_BB_DUMP_PORT;
|
||||
extern const Info<bool> MAIN_SYNC_GPU;
|
||||
extern const Info<int> MAIN_SYNC_GPU_MAX_DISTANCE;
|
||||
extern const Info<int> MAIN_SYNC_GPU_MIN_DISTANCE;
|
||||
extern const Info<float> MAIN_SYNC_GPU_OVERCLOCK;
|
||||
extern const Info<bool> MAIN_FAST_DISC_SPEED;
|
||||
extern const Info<bool> MAIN_LOW_DCBZ_HACK;
|
||||
extern const Info<bool> MAIN_FPRF;
|
||||
extern const Info<bool> MAIN_ACCURATE_NANS;
|
||||
extern const Info<float> MAIN_EMULATION_SPEED;
|
||||
extern const Info<float> MAIN_OVERCLOCK;
|
||||
extern const Info<bool> MAIN_OVERCLOCK_ENABLE;
|
||||
extern const Info<bool> MAIN_RAM_OVERRIDE_ENABLE;
|
||||
extern const Info<u32> MAIN_MEM1_SIZE;
|
||||
extern const Info<u32> MAIN_MEM2_SIZE;
|
||||
// Should really be part of System::GFX, but again, we're stuck with past mistakes.
|
||||
extern const ConfigInfo<std::string> MAIN_GFX_BACKEND;
|
||||
extern const ConfigInfo<std::string> MAIN_GPU_DETERMINISM_MODE;
|
||||
extern const ConfigInfo<std::string> MAIN_PERF_MAP_DIR;
|
||||
extern const ConfigInfo<bool> MAIN_CUSTOM_RTC_ENABLE;
|
||||
extern const ConfigInfo<u32> MAIN_CUSTOM_RTC_VALUE;
|
||||
extern const ConfigInfo<bool> MAIN_AUTO_DISC_CHANGE;
|
||||
extern const Info<std::string> MAIN_GFX_BACKEND;
|
||||
extern const Info<std::string> MAIN_GPU_DETERMINISM_MODE;
|
||||
extern const Info<std::string> MAIN_PERF_MAP_DIR;
|
||||
extern const Info<bool> MAIN_CUSTOM_RTC_ENABLE;
|
||||
extern const Info<u32> MAIN_CUSTOM_RTC_VALUE;
|
||||
extern const Info<bool> MAIN_AUTO_DISC_CHANGE;
|
||||
|
||||
// Main.DSP
|
||||
|
||||
extern const ConfigInfo<bool> MAIN_DSP_CAPTURE_LOG;
|
||||
extern const ConfigInfo<bool> MAIN_DSP_JIT;
|
||||
extern const ConfigInfo<bool> MAIN_DUMP_AUDIO;
|
||||
extern const ConfigInfo<bool> MAIN_DUMP_AUDIO_SILENT;
|
||||
extern const ConfigInfo<bool> MAIN_DUMP_UCODE;
|
||||
extern const ConfigInfo<std::string> MAIN_AUDIO_BACKEND;
|
||||
extern const ConfigInfo<int> MAIN_AUDIO_VOLUME;
|
||||
extern const Info<bool> MAIN_DSP_CAPTURE_LOG;
|
||||
extern const Info<bool> MAIN_DSP_JIT;
|
||||
extern const Info<bool> MAIN_DUMP_AUDIO;
|
||||
extern const Info<bool> MAIN_DUMP_AUDIO_SILENT;
|
||||
extern const Info<bool> MAIN_DUMP_UCODE;
|
||||
extern const Info<std::string> MAIN_AUDIO_BACKEND;
|
||||
extern const Info<int> MAIN_AUDIO_VOLUME;
|
||||
|
||||
// Main.Display
|
||||
|
||||
extern const ConfigInfo<std::string> MAIN_FULLSCREEN_DISPLAY_RES;
|
||||
extern const ConfigInfo<bool> MAIN_FULLSCREEN;
|
||||
extern const ConfigInfo<bool> MAIN_RENDER_TO_MAIN;
|
||||
extern const ConfigInfo<int> MAIN_RENDER_WINDOW_XPOS;
|
||||
extern const ConfigInfo<int> MAIN_RENDER_WINDOW_YPOS;
|
||||
extern const ConfigInfo<int> MAIN_RENDER_WINDOW_WIDTH;
|
||||
extern const ConfigInfo<int> MAIN_RENDER_WINDOW_HEIGHT;
|
||||
extern const ConfigInfo<bool> MAIN_RENDER_WINDOW_AUTOSIZE;
|
||||
extern const ConfigInfo<bool> MAIN_KEEP_WINDOW_ON_TOP;
|
||||
extern const ConfigInfo<bool> MAIN_DISABLE_SCREENSAVER;
|
||||
extern const Info<std::string> MAIN_FULLSCREEN_DISPLAY_RES;
|
||||
extern const Info<bool> MAIN_FULLSCREEN;
|
||||
extern const Info<bool> MAIN_RENDER_TO_MAIN;
|
||||
extern const Info<int> MAIN_RENDER_WINDOW_XPOS;
|
||||
extern const Info<int> MAIN_RENDER_WINDOW_YPOS;
|
||||
extern const Info<int> MAIN_RENDER_WINDOW_WIDTH;
|
||||
extern const Info<int> MAIN_RENDER_WINDOW_HEIGHT;
|
||||
extern const Info<bool> MAIN_RENDER_WINDOW_AUTOSIZE;
|
||||
extern const Info<bool> MAIN_KEEP_WINDOW_ON_TOP;
|
||||
extern const Info<bool> MAIN_DISABLE_SCREENSAVER;
|
||||
|
||||
// Main.General
|
||||
|
||||
extern const ConfigInfo<std::string> MAIN_DUMP_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_LOAD_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_RESOURCEPACK_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_FS_PATH;
|
||||
extern const ConfigInfo<std::string> MAIN_SD_PATH;
|
||||
extern const Info<std::string> MAIN_DUMP_PATH;
|
||||
extern const Info<std::string> MAIN_LOAD_PATH;
|
||||
extern const Info<std::string> MAIN_RESOURCEPACK_PATH;
|
||||
extern const Info<std::string> MAIN_FS_PATH;
|
||||
extern const Info<std::string> MAIN_SD_PATH;
|
||||
} // namespace Config
|
||||
|
|
|
@ -14,55 +14,49 @@ static constexpr u16 DEFAULT_LISTEN_PORT = 2626;
|
|||
|
||||
// Main.NetPlay
|
||||
|
||||
const ConfigInfo<std::string> NETPLAY_TRAVERSAL_SERVER{{System::Main, "NetPlay", "TraversalServer"},
|
||||
"stun.dolphin-emu.org"};
|
||||
const ConfigInfo<u16> NETPLAY_TRAVERSAL_PORT{{System::Main, "NetPlay", "TraversalPort"}, 6262};
|
||||
const ConfigInfo<std::string> NETPLAY_TRAVERSAL_CHOICE{{System::Main, "NetPlay", "TraversalChoice"},
|
||||
"direct"};
|
||||
const ConfigInfo<std::string> NETPLAY_INDEX_URL{{System::Main, "NetPlay", "IndexServer"},
|
||||
"https://lobby.dolphin-emu.org"};
|
||||
const Info<std::string> NETPLAY_TRAVERSAL_SERVER{{System::Main, "NetPlay", "TraversalServer"},
|
||||
"stun.dolphin-emu.org"};
|
||||
const Info<u16> NETPLAY_TRAVERSAL_PORT{{System::Main, "NetPlay", "TraversalPort"}, 6262};
|
||||
const Info<std::string> NETPLAY_TRAVERSAL_CHOICE{{System::Main, "NetPlay", "TraversalChoice"},
|
||||
"direct"};
|
||||
const Info<std::string> NETPLAY_INDEX_URL{{System::Main, "NetPlay", "IndexServer"},
|
||||
"https://lobby.dolphin-emu.org"};
|
||||
|
||||
const ConfigInfo<bool> NETPLAY_USE_INDEX{{System::Main, "NetPlay", "UseIndex"}, false};
|
||||
const ConfigInfo<std::string> NETPLAY_INDEX_NAME{{System::Main, "NetPlay", "IndexName"}, ""};
|
||||
const ConfigInfo<std::string> NETPLAY_INDEX_REGION{{System::Main, "NetPlay", "IndexRegion"}, ""};
|
||||
const ConfigInfo<std::string> NETPLAY_INDEX_PASSWORD{{System::Main, "NetPlay", "IndexPassword"},
|
||||
""};
|
||||
const Info<bool> NETPLAY_USE_INDEX{{System::Main, "NetPlay", "UseIndex"}, false};
|
||||
const Info<std::string> NETPLAY_INDEX_NAME{{System::Main, "NetPlay", "IndexName"}, ""};
|
||||
const Info<std::string> NETPLAY_INDEX_REGION{{System::Main, "NetPlay", "IndexRegion"}, ""};
|
||||
const Info<std::string> NETPLAY_INDEX_PASSWORD{{System::Main, "NetPlay", "IndexPassword"}, ""};
|
||||
|
||||
const ConfigInfo<std::string> NETPLAY_HOST_CODE{{System::Main, "NetPlay", "HostCode"}, "00000000"};
|
||||
const Info<std::string> NETPLAY_HOST_CODE{{System::Main, "NetPlay", "HostCode"}, "00000000"};
|
||||
|
||||
const ConfigInfo<u16> NETPLAY_HOST_PORT{{System::Main, "NetPlay", "HostPort"}, DEFAULT_LISTEN_PORT};
|
||||
const ConfigInfo<std::string> NETPLAY_ADDRESS{{System::Main, "NetPlay", "Address"}, "127.0.0.1"};
|
||||
const ConfigInfo<u16> NETPLAY_CONNECT_PORT{{System::Main, "NetPlay", "ConnectPort"},
|
||||
DEFAULT_LISTEN_PORT};
|
||||
const ConfigInfo<u16> NETPLAY_LISTEN_PORT{{System::Main, "NetPlay", "ListenPort"},
|
||||
DEFAULT_LISTEN_PORT};
|
||||
const Info<u16> NETPLAY_HOST_PORT{{System::Main, "NetPlay", "HostPort"}, DEFAULT_LISTEN_PORT};
|
||||
const Info<std::string> NETPLAY_ADDRESS{{System::Main, "NetPlay", "Address"}, "127.0.0.1"};
|
||||
const Info<u16> NETPLAY_CONNECT_PORT{{System::Main, "NetPlay", "ConnectPort"}, DEFAULT_LISTEN_PORT};
|
||||
const Info<u16> NETPLAY_LISTEN_PORT{{System::Main, "NetPlay", "ListenPort"}, DEFAULT_LISTEN_PORT};
|
||||
|
||||
const ConfigInfo<std::string> NETPLAY_NICKNAME{{System::Main, "NetPlay", "Nickname"}, "Player"};
|
||||
const ConfigInfo<bool> NETPLAY_USE_UPNP{{System::Main, "NetPlay", "UseUPNP"}, false};
|
||||
const Info<std::string> NETPLAY_NICKNAME{{System::Main, "NetPlay", "Nickname"}, "Player"};
|
||||
const Info<bool> NETPLAY_USE_UPNP{{System::Main, "NetPlay", "UseUPNP"}, false};
|
||||
|
||||
const ConfigInfo<bool> NETPLAY_ENABLE_QOS{{System::Main, "NetPlay", "EnableQoS"}, true};
|
||||
const Info<bool> NETPLAY_ENABLE_QOS{{System::Main, "NetPlay", "EnableQoS"}, true};
|
||||
|
||||
const ConfigInfo<bool> NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT{
|
||||
const Info<bool> NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT{
|
||||
{System::Main, "NetPlay", "EnableChunkedUploadLimit"}, false};
|
||||
const ConfigInfo<u32> NETPLAY_CHUNKED_UPLOAD_LIMIT{{System::Main, "NetPlay", "ChunkedUploadLimit"},
|
||||
3000};
|
||||
const Info<u32> NETPLAY_CHUNKED_UPLOAD_LIMIT{{System::Main, "NetPlay", "ChunkedUploadLimit"}, 3000};
|
||||
|
||||
const ConfigInfo<u32> NETPLAY_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSize"}, 5};
|
||||
const ConfigInfo<u32> NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1};
|
||||
const Info<u32> NETPLAY_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSize"}, 5};
|
||||
const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1};
|
||||
|
||||
const ConfigInfo<bool> NETPLAY_WRITE_SAVE_SDCARD_DATA{
|
||||
{System::Main, "NetPlay", "WriteSaveSDCardData"}, false};
|
||||
const ConfigInfo<bool> NETPLAY_LOAD_WII_SAVE{{System::Main, "NetPlay", "LoadWiiSave"}, false};
|
||||
const ConfigInfo<bool> NETPLAY_SYNC_SAVES{{System::Main, "NetPlay", "SyncSaves"}, true};
|
||||
const ConfigInfo<bool> NETPLAY_SYNC_CODES{{System::Main, "NetPlay", "SyncCodes"}, true};
|
||||
const ConfigInfo<bool> NETPLAY_RECORD_INPUTS{{System::Main, "NetPlay", "RecordInputs"}, false};
|
||||
const ConfigInfo<bool> NETPLAY_STRICT_SETTINGS_SYNC{{System::Main, "NetPlay", "StrictSettingsSync"},
|
||||
false};
|
||||
const ConfigInfo<std::string> NETPLAY_NETWORK_MODE{{System::Main, "NetPlay", "NetworkMode"},
|
||||
"fixeddelay"};
|
||||
const ConfigInfo<bool> NETPLAY_SYNC_ALL_WII_SAVES{{System::Main, "NetPlay", "SyncAllWiiSaves"},
|
||||
false};
|
||||
const ConfigInfo<bool> NETPLAY_GOLF_MODE_OVERLAY{{System::Main, "NetPlay", "GolfModeOverlay"},
|
||||
true};
|
||||
const Info<bool> NETPLAY_WRITE_SAVE_SDCARD_DATA{{System::Main, "NetPlay", "WriteSaveSDCardData"},
|
||||
false};
|
||||
const Info<bool> NETPLAY_LOAD_WII_SAVE{{System::Main, "NetPlay", "LoadWiiSave"}, false};
|
||||
const Info<bool> NETPLAY_SYNC_SAVES{{System::Main, "NetPlay", "SyncSaves"}, true};
|
||||
const Info<bool> NETPLAY_SYNC_CODES{{System::Main, "NetPlay", "SyncCodes"}, true};
|
||||
const Info<bool> NETPLAY_RECORD_INPUTS{{System::Main, "NetPlay", "RecordInputs"}, false};
|
||||
const Info<bool> NETPLAY_STRICT_SETTINGS_SYNC{{System::Main, "NetPlay", "StrictSettingsSync"},
|
||||
false};
|
||||
const Info<std::string> NETPLAY_NETWORK_MODE{{System::Main, "NetPlay", "NetworkMode"},
|
||||
"fixeddelay"};
|
||||
const Info<bool> NETPLAY_SYNC_ALL_WII_SAVES{{System::Main, "NetPlay", "SyncAllWiiSaves"}, false};
|
||||
const Info<bool> NETPLAY_GOLF_MODE_OVERLAY{{System::Main, "NetPlay", "GolfModeOverlay"}, true};
|
||||
|
||||
} // namespace Config
|
||||
|
|
|
@ -15,41 +15,41 @@ namespace Config
|
|||
|
||||
// Main.NetPlay
|
||||
|
||||
extern const ConfigInfo<std::string> NETPLAY_TRAVERSAL_SERVER;
|
||||
extern const ConfigInfo<u16> NETPLAY_TRAVERSAL_PORT;
|
||||
extern const ConfigInfo<std::string> NETPLAY_TRAVERSAL_CHOICE;
|
||||
extern const ConfigInfo<std::string> NETPLAY_HOST_CODE;
|
||||
extern const ConfigInfo<std::string> NETPLAY_INDEX_URL;
|
||||
extern const Info<std::string> NETPLAY_TRAVERSAL_SERVER;
|
||||
extern const Info<u16> NETPLAY_TRAVERSAL_PORT;
|
||||
extern const Info<std::string> NETPLAY_TRAVERSAL_CHOICE;
|
||||
extern const Info<std::string> NETPLAY_HOST_CODE;
|
||||
extern const Info<std::string> NETPLAY_INDEX_URL;
|
||||
|
||||
extern const ConfigInfo<u16> NETPLAY_HOST_PORT;
|
||||
extern const ConfigInfo<std::string> NETPLAY_ADDRESS;
|
||||
extern const ConfigInfo<u16> NETPLAY_CONNECT_PORT;
|
||||
extern const ConfigInfo<u16> NETPLAY_LISTEN_PORT;
|
||||
extern const Info<u16> NETPLAY_HOST_PORT;
|
||||
extern const Info<std::string> NETPLAY_ADDRESS;
|
||||
extern const Info<u16> NETPLAY_CONNECT_PORT;
|
||||
extern const Info<u16> NETPLAY_LISTEN_PORT;
|
||||
|
||||
extern const ConfigInfo<std::string> NETPLAY_NICKNAME;
|
||||
extern const ConfigInfo<bool> NETPLAY_USE_UPNP;
|
||||
extern const Info<std::string> NETPLAY_NICKNAME;
|
||||
extern const Info<bool> NETPLAY_USE_UPNP;
|
||||
|
||||
extern const ConfigInfo<bool> NETPLAY_ENABLE_QOS;
|
||||
extern const Info<bool> NETPLAY_ENABLE_QOS;
|
||||
|
||||
extern const ConfigInfo<bool> NETPLAY_USE_INDEX;
|
||||
extern const ConfigInfo<std::string> NETPLAY_INDEX_REGION;
|
||||
extern const ConfigInfo<std::string> NETPLAY_INDEX_NAME;
|
||||
extern const ConfigInfo<std::string> NETPLAY_INDEX_PASSWORD;
|
||||
extern const Info<bool> NETPLAY_USE_INDEX;
|
||||
extern const Info<std::string> NETPLAY_INDEX_REGION;
|
||||
extern const Info<std::string> NETPLAY_INDEX_NAME;
|
||||
extern const Info<std::string> NETPLAY_INDEX_PASSWORD;
|
||||
|
||||
extern const ConfigInfo<bool> NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT;
|
||||
extern const ConfigInfo<u32> NETPLAY_CHUNKED_UPLOAD_LIMIT;
|
||||
extern const Info<bool> NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT;
|
||||
extern const Info<u32> NETPLAY_CHUNKED_UPLOAD_LIMIT;
|
||||
|
||||
extern const ConfigInfo<u32> NETPLAY_BUFFER_SIZE;
|
||||
extern const ConfigInfo<u32> NETPLAY_CLIENT_BUFFER_SIZE;
|
||||
extern const Info<u32> NETPLAY_BUFFER_SIZE;
|
||||
extern const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE;
|
||||
|
||||
extern const ConfigInfo<bool> NETPLAY_WRITE_SAVE_SDCARD_DATA;
|
||||
extern const ConfigInfo<bool> NETPLAY_LOAD_WII_SAVE;
|
||||
extern const ConfigInfo<bool> NETPLAY_SYNC_SAVES;
|
||||
extern const ConfigInfo<bool> NETPLAY_SYNC_CODES;
|
||||
extern const ConfigInfo<bool> NETPLAY_RECORD_INPUTS;
|
||||
extern const ConfigInfo<bool> NETPLAY_STRICT_SETTINGS_SYNC;
|
||||
extern const ConfigInfo<std::string> NETPLAY_NETWORK_MODE;
|
||||
extern const ConfigInfo<bool> NETPLAY_SYNC_ALL_WII_SAVES;
|
||||
extern const ConfigInfo<bool> NETPLAY_GOLF_MODE_OVERLAY;
|
||||
extern const Info<bool> NETPLAY_WRITE_SAVE_SDCARD_DATA;
|
||||
extern const Info<bool> NETPLAY_LOAD_WII_SAVE;
|
||||
extern const Info<bool> NETPLAY_SYNC_SAVES;
|
||||
extern const Info<bool> NETPLAY_SYNC_CODES;
|
||||
extern const Info<bool> NETPLAY_RECORD_INPUTS;
|
||||
extern const Info<bool> NETPLAY_STRICT_SETTINGS_SYNC;
|
||||
extern const Info<std::string> NETPLAY_NETWORK_MODE;
|
||||
extern const Info<bool> NETPLAY_SYNC_ALL_WII_SAVES;
|
||||
extern const Info<bool> NETPLAY_GOLF_MODE_OVERLAY;
|
||||
|
||||
} // namespace Config
|
||||
|
|
|
@ -8,19 +8,19 @@ namespace Config
|
|||
{
|
||||
// SYSCONF.IPL
|
||||
|
||||
const ConfigInfo<bool> SYSCONF_SCREENSAVER{{System::SYSCONF, "IPL", "SSV"}, false};
|
||||
const ConfigInfo<u32> SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, 0x01};
|
||||
const ConfigInfo<u32> SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c};
|
||||
const ConfigInfo<bool> SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true};
|
||||
const ConfigInfo<bool> SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true};
|
||||
const ConfigInfo<bool> SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01};
|
||||
const Info<bool> SYSCONF_SCREENSAVER{{System::SYSCONF, "IPL", "SSV"}, false};
|
||||
const Info<u32> SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, 0x01};
|
||||
const Info<u32> SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c};
|
||||
const Info<bool> SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true};
|
||||
const Info<bool> SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true};
|
||||
const Info<bool> SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01};
|
||||
|
||||
// SYSCONF.BT
|
||||
|
||||
const ConfigInfo<u32> SYSCONF_SENSOR_BAR_POSITION{{System::SYSCONF, "BT", "BAR"}, 0x01};
|
||||
const ConfigInfo<u32> SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, 0x03};
|
||||
const ConfigInfo<u32> SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58};
|
||||
const ConfigInfo<bool> SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true};
|
||||
const Info<u32> SYSCONF_SENSOR_BAR_POSITION{{System::SYSCONF, "BT", "BAR"}, 0x01};
|
||||
const Info<u32> SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, 0x03};
|
||||
const Info<u32> SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58};
|
||||
const Info<bool> SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true};
|
||||
|
||||
const std::array<SYSCONFSetting, 10> SYSCONF_SETTINGS{
|
||||
{{SYSCONF_SCREENSAVER, SysConf::Entry::Type::Byte},
|
||||
|
|
|
@ -16,23 +16,23 @@ namespace Config
|
|||
|
||||
// SYSCONF.IPL
|
||||
|
||||
extern const ConfigInfo<bool> SYSCONF_SCREENSAVER;
|
||||
extern const ConfigInfo<u32> SYSCONF_LANGUAGE;
|
||||
extern const ConfigInfo<u32> SYSCONF_COUNTRY;
|
||||
extern const ConfigInfo<bool> SYSCONF_WIDESCREEN;
|
||||
extern const ConfigInfo<bool> SYSCONF_PROGRESSIVE_SCAN;
|
||||
extern const ConfigInfo<bool> SYSCONF_PAL60;
|
||||
extern const Info<bool> SYSCONF_SCREENSAVER;
|
||||
extern const Info<u32> SYSCONF_LANGUAGE;
|
||||
extern const Info<u32> SYSCONF_COUNTRY;
|
||||
extern const Info<bool> SYSCONF_WIDESCREEN;
|
||||
extern const Info<bool> SYSCONF_PROGRESSIVE_SCAN;
|
||||
extern const Info<bool> SYSCONF_PAL60;
|
||||
|
||||
// SYSCONF.BT
|
||||
|
||||
extern const ConfigInfo<u32> SYSCONF_SENSOR_BAR_POSITION;
|
||||
extern const ConfigInfo<u32> SYSCONF_SENSOR_BAR_SENSITIVITY;
|
||||
extern const ConfigInfo<u32> SYSCONF_SPEAKER_VOLUME;
|
||||
extern const ConfigInfo<bool> SYSCONF_WIIMOTE_MOTOR;
|
||||
extern const Info<u32> SYSCONF_SENSOR_BAR_POSITION;
|
||||
extern const Info<u32> SYSCONF_SENSOR_BAR_SENSITIVITY;
|
||||
extern const Info<u32> SYSCONF_SPEAKER_VOLUME;
|
||||
extern const Info<bool> SYSCONF_WIIMOTE_MOTOR;
|
||||
|
||||
struct SYSCONFSetting
|
||||
{
|
||||
std::variant<ConfigInfo<u32>, ConfigInfo<bool>> config_info;
|
||||
std::variant<Info<u32>, Info<bool>> config_info;
|
||||
SysConf::Entry::Type type;
|
||||
};
|
||||
|
||||
|
|
|
@ -8,10 +8,9 @@ namespace Config
|
|||
{
|
||||
// UI.General
|
||||
|
||||
const ConfigInfo<bool> MAIN_USE_DISCORD_PRESENCE{{System::Main, "General", "UseDiscordPresence"},
|
||||
true};
|
||||
const ConfigInfo<bool> MAIN_USE_GAME_COVERS{{System::Main, "General", "UseGameCovers"}, false};
|
||||
const Info<bool> MAIN_USE_DISCORD_PRESENCE{{System::Main, "General", "UseDiscordPresence"}, true};
|
||||
const Info<bool> MAIN_USE_GAME_COVERS{{System::Main, "General", "UseGameCovers"}, false};
|
||||
|
||||
const ConfigInfo<bool> MAIN_FOCUSED_HOTKEYS{{System::Main, "General", "HotkeysRequireFocus"}, true};
|
||||
const Info<bool> MAIN_FOCUSED_HOTKEYS{{System::Main, "General", "HotkeysRequireFocus"}, true};
|
||||
|
||||
} // namespace Config
|
||||
|
|
|
@ -16,8 +16,8 @@ namespace Config
|
|||
|
||||
// UI.General
|
||||
|
||||
extern const ConfigInfo<bool> MAIN_USE_DISCORD_PRESENCE;
|
||||
extern const ConfigInfo<bool> MAIN_USE_GAME_COVERS;
|
||||
extern const ConfigInfo<bool> MAIN_FOCUSED_HOTKEYS;
|
||||
extern const Info<bool> MAIN_USE_DISCORD_PRESENCE;
|
||||
extern const Info<bool> MAIN_USE_GAME_COVERS;
|
||||
extern const Info<bool> MAIN_FOCUSED_HOTKEYS;
|
||||
|
||||
} // namespace Config
|
||||
|
|
|
@ -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<std::string>& value = config.second;
|
||||
|
||||
// Done by SaveToSYSCONF
|
||||
|
|
|
@ -59,11 +59,11 @@ std::vector<std::string> GetGameIniFilenames(const std::string& id, std::optiona
|
|||
return filenames;
|
||||
}
|
||||
|
||||
using ConfigLocation = Config::ConfigLocation;
|
||||
using INIToLocationMap = std::map<std::pair<std::string, std::string>, ConfigLocation>;
|
||||
using Location = Config::Location;
|
||||
using INIToLocationMap = std::map<std::pair<std::string, std::string>, Location>;
|
||||
using INIToSectionMap = std::map<std::string, std::pair<Config::System, std::string>>;
|
||||
|
||||
// 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<std::string, std::string> GetINILocationFromConfig(const ConfigLocation& location)
|
||||
static std::pair<std::string, std::string> 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<std::string>& value = config.second;
|
||||
|
||||
if (!IsSettingSaveable(location))
|
||||
|
|
|
@ -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<const Config::ConfigLocation*, 96> s_setting_saveable = {
|
||||
static constexpr std::array<const Config::Location*, 96> 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;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
#include <QFont>
|
||||
|
||||
GraphicsBool::GraphicsBool(const QString& label, const Config::ConfigInfo<bool>& setting,
|
||||
bool reverse)
|
||||
GraphicsBool::GraphicsBool(const QString& label, const Config::Info<bool>& 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<bool>(isChecked() ^ m_reverse));
|
||||
}
|
||||
|
||||
GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::ConfigInfo<bool>& setting,
|
||||
GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::Info<bool>& setting,
|
||||
bool reverse)
|
||||
: QRadioButton(label), m_setting(setting), m_reverse(reverse)
|
||||
{
|
||||
|
|
|
@ -10,19 +10,19 @@
|
|||
namespace Config
|
||||
{
|
||||
template <typename T>
|
||||
struct ConfigInfo;
|
||||
struct Info;
|
||||
}
|
||||
|
||||
class GraphicsBool : public QCheckBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsBool(const QString& label, const Config::ConfigInfo<bool>& setting, bool reverse = false);
|
||||
GraphicsBool(const QString& label, const Config::Info<bool>& setting, bool reverse = false);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
const Config::ConfigInfo<bool>& m_setting;
|
||||
const Config::Info<bool>& m_setting;
|
||||
bool m_reverse;
|
||||
};
|
||||
|
||||
|
@ -30,12 +30,11 @@ class GraphicsBoolEx : public QRadioButton
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsBoolEx(const QString& label, const Config::ConfigInfo<bool>& setting,
|
||||
bool reverse = false);
|
||||
GraphicsBoolEx(const QString& label, const Config::Info<bool>& setting, bool reverse = false);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
const Config::ConfigInfo<bool>& m_setting;
|
||||
const Config::Info<bool>& m_setting;
|
||||
bool m_reverse;
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigInfo<int>& setting)
|
||||
GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::Info<int>& setting)
|
||||
: m_setting(setting)
|
||||
{
|
||||
addItems(options);
|
||||
|
|
|
@ -12,10 +12,10 @@ class GraphicsChoice : public QComboBox
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsChoice(const QStringList& options, const Config::ConfigInfo<int>& setting);
|
||||
GraphicsChoice(const QStringList& options, const Config::Info<int>& setting);
|
||||
|
||||
private:
|
||||
void Update(int choice);
|
||||
|
||||
Config::ConfigInfo<int> m_setting;
|
||||
Config::Info<int> m_setting;
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::ConfigInfo<int>& setting,
|
||||
GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info<int>& setting,
|
||||
int step)
|
||||
: QSpinBox(), m_setting(setting)
|
||||
{
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
namespace Config
|
||||
{
|
||||
template <typename T>
|
||||
struct ConfigInfo;
|
||||
struct Info;
|
||||
}
|
||||
|
||||
class GraphicsInteger : public QSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsInteger(int minimum, int maximum, const Config::ConfigInfo<int>& setting, int step = 1);
|
||||
GraphicsInteger(int minimum, int maximum, const Config::Info<int>& setting, int step = 1);
|
||||
void Update(int value);
|
||||
|
||||
private:
|
||||
const Config::ConfigInfo<int>& m_setting;
|
||||
const Config::Info<int>& m_setting;
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInfo<int>& setting,
|
||||
GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::Info<int>& setting,
|
||||
int value)
|
||||
: QRadioButton(label), m_setting(setting), m_value(value)
|
||||
{
|
||||
|
|
|
@ -12,11 +12,11 @@ class GraphicsRadioInt : public QRadioButton
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsRadioInt(const QString& label, const Config::ConfigInfo<int>& setting, int value);
|
||||
GraphicsRadioInt(const QString& label, const Config::Info<int>& setting, int value);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
Config::ConfigInfo<int> m_setting;
|
||||
Config::Info<int> m_setting;
|
||||
int m_value;
|
||||
};
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::ConfigInfo<int>& setting,
|
||||
int tick)
|
||||
GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick)
|
||||
: QSlider(Qt::Horizontal), m_setting(setting)
|
||||
{
|
||||
setMinimum(minimum);
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
namespace Config
|
||||
{
|
||||
template <typename T>
|
||||
struct ConfigInfo;
|
||||
struct Info;
|
||||
}
|
||||
|
||||
class GraphicsSlider : public QSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsSlider(int minimum, int maximum, const Config::ConfigInfo<int>& setting, int tick = 0);
|
||||
GraphicsSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick = 0);
|
||||
void Update(int value);
|
||||
|
||||
private:
|
||||
const Config::ConfigInfo<int>& m_setting;
|
||||
const Config::Info<int>& m_setting;
|
||||
};
|
||||
|
|
|
@ -31,12 +31,12 @@ namespace Settings
|
|||
constexpr char DEFAULT_SERVER_ADDRESS[] = "127.0.0.1";
|
||||
constexpr u16 DEFAULT_SERVER_PORT = 26760;
|
||||
|
||||
const Config::ConfigInfo<bool> SERVER_ENABLED{
|
||||
{Config::System::DualShockUDPClient, "Server", "Enabled"}, false};
|
||||
const Config::ConfigInfo<std::string> SERVER_ADDRESS{
|
||||
const Config::Info<bool> SERVER_ENABLED{{Config::System::DualShockUDPClient, "Server", "Enabled"},
|
||||
false};
|
||||
const Config::Info<std::string> SERVER_ADDRESS{
|
||||
{Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS};
|
||||
const Config::ConfigInfo<int> SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"},
|
||||
DEFAULT_SERVER_PORT};
|
||||
const Config::Info<int> SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"},
|
||||
DEFAULT_SERVER_PORT};
|
||||
} // namespace Settings
|
||||
|
||||
// Clock type used for querying timeframes
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace ciface::DualShockUDPClient
|
|||
{
|
||||
namespace Settings
|
||||
{
|
||||
extern const Config::ConfigInfo<bool> SERVER_ENABLED;
|
||||
extern const Config::ConfigInfo<std::string> SERVER_ADDRESS;
|
||||
extern const Config::ConfigInfo<int> SERVER_PORT;
|
||||
extern const Config::Info<bool> SERVER_ENABLED;
|
||||
extern const Config::Info<std::string> SERVER_ADDRESS;
|
||||
extern const Config::Info<int> SERVER_PORT;
|
||||
} // namespace Settings
|
||||
|
||||
void Init();
|
||||
|
|
|
@ -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<std::tuple<Config::ConfigLocation, std::string>> m_values;
|
||||
std::list<std::tuple<Config::Location, std::string>> m_values;
|
||||
};
|
||||
|
||||
std::unique_ptr<optparse::OptionParser> CreateParser(ParserOptions options)
|
||||
|
|
Loading…
Reference in New Issue