Skip to content

Commit

Permalink
wlserver: Filter out garbage HDR metadata
Browse files Browse the repository at this point in the history
Elden Ring and Sekiro pass all zero HDR metadata which royally messes up some displays.
  • Loading branch information
misyltoad committed Aug 17, 2023
1 parent 5e70062 commit 22618ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wlserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 22618ea

Please sign in to comment.