Skip to content

[Feature]: Add gamescope support #3089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions flatpak/templates/com.heroicgameslauncher.hgl.metainfo.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -233,42 +233,40 @@
</p>
<ul>
<li>
Auto Install UbisoftConnect when running UbisoftConnect games
Added a new System Information Tab to the Heroic Settings
</li>
<li>
UI improvements on the GamePage to make it cleaner and organized
Added support for installing and enabling DXVK-NVAPI
</li>
<li>
Library render improvements and download GOG game images in the background
Added user feedback when copying log to clipboard
</li>
<li>
Improvements on Epic Login
Added ExperimentalFeatures feature setting support

</li>
<li>
Show game logs from the card's context menu
</li>
</ul>
</ul>
<p>
BugFixes
</p>
<ul>
<li>
Fix Discord RPC for flatpak heroic
Fixed installation of EOS Overlay
</li>
<li>
Fix auto-enabling of anti-cheat runtimes
Fixed some issues for Amazon Games
</li>
<li>
Fix non-available status for games just installed
Fixed issues with missing games metadata for GOG
</li>
<li>
Kill leftover wine processes after the stop button is pressed
Fixed issue with egl-sync
</li>
<li>
Fix not being possible to change the default installation path
Fixed installing all DLCs not adding them to the queue
</li>
<li>
Inaccuracy of disk and down speed
Make sure the game is available before auto-updating
</li>
<li>
Several other fixes and improvements
Expand Down
30 changes: 17 additions & 13 deletions flatpak/templates/com.heroicgameslauncher.hgl.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ finish-args:
- --allow=devel
- --allow=multiarch
- --device=all
- --env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin:/app/bin/heroic/resources/app.asar.unpacked/build/bin/linux
- --env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin:/usr/lib/extensions/vulkan/gamescope/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin:/app/bin/heroic/resources/app.asar.unpacked/build/bin/linux
- --filesystem=xdg-data/lutris:rw
- --filesystem=xdg-data/Steam:rw
- --filesystem=xdg-data/applications:rw
Expand All @@ -30,17 +30,20 @@ finish-args:
- --filesystem=xdg-desktop
# should fix access to SD card on the deck
- --filesystem=/run/media
# There are still quite a few users using /mnt/ for external drives
- --filesystem=/mnt
# should fix steamdeck controler navigation
- --filesystem=/run/udev:ro
# should fix discord rich presence
- --filesystem=xdg-run/app/com.discordapp.Discord:create
- --persist=.
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --socket=pulseaudio
- --talk-name=org.freedesktop.Notifications
- --own-name=org.kde.*
- --talk-name=org.kde.StatusNotifierWatcher

add-extensions:
org.freedesktop.Platform.Compat.i386:
Expand Down Expand Up @@ -165,8 +168,9 @@ modules:
dest-filename: heroic-run
commands:
- for i in {0..9}; do
- test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
- test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
- done
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- zypak-wrapper /app/bin/heroic/heroic "$@"

- ${heroic-app-image}
Expand Down Expand Up @@ -218,38 +222,38 @@ modules:
- DEST_MAN=$(FLATPAK_DEST)/share/man
sources:
- type: archive
url: "https://downloads.sourceforge.net/p7zip/p7zip_16.02_src_all.tar.bz2"
url: https://downloads.sourceforge.net/p7zip/p7zip_16.02_src_all.tar.bz2
sha256: 5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f
- type: patch
paths:
- patches/p7zip/gcc10-conversion.patch
- type: shell
only-arches:
- "x86_64"
- x86_64
commands:
- ln -sf makefile.linux_amd64_asm makefile.machine
- type: shell
only-arches:
- "i386"
- i386
commands:
- ln -sf makefile.linux_x86_asm_gcc_4.X makefile.machine
modules:
- name: yasm
buildsystem: cmake-ninja
sources:
- type: archive
url: "https://github.com/yasm/yasm/archive/v1.3.0.tar.gz"
url: https://github.com/yasm/yasm/archive/v1.3.0.tar.gz
sha256: f708be0b7b8c59bc1dbe7134153cd2f31faeebaa8eec48676c10f972a1f13df3
cleanup:
- "*"
- '*'

- name: cabextract
build-options:
strip: true
sources:
- type: archive
url: "https://www.cabextract.org.uk/cabextract-1.10.tar.gz"
sha256: edfc785ef252460cab7fdfa6fb2599058a6f5618f7f48a4ad22da816da8cb117
url: https://www.cabextract.org.uk/cabextract-1.11.tar.gz
sha256: b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6
x-checker-data:
type: anitya
project-id: 245
Expand All @@ -263,8 +267,8 @@ modules:
- DESTDIR=$(FLATPAK_DEST)
sources:
- type: archive
url: "https://www.rarlab.com/rar/unrarsrc-6.2.5.tar.gz"
sha256: 9a3974410d1d340e3998dd2a6f98faefbe838cad556266e714adfb0e8cf9377c
url: https://www.rarlab.com/rar/unrarsrc-6.2.10.tar.gz
sha256: 55fe6ebd5e48d6655bfda3fd19b55438ca05e13c7e69772420caad9fdb68ef42
x-checker-data:
type: anitya
project-id: 13306
Expand All @@ -286,7 +290,7 @@ modules:
sources:
- type: archive
sha256: 58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5
url: "https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.xz"
url: https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.xz
- type: patch
path: patches/aria2/working-build.patch
#END --- Winetricks Deps --
26 changes: 26 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,15 @@
"valid_codes": "Valid language codes are game-dependant."
},
"gamemode": "Feral GameMode applies automatic and temporary tweaks to the system when running games. Enabling may improve performance.",
"gamescope": {
"fpsLimiter": "The amount of frames gamescope should limit to. E.g. 60",
"fpsLimiterNoFocus": "The frame rate limit gamescope should limit per second if the game is not focused.",
"gameHeight": "The height resolution used by the game. A 16:9 aspect ratio is assumed by gamescope.",
"gameWidth": "The width resolution used by the game. A 16:9 aspect ratio is assumed by gamescope.",
"upscaleHeight": "The height resolution used by gamescope. A 16:9 aspect ratio is assumed.",
"upscaleMethod": "The upscaling method gamescope should use.",
"upscaleWidth": "The width resolution used by gamescope. A 16:9 aspect ratio is assumed."
},
"general": "Sync with EGL if you have a working installation of the Epic Games Launcher elsewhere and want to import your games to avoid downloading them again.",
"mangohud": "MangoHUD is an overlay that displays and monitors FPS, temperatures, CPU/GPU load and other system resources.",
"other": {
Expand Down Expand Up @@ -427,6 +436,14 @@
"placeholder": "Put here the Launcher Arguments",
"title": "Game Arguments (To run after the command):"
},
"gamescope": {
"fpsLimiter": "FPS Limiter",
"fpsLimiterNoFocus": "FPS Limiter (No Focus)",
"gameHeight": "Game Height",
"gameWidth": "Game Width",
"upscaleHeight": "Upscale Height",
"upscaleWidth": "Upscale Width"
},
"quote-args-with-spaces": "Warning: Make sure to quote args with spaces! E.g.: \"path/with spaces/\"",
"wrapper": {
"args": "Arguments",
Expand Down Expand Up @@ -535,6 +552,11 @@
"FsrSharpnessStrenght": "FSR Sharpness Strength",
"fsync": "Enable Fsync",
"gamemode": "Use GameMode (Feral Game Mode needs to be installed)",
"gamescope": {
"enableLimiter": "Enable FPS Limiter",
"enableUpscaling": "Enables Upscaling",
"missingMsg": "We could not found gamescope on the PATH. Install it or add it to the PATH."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"missingMsg": "We could not found gamescope on the PATH. Install it or add it to the PATH."
"missingMsg": "Heroic could not find gamescope on your system. Install it or add it to the PATH."

I think it is easier to understand this way.

},
"hideChangelogsOnStartup": "Don't show changelogs on Startup",
"ignoreGameUpdates": "Ignore game updates",
"language": "Choose App Language",
Expand Down Expand Up @@ -621,12 +643,16 @@
"title": "EAC runtime enabled"
}
},
"gamescope": {
"searchMsg": "Searching for gamescope executable."
},
"log": {
"long-log-hint": "Log truncated, last 1000 lines are shown!"
},
"navbar": {
"advanced": "Advanced",
"games_settings_defaults": "Game Defaults",
"gamescope": "Gamescope",
"general": "General",
"log": "Log",
"other": "Other",
Expand Down
3 changes: 3 additions & 0 deletions src/backend/api/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ export const systemInfo = {
ipcRenderer.invoke('getSystemInfo', cache),
copyToClipboard: (): void => ipcRenderer.send('copySystemInfoToClipboard')
}

export const hasExecutable = async (executable: string) =>
ipcRenderer.invoke('hasExecutable', executable)
Loading