mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 23:11:18 +12:00
Logging: Refactor and optimizations
This commit is contained in:
parent
fda5ec2697
commit
b902aa2048
15 changed files with 263 additions and 266 deletions
|
@ -69,12 +69,12 @@ private:
|
|||
inline static fs::path s_executable_filename; // cemu.exe
|
||||
inline static fs::path s_mlc_path;
|
||||
|
||||
public:
|
||||
public:
|
||||
// general
|
||||
[[nodiscard]] static bool LoadSharedLibrariesEnabled();
|
||||
[[nodiscard]] static bool DisplayDRCEnabled();
|
||||
[[nodiscard]] static bool FullscreenEnabled();
|
||||
|
||||
|
||||
// cpu
|
||||
[[nodiscard]] static CPUMode GetCPUMode();
|
||||
[[nodiscard]] static uint8 GetTimerShiftFactor();
|
||||
|
|
|
@ -43,6 +43,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
|
|||
|
||||
// general settings
|
||||
log_flag = parser.get("logflag", log_flag.GetInitValue());
|
||||
cemuLog_setActiveLoggingFlags(GetConfig().log_flag.GetValue());
|
||||
advanced_ppc_logging = parser.get("advanced_ppc_logging", advanced_ppc_logging.GetInitValue());
|
||||
|
||||
const char* mlc = parser.get("mlc_path", "");
|
||||
|
@ -53,7 +54,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
|
|||
language = parser.get<sint32>("language", wxLANGUAGE_DEFAULT);
|
||||
use_discord_presence = parser.get("use_discord_presence", true);
|
||||
fullscreen_menubar = parser.get("fullscreen_menubar", false);
|
||||
feral_gamemode = parser.get("feral_gamemode", false);
|
||||
feral_gamemode = parser.get("feral_gamemode", false);
|
||||
check_update = parser.get("check_update", check_update);
|
||||
save_screenshot = parser.get("save_screenshot", save_screenshot);
|
||||
did_show_vulkan_warning = parser.get("vk_warning", did_show_vulkan_warning);
|
||||
|
@ -62,9 +63,6 @@ void CemuConfig::Load(XMLConfigParser& parser)
|
|||
fullscreen = parser.get("fullscreen", fullscreen);
|
||||
proxy_server = parser.get("proxy_server", "");
|
||||
disable_screensaver = parser.get("disable_screensaver", disable_screensaver);
|
||||
|
||||
// cpu_mode = parser.get("cpu_mode", cpu_mode.GetInitValue());
|
||||
//console_region = parser.get("console_region", console_region.GetInitValue());
|
||||
console_language = parser.get("console_language", console_language.GetInitValue());
|
||||
|
||||
window_position.x = parser.get("window_position").get("x", -1);
|
||||
|
|
|
@ -353,7 +353,6 @@ struct CemuConfig
|
|||
};
|
||||
|
||||
CemuConfig(const CemuConfig&) = delete;
|
||||
//
|
||||
|
||||
// sets mlc path, updates permanent config value, saves config
|
||||
void SetMLCPath(fs::path path, bool save = true);
|
||||
|
@ -365,10 +364,10 @@ struct CemuConfig
|
|||
|
||||
ConfigValue<sint32> language{ wxLANGUAGE_DEFAULT };
|
||||
ConfigValue<bool> use_discord_presence{ true };
|
||||
ConfigValue<std::string> mlc_path {};
|
||||
ConfigValue<std::string> mlc_path{};
|
||||
ConfigValue<bool> fullscreen_menubar{ false };
|
||||
ConfigValue<bool> fullscreen{ false };
|
||||
ConfigValue<bool> feral_gamemode{false};
|
||||
ConfigValue<bool> feral_gamemode{false};
|
||||
ConfigValue<std::string> proxy_server{};
|
||||
|
||||
// temporary workaround because feature crashes on macOS
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]] TType GetValue() const { return m_value.load(); }
|
||||
[[nodiscard]] inline TType GetValue() const { return m_value.load(); }
|
||||
void SetValue(const TType& v) { m_value = v; }
|
||||
|
||||
[[nodiscard]] const TType& GetInitValue() const { return m_init_value; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue