From 905376f036dbd0b0fd306fc8bb4213751970ba58 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 3 Jan 2023 12:43:38 +0000 Subject: [PATCH] steamcompmgr: Add GAMESCOPE_DEBUG_HDR_HEATMAP --- src/steamcompmgr.cpp | 9 +++++++++ src/xwayland_ctx.hpp | 1 + 2 files changed, 10 insertions(+) diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index 4868d27..a80be92 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -4447,6 +4447,14 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) g_bForceHDRSupportDebug = !!get_prop( ctx, ctx->root, ctx->atoms.gamescopeDebugForceHDRSupport, 0 ); hasRepaint = true; } + if ( ev->atom == ctx->atoms.gamescopeDebugHDRHeatmap ) + { + bool heatmap = !!get_prop( ctx, ctx->root, ctx->atoms.gamescopeDebugHDRHeatmap, 0 ); + g_uCompositeDebug &= ~CompositeDebugFlag::Heatmap; + if (heatmap) + g_uCompositeDebug |= CompositeDebugFlag::Heatmap; + hasRepaint = true; + } if (ev->atom == ctx->atoms.wineHwndStyle) { win * w = find_win(ctx, ev->window); @@ -5414,6 +5422,7 @@ void init_xwayland_ctx(gamescope_xwayland_server_t *xwayland_server) ctx->atoms.gamescopeDisplayHDRForceWideGammutForSDR = XInternAtom( ctx->dpy, "GAMESCOPE_DISPLAY_HDR_FORCE_WIDE_GAMMUT_FOR_SDR", false ); ctx->atoms.gamescopeDebugForceHDR10Output = XInternAtom( ctx->dpy, "GAMESCOPE_DEBUG_FORCE_HDR10_PQ_OUTPUT", false ); ctx->atoms.gamescopeDebugForceHDRSupport = XInternAtom( ctx->dpy, "GAMESCOPE_DEBUG_FORCE_HDR_SUPPORT", false ); + ctx->atoms.gamescopeDebugHDRHeatmap = XInternAtom( ctx->dpy, "GAMESCOPE_DEBUG_HDR_HEATMAP", false ); ctx->atoms.gamescopeHDROutputFeedback = XInternAtom( ctx->dpy, "GAMESCOPE_HDR_OUTPUT_FEEDBACK", false ); ctx->atoms.wineHwndStyle = XInternAtom( ctx->dpy, "_WINE_HWND_STYLE", false ); diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp index b07c150..c8c574c 100644 --- a/src/xwayland_ctx.hpp +++ b/src/xwayland_ctx.hpp @@ -173,6 +173,7 @@ struct xwayland_ctx_t Atom gamescopeDisplayHDRForceWideGammutForSDR; Atom gamescopeDebugForceHDR10Output; Atom gamescopeDebugForceHDRSupport; + Atom gamescopeDebugHDRHeatmap; Atom gamescopeHDROutputFeedback; Atom wineHwndStyle;