mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 23:03:18 +00:00
video_out: HDR support (#2381)
* Initial HDR support * fix for crashes when debug tools used
This commit is contained in:
parent
fb0871dbc8
commit
8f2883a388
16 changed files with 186 additions and 16 deletions
|
@ -31,6 +31,7 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
|||
|
||||
namespace Config {
|
||||
|
||||
static bool isHDRAllowed = false;
|
||||
static bool isNeo = false;
|
||||
static bool isFullscreen = false;
|
||||
static std::string fullscreenMode = "borderless";
|
||||
|
@ -101,6 +102,10 @@ static bool showBackgroundImage = true;
|
|||
// Language
|
||||
u32 m_language = 1; // english
|
||||
|
||||
bool allowHDR() {
|
||||
return isHDRAllowed;
|
||||
}
|
||||
|
||||
bool GetUseUnifiedInputConfig() {
|
||||
return useUnifiedInputConfig;
|
||||
}
|
||||
|
@ -651,6 +656,7 @@ void load(const std::filesystem::path& path) {
|
|||
if (data.contains("General")) {
|
||||
const toml::value& general = data.at("General");
|
||||
|
||||
isHDRAllowed = toml::find_or<bool>(general, "allowHDR", false);
|
||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
||||
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
||||
fullscreenMode = toml::find_or<std::string>(general, "FullscreenMode", "borderless");
|
||||
|
@ -786,6 +792,7 @@ void save(const std::filesystem::path& path) {
|
|||
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
||||
}
|
||||
|
||||
data["General"]["allowHDR"] = isHDRAllowed;
|
||||
data["General"]["isPS4Pro"] = isNeo;
|
||||
data["General"]["Fullscreen"] = isFullscreen;
|
||||
data["General"]["FullscreenMode"] = fullscreenMode;
|
||||
|
@ -894,6 +901,7 @@ void saveMainWindow(const std::filesystem::path& path) {
|
|||
}
|
||||
|
||||
void setDefaultValues() {
|
||||
isHDRAllowed = false;
|
||||
isNeo = false;
|
||||
isFullscreen = false;
|
||||
isTrophyPopupDisabled = false;
|
||||
|
|
|
@ -51,6 +51,7 @@ void SetUseUnifiedInputConfig(bool use);
|
|||
u32 getScreenWidth();
|
||||
u32 getScreenHeight();
|
||||
s32 getGpuId();
|
||||
bool allowHDR();
|
||||
|
||||
bool debugDump();
|
||||
bool collectShadersForDebug();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue