Skip to content

Commit 209b3f0

Browse files
committed
attempt to add gamescope overlay
1 parent a4ed887 commit 209b3f0

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

overlays/default.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@
1616
# hash = "sha256-2Wp426uBn1V1AXNERESZW1Ax69zBW3ev672NvAKvNPQ=";
1717
# };
1818
# });
19+
gamescope = prev.gamescope.overrideAttrs (oldAttrs: rec {
20+
version = "3.16.4";
21+
src = prev.fetchFromGitHub {
22+
owner = "ValveSoftware";
23+
repo = "gamescope";
24+
rev = "refs/tags/${version}";
25+
fetchSubmodules = true;
26+
hash = "sha256-2AxqvZA1eZaJFKMfRljCIcP0M2nMngw0FQiXsfBW7IA=";
27+
};
28+
29+
patches = [
30+
./shaders-path.patch
31+
./gamescopereaper.patch
32+
];
33+
});
1934
};
2035

2136
# When applied, the unstable nixpkgs set (declared in the flake inputs) will

overlays/gamescopereaper.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Utils/Process.cpp b/src/Utils/Process.cpp
2+
index 5688fb1..6cea8d8 100644
3+
--- a/src/Utils/Process.cpp
4+
+++ b/src/Utils/Process.cpp
5+
@@ -392,7 +392,7 @@ namespace gamescope::Process
6+
pid_t SpawnProcessInWatchdog( char **argv, bool bRespawn, std::function<void()> fnPreambleInChild )
7+
{
8+
std::vector<char *> args;
9+
- args.push_back( (char *)"gamescopereaper" );
10+
+ args.push_back( (char *)"@gamescopereaper@" );
11+
if ( bRespawn )
12+
args.push_back( (char *)"--respawn" );
13+
args.push_back( (char *)"--" );

overlays/shaders-path.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/reshade_effect_manager.cpp b/src/reshade_effect_manager.cpp
2+
index 3597ca1..de45250 100644
3+
--- a/src/reshade_effect_manager.cpp
4+
+++ b/src/reshade_effect_manager.cpp
5+
@@ -34,7 +34,7 @@ static std::string GetLocalUsrDir()
6+
7+
static std::string GetUsrDir()
8+
{
9+
- return "/usr";
10+
+ return "@out@";
11+
}
12+
13+
static LogScope reshade_log("gamescope_reshade");

0 commit comments

Comments
 (0)