From 22618ea0841158d0d0ff0f50a76ee24fbfa63893 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 18 Aug 2023 00:36:09 +0100 Subject: [PATCH] wlserver: Filter out garbage HDR metadata Elden Ring and Sekiro pass all zero HDR metadata which royally messes up some displays. --- src/wlserver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wlserver.cpp b/src/wlserver.cpp index 0f1a0f7ee..194b75db7 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp @@ -654,6 +654,11 @@ static void gamescope_xwayland_handle_set_hdr_metadata( struct wl_client *client return; } + // Check validity of this metadata, + // if it's garbage, just toss it... + if (!max_cll || !max_fall || (!white_point_x && !white_point_y)) + return; + hdr_output_metadata metadata = {}; metadata.metadata_type = 0;