Replace Back Button Behaviour with a rebindable solution (#3114)

This commit is contained in:
kalaposfos13 2025-06-20 11:51:55 +02:00 committed by GitHub
parent 43321fb45a
commit e214ca6884
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 81 deletions

View file

@ -42,7 +42,6 @@ static std::string logFilter;
static std::string logType = "sync";
static std::string userName = "shadPS4";
static std::string chooseHomeTab;
static std::string backButtonBehavior = "left";
static bool useSpecialPad = false;
static int specialPadClass = 1;
static bool isMotionControlsEnabled = true;
@ -205,10 +204,6 @@ std::string getChooseHomeTab() {
return chooseHomeTab;
}
std::string getBackButtonBehavior() {
return backButtonBehavior;
}
bool getUseSpecialPad() {
return useSpecialPad;
}
@ -424,10 +419,6 @@ void setChooseHomeTab(const std::string& type) {
chooseHomeTab = type;
}
void setBackButtonBehavior(const std::string& type) {
backButtonBehavior = type;
}
void setUseSpecialPad(bool use) {
useSpecialPad = use;
}
@ -582,7 +573,6 @@ void load(const std::filesystem::path& path) {
cursorState = toml::find_or<int>(input, "cursorState", HideCursorState::Idle);
cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", 5);
backButtonBehavior = toml::find_or<std::string>(input, "backButtonBehavior", "left");
useSpecialPad = toml::find_or<bool>(input, "useSpecialPad", false);
specialPadClass = toml::find_or<int>(input, "specialPadClass", 1);
isMotionControlsEnabled = toml::find_or<bool>(input, "isMotionControlsEnabled", true);
@ -737,7 +727,6 @@ void save(const std::filesystem::path& path) {
data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup;
data["Input"]["cursorState"] = cursorState;
data["Input"]["cursorHideTimeout"] = cursorHideTimeout;
data["Input"]["backButtonBehavior"] = backButtonBehavior;
data["Input"]["useSpecialPad"] = useSpecialPad;
data["Input"]["specialPadClass"] = specialPadClass;
data["Input"]["isMotionControlsEnabled"] = isMotionControlsEnabled;
@ -828,7 +817,6 @@ void setDefaultValues() {
cursorState = HideCursorState::Idle;
cursorHideTimeout = 5;
trophyNotificationDuration = 6.0;
backButtonBehavior = "left";
useSpecialPad = false;
specialPadClass = 1;
isDebugDump = false;
@ -874,7 +862,7 @@ l3 = x
r3 = m
options = enter
touchpad = space
touchpad_center = space
pad_up = up
pad_down = down
@ -906,7 +894,7 @@ r2 = r2
r3 = r3
options = options
touchpad = back
touchpad_center = back
pad_up = pad_up
pad_down = pad_down