Skip to content

Commit b2f0b55

Browse files
committed
fix: Add fix for docking and a crash for certain inputs to Gamescope
1 parent b1277b5 commit b2f0b55

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

spec_files/gamescope/1444.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From ce4029c6523d8ee9773958577e6edc32979d2271 Mon Sep 17 00:00:00 2001
2+
From: sharkautarch <128002472+sharkautarch@users.noreply.github.com>
3+
Date: Wed, 31 Jul 2024 18:36:38 -0400
4+
Subject: [PATCH] wlserver: fix nullptr dereference on oPoint->pTimeline
5+
6+
---
7+
src/wlserver.cpp | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
11+
index 79b9c5c5c..756393c6f 100644
12+
--- a/src/wlserver.cpp
13+
+++ b/src/wlserver.cpp
14+
@@ -131,7 +131,7 @@ void GamescopeTimelinePoint::Release()
15+
16+
static std::optional<GamescopeAcquireTimelineState> TimelinePointToEventFd( const std::optional<GamescopeTimelinePoint>& oPoint )
17+
{
18+
- if (!oPoint)
19+
+ if (!oPoint || !(oPoint->pTimeline) )
20+
return std::nullopt;
21+
22+
uint64_t uSignalledPoint = 0;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From e31b8dea137d2cedd4cf71fede560feb2ad3ffc5 Mon Sep 17 00:00:00 2001
2+
From: Joshua Ashton <joshua@froggi.es>
3+
Date: Fri, 2 Aug 2024 21:11:11 +0100
4+
Subject: [PATCH] DRMBackend: Fix mode fallback on connector changes
5+
6+
---
7+
src/Backends/DRMBackend.cpp | 8 ++++++++
8+
1 file changed, 8 insertions(+)
9+
10+
diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp
11+
index 2712994ef..ee2cbd3d9 100644
12+
--- a/src/Backends/DRMBackend.cpp
13+
+++ b/src/Backends/DRMBackend.cpp
14+
@@ -1040,6 +1040,9 @@ static bool setup_best_connector(struct drm_t *drm, bool force, bool initial)
15+
return false;
16+
}
17+
18+
+ // Don't allow rollback of mode_id after connector change
19+
+ drm->current.mode_id = drm->pending.mode_id;
20+
+
21+
const struct wlserver_output_info wlserver_output_info = {
22+
.description = description,
23+
.phys_width = (int) best->GetModeConnector()->mmWidth,
24+
@@ -2876,6 +2879,11 @@ bool drm_set_connector( struct drm_t *drm, gamescope::CDRMConnector *conn )
25+
return false;
26+
}
27+
28+
+ // If we are changing connector, zero out the current and pending mode IDs.
29+
+ // So we don't try to use one mode from the old connector on the new one if we roll back.
30+
+ drm->pending.mode_id = nullptr;
31+
+ drm->current.mode_id = nullptr;
32+
+
33+
drm->pConnector = conn;
34+
drm->needs_modeset = true;
35+

spec_files/gamescope/gamescope.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Name: gamescope
88
Version: 100.%{gamescope_tag}
9-
Release: 19.bazzite
9+
Release: 20.bazzite
1010
Summary: Micro-compositor for video games on Wayland
1111

1212
License: BSD
@@ -24,6 +24,10 @@ Patch2: disable-steam-touch-click-atom.patch
2424
Patch3: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch
2525
# https://github.com/ValveSoftware/gamescope/issues/1398
2626
Patch4: drm-Separate-BOE-and-SDC-OLED-Deck-panel-rates.patch
27+
# https://github.com/ValveSoftware/gamescope/pull/1444
28+
Patch5: 1444.patch
29+
# https://github.com/ValveSoftware/gamescope/commit/e31b8dea137d2cedd4cf71fede560feb2ad3ffc5
30+
Patch6: e31b8dea137d2cedd4cf71fede560feb2ad3ffc5.patch
2731

2832
BuildRequires: meson >= 0.54.0
2933
BuildRequires: ninja-build

0 commit comments

Comments
 (0)