Ability to change username (#432)

This commit is contained in:
¥IGA 2024-08-15 11:33:10 +02:00 committed by GitHub
parent 9adc638220
commit 8c77d4dde6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 31 deletions

View file

@ -16,6 +16,7 @@ static u32 screenHeight = 720;
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
static std::string logFilter;
static std::string logType = "async";
static std::string userName = "shadPS4";
static bool isDebugDump = false;
static bool isLibc = true;
static bool isShowSplash = false;
@ -80,6 +81,10 @@ std::string getLogType() {
return logType;
}
std::string getUserName() {
return userName;
}
bool debugDump() {
return isDebugDump;
}
@ -313,6 +318,7 @@ void load(const std::filesystem::path& path) {
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
logFilter = toml::find_or<std::string>(general, "logFilter", "");
logType = toml::find_or<std::string>(general, "logType", "sync");
userName = toml::find_or<std::string>(general, "userName", "shadPS4");
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
}
@ -400,6 +406,7 @@ void save(const std::filesystem::path& path) {
data["General"]["Fullscreen"] = isFullscreen;
data["General"]["logFilter"] = logFilter;
data["General"]["logType"] = logType;
data["General"]["userName"] = userName;
data["General"]["showSplash"] = isShowSplash;
data["GPU"]["screenWidth"] = screenWidth;
data["GPU"]["screenHeight"] = screenHeight;