Skip to content

Commit 129b5f2

Browse files
authored
fix: make gamescope 720p patch use env_to_bool to allow user binary setting (#758)
1 parent e3aae41 commit 129b5f2

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
1-
From dab64a97b336c13c4d48a14550b72508f98cc1d4 Mon Sep 17 00:00:00 2001
1+
From 19c6635d5e20dd429cb23b4a7c728afa306fae0a Mon Sep 17 00:00:00 2001
22
From: Sterophonick <sterophonick@gmail.com>
3-
Date: Wed, 17 Jan 2024 12:00:44 -0700
3+
Date: Sat, 10 Feb 2024 22:00:36 -0700
44
Subject: [PATCH] steamcompmgr: add env var to enable/disable 720p restriction
55

66
---
7-
src/steamcompmgr.cpp | 2 +-
8-
1 file changed, 1 insertion(+), 1 deletion(-)
7+
src/steamcompmgr.cpp | 5 ++++-
8+
1 file changed, 4 insertions(+), 1 deletion(-)
99

1010
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
11-
index e50265c..22e9345 100644
11+
index 00c00e9..795898c 100644
1212
--- a/src/steamcompmgr.cpp
1313
+++ b/src/steamcompmgr.cpp
14-
@@ -5822,7 +5822,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
14+
@@ -137,6 +137,9 @@ extern float g_flInternalDisplayBrightnessNits;
15+
extern float g_flHDRItmSdrNits;
16+
extern float g_flHDRItmTargetNits;
17+
18+
+// define env_to_bool to point to the function in drm: remove in later patches pl0x
19+
+extern bool env_to_bool(const char *env);
20+
+
21+
uint64_t g_lastWinSeq = 0;
22+
23+
static std::shared_ptr<wlserver_ctm> s_scRGB709To2020Matrix;
24+
@@ -5657,7 +5660,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
1525
int width = xwayland_mode_ctl[ 1 ];
1626
int height = xwayland_mode_ctl[ 2 ];
1727

1828
- if ( g_nOutputWidth != 1280 && width == 1280 )
19-
+ if ( ( g_nOutputWidth != 1280 && width == 1280 ) && !getenv("GAMESCOPE_ENABLE_720P_RESTRICT") )
29+
+ if ( g_nOutputWidth != 1280 && width == 1280 && !env_to_bool( getenv("GAMESCOPE_ENABLE_720P_RESTRICT") ) )
2030
{
2131
width = g_nOutputWidth;
2232
height = g_nOutputHeight;
2333
--
2434
2.43.0
35+

0 commit comments

Comments
 (0)