diff --git a/spec_files/gamescope/720p.patch b/spec_files/gamescope/720p.patch new file mode 100644 index 00000000..2a4b3615 --- /dev/null +++ b/spec_files/gamescope/720p.patch @@ -0,0 +1,28 @@ +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 52dd8d1..b62c46e 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -140,6 +140,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 s_scRGB709To2020Matrix; +@@ -5202,6 +5205,13 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + size_t server_idx = size_t{ xwayland_mode_ctl[ 0 ] }; + int width = xwayland_mode_ctl[ 1 ]; + int height = xwayland_mode_ctl[ 2 ]; ++ ++ if ( g_nOutputWidth != 1280 && width == 1280 && !env_to_bool(getenv("GAMESCOPE_ENABLE_720P_RESTRICT")) ) ++ { ++ width = g_nOutputWidth; ++ height = g_nOutputHeight; ++ } ++ + bool allowSuperRes = !!xwayland_mode_ctl[ 3 ]; + + if ( !allowSuperRes ) diff --git a/spec_files/gamescope/disable-steam-touch-click-atom.patch b/spec_files/gamescope/disable-steam-touch-click-atom.patch new file mode 100644 index 00000000..3d81710a --- /dev/null +++ b/spec_files/gamescope/disable-steam-touch-click-atom.patch @@ -0,0 +1,15 @@ +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index b62c46e..ab24343 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -4954,7 +4954,9 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + } + if (ev->atom == ctx->atoms.steamTouchClickModeAtom ) + { +- gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, 0u ); ++ // When steam changes this to 1 stuff breaks, make it not shoot itself ++ // in the foot ++ //gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, 0u ); + } + if (ev->atom == ctx->atoms.steamStreamingClientAtom) + { diff --git a/spec_files/gamescope/gamescope.spec b/spec_files/gamescope/gamescope.spec index 7402efcf..c37daabe 100644 --- a/spec_files/gamescope/gamescope.spec +++ b/spec_files/gamescope/gamescope.spec @@ -16,6 +16,8 @@ URL: https://github.com/ValveSoftware/gamescope Source0: stb.pc Patch0: hardware.patch +Patch1: 720p.patch +Patch2: disable-steam-touch-click-atom.patch BuildRequires: meson >= 0.54.0 BuildRequires: ninja-build