diff --git a/src/common/config.cpp b/src/common/config.cpp index 403b0e32f..45f9e1d19 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -44,6 +44,7 @@ static std::string logType = "async"; static std::string userName = "shadPS4"; static std::string updateChannel; static std::string backButtonBehavior = "left"; +static std::string widgetStyle = "Fusion"; static bool useSpecialPad = false; static int specialPadClass = 1; static bool isDebugDump = false; @@ -136,6 +137,10 @@ std::string getLogType() { return logType; } +std::string getWidgetStyle() { + return widgetStyle; +} + std::string getUserName() { return userName; } @@ -320,6 +325,10 @@ void setLogFilter(const std::string& type) { logFilter = type; } +void setWidgetStyle(const std::string &type) { + widgetStyle = type; +} + void setUserName(const std::string& type) { userName = type; } @@ -614,6 +623,7 @@ void load(const std::filesystem::path& path) { m_recent_files = toml::find_or>(gui, "recentFiles", {}); m_table_mode = toml::find_or(gui, "gameTableMode", 0); emulator_language = toml::find_or(gui, "emulatorLanguage", "en"); + widgetStyle = toml::find_or(gui, "widgetStyle", "System"); } if (data.contains("Settings")) { @@ -687,6 +697,7 @@ void save(const std::filesystem::path& path) { data["GUI"]["addonInstallDir"] = std::string{fmt::UTF(settings_addon_install_dir.u8string()).data}; data["GUI"]["emulatorLanguage"] = emulator_language; + data["GUI"]["widgetStyle"] = widgetStyle; data["Settings"]["consoleLanguage"] = m_language; std::ofstream file(path, std::ios::binary); @@ -747,6 +758,7 @@ void setDefaultValues() { screenHeight = 720; logFilter = ""; logType = "async"; + widgetStyle = "Fusion"; userName = "shadPS4"; if (Common::isRelease) { updateChannel = "Release"; diff --git a/src/common/config.h b/src/common/config.h index ff3b3703f..0b2cae6ee 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -24,6 +24,7 @@ bool getSeparateUpdateEnabled(); std::string getLogFilter(); std::string getLogType(); +std::string getWidgetStyle(); std::string getUserName(); std::string getUpdateChannel(); @@ -78,6 +79,7 @@ void setSpecialPadClass(int type); void setLogType(const std::string& type); void setLogFilter(const std::string& type); +void setWidgetStyle(const std::string& type); void setVkValidation(bool enable); void setVkSyncValidation(bool enable);