mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Qt: Add FSR options to settings GUI (#3504)
* Qt: Add FSR settings to settings GUI * Move FSR settings from Imgui.ini to main config * move passing fsr settings to presenter constuctor * cleanup: use struct instead of function call * cleanup: make variable names consistent with others * Update fsr settings real-time in qt, save button in Imgui * Linux build fix, missing running game check * syntax fix * Change gamerunning checks to if (presenter)
This commit is contained in:
@@ -81,6 +81,9 @@ static bool isFullscreen = false;
|
||||
static std::string fullscreenMode = "Windowed";
|
||||
static std::string presentMode = "Mailbox";
|
||||
static bool isHDRAllowed = false;
|
||||
static bool fsrEnabled = true;
|
||||
static bool rcasEnabled = true;
|
||||
static int rcasAttenuation = 250;
|
||||
|
||||
// Vulkan
|
||||
static s32 gpuId = -1;
|
||||
@@ -652,6 +655,30 @@ void setBackgroundControllerInput(bool enable) {
|
||||
backgroundControllerInput = enable;
|
||||
}
|
||||
|
||||
bool getFsrEnabled() {
|
||||
return fsrEnabled;
|
||||
}
|
||||
|
||||
void setFsrEnabled(bool enable) {
|
||||
fsrEnabled = enable;
|
||||
}
|
||||
|
||||
bool getRcasEnabled() {
|
||||
return rcasEnabled;
|
||||
}
|
||||
|
||||
void setRcasEnabled(bool enable) {
|
||||
rcasEnabled = enable;
|
||||
}
|
||||
|
||||
int getRcasAttenuation() {
|
||||
return rcasAttenuation;
|
||||
}
|
||||
|
||||
void setRcasAttenuation(int value) {
|
||||
rcasAttenuation = value;
|
||||
}
|
||||
|
||||
void load(const std::filesystem::path& path) {
|
||||
// If the configuration file does not exist, create it and return
|
||||
std::error_code error;
|
||||
@@ -737,6 +764,9 @@ void load(const std::filesystem::path& path) {
|
||||
fullscreenMode = toml::find_or<std::string>(gpu, "FullscreenMode", fullscreenMode);
|
||||
presentMode = toml::find_or<std::string>(gpu, "presentMode", presentMode);
|
||||
isHDRAllowed = toml::find_or<bool>(gpu, "allowHDR", isHDRAllowed);
|
||||
fsrEnabled = toml::find_or<bool>(gpu, "fsrEnabled", fsrEnabled);
|
||||
rcasEnabled = toml::find_or<bool>(gpu, "rcasEnabled", rcasEnabled);
|
||||
rcasAttenuation = toml::find_or<int>(gpu, "rcasAttenuation", rcasAttenuation);
|
||||
}
|
||||
|
||||
if (data.contains("Vulkan")) {
|
||||
@@ -906,6 +936,9 @@ void save(const std::filesystem::path& path) {
|
||||
data["GPU"]["FullscreenMode"] = fullscreenMode;
|
||||
data["GPU"]["presentMode"] = presentMode;
|
||||
data["GPU"]["allowHDR"] = isHDRAllowed;
|
||||
data["GPU"]["fsrEnabled"] = fsrEnabled;
|
||||
data["GPU"]["rcasEnabled"] = rcasEnabled;
|
||||
data["GPU"]["rcasAttenuation"] = rcasAttenuation;
|
||||
data["Vulkan"]["gpuId"] = gpuId;
|
||||
data["Vulkan"]["validation"] = vkValidation;
|
||||
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
||||
@@ -1016,6 +1049,9 @@ void setDefaultValues() {
|
||||
fullscreenMode = "Windowed";
|
||||
presentMode = "Mailbox";
|
||||
isHDRAllowed = false;
|
||||
fsrEnabled = true;
|
||||
rcasEnabled = true;
|
||||
rcasAttenuation = 250;
|
||||
|
||||
// Vulkan
|
||||
gpuId = -1;
|
||||
|
||||
@@ -115,6 +115,12 @@ bool getBackgroundControllerInput();
|
||||
void setBackgroundControllerInput(bool enable);
|
||||
bool getLoggingEnabled();
|
||||
void setLoggingEnabled(bool enable);
|
||||
bool getFsrEnabled();
|
||||
void setFsrEnabled(bool enable);
|
||||
bool getRcasEnabled();
|
||||
void setRcasEnabled(bool enable);
|
||||
int getRcasAttenuation();
|
||||
void setRcasAttenuation(int value);
|
||||
|
||||
// TODO
|
||||
bool GetLoadGameSizeEnabled();
|
||||
|
||||
Reference in New Issue
Block a user