Skip to content

Commit

Permalink
chore: Update gamescope patches
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed May 2, 2024
1 parent aa49a91 commit 5486d56
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
7 changes: 2 additions & 5 deletions spec_files/gamescope/disable-steam-touch-click-atom.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 05337c1..aeb3a39 100644
index 05337c1..d6d883b 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -4949,8 +4949,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
@@ -4949,7 +4949,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev)
focusDirty = true;
}
}
- if (ev->atom == ctx->atoms.steamTouchClickModeAtom )
+ if (ev->atom == ctx->atoms.steamTouchClickModeAtom && !env_to_bool(getenv("GAMESCOPE_DISABLE_TOUCH_CLICK_MODE")))
{
+ // 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)
45 changes: 24 additions & 21 deletions spec_files/gamescope/external-rotation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,34 +89,37 @@ index 4e4e9a7..be9a9dd 100644
enum class GamescopeUpscaleFilter : uint32_t
{
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 9afaab7..7b78bbc 100644
index 9afaab7..b3f9f31 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -2130,6 +2130,29 @@ static void apply_touchscreen_orientation(double *x, double *y )
@@ -2130,6 +2130,32 @@ static void apply_touchscreen_orientation(double *x, double *y )
break;
}

+ // Rotate screen if it's forced with --force-external-orientation
+ switch ( GetBackend()->GetConnector( gamescope::GAMESCOPE_SCREEN_TYPE_EXTERNAL )->GetCurrentOrientation() )
+ if ( g_bExternalForced == true )
+ {
+ default:
+ case GAMESCOPE_PANEL_ORIENTATION_AUTO:
+ case GAMESCOPE_PANEL_ORIENTATION_0:
+ tx = *x;
+ ty = *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_90:
+ tx = 1.0 - *y;
+ ty = *x;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_180:
+ tx = 1.0 - *x;
+ ty = 1.0 - *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_270:
+ tx = *y;
+ ty = 1.0 - *x;
+ break;
+ switch ( GetBackend()->GetConnector( gamescope::GAMESCOPE_SCREEN_TYPE_EXTERNAL )->GetCurrentOrientation() )
+ {
+ default:
+ case GAMESCOPE_PANEL_ORIENTATION_AUTO:
+ case GAMESCOPE_PANEL_ORIENTATION_0:
+ tx = *x;
+ ty = *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_90:
+ tx = 1.0 - *y;
+ ty = *x;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_180:
+ tx = 1.0 - *x;
+ ty = 1.0 - *y;
+ break;
+ case GAMESCOPE_PANEL_ORIENTATION_270:
+ tx = *y;
+ ty = 1.0 - *x;
+ break;
+ }
+ }
+
*x = tx;
Expand Down
1 change: 1 addition & 0 deletions spec_files/gamescope/gamescope.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Patch1: 720p.patch
Patch2: disable-steam-touch-click-atom.patch
Patch3: external-rotation.patch
Patch4: panel-type.patch
Patch5: gestures.patch

BuildRequires: meson >= 0.54.0
BuildRequires: ninja-build
Expand Down

0 comments on commit 5486d56

Please sign in to comment.