mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
config: Add present mode option. (#3502)
* config: Add present mode option. * settings_dialog: Add details for present modes.
This commit is contained in:
@@ -79,6 +79,7 @@ static bool shouldPatchShaders = false;
|
||||
static u32 vblankDivider = 1;
|
||||
static bool isFullscreen = false;
|
||||
static std::string fullscreenMode = "Windowed";
|
||||
static std::string presentMode = "Mailbox";
|
||||
static bool isHDRAllowed = false;
|
||||
|
||||
// Vulkan
|
||||
@@ -194,6 +195,10 @@ std::string getFullscreenMode() {
|
||||
return fullscreenMode;
|
||||
}
|
||||
|
||||
std::string getPresentMode() {
|
||||
return presentMode;
|
||||
}
|
||||
|
||||
bool getisTrophyPopupDisabled() {
|
||||
return isTrophyPopupDisabled;
|
||||
}
|
||||
@@ -466,6 +471,10 @@ void setFullscreenMode(std::string mode) {
|
||||
fullscreenMode = mode;
|
||||
}
|
||||
|
||||
void setPresentMode(std::string mode) {
|
||||
presentMode = mode;
|
||||
}
|
||||
|
||||
void setisTrophyPopupDisabled(bool disable) {
|
||||
isTrophyPopupDisabled = disable;
|
||||
}
|
||||
@@ -726,6 +735,7 @@ void load(const std::filesystem::path& path) {
|
||||
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", vblankDivider);
|
||||
isFullscreen = toml::find_or<bool>(gpu, "Fullscreen", isFullscreen);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -894,6 +904,7 @@ void save(const std::filesystem::path& path) {
|
||||
data["GPU"]["vblankDivider"] = vblankDivider;
|
||||
data["GPU"]["Fullscreen"] = isFullscreen;
|
||||
data["GPU"]["FullscreenMode"] = fullscreenMode;
|
||||
data["GPU"]["presentMode"] = presentMode;
|
||||
data["GPU"]["allowHDR"] = isHDRAllowed;
|
||||
data["Vulkan"]["gpuId"] = gpuId;
|
||||
data["Vulkan"]["validation"] = vkValidation;
|
||||
@@ -1003,6 +1014,7 @@ void setDefaultValues() {
|
||||
vblankDivider = 1;
|
||||
isFullscreen = false;
|
||||
fullscreenMode = "Windowed";
|
||||
presentMode = "Mailbox";
|
||||
isHDRAllowed = false;
|
||||
|
||||
// Vulkan
|
||||
|
||||
@@ -27,6 +27,8 @@ bool getIsFullscreen();
|
||||
void setIsFullscreen(bool enable);
|
||||
std::string getFullscreenMode();
|
||||
void setFullscreenMode(std::string mode);
|
||||
std::string getPresentMode();
|
||||
void setPresentMode(std::string mode);
|
||||
u32 getWindowWidth();
|
||||
u32 getWindowHeight();
|
||||
void setWindowWidth(u32 width);
|
||||
|
||||
Reference in New Issue
Block a user