From 8d60671ec7b9a5cb218a79e23f57b0815f615c84 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 15 Feb 2026 12:05:34 +0200 Subject: [PATCH] fixed compile issues --- src/common/config.cpp | 14 -------------- src/common/config.h | 6 ------ src/common/logging/backend.cpp | 10 +++++----- src/emulator.cpp | 5 +++-- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/common/config.cpp b/src/common/config.cpp index 5b065d8ef..90f531c2c 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -158,17 +158,6 @@ static string config_version = Common::g_scm_rev; static bool overrideControllerColor = false; static int controllerCustomColorRGB[3] = {0, 0, 255}; -std::filesystem::path getFontsPath() { - if (fonts_path.empty()) { - return Common::FS::GetUserPath(Common::FS::PathType::FontsDir); - } - return fonts_path; -} - -void setFontsPath(const std::filesystem::path& path) { - fonts_path = path; -} - bool GetUseUnifiedInputConfig() { return useUnifiedInputConfig.get(); } @@ -242,7 +231,6 @@ void load(const std::filesystem::path& path, bool is_game_specific) { if (data.contains("General")) { const toml::value& general = data.at("General"); userNames.setFromToml(general, "userNames", is_game_specific); - fonts_path = toml::find_fs_path_or(general, "fontsPath", fonts_path); } if (data.contains("Input")) { @@ -324,8 +312,6 @@ void save(const std::filesystem::path& path, bool is_game_specific) { if (!is_game_specific) { // Non game-specific entries - data["General"]["fontsPath"] = string{fmt::UTF(fonts_path.u8string()).data}; - // Do not save these entries in the game-specific dialog since they are not in the GUI data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig.base_value; } diff --git a/src/common/config.h b/src/common/config.h index 8587c56e7..950826f6d 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -27,12 +27,6 @@ void save(const std::filesystem::path& path, bool is_game_specific = false); std::string getTrophyKey(); void setTrophyKey(std::string key); void setUserName(const std::string& name, bool is_game_specific = false); -std::filesystem::path getFontsPath(); -void setFontsPath(const std::filesystem::path& path); - -enum UsbBackendType : int { Real, SkylandersPortal, InfinityBase, DimensionsToypad }; -int getUsbDeviceBackend(); -void setUsbDeviceBackend(int value, bool is_game_specific = false); // TODO std::string getUserName(int id); diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 048f27314..e778704cd 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -215,7 +215,7 @@ public: using std::chrono::microseconds; using std::chrono::steady_clock; - if (Config::groupIdenticalLogs()) { + if (EmulatorSettings::GetInstance()->IsIdenticalLogGrouped()) { std::unique_lock entry_loc(_mutex); if (_last_entry.message == message) { @@ -228,7 +228,7 @@ public: } if (_last_entry.counter >= 1) { - if (Config::getLogType() == "async") { + if (EmulatorSettings::GetInstance()->GetLogType() == "async") { message_queue.EmplaceWait(_last_entry); } else { ForEachBackend([this](auto& backend) { backend.Write(this->_last_entry); }); @@ -260,7 +260,7 @@ public: .counter = 1, }; - if (Config::getLogType() == "async") { + if (EmulatorSettings::GetInstance()->GetLogType() == "async") { message_queue.EmplaceWait(entry); } else { ForEachBackend([&entry](auto& backend) { backend.Write(entry); }); @@ -298,14 +298,14 @@ private: } void StopBackendThread() { - if (Config::groupIdenticalLogs()) { + if (EmulatorSettings::GetInstance()->IsIdenticalLogGrouped()) { // log last message if (_last_entry.counter >= 2) { _last_entry.message += " x" + std::to_string(_last_entry.counter); } if (_last_entry.counter >= 1) { - if (Config::getLogType() == "async") { + if (EmulatorSettings::GetInstance()->GetLogType() == "async") { message_queue.EmplaceWait(_last_entry); } else { ForEachBackend([this](auto& backend) { backend.Write(this->_last_entry); }); diff --git a/src/emulator.cpp b/src/emulator.cpp index 341718ece..55e1b2f2f 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -240,7 +240,8 @@ void Emulator::Run(std::filesystem::path file, std::vector args, LOG_INFO(Config, "Game-specific config exists: {}", has_game_config); LOG_INFO(Config, "General LogType: {}", EmulatorSettings::GetInstance()->GetLogType()); - LOG_INFO(Config, "General isIdenticalLogGrouped: {}", Config::groupIdenticalLogs()); + LOG_INFO(Config, "General isIdenticalLogGrouped: {}", + EmulatorSettings::GetInstance()->IsIdenticalLogGrouped()); LOG_INFO(Config, "General isNeo: {}", EmulatorSettings::GetInstance()->IsNeo()); LOG_INFO(Config, "General isDevKit: {}", EmulatorSettings::GetInstance()->IsDevKit()); LOG_INFO(Config, "General isConnectedToNetwork: {}", @@ -390,7 +391,7 @@ void Emulator::Run(std::filesystem::path file, std::vector args, VideoCore::SetOutputDir(mount_captures_dir, id); // Mount system fonts - const auto& fonts_dir = Config::getFontsPath(); + const auto& fonts_dir = EmulatorSettings::GetInstance()->GetFontsDir(); if (!std::filesystem::exists(fonts_dir)) { std::filesystem::create_directory(fonts_dir); }