diff --git a/src/main.cpp b/src/main.cpp index 63f5ae9..f7151e2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -86,6 +86,7 @@ const struct option *gamescope_options = (struct option[]){ { "force-orientation", required_argument, nullptr, 0 }, { "hdr-enabled", no_argument, nullptr, 0 }, + { "hdr-sdr-content-nits", required_argument, nullptr, 0 }, { "hdr-wide-gammut-for-sdr", no_argument, nullptr, 0 }, { "hdr-debug-force-support", no_argument, nullptr, 0 }, { "hdr-debug-force-output", no_argument, nullptr, 0 }, @@ -122,6 +123,7 @@ const char usage[] = " --hdr-enabled enable HDR output (needs Gamescope WSI layer enabled for support from clients)\n" " If this is not set, and there is a HDR client, it will be tonemapped SDR.\n" " --hdr-wide-gammut-for-sdr treat SDR sRGB content as having Rec.2020 primaries. Makes colors more vivid at cost of 'correctness'.\n" + " --hdr-sdr-content-nits set the luminance of SDR content in nits. Default: 400 nits.\n" "\n" "Nested mode options:\n" " -o, --nested-unfocused-refresh game refresh rate when unfocused\n" diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index f698b15..4868d27 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -5536,6 +5536,7 @@ extern int g_nPreferredOutputWidth; extern int g_nPreferredOutputHeight; static bool g_bWasFSRActive = false; +extern float g_flLinearToNits; extern std::atomic g_nCompletedPageFlipCount; @@ -5595,6 +5596,8 @@ steamcompmgr_main(int argc, char **argv) g_FadeOutDuration = atoi(optarg); } else if (strcmp(opt_name, "hdr-enabled") == 0) { g_bHDREnabled = true; + } else if (strcmp(opt_name, "hdr-sdr-content-nits") == 0) { + g_flLinearToNits = atof(optarg); } else if (strcmp(opt_name, "hdr-debug-force-support") == 0) { g_bForceHDRSupportDebug = true; } else if (strcmp(opt_name, "hdr-debug-force-output") == 0) {