Skip to content

Commit

Permalink
Merge pull request #4 from Sterophonick/gamescope-plus
Browse files Browse the repository at this point in the history
steamcompmgr: add env var to enable/disable 720p restriction
  • Loading branch information
ruineka authored Mar 12, 2024
2 parents ec58bd5 + b68fd83 commit 741bb26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ extern float g_flInternalDisplayBrightnessNits;
extern float g_flHDRItmSdrNits;
extern float g_flHDRItmTargetNits;

// define env_to_bool to point to the function in drm: remove in later patches pl0x
extern bool env_to_bool(const char *env);

uint64_t g_lastWinSeq = 0;

static std::shared_ptr<wlserver_ctm> s_scRGB709To2020Matrix;
Expand Down Expand Up @@ -5657,7 +5660,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
int width = xwayland_mode_ctl[ 1 ];
int height = xwayland_mode_ctl[ 2 ];

if ( g_nOutputWidth != 1280 && width == 1280 )
if ( g_nOutputWidth != 1280 && width == 1280 && !env_to_bool( getenv("GAMESCOPE_ENABLE_720P_RESTRICT") ) )
{
width = g_nOutputWidth;
height = g_nOutputHeight;
Expand Down

0 comments on commit 741bb26

Please sign in to comment.