mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 03:24:49 +00:00
Cleanup + initial code to set custom names for different players
This commit is contained in:
parent
edf14ac019
commit
aa288d9141
3 changed files with 6 additions and 23 deletions
|
@ -42,7 +42,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 = "sync";
|
||||
static std::string userName = "shadPS4";
|
||||
static std::array<std::string, 4> userNames = {"shadPS4" "shadps4-2", "shadPS4-3", "shadPS4-4"};
|
||||
static std::string updateChannel;
|
||||
static std::string chooseHomeTab;
|
||||
static std::string backButtonBehavior = "left";
|
||||
|
@ -75,7 +75,6 @@ static double trophyNotificationDuration = 6.0;
|
|||
static bool useUnifiedInputConfig = true;
|
||||
static bool overrideControllerColor = false;
|
||||
static int controllerCustomColorRGB[3] = {0, 0, 255};
|
||||
static int numberOfPlayers = 1;
|
||||
static bool separateupdatefolder = false;
|
||||
static bool compatibilityData = false;
|
||||
static bool checkCompatibilityOnStartup = false;
|
||||
|
@ -112,14 +111,6 @@ static bool showLabelsUnderIcons = true;
|
|||
// Language
|
||||
u32 m_language = 1; // english
|
||||
|
||||
void SetNumberOfPlayers(int num) {
|
||||
numberOfPlayers = num;
|
||||
}
|
||||
|
||||
int GetNumberOfPlayers() {
|
||||
return numberOfPlayers;
|
||||
}
|
||||
|
||||
bool allowHDR() {
|
||||
return isHDRAllowed;
|
||||
}
|
||||
|
@ -246,7 +237,7 @@ std::string getLogType() {
|
|||
}
|
||||
|
||||
std::string getUserName() {
|
||||
return userName;
|
||||
return userNames[0];
|
||||
}
|
||||
|
||||
std::string getUpdateChannel() {
|
||||
|
@ -496,7 +487,7 @@ void setSeparateLogFilesEnabled(bool enabled) {
|
|||
}
|
||||
|
||||
void setUserName(const std::string& type) {
|
||||
userName = type;
|
||||
userNames[0] = type;
|
||||
}
|
||||
|
||||
void setUpdateChannel(const std::string& type) {
|
||||
|
@ -772,7 +763,7 @@ void load(const std::filesystem::path& path) {
|
|||
enableDiscordRPC = toml::find_or<bool>(general, "enableDiscordRPC", true);
|
||||
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");
|
||||
userNames[0] = toml::find_or<std::string>(general, "userName", "shadPS4");
|
||||
if (Common::g_is_release) {
|
||||
updateChannel = toml::find_or<std::string>(general, "updateChannel", "Release");
|
||||
} else {
|
||||
|
@ -798,7 +789,6 @@ void load(const std::filesystem::path& path) {
|
|||
specialPadClass = toml::find_or<int>(input, "specialPadClass", 1);
|
||||
isMotionControlsEnabled = toml::find_or<bool>(input, "isMotionControlsEnabled", true);
|
||||
useUnifiedInputConfig = toml::find_or<bool>(input, "useUnifiedInputConfig", true);
|
||||
numberOfPlayers = toml::find_or<int>(input, "numberOfPlayers", 1);
|
||||
}
|
||||
|
||||
if (data.contains("GPU")) {
|
||||
|
@ -971,7 +961,7 @@ void save(const std::filesystem::path& path) {
|
|||
data["General"]["enableDiscordRPC"] = enableDiscordRPC;
|
||||
data["General"]["logFilter"] = logFilter;
|
||||
data["General"]["logType"] = logType;
|
||||
data["General"]["userName"] = userName;
|
||||
data["General"]["userName"] = userNames[0];
|
||||
data["General"]["updateChannel"] = updateChannel;
|
||||
data["General"]["chooseHomeTab"] = chooseHomeTab;
|
||||
data["General"]["showSplash"] = isShowSplash;
|
||||
|
@ -987,7 +977,6 @@ void save(const std::filesystem::path& path) {
|
|||
data["Input"]["specialPadClass"] = specialPadClass;
|
||||
data["Input"]["isMotionControlsEnabled"] = isMotionControlsEnabled;
|
||||
data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig;
|
||||
data["Input"]["numberOfPlayers"] = numberOfPlayers;
|
||||
data["GPU"]["screenWidth"] = screenWidth;
|
||||
data["GPU"]["screenHeight"] = screenHeight;
|
||||
data["GPU"]["nullGpu"] = isNullGpu;
|
||||
|
@ -1119,7 +1108,7 @@ void setDefaultValues() {
|
|||
screenHeight = 720;
|
||||
logFilter = "";
|
||||
logType = "sync";
|
||||
userName = "shadPS4";
|
||||
userNames = {"shadPS4", "shadps4-2", "shadPS4-3", "shadPS4-4"};
|
||||
if (Common::g_is_release) {
|
||||
updateChannel = "Release";
|
||||
} else {
|
||||
|
|
|
@ -20,8 +20,6 @@ void load(const std::filesystem::path& path);
|
|||
void save(const std::filesystem::path& path);
|
||||
void saveMainWindow(const std::filesystem::path& path);
|
||||
|
||||
void SetNumberOfPlayers(int num);
|
||||
int GetNumberOfPlayers();
|
||||
std::string getTrophyKey();
|
||||
void setTrophyKey(std::string key);
|
||||
bool GetLoadGameSizeEnabled();
|
||||
|
|
|
@ -145,10 +145,6 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameControllers* controller
|
|||
Input::ParseInputConfig(std::string(Common::ElfInfo::Instance().GameSerial()));
|
||||
// default login
|
||||
using namespace Libraries::UserService;
|
||||
// int player_count = Config::GetNumberOfPlayers();
|
||||
// for (int i = 0; i < player_count; i++) {
|
||||
// AddUserServiceEvent({OrbisUserServiceEventType::Login, i + 1});
|
||||
// }
|
||||
}
|
||||
|
||||
WindowSDL::~WindowSDL() = default;
|
||||
|
|
Loading…
Add table
Reference in a new issue