From 9f101fb5463911856b30df3d36670313ac3077cd Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 4 Aug 2025 23:30:48 -0400 Subject: [PATCH 01/73] style(sonar): fix cpp:S3806 (#4129) --- src/platform/windows/audio.cpp | 2 +- src/platform/windows/display.h | 2 +- src/platform/windows/display_vram.cpp | 2 +- src/platform/windows/display_wgc.cpp | 2 +- src/platform/windows/input.cpp | 2 +- src/platform/windows/misc.cpp | 12 ++++++------ src/platform/windows/misc.h | 2 +- src/platform/windows/nvprefs/nvprefs_common.h | 4 ++-- src/platform/windows/publish.cpp | 8 ++++---- tools/audio.cpp | 2 +- tools/sunshinesvc.cpp | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index 20e600ac..e92688e5 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -5,7 +5,7 @@ #define INITGUID // platform includes -#include +#include #include #include #include diff --git a/src/platform/windows/display.h b/src/platform/windows/display.h index 74c4be7c..d508ae97 100644 --- a/src/platform/windows/display.h +++ b/src/platform/windows/display.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include // local includes #include "src/platform/common.h" diff --git a/src/platform/windows/display_vram.cpp b/src/platform/windows/display_vram.cpp index 7a8b0705..447fc534 100644 --- a/src/platform/windows/display_vram.cpp +++ b/src/platform/windows/display_vram.cpp @@ -7,7 +7,7 @@ // platform includes #include -#include +#include extern "C" { #include diff --git a/src/platform/windows/display_wgc.cpp b/src/platform/windows/display_wgc.cpp index 5b31dcae..e70720eb 100644 --- a/src/platform/windows/display_wgc.cpp +++ b/src/platform/windows/display_wgc.cpp @@ -13,7 +13,7 @@ // Gross hack to work around MINGW-packages#22160 #define ____FIReference_1_boolean_INTERFACE_DEFINED__ -#include +#include #include #include #include diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 50f8aab8..da552e27 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -5,7 +5,7 @@ #define WINVER 0x0A00 // platform includes -#include +#include // standard includes #include diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index c931b0ad..4358ea1a 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -22,13 +22,13 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include // clang-format on diff --git a/src/platform/windows/misc.h b/src/platform/windows/misc.h index 30d85376..ba58c877 100644 --- a/src/platform/windows/misc.h +++ b/src/platform/windows/misc.h @@ -9,7 +9,7 @@ #include // platform includes -#include +#include #include namespace platf { diff --git a/src/platform/windows/nvprefs/nvprefs_common.h b/src/platform/windows/nvprefs/nvprefs_common.h index baf4c0fb..b498c944 100644 --- a/src/platform/windows/nvprefs/nvprefs_common.h +++ b/src/platform/windows/nvprefs/nvprefs_common.h @@ -7,8 +7,8 @@ // platform includes // disable clang-format header reordering // clang-format off -#include -#include +#include +#include // clang-format on // local includes diff --git a/src/platform/windows/publish.cpp b/src/platform/windows/publish.cpp index 4c3c6f24..e93001a4 100644 --- a/src/platform/windows/publish.cpp +++ b/src/platform/windows/publish.cpp @@ -3,12 +3,12 @@ * @brief Definitions for Windows mDNS service registration. */ // platform includes -// winsock2.h must be included before windows.h +// WinSock2.h must be included before Windows.h // clang-format off -#include -#include +#include +#include // clang-format on -#include +#include #include // local includes diff --git a/tools/audio.cpp b/tools/audio.cpp index c5ca506f..e14e9053 100644 --- a/tools/audio.cpp +++ b/tools/audio.cpp @@ -5,7 +5,7 @@ #define INITGUID // platform includes -#include +#include #include #include #include diff --git a/tools/sunshinesvc.cpp b/tools/sunshinesvc.cpp index 07e5303b..9ff124ed 100644 --- a/tools/sunshinesvc.cpp +++ b/tools/sunshinesvc.cpp @@ -5,7 +5,7 @@ #define WIN32_LEAN_AND_MEAN #include #include -#include +#include // PROC_THREAD_ATTRIBUTE_JOB_LIST is currently missing from MinGW headers #ifndef PROC_THREAD_ATTRIBUTE_JOB_LIST From b2d3ded6f4af0ed25f2f1b71070219aa91b0c8b5 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 5 Aug 2025 08:30:24 -0400 Subject: [PATCH 02/73] style(sonar): fix cpp:S1110 (#4130) --- src/platform/windows/audio.cpp | 8 ++++---- src/platform/windows/input.cpp | 4 ++-- src/process.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index e92688e5..94863409 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -172,19 +172,19 @@ namespace { std::to_string(waveformat.Format.nSamplesPerSec) + " "; switch (waveformat.dwChannelMask) { - case (waveformat_mask_stereo): + case waveformat_mask_stereo: result += "2.0"; break; - case (waveformat_mask_surround51_with_backspeakers): + case waveformat_mask_surround51_with_backspeakers: result += "5.1"; break; - case (waveformat_mask_surround51_with_sidespeakers): + case waveformat_mask_surround51_with_sidespeakers: result += "5.1 (sidespeakers)"; break; - case (waveformat_mask_surround71): + case waveformat_mask_surround71: result += "7.1"; break; diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index da552e27..68bca308 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1598,8 +1598,8 @@ namespace platf { uint16_t y = touch.y * 943; uint8_t touchData[] = { (uint8_t) (x & 0xFF), // Low 8 bits of X - (uint8_t) (((x >> 8) & 0x0F) | ((y & 0x0F) << 4)), // High 4 bits of X and low 4 bits of Y - (uint8_t) (((y >> 4) & 0xFF)) // High 8 bits of Y + (uint8_t) ((x >> 8 & 0x0F) | (y & 0x0F) << 4), // High 4 bits of X and low 4 bits of Y + (uint8_t) (y >> 4 & 0xFF) // High 8 bits of Y }; report.sCurrentTouch.bPacketCounter++; diff --git a/src/process.cpp b/src/process.cpp index c009fda3..fb123470 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -158,7 +158,7 @@ namespace proc { _env["SUNSHINE_CLIENT_GCMAP"] = std::to_string(launch_session->gcmap); _env["SUNSHINE_CLIENT_HOST_AUDIO"] = launch_session->host_audio ? "true" : "false"; _env["SUNSHINE_CLIENT_ENABLE_SOPS"] = launch_session->enable_sops ? "true" : "false"; - int channelCount = launch_session->surround_info & (65535); + int channelCount = launch_session->surround_info & 65535; switch (channelCount) { case 2: _env["SUNSHINE_CLIENT_AUDIO_CONFIGURATION"] = "2.0"; From bb6e3bc8e172af840d8d11c606a5c9cc2c7d0e48 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:02:25 -0400 Subject: [PATCH 03/73] chore: update global workflows (#4125) --- .github/workflows/_release-notifier.yml | 2 ++ .github/workflows/_update-flathub-repo.yml | 2 ++ .github/workflows/_update-pacman-repo.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/_release-notifier.yml b/.github/workflows/_release-notifier.yml index b32da784..76ee855e 100644 --- a/.github/workflows/_release-notifier.yml +++ b/.github/workflows/_release-notifier.yml @@ -20,4 +20,6 @@ jobs: uses: LizardByte/.github/.github/workflows/__call-release-notifier.yml@master if: github.repository_owner == 'LizardByte' secrets: + GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }} + GH_NAME: ${{ secrets.GH_BOT_NAME }} GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/_update-flathub-repo.yml b/.github/workflows/_update-flathub-repo.yml index 1f4ba3c7..35286db9 100644 --- a/.github/workflows/_update-flathub-repo.yml +++ b/.github/workflows/_update-flathub-repo.yml @@ -26,4 +26,6 @@ jobs: uses: LizardByte/.github/.github/workflows/__call-update-flathub-repo.yml@master if: github.repository_owner == 'LizardByte' secrets: + GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }} + GH_NAME: ${{ secrets.GH_BOT_NAME }} GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/_update-pacman-repo.yml b/.github/workflows/_update-pacman-repo.yml index c62b34a4..dce30c57 100644 --- a/.github/workflows/_update-pacman-repo.yml +++ b/.github/workflows/_update-pacman-repo.yml @@ -26,4 +26,6 @@ jobs: uses: LizardByte/.github/.github/workflows/__call-update-pacman-repo.yml@master if: github.repository_owner == 'LizardByte' secrets: + GH_EMAIL: ${{ secrets.GH_BOT_EMAIL }} + GH_NAME: ${{ secrets.GH_BOT_NAME }} GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} From 03bb53d5917a18acee0ca68a21e40f0a4a6c0f66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:07:26 -0400 Subject: [PATCH 04/73] build(deps): bump packaging/linux/flatpak/deps/flatpak-builder-tools from `7090720` to `d2fa57a` (#4117) build(deps): bump packaging/linux/flatpak/deps/flatpak-builder-tools Bumps [packaging/linux/flatpak/deps/flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools) from `7090720` to `d2fa57a`. - [Commits](https://github.com/flatpak/flatpak-builder-tools/compare/7090720d43404c60b88445a3149835ec3c585717...d2fa57ab89811efb8d83da6cfa93fc184e94c640) --- updated-dependencies: - dependency-name: packaging/linux/flatpak/deps/flatpak-builder-tools dependency-version: d2fa57ab89811efb8d83da6cfa93fc184e94c640 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packaging/linux/flatpak/deps/flatpak-builder-tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/linux/flatpak/deps/flatpak-builder-tools b/packaging/linux/flatpak/deps/flatpak-builder-tools index 7090720d..d2fa57ab 160000 --- a/packaging/linux/flatpak/deps/flatpak-builder-tools +++ b/packaging/linux/flatpak/deps/flatpak-builder-tools @@ -1 +1 @@ -Subproject commit 7090720d43404c60b88445a3149835ec3c585717 +Subproject commit d2fa57ab89811efb8d83da6cfa93fc184e94c640 From 4503fea7fbc5cc5ae5aa1de10716f54de948af0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 13:56:25 -0400 Subject: [PATCH 05/73] build(deps): bump actions/download-artifact from 4 to 5 in the github-actions group (#4134) build(deps): bump actions/download-artifact in the github-actions group Bumps the github-actions group with 1 update: [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/download-artifact` from 4 to 5 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-copr.yml | 2 +- .github/workflows/ci.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-copr.yml b/.github/workflows/ci-copr.yml index 4981d4c4..f8383942 100644 --- a/.github/workflows/ci-copr.yml +++ b/.github/workflows/ci-copr.yml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: path: artifacts pattern: build-* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6caaa06..0eb1c18d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: uses: actions/checkout@v4 - name: Download coverage artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: coverage-${{ matrix.name }} path: _coverage @@ -192,7 +192,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: path: artifacts pattern: build-* @@ -225,7 +225,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download homebrew artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: beta-Homebrew path: homebrew From a28c20df1879d2d434d629f7352ee150befe76db Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:13:25 -0400 Subject: [PATCH 06/73] build(linux): compile with gcc13+ and bump cuda (#4136) --- .github/workflows/ci.yml | 1 + docker/clion-toolchain.dockerfile | 50 ++++++----- ...rm.dockerfile => debian-trixie.dockerfile} | 3 +- docker/ubuntu-22.04.dockerfile | 3 +- docs/building.md | 11 ++- docs/getting_started.md | 23 ++--- packaging/linux/fedora/Sunshine.spec | 12 +-- packaging/linux/flatpak/modules/cuda.json | 8 +- .../aarch64/01-math_functions.patch | 0 .../x86_64/01-math_functions.patch | 0 scripts/linux_build.sh | 86 ++++++++++++------- 11 files changed, 117 insertions(+), 80 deletions(-) rename docker/{debian-bookworm.dockerfile => debian-trixie.dockerfile} (98%) rename packaging/linux/{fedora/patches/f42 => patches}/aarch64/01-math_functions.patch (100%) rename packaging/linux/{fedora/patches/f42 => patches}/x86_64/01-math_functions.patch (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eb1c18d..02ef92cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: uses: LizardByte/.github/.github/workflows/__call-docker.yml@master with: maximize_build_space: true + maximize_build_space_root_reserve_size: 32768 publish_release: ${{ needs.release-setup.outputs.publish_release }} release_commit: ${{ needs.release-setup.outputs.release_commit }} release_tag: ${{ needs.release-setup.outputs.release_tag }} diff --git a/docker/clion-toolchain.dockerfile b/docker/clion-toolchain.dockerfile index f5080d18..fe3e7cc5 100644 --- a/docker/clion-toolchain.dockerfile +++ b/docker/clion-toolchain.dockerfile @@ -3,8 +3,8 @@ # platforms: linux/amd64 # platforms_pr: linux/amd64 # no-cache-filters: toolchain-base,toolchain -ARG BASE=ubuntu -ARG TAG=22.04 +ARG BASE=debian +ARG TAG=trixie-slim FROM ${BASE}:${TAG} AS toolchain-base ENV DEBIAN_FRONTEND=noninteractive @@ -25,11 +25,11 @@ set -e apt-get update -y apt-get install -y --no-install-recommends \ build-essential \ - cmake=3.22.* \ + cmake=3.31.* \ ca-certificates \ doxygen \ - gcc=4:11.2.* \ - g++=4:11.2.* \ + gcc=4:14.2.* \ + g++=4:14.2.* \ gdb \ git \ graphviz \ @@ -59,20 +59,13 @@ apt-get install -y --no-install-recommends \ xvfb apt-get clean rm -rf /var/lib/apt/lists/* - -# Install Node -wget --max-redirect=0 -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash -source "$HOME/.nvm/nvm.sh" -nvm install node -nvm use node -nvm alias default node _DEPS # install cuda WORKDIR /build/cuda # versions: https://developer.nvidia.com/cuda-toolkit-archive -ENV CUDA_VERSION="11.8.0" -ENV CUDA_BUILD="520.61.05" +ENV CUDA_VERSION="12.9.1" +ENV CUDA_BUILD="575.57.08" RUN <<_INSTALL_CUDA #!/bin/bash set -e @@ -83,18 +76,31 @@ if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then fi url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run" echo "cuda url: ${url}" -wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run -chmod a+x ./cuda.run -./cuda.run --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm -rm ./cuda.run +tmpfile="/tmp/cuda.run" +wget "$url" --progress=bar:force:noscroll --show-progress -O "$tmpfile" +chmod a+x "${tmpfile}" +"${tmpfile}" --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm +rm -f "${tmpfile}" _INSTALL_CUDA WORKDIR / -# Write a shell script that starts Xvfb and then runs a shell +# install node +RUN <<_INSTALL_NODE +#!/bin/bash +set -e +wget --max-redirect=0 -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash +source "$HOME/.nvm/nvm.sh" +nvm install node +nvm use node +nvm alias default node +_INSTALL_NODE + +WORKDIR /toolchain +# Create a shell script that starts Xvfb and then runs a shell RUN <<_ENTRYPOINT #!/bin/bash set -e -cat < /entrypoint.sh +cat < entrypoint.sh #!/bin/bash Xvfb ${DISPLAY} -screen 0 1024x768x24 & if [ "\$#" -eq 0 ]; then @@ -105,11 +111,11 @@ fi EOF # Make the script executable -chmod +x /entrypoint.sh +chmod +x entrypoint.sh # Note about CLion echo "ATTENTION: CLion will override the entrypoint, you can disable this in the toolchain settings" _ENTRYPOINT # Use the shell script as the entrypoint -ENTRYPOINT ["/entrypoint.sh"] +ENTRYPOINT ["/toolchain/entrypoint.sh"] diff --git a/docker/debian-bookworm.dockerfile b/docker/debian-trixie.dockerfile similarity index 98% rename from docker/debian-bookworm.dockerfile rename to docker/debian-trixie.dockerfile index ffa68b7c..cec96910 100644 --- a/docker/debian-bookworm.dockerfile +++ b/docker/debian-trixie.dockerfile @@ -4,7 +4,7 @@ # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=debian -ARG TAG=bookworm +ARG TAG=trixie FROM ${BASE}:${TAG} AS sunshine-base ENV DEBIAN_FRONTEND=noninteractive @@ -32,6 +32,7 @@ RUN <<_BUILD set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ + --cuda-patches \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ diff --git a/docker/ubuntu-22.04.dockerfile b/docker/ubuntu-22.04.dockerfile index 06032175..d8a8df42 100644 --- a/docker/ubuntu-22.04.dockerfile +++ b/docker/ubuntu-22.04.dockerfile @@ -35,7 +35,8 @@ chmod +x ./scripts/linux_build.sh --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ - --sudo-off + --sudo-off \ + --ubuntu-test-repo apt-get clean rm -rf /var/lib/apt/lists/* _BUILD diff --git a/docs/building.md b/docs/building.md index b7f5d402..919cfd3c 100644 --- a/docs/building.md +++ b/docs/building.md @@ -3,6 +3,15 @@ Sunshine binaries are built using [CMake](https://cmake.org) and requires `cmake ## Building Locally +### Compiler +It is recommended to use one of the following compilers: + +| Compiler | Version | +|:------------|:--------| +| GCC | 13+ | +| Clang | 17+ | +| Apple Clang | 15+ | + ### Dependencies #### Linux @@ -16,7 +25,7 @@ Sunshine requires CUDA Toolkit for NVFBC capture. There are two caveats to CUDA: 1. The version installed depends on the version of GCC. 2. The version of CUDA you use will determine compatibility with various GPU generations. - At the time of writing, the recommended version to use is CUDA ~11.8. + At the time of writing, the recommended version to use is CUDA ~12.9. See [CUDA compatibility](https://docs.nvidia.com/deploy/cuda-compatibility/index.html) for more info. @tip{To install older versions, select the appropriate run file based on your desired CUDA version and architecture diff --git a/docs/getting_started.md b/docs/getting_started.md index f3036239..2761fb56 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -31,7 +31,7 @@ See [Docker](../DOCKER_README.md) for more information. CUDA is used for NVFBC capture. @tip{See [CUDA GPUS](https://developer.nvidia.com/cuda-gpus) to cross-reference Compute Capability to your GPU. -The table below applies to packages provided by LizardByte. If you use an official LizardByte package then you do not +The table below applies to packages provided by LizardByte. If you use an official LizardByte package, then you do not need to install CUDA.} @@ -43,9 +43,9 @@ need to install CUDA.} - - - + + + @@ -55,27 +55,18 @@ need to install CUDA.} - - - - + - - - - - -
Package
11.8.0450.80.0235;50;52;60;61;62;70;72;75;80;86;87;89;9012.9.1575.57.0850;52;60;61;62;70;72;75;80;86;87;89;90 sunshine.AppImage
sunshine-ubuntu-24.04-{arch}.deb
12.0.0525.60.1350;52;60;61;62;70;72;75;80;86;87;89;90sunshine-debian-bookworm-{arch}.debsunshine-debian-trixie-{arch}.deb
12.6.2560.35.03 sunshine_{arch}.flatpak
Sunshine (copr - Fedora 41)
12.8.1570.124.06 Sunshine (copr - Fedora 42)
12.9.1575.57.08 sunshine.pkg.tar.zst
@@ -89,13 +80,15 @@ According to AppImageLint the supported distro matrix of the AppImage is below. - ✔ Debian bookworm - ✔ Debian trixie - ✔ Debian sid +- ✔ Ubuntu plucky - ✔ Ubuntu noble - ✔ Ubuntu jammy - ✖ Ubuntu focal - ✖ Ubuntu bionic - ✖ Ubuntu xenial - ✖ Ubuntu trusty -- ✖ CentOS 7 +- ✖ Rocky Linux 8 +- ✖ Rocky Linux 9 ##### Install 1. Download [sunshine.AppImage](https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.AppImage) diff --git a/packaging/linux/fedora/Sunshine.spec b/packaging/linux/fedora/Sunshine.spec index 798d0009..5184a3fa 100644 --- a/packaging/linux/fedora/Sunshine.spec +++ b/packaging/linux/fedora/Sunshine.spec @@ -56,18 +56,18 @@ BuildRequires: which BuildRequires: xorg-x11-server-Xvfb # Conditional BuildRequires for cuda-gcc based on Fedora version -%if 0%{?fedora} >= 40 && 0%{?fedora} <= 41 +%if 0%{?fedora} <= 41 BuildRequires: gcc13 BuildRequires: gcc13-c++ %global gcc_version 13 -%global cuda_version 12.6.3 -%global cuda_build 560.35.05 +%global cuda_version 12.9.1 +%global cuda_build 575.57.08 %elif %{?fedora} >= 42 BuildRequires: gcc14 BuildRequires: gcc14-c++ %global gcc_version 14 -%global cuda_version 12.8.1 -%global cuda_build 570.124.06 +%global cuda_version 12.9.1 +%global cuda_build 575.57.08 %endif %global cuda_dir %{_builddir}/cuda @@ -171,7 +171,7 @@ function install_cuda() { --backup \ --directory="%{cuda_dir}" \ --verbose \ - < "%{_builddir}/Sunshine/packaging/linux/fedora/patches/f42/${architecture}/01-math_functions.patch" + < "%{_builddir}/Sunshine/packaging/linux/patches/${architecture}/01-math_functions.patch" fi } diff --git a/packaging/linux/flatpak/modules/cuda.json b/packaging/linux/flatpak/modules/cuda.json index 3e10f2fb..27fdb581 100644 --- a/packaging/linux/flatpak/modules/cuda.json +++ b/packaging/linux/flatpak/modules/cuda.json @@ -19,8 +19,8 @@ "only-arches": [ "x86_64" ], - "url": "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run", - "sha256": "3729a89cb58f7ca6a46719cff110d6292aec7577585a8d71340f0dbac54fb237", + "url": "https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda_12.9.1_575.57.08_linux.run", + "sha256": "0f6d806ddd87230d2adbe8a6006a9d20144fdbda9de2d6acc677daa5d036417a", "dest-filename": "cuda.run" }, { @@ -28,8 +28,8 @@ "only-arches": [ "aarch64" ], - "url": "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux_sbsa.run", - "sha256": "2249408848b705c18b9eadfb5161b52e4e36fcc5753647329cce93db141e5466", + "url": "https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda_12.9.1_575.57.08_linux_sbsa.run", + "sha256": "64f47ab791a76b6889702425e0755385f5fa216c5a9f061875c7deed5f08cdb6", "dest-filename": "cuda.run" } ] diff --git a/packaging/linux/fedora/patches/f42/aarch64/01-math_functions.patch b/packaging/linux/patches/aarch64/01-math_functions.patch similarity index 100% rename from packaging/linux/fedora/patches/f42/aarch64/01-math_functions.patch rename to packaging/linux/patches/aarch64/01-math_functions.patch diff --git a/packaging/linux/fedora/patches/f42/x86_64/01-math_functions.patch b/packaging/linux/patches/x86_64/01-math_functions.patch similarity index 100% rename from packaging/linux/fedora/patches/f42/x86_64/01-math_functions.patch rename to packaging/linux/patches/x86_64/01-math_functions.patch diff --git a/scripts/linux_build.sh b/scripts/linux_build.sh index abab4754..bfffacb2 100755 --- a/scripts/linux_build.sh +++ b/scripts/linux_build.sh @@ -3,6 +3,7 @@ set -e # Default value for arguments appimage_build=0 +cuda_patches=0 num_processors=$(nproc) publisher_name="Third Party Publisher" publisher_website="" @@ -28,6 +29,7 @@ Options: -h, --help Display this help message. -s, --sudo-off Disable sudo command. --appimage-build Compile for AppImage, this will not create the AppImage, just the executable. + --cuda-patches Apply cuda patches. --num-processors The number of processors to use for compilation. Default is the value of 'nproc'. --publisher-name The name of the publisher (not developer) of the application. --publisher-website The URL of the publisher's website. @@ -55,6 +57,9 @@ while getopts ":hs-:" opt; do appimage_build=1 skip_libva=1 ;; + cuda-patches) + cuda_patches=1 + ;; num-processors=*) num_processors="${OPTARG#*=}" ;; @@ -185,7 +190,15 @@ function add_debian_based_deps() { fi } +function add_test_ppa() { + if [ "$ubuntu_test_repo" == 1 ]; then + $package_install_command "software-properties-common" + ${sudo_cmd} add-apt-repository ppa:ubuntu-toolchain-r/test -y + fi +} + function add_debian_deps() { + add_test_ppa add_debian_based_deps dependencies+=( "libayatana-appindicator3-dev" @@ -193,11 +206,7 @@ function add_debian_deps() { } function add_ubuntu_deps() { - if [ "$ubuntu_test_repo" == 1 ]; then - # allow newer gcc - ${sudo_cmd} add-apt-repository ppa:ubuntu-toolchain-r/test -y - fi - + add_test_ppa add_debian_based_deps dependencies+=( "libappindicator3-dev" @@ -298,6 +307,24 @@ function install_cuda() { "${build_dir}/cuda.run" --silent --toolkit --toolkitpath="${build_dir}/cuda" --no-opengl-libs --no-man-page --no-drm rm "${build_dir}/cuda.run" nvcc_path="${build_dir}/cuda/bin/nvcc" + + # run cuda patches + if [ "$cuda_patches" == 1 ]; then + echo "Applying CUDA patches" + local patch_dir="${script_dir}/../packaging/linux/patches/${architecture}" + if [ -d "$patch_dir" ]; then + for patch in "$patch_dir"/*.patch; do + echo "Applying patch: $patch" + patch -p2 \ + --backup \ + --directory="${build_dir}/cuda" \ + --verbose \ + < "$patch" + done + else + echo "No patches found for architecture: $architecture" + fi + fi } function check_version() { @@ -536,27 +563,26 @@ elif grep -q "Debian GNU/Linux 12 (bookworm)" /etc/os-release; then version="12" package_update_command="${sudo_cmd} apt-get update" package_install_command="${sudo_cmd} apt-get install -y" - cuda_version="12.0.0" - cuda_build="525.60.13" - gcc_version="12" - nvm_node=0 -elif grep -q "PLATFORM_ID=\"platform:f40\"" /etc/os-release; then - distro="fedora" - version="40" - package_update_command="${sudo_cmd} dnf update -y" - package_install_command="${sudo_cmd} dnf install -y" - cuda_version=12.6.3 - cuda_build=560.35.05 + cuda_version="12.9.1" + cuda_build="575.57.08" gcc_version="13" nvm_node=0 - dev_tools_group="Development Tools" +elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then + distro="debian" + version="13" + package_update_command="${sudo_cmd} apt-get update" + package_install_command="${sudo_cmd} apt-get install -y" + cuda_version="12.9.1" + cuda_build="575.57.08" + gcc_version="14" + nvm_node=0 elif grep -q "PLATFORM_ID=\"platform:f41\"" /etc/os-release; then distro="fedora" version="41" package_update_command="${sudo_cmd} dnf update -y" package_install_command="${sudo_cmd} dnf install -y" - cuda_version=12.6.3 - cuda_build=560.35.05 + cuda_version="12.9.1" + cuda_build="575.57.08" gcc_version="13" nvm_node=0 dev_tools_group="development-tools" @@ -565,8 +591,8 @@ elif grep -q "PLATFORM_ID=\"platform:f42\"" /etc/os-release; then version="42" package_update_command="${sudo_cmd} dnf update -y" package_install_command="${sudo_cmd} dnf install -y" - cuda_version=12.8.1 - cuda_build=570.124.06 + cuda_version="12.9.1" + cuda_build="575.57.08" gcc_version="14" nvm_node=0 dev_tools_group="development-tools" @@ -575,27 +601,27 @@ elif grep -q "Ubuntu 22.04" /etc/os-release; then version="22.04" package_update_command="${sudo_cmd} apt-get update" package_install_command="${sudo_cmd} apt-get install -y" - cuda_version="11.8.0" - cuda_build="520.61.05" - gcc_version="11" + cuda_version="12.9.1" + cuda_build="575.57.08" + gcc_version="13" nvm_node=1 elif grep -q "Ubuntu 24.04" /etc/os-release; then distro="ubuntu" version="24.04" package_update_command="${sudo_cmd} apt-get update" package_install_command="${sudo_cmd} apt-get install -y" - cuda_version="11.8.0" - cuda_build="520.61.05" - gcc_version="11" + cuda_version="12.9.1" + cuda_build="575.57.08" + gcc_version="14" nvm_node=0 elif grep -q "Ubuntu 25.04" /etc/os-release; then distro="ubuntu" version="25.04" package_update_command="${sudo_cmd} apt-get update" package_install_command="${sudo_cmd} apt-get install -y" - cuda_version="11.8.0" - cuda_build="520.61.05" - gcc_version="11" + cuda_version="12.9.1" + cuda_build="575.57.08" + gcc_version="14" nvm_node=0 else echo "Unsupported Distro or Version" From dbe80d0f92367bc5e1d290f11a407f1f04a29b46 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 7 Aug 2025 23:17:13 -0400 Subject: [PATCH 07/73] style(sonar): fix cpp:S6185 (#4133) --- .github/workflows/ci-homebrew.yml | 2 -- .github/workflows/ci.yml | 2 -- README.md | 6 +++--- packaging/sunshine.rb | 14 ++++++++++++++ src/confighttp.cpp | 5 +++-- src/entry_handler.cpp | 13 ++++++------- src/entry_handler.h | 12 +++--------- src/nvenc/nvenc_base.cpp | 7 +++++-- src/nvhttp.cpp | 23 ++++++++++++++++++++--- src/platform/linux/vaapi.cpp | 3 ++- src/platform/windows/audio.cpp | 8 +++++--- src/rtsp.cpp | 3 ++- src/system_tray.cpp | 2 +- tests/unit/test_display_device.cpp | 3 ++- tests/unit/test_file_handler.cpp | 5 +++-- tests/unit/test_logging.cpp | 3 ++- tools/sunshinesvc.cpp | 3 ++- 17 files changed, 73 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci-homebrew.yml b/.github/workflows/ci-homebrew.yml index 1b8eb724..dfb232be 100644 --- a/.github/workflows/ci-homebrew.yml +++ b/.github/workflows/ci-homebrew.yml @@ -36,8 +36,6 @@ jobs: include: # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories # while GitHub has larger macOS runners, they are not available for our repos :( - - os_version: "13" - os_name: "macos" - os_version: "14" os_name: "macos" - os_version: "15" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02ef92cc..e4266bfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,8 +137,6 @@ jobs: include: - name: Linux-AppImage coverage: true - - name: Homebrew-macos-13 - coverage: false - name: Homebrew-macos-14 coverage: false - name: Homebrew-macos-15 diff --git a/README.md b/README.md index 80733b20..63cc9a2d 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,13 @@ LizardByte has the full documentation hosted on [Read the Docs](https://docs.liz Windows: 10+ (Windows Server does not support virtual gamepads) - macOS: 13+ + macOS: 14+ - Linux/Debian: 12+ (bookworm) + Linux/Debian: 13+ (trixie) - Linux/Fedora: 40+ + Linux/Fedora: 41+ Linux/Ubuntu: 22.04+ (jammy) diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 97eb9fe5..33eab1e7 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -37,6 +37,10 @@ class @PROJECT_NAME@ < Formula depends_on "opus" depends_on "icu4c" => :recommended + on_macos do + depends_on xcode: ["15.3", :build] + end + on_linux do depends_on "avahi" depends_on "libayatana-appindicator" @@ -59,6 +63,16 @@ class @PROJECT_NAME@ < Formula depends_on "wayland" end + fails_with :clang do + build 1400 + cause "Requires C++23 support" + end + + fails_with :gcc do + version "12" # fails with GCC 12.x and earlier + cause "Requires C++23 support" + end + def install ENV["BRANCH"] = "@GITHUB_BRANCH@" ENV["BUILD_VERSION"] = "@BUILD_VERSION@" diff --git a/src/confighttp.cpp b/src/confighttp.cpp index b50e94d9..5fad47bb 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -8,6 +8,7 @@ // standard includes #include +#include #include #include @@ -713,7 +714,7 @@ namespace confighttp { if (const int max_index = static_cast(apps_node.size()) - 1; max_index < 0) { error = "No applications to delete"; } else { - error = "'index' out of range, max index is "s + std::to_string(max_index); + error = std::format("'index' {} out of range, max index is {}", index, max_index); } bad_request(response, request, error); return; @@ -730,7 +731,7 @@ namespace confighttp { proc::refresh(config::stream.file_apps); output_tree["status"] = true; - output_tree["result"] = "application " + std::to_string(index) + " deleted"; + output_tree["result"] = std::format("application {} deleted", index); send_response(response, output_tree); } catch (std::exception &e) { BOOST_LOG(warning) << "DeleteApp: "sv << e.what(); diff --git a/src/entry_handler.cpp b/src/entry_handler.cpp index 9ac07649..3986be5c 100644 --- a/src/entry_handler.cpp +++ b/src/entry_handler.cpp @@ -4,6 +4,7 @@ */ // standard includes #include +#include #include #include @@ -25,13 +26,11 @@ extern "C" { using namespace std::literals; -void launch_ui() { - std::string url = "https://localhost:" + std::to_string(net::map_port(confighttp::PORT_HTTPS)); - platf::open_url(url); -} - -void launch_ui_with_path(std::string path) { - std::string url = "https://localhost:" + std::to_string(net::map_port(confighttp::PORT_HTTPS)) + path; +void launch_ui(const std::optional &path) { + std::string url = std::format("https://localhost:{}", static_cast(net::map_port(confighttp::PORT_HTTPS))); + if (path) { + url += *path; + } platf::open_url(url); } diff --git a/src/entry_handler.h b/src/entry_handler.h index a83fed29..8d5a03e7 100644 --- a/src/entry_handler.h +++ b/src/entry_handler.h @@ -14,19 +14,13 @@ /** * @brief Launch the Web UI. + * @param path Optional path to append to the base URL. * @examples * launch_ui(); + * launch_ui("/pin"); * @examples_end */ -void launch_ui(); - -/** - * @brief Launch the Web UI at a specific endpoint. - * @examples - * launch_ui_with_path("/pin"); - * @examples_end - */ -void launch_ui_with_path(std::string path); +void launch_ui(const std::optional &path = std::nullopt); /** * @brief Functions for handling command line arguments. diff --git a/src/nvenc/nvenc_base.cpp b/src/nvenc/nvenc_base.cpp index bcd12ca1..431b7de2 100644 --- a/src/nvenc/nvenc_base.cpp +++ b/src/nvenc/nvenc_base.cpp @@ -5,6 +5,9 @@ // this include #include "nvenc_base.h" +// standard includes +#include + // local includes #include "src/config.h" #include "src/logging.h" @@ -427,7 +430,7 @@ namespace nvenc { extra += " two-pass"; } if (config.vbv_percentage_increase > 0 && get_encoder_cap(NV_ENC_CAPS_SUPPORT_CUSTOM_VBV_BUF_SIZE)) { - extra += " vbv+" + std::to_string(config.vbv_percentage_increase); + extra += std::format(" vbv+{}", config.vbv_percentage_increase); } if (encoder_params.rfi) { extra += " rfi"; @@ -439,7 +442,7 @@ namespace nvenc { extra += " spatial-aq"; } if (enc_config.rcParams.enableMinQP) { - extra += " qpmin=" + std::to_string(enc_config.rcParams.minQP.qpInterP); + extra += std::format(" qpmin={}", enc_config.rcParams.minQP.qpInterP); } if (config.insert_filler_data) { extra += " filler-data"; diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 6b518bf9..3511ad32 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -7,6 +7,7 @@ // standard includes #include +#include #include #include @@ -636,7 +637,7 @@ namespace nvhttp { tree.put("root..status_code", 400); tree.put( "root..status_message", - "Pin must be 4 digits, " + std::to_string(pin.size()) + " provided" + std::format("Pin must be 4 digits, {} provided", pin.size()) ); return false; } @@ -896,7 +897,15 @@ namespace nvhttp { } tree.put("root..status_code", 200); - tree.put("root.sessionUrl0", launch_session->rtsp_url_scheme + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(net::map_port(rtsp_stream::RTSP_SETUP_PORT))); + tree.put( + "root.sessionUrl0", + std::format( + "{}{}:{}", + launch_session->rtsp_url_scheme, + net::addr_to_url_escaped_string(request->local_endpoint().address()), + static_cast(net::map_port(rtsp_stream::RTSP_SETUP_PORT)) + ) + ); tree.put("root.gamesession", 1); rtsp_stream::launch_session_raise(launch_session); @@ -978,7 +987,15 @@ namespace nvhttp { } tree.put("root..status_code", 200); - tree.put("root.sessionUrl0", launch_session->rtsp_url_scheme + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(net::map_port(rtsp_stream::RTSP_SETUP_PORT))); + tree.put( + "root.sessionUrl0", + std::format( + "{}{}:{}", + launch_session->rtsp_url_scheme, + net::addr_to_url_escaped_string(request->local_endpoint().address()), + static_cast(net::map_port(rtsp_stream::RTSP_SETUP_PORT)) + ) + ); tree.put("root.resume", 1); rtsp_stream::launch_session_raise(launch_session); diff --git a/src/platform/linux/vaapi.cpp b/src/platform/linux/vaapi.cpp index 88444d10..1a38c4ec 100644 --- a/src/platform/linux/vaapi.cpp +++ b/src/platform/linux/vaapi.cpp @@ -4,6 +4,7 @@ */ // standard includes #include +#include #include #include @@ -574,7 +575,7 @@ namespace va { if (!display) { char string[1024]; - auto bytes = readlink(("/proc/self/fd/" + std::to_string(fd)).c_str(), string, sizeof(string)); + auto bytes = readlink(std::format("/proc/self/fd/{}", fd).c_str(), string, sizeof(string)); std::string_view render_device {string, (std::size_t) bytes}; diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index 94863409..48738cb3 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -4,6 +4,9 @@ */ #define INITGUID +// standard includes +#include + // platform includes #include #include @@ -168,8 +171,7 @@ namespace { waveformat.SubFormat == KSDATAFORMAT_SUBTYPE_PCM ? "S" : "UNKNOWN"; - result += std::to_string(waveformat.Samples.wValidBitsPerSample) + " " + - std::to_string(waveformat.Format.nSamplesPerSec) + " "; + result += std::format("{} {} ", static_cast(waveformat.Samples.wValidBitsPerSample), static_cast(waveformat.Format.nSamplesPerSec)); switch (waveformat.dwChannelMask) { case waveformat_mask_stereo: @@ -189,7 +191,7 @@ namespace { break; default: - result += std::to_string(waveformat.Format.nChannels) + " channels (unrecognized)"; + result += std::format("{} channels (unrecognized)", static_cast(waveformat.Format.nChannels)); break; } diff --git a/src/rtsp.cpp b/src/rtsp.cpp index cd43dd0c..25647e2e 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -12,6 +12,7 @@ extern "C" { // standard includes #include #include +#include #include #include #include @@ -864,7 +865,7 @@ namespace rtsp_stream { session_option.next = &port_option; // Moonlight merely requires 'server_port=' - auto port_value = "server_port=" + std::to_string(port); + auto port_value = std::format("server_port={}", static_cast(port)); port_option.option = const_cast("Transport"); port_option.content = port_value.data(); diff --git a/src/system_tray.cpp b/src/system_tray.cpp index f792c741..255904b0 100644 --- a/src/system_tray.cpp +++ b/src/system_tray.cpp @@ -305,7 +305,7 @@ namespace system_tray { tray.notification_icon = TRAY_ICON_LOCKED; tray.tooltip = PROJECT_NAME; tray.notification_cb = []() { - launch_ui_with_path("/pin"); + launch_ui("/pin"); }; tray_update(&tray); } diff --git a/tests/unit/test_display_device.cpp b/tests/unit/test_display_device.cpp index 92133c3c..cf7992fa 100644 --- a/tests/unit/test_display_device.cpp +++ b/tests/unit/test_display_device.cpp @@ -4,6 +4,7 @@ */ #include "../tests_common.h" +#include #include #include #include @@ -473,7 +474,7 @@ namespace { } else { const auto [manual_res] = std::get>(input_res); video_config.dd.resolution_option = manual; - video_config.dd.manual_resolution = std::to_string(manual_res.m_width) + "x"s + std::to_string(manual_res.m_height); + video_config.dd.manual_resolution = std::format("{}x{}", static_cast(manual_res.m_width), static_cast(manual_res.m_height)); } } diff --git a/tests/unit/test_file_handler.cpp b/tests/unit/test_file_handler.cpp index 99872cc6..cf5b8a1f 100644 --- a/tests/unit/test_file_handler.cpp +++ b/tests/unit/test_file_handler.cpp @@ -4,6 +4,7 @@ */ #include "../tests_common.h" +#include #include struct FileHandlerParentDirectoryTest: testing::TestWithParam> {}; @@ -79,13 +80,13 @@ Hey, hey, hey! TEST_P(FileHandlerTests, WriteFileTest) { auto [fileNum, content] = GetParam(); - std::string fileName = "write_file_test_" + std::to_string(fileNum) + ".txt"; + const std::string fileName = std::format("write_file_test_{}.txt", fileNum); EXPECT_EQ(file_handler::write_file(fileName.c_str(), content), 0); } TEST_P(FileHandlerTests, ReadFileTest) { auto [fileNum, content] = GetParam(); - std::string fileName = "write_file_test_" + std::to_string(fileNum) + ".txt"; + const std::string fileName = std::format("write_file_test_{}.txt", fileNum); EXPECT_EQ(file_handler::read_file(fileName.c_str()), content); } diff --git a/tests/unit/test_logging.cpp b/tests/unit/test_logging.cpp index 0b4c2273..cc638859 100644 --- a/tests/unit/test_logging.cpp +++ b/tests/unit/test_logging.cpp @@ -5,6 +5,7 @@ #include "../tests_common.h" #include "../tests_log_checker.h" +#include #include #include @@ -39,7 +40,7 @@ TEST_P(LogLevelsTest, PutMessage) { std::random_device rand_dev; std::mt19937_64 rand_gen(rand_dev()); - auto test_message = std::to_string(rand_gen()) + std::to_string(rand_gen()); + auto test_message = std::format("{}{}", rand_gen(), rand_gen()); BOOST_LOG(logger) << test_message; ASSERT_TRUE(log_checker::line_contains(log_file, test_message)); diff --git a/tools/sunshinesvc.cpp b/tools/sunshinesvc.cpp index 9ff124ed..bd9522b9 100644 --- a/tools/sunshinesvc.cpp +++ b/tools/sunshinesvc.cpp @@ -3,6 +3,7 @@ * @brief Handles launching Sunshine.exe into user sessions as SYSTEM */ #define WIN32_LEAN_AND_MEAN +#include #include #include #include @@ -137,7 +138,7 @@ bool RunTerminationHelper(HANDLE console_token, DWORD pid) { command += L'"'; command += module_path; command += L'"'; - command += L" --terminate " + std::to_wstring(pid); + command += std::format(L" --terminate {}", pid); STARTUPINFOW startup_info = {}; startup_info.cb = sizeof(startup_info); From fc7b9e30c89101e0a50f28d3d5ed534155cc4a26 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 8 Aug 2025 00:45:53 -0400 Subject: [PATCH 08/73] style(sonar): fix cpp:S4962 (#4140) --- src/config.cpp | 2 +- src/entry_handler.cpp | 4 +- src/main.cpp | 2 +- src/nvenc/nvenc_d3d11.cpp | 8 +-- src/nvenc/nvenc_d3d11.h | 2 +- src/nvenc/nvenc_d3d11_on_cuda.cpp | 2 +- src/nvenc/nvenc_d3d11_on_cuda.h | 2 +- src/nvhttp.cpp | 2 +- src/platform/windows/audio.cpp | 4 +- src/platform/windows/display_base.cpp | 32 +++++----- src/platform/windows/display_vram.cpp | 2 +- src/platform/windows/input.cpp | 4 +- src/platform/windows/misc.cpp | 54 ++++++++-------- .../windows/nvprefs/driver_settings.cpp | 8 +-- .../windows/nvprefs/driver_settings.h | 2 +- .../nvprefs/nvapi_opensource_wrapper.cpp | 6 +- src/platform/windows/nvprefs/nvprefs_common.h | 2 +- src/platform/windows/nvprefs/undo_file.cpp | 4 +- src/system_tray.cpp | 34 +++++----- tools/sunshinesvc.cpp | 62 +++++++++---------- 20 files changed, 119 insertions(+), 119 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 17faacb4..24ef2a08 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1421,7 +1421,7 @@ namespace config { if (!service_ctrl::is_service_running()) { // If the service isn't running, relaunch ourselves as admin to start it WCHAR executable[MAX_PATH]; - GetModuleFileNameW(NULL, executable, ARRAYSIZE(executable)); + GetModuleFileNameW(nullptr, executable, ARRAYSIZE(executable)); SHELLEXECUTEINFOW shell_exec_info {}; shell_exec_info.cbSize = sizeof(shell_exec_info); diff --git a/src/entry_handler.cpp b/src/entry_handler.cpp index 3986be5c..8c741273 100644 --- a/src/entry_handler.cpp +++ b/src/entry_handler.cpp @@ -191,8 +191,8 @@ namespace service_ctrl { } private: - SC_HANDLE scm_handle = NULL; - SC_HANDLE service_handle = NULL; + SC_HANDLE scm_handle = nullptr; + SC_HANDLE service_handle = nullptr; }; bool is_service_running() { diff --git a/src/main.cpp b/src/main.cpp index ed0945d8..d7dc1d1c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) { wnd_class.lpszClassName = "SunshineSessionMonitorClass"; wnd_class.lpfnWndProc = SessionMonitorWindowProc; if (!RegisterClassA(&wnd_class)) { - session_monitor_hwnd_promise.set_value(NULL); + session_monitor_hwnd_promise.set_value(nullptr); BOOST_LOG(error) << "Failed to register session monitor window class"sv << std::endl; return; } diff --git a/src/nvenc/nvenc_d3d11.cpp b/src/nvenc/nvenc_d3d11.cpp index 74670acd..1b749f92 100644 --- a/src/nvenc/nvenc_d3d11.cpp +++ b/src/nvenc/nvenc_d3d11.cpp @@ -12,13 +12,13 @@ namespace nvenc { nvenc_d3d11::nvenc_d3d11(NV_ENC_DEVICE_TYPE device_type): nvenc_base(device_type) { - async_event_handle = CreateEvent(NULL, FALSE, FALSE, NULL); + async_event_handle = CreateEvent(nullptr, FALSE, FALSE, nullptr); } nvenc_d3d11::~nvenc_d3d11() { if (dll) { FreeLibrary(dll); - dll = NULL; + dll = nullptr; } if (async_event_handle) { CloseHandle(async_event_handle); @@ -36,7 +36,7 @@ namespace nvenc { constexpr auto dll_name = "nvEncodeAPI.dll"; #endif - if ((dll = LoadLibraryEx(dll_name, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32))) { + if ((dll = LoadLibraryEx(dll_name, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32))) { if (auto create_instance = (decltype(NvEncodeAPICreateInstance) *) GetProcAddress(dll, "NvEncodeAPICreateInstance")) { auto new_nvenc = std::make_unique(); new_nvenc->version = min_struct_version(NV_ENCODE_API_FUNCTION_LIST_VER); @@ -55,7 +55,7 @@ namespace nvenc { if (dll) { FreeLibrary(dll); - dll = NULL; + dll = nullptr; } return false; diff --git a/src/nvenc/nvenc_d3d11.h b/src/nvenc/nvenc_d3d11.h index efacb607..19facee0 100644 --- a/src/nvenc/nvenc_d3d11.h +++ b/src/nvenc/nvenc_d3d11.h @@ -39,7 +39,7 @@ namespace nvenc { bool wait_for_async_event(uint32_t timeout_ms) override; private: - HMODULE dll = NULL; + HMODULE dll = nullptr; }; } // namespace nvenc diff --git a/src/nvenc/nvenc_d3d11_on_cuda.cpp b/src/nvenc/nvenc_d3d11_on_cuda.cpp index 02436e69..b915b329 100644 --- a/src/nvenc/nvenc_d3d11_on_cuda.cpp +++ b/src/nvenc/nvenc_d3d11_on_cuda.cpp @@ -63,7 +63,7 @@ namespace nvenc { constexpr auto dll_name = "nvcuda.dll"; - if ((cuda_functions.dll = LoadLibraryEx(dll_name, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32))) { + if ((cuda_functions.dll = LoadLibraryEx(dll_name, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32))) { auto load_function = [&](T &location, auto symbol) -> bool { location = (T) GetProcAddress(cuda_functions.dll, symbol); return location != nullptr; diff --git a/src/nvenc/nvenc_d3d11_on_cuda.h b/src/nvenc/nvenc_d3d11_on_cuda.h index 1c912f50..102e1809 100644 --- a/src/nvenc/nvenc_d3d11_on_cuda.h +++ b/src/nvenc/nvenc_d3d11_on_cuda.h @@ -56,7 +56,7 @@ namespace nvenc { autopop_context push_context(); - HMODULE dll = NULL; + HMODULE dll = nullptr; const ID3D11DevicePtr d3d_device; ID3D11Texture2DPtr d3d_input_texture; diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 3511ad32..c1d9401c 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -155,7 +155,7 @@ namespace nvhttp { std::string get_arg(const args_t &args, const char *name, const char *default_value = nullptr) { auto it = args.find(name); if (it == std::end(args)) { - if (default_value != NULL) { + if (default_value != nullptr) { return std::string(default_value); } diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index 48738cb3..964a6afb 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -377,7 +377,7 @@ namespace platf::audio { *ppvInterface = (IMMNotificationClient *) this; return S_OK; } else { - *ppvInterface = NULL; + *ppvInterface = nullptr; return E_NOINTERFACE; } } @@ -679,7 +679,7 @@ namespace platf::audio { float *sample_buf_pos; int channels; - HANDLE mmcss_task_handle = NULL; + HANDLE mmcss_task_handle = nullptr; }; class audio_control_t: public ::platf::audio_control_t { diff --git a/src/platform/windows/display_base.cpp b/src/platform/windows/display_base.cpp index 66985662..2538a690 100644 --- a/src/platform/windows/display_base.cpp +++ b/src/platform/windows/display_base.cpp @@ -601,12 +601,12 @@ namespace platf::dxgi { LUID val; if (OpenProcessToken(GetCurrentProcess(), flags, &token) && - !!LookupPrivilegeValue(NULL, SE_INC_BASE_PRIORITY_NAME, &val)) { + !!LookupPrivilegeValue(nullptr, SE_INC_BASE_PRIORITY_NAME, &val)) { tp.PrivilegeCount = 1; tp.Privileges[0].Luid = val; tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - if (!AdjustTokenPrivileges(token, false, &tp, sizeof(tp), NULL, NULL)) { + if (!AdjustTokenPrivileges(token, false, &tp, sizeof(tp), nullptr, nullptr)) { BOOST_LOG(warning) << "Could not set privilege to increase GPU priority"; } } @@ -918,20 +918,20 @@ namespace platf::dxgi { "DXGI_FORMAT_A8P8", "DXGI_FORMAT_B4G4R4A4_UNORM", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, "DXGI_FORMAT_P208", "DXGI_FORMAT_V208", diff --git a/src/platform/windows/display_vram.cpp b/src/platform/windows/display_vram.cpp index 447fc534..b537e6e6 100644 --- a/src/platform/windows/display_vram.cpp +++ b/src/platform/windows/display_vram.cpp @@ -1739,7 +1739,7 @@ namespace platf::dxgi { img->data = nullptr; if (img->encoder_texture_handle) { CloseHandle(img->encoder_texture_handle); - img->encoder_texture_handle = NULL; + img->encoder_texture_handle = nullptr; } // Initialize format-dependent fields diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 68bca308..02310ec3 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -293,7 +293,7 @@ namespace platf { if (gamepad.repeat_task) { task_pool.cancel(gamepad.repeat_task); - gamepad.repeat_task = 0; + gamepad.repeat_task = nullptr; } if (gamepad.gp && vigem_target_is_attached(gamepad.gp.get())) { @@ -1452,7 +1452,7 @@ namespace platf { // Cancel any pending updates. We will requeue one here when we're finished. if (gamepad.repeat_task) { task_pool.cancel(gamepad.repeat_task); - gamepad.repeat_task = 0; + gamepad.repeat_task = nullptr; } if (gamepad.gp && vigem_target_is_attached(gamepad.gp.get())) { diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index 4358ea1a..a921c3cc 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -117,7 +117,7 @@ namespace platf { std::filesystem::path appdata() { WCHAR sunshine_path[MAX_PATH]; - GetModuleFileNameW(NULL, sunshine_path, _countof(sunshine_path)); + GetModuleFileNameW(nullptr, sunshine_path, _countof(sunshine_path)); return std::filesystem::path {sunshine_path}.remove_filename() / L"config"sv; } @@ -410,16 +410,16 @@ namespace platf { LPPROC_THREAD_ATTRIBUTE_LIST allocate_proc_thread_attr_list(DWORD attribute_count) { SIZE_T size; - InitializeProcThreadAttributeList(NULL, attribute_count, 0, &size); + InitializeProcThreadAttributeList(nullptr, attribute_count, 0, &size); auto list = (LPPROC_THREAD_ATTRIBUTE_LIST) HeapAlloc(GetProcessHeap(), 0, size); - if (list == NULL) { - return NULL; + if (list == nullptr) { + return nullptr; } if (!InitializeProcThreadAttributeList(list, attribute_count, 0, &size)) { HeapFree(GetProcessHeap(), 0, list); - return NULL; + return nullptr; } return list; @@ -518,7 +518,7 @@ namespace platf { // Allocate a process attribute list with space for 2 elements startup_info.lpAttributeList = allocate_proc_thread_attr_list(2); - if (startup_info.lpAttributeList == NULL) { + if (startup_info.lpAttributeList == nullptr) { // If the allocation failed, set ec to an appropriate error code and return the structure ec = std::make_error_code(std::errc::not_enough_memory); return startup_info; @@ -530,7 +530,7 @@ namespace platf { // Populate std handles if the caller gave us a log file to use startup_info.StartupInfo.dwFlags |= STARTF_USESTDHANDLES; - startup_info.StartupInfo.hStdInput = NULL; + startup_info.StartupInfo.hStdInput = nullptr; startup_info.StartupInfo.hStdOutput = log_file_handle; startup_info.StartupInfo.hStdError = log_file_handle; @@ -539,7 +539,7 @@ namespace platf { // // Note: The value we point to here must be valid for the lifetime of the attribute list, // so we need to point into the STARTUPINFO instead of our log_file_variable on the stack. - UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, &startup_info.StartupInfo.hStdOutput, sizeof(startup_info.StartupInfo.hStdOutput), NULL, NULL); + UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, &startup_info.StartupInfo.hStdOutput, sizeof(startup_info.StartupInfo.hStdOutput), nullptr, nullptr); } if (job) { @@ -547,7 +547,7 @@ namespace platf { // // Note: The value we point to here must be valid for the lifetime of the attribute list, // so we take a HANDLE* instead of just a HANDLE to use the caller's stack storage. - UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, job, sizeof(*job), NULL, NULL); + UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, job, sizeof(*job), nullptr, nullptr); } return startup_info; @@ -555,11 +555,11 @@ namespace platf { /** * @brief This function overrides HKEY_CURRENT_USER and HKEY_CLASSES_ROOT using the provided token. - * @param token The primary token identifying the user to use, or `NULL` to restore original keys. + * @param token The primary token identifying the user to use, or `nullptr` to restore original keys. * @return `true` if the override or restore operation was successful. */ bool override_per_user_predefined_keys(HANDLE token) { - HKEY user_classes_root = NULL; + HKEY user_classes_root = nullptr; if (token) { auto err = RegOpenUserClassesRoot(token, 0, GENERIC_ALL, &user_classes_root); if (err != ERROR_SUCCESS) { @@ -573,14 +573,14 @@ namespace platf { } }); - HKEY user_key = NULL; + HKEY user_key = nullptr; if (token) { impersonate_current_user(token, [&]() { // RegOpenCurrentUser() doesn't take a token. It assumes we're impersonating the desired user. auto err = RegOpenCurrentUser(GENERIC_ALL, &user_key); if (err != ERROR_SUCCESS) { BOOST_LOG(error) << "Failed to open user key for target user: "sv << err; - user_key = NULL; + user_key = nullptr; } }); if (!user_key) { @@ -602,7 +602,7 @@ namespace platf { err = RegOverridePredefKey(HKEY_CURRENT_USER, user_key); if (err != ERROR_SUCCESS) { BOOST_LOG(error) << "Failed to override HKEY_CURRENT_USER: "sv << err; - RegOverridePredefKey(HKEY_CLASSES_ROOT, NULL); + RegOverridePredefKey(HKEY_CLASSES_ROOT, nullptr); return false; } @@ -671,7 +671,7 @@ namespace platf { * @details This converts URLs and non-executable file paths into a runnable command like ShellExecute(). * @param raw_cmd The raw command provided by the user. * @param working_dir The working directory for the new process. - * @param token The user token currently being impersonated or `NULL` if running as ourselves. + * @param token The user token currently being impersonated or `nullptr` if running as ourselves. * @param creation_flags The creation flags for CreateProcess(), which may be modified by this function. * @return A command string suitable for use by CreateProcess(). */ @@ -757,7 +757,7 @@ namespace platf { } // Reset per-user keys back to the original value - override_per_user_predefined_keys(NULL); + override_per_user_predefined_keys(nullptr); } if (res != S_OK) { @@ -972,7 +972,7 @@ namespace platf { ec = impersonate_current_user(user_token, [&]() { std::wstring env_block = create_environment_block(cloned_env); std::wstring wcmd = resolve_command_string(cmd, start_dir, user_token, creation_flags); - ret = CreateProcessAsUserW(user_token, NULL, (LPWSTR) wcmd.c_str(), NULL, NULL, !!(startup_info.StartupInfo.dwFlags & STARTF_USESTDHANDLES), creation_flags, env_block.data(), start_dir.empty() ? NULL : start_dir.c_str(), (LPSTARTUPINFOW) &startup_info, &process_info); + ret = CreateProcessAsUserW(user_token, nullptr, (LPWSTR) wcmd.c_str(), nullptr, nullptr, !!(startup_info.StartupInfo.dwFlags & STARTF_USESTDHANDLES), creation_flags, env_block.data(), start_dir.empty() ? nullptr : start_dir.c_str(), (LPSTARTUPINFOW) &startup_info, &process_info); }); } // Otherwise, launch the process using CreateProcessW() @@ -995,8 +995,8 @@ namespace platf { } std::wstring env_block = create_environment_block(cloned_env); - std::wstring wcmd = resolve_command_string(cmd, start_dir, NULL, creation_flags); - ret = CreateProcessW(NULL, (LPWSTR) wcmd.c_str(), NULL, NULL, !!(startup_info.StartupInfo.dwFlags & STARTF_USESTDHANDLES), creation_flags, env_block.data(), start_dir.empty() ? NULL : start_dir.c_str(), (LPSTARTUPINFOW) &startup_info, &process_info); + std::wstring wcmd = resolve_command_string(cmd, start_dir, nullptr, creation_flags); + ret = CreateProcessW(nullptr, (LPWSTR) wcmd.c_str(), nullptr, nullptr, !!(startup_info.StartupInfo.dwFlags & STARTF_USESTDHANDLES), creation_flags, env_block.data(), start_dir.empty() ? nullptr : start_dir.c_str(), (LPSTARTUPINFOW) &startup_info, &process_info); } // Use the results of the launch to create a bp::child object @@ -1052,7 +1052,7 @@ namespace platf { static std::once_flag load_wlanapi_once_flag; std::call_once(load_wlanapi_once_flag, []() { // wlanapi.dll is not installed by default on Windows Server, so we load it dynamically - HMODULE wlanapi = LoadLibraryExA("wlanapi.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + HMODULE wlanapi = LoadLibraryExA("wlanapi.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); if (!wlanapi) { BOOST_LOG(debug) << "wlanapi.dll is not available on this OS"sv; return; @@ -1129,7 +1129,7 @@ namespace platf { fn_WlanFreeMemory(wlan_interface_list); } else { fn_WlanCloseHandle(wlan_handle, nullptr); - wlan_handle = NULL; + wlan_handle = nullptr; } } } @@ -1200,7 +1200,7 @@ namespace platf { startup_info.StartupInfo.cb = sizeof(startup_info); WCHAR executable[MAX_PATH]; - if (GetModuleFileNameW(NULL, executable, ARRAYSIZE(executable)) == 0) { + if (GetModuleFileNameW(nullptr, executable, ARRAYSIZE(executable)) == 0) { auto winerr = GetLastError(); BOOST_LOG(fatal) << "Failed to get Sunshine path: "sv << winerr; return; @@ -1220,7 +1220,7 @@ namespace platf { void restart() { // If we're running standalone, we have to respawn ourselves via CreateProcess(). // If we're running from the service, we should just exit and let it respawn us. - if (GetConsoleWindow() != NULL) { + if (GetConsoleWindow() != nullptr) { // Avoid racing with the new process by waiting until we're exiting to start it. atexit(restart_on_exit); } @@ -1538,7 +1538,7 @@ namespace platf { } virtual ~qos_t() { - if (!fn_QOSRemoveSocketFromFlow(qos_handle, (SOCKET) NULL, flow_id, 0)) { + if (!fn_QOSRemoveSocketFromFlow(qos_handle, (SOCKET) nullptr, flow_id, 0)) { auto winerr = GetLastError(); BOOST_LOG(warning) << "QOSRemoveSocketFromFlow() failed: "sv << winerr; } @@ -1570,7 +1570,7 @@ namespace platf { static std::once_flag load_qwave_once_flag; std::call_once(load_qwave_once_flag, []() { // qWAVE is not installed by default on Windows Server, so we load it dynamically - HMODULE qwave = LoadLibraryExA("qwave.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + HMODULE qwave = LoadLibraryExA("qwave.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); if (!qwave) { BOOST_LOG(debug) << "qwave.dll is not available on this OS"sv; return; @@ -1788,11 +1788,11 @@ namespace platf { } operator bool() override { - return timer != NULL; + return timer != nullptr; } private: - HANDLE timer = NULL; + HANDLE timer = nullptr; }; std::unique_ptr create_high_precision_timer() { diff --git a/src/platform/windows/nvprefs/driver_settings.cpp b/src/platform/windows/nvprefs/driver_settings.cpp index 57aa809f..8cefd793 100644 --- a/src/platform/windows/nvprefs/driver_settings.cpp +++ b/src/platform/windows/nvprefs/driver_settings.cpp @@ -60,7 +60,7 @@ namespace nvprefs { void driver_settings_t::destroy() { if (session_handle) { NvAPI_DRS_DestroySession(session_handle); - session_handle = 0; + session_handle = nullptr; } NvAPI_Unload(); } @@ -105,7 +105,7 @@ namespace nvprefs { if (swapchain_data) { NvAPI_Status status; - NvDRSProfileHandle profile_handle = 0; + NvDRSProfileHandle profile_handle = nullptr; status = NvAPI_DRS_GetBaseProfile(session_handle, &profile_handle); if (status != NVAPI_OK) { nvapi_error_message(status); @@ -168,7 +168,7 @@ namespace nvprefs { return true; } - NvDRSProfileHandle profile_handle = 0; + NvDRSProfileHandle profile_handle = nullptr; status = NvAPI_DRS_GetBaseProfile(session_handle, &profile_handle); if (status != NVAPI_OK) { nvapi_error_message(status); @@ -224,7 +224,7 @@ namespace nvprefs { NvAPI_UnicodeString profile_name = {}; fill_nvapi_string(profile_name, sunshine_application_profile_name); - NvDRSProfileHandle profile_handle = 0; + NvDRSProfileHandle profile_handle = nullptr; status = NvAPI_DRS_FindProfileByName(session_handle, profile_name, &profile_handle); if (status != NVAPI_OK) { diff --git a/src/platform/windows/nvprefs/driver_settings.h b/src/platform/windows/nvprefs/driver_settings.h index e4649d1d..f62cf4bd 100644 --- a/src/platform/windows/nvprefs/driver_settings.h +++ b/src/platform/windows/nvprefs/driver_settings.h @@ -36,7 +36,7 @@ namespace nvprefs { bool check_and_modify_application_profile(bool &modified); private: - NvDRSSessionHandle session_handle = 0; + NvDRSSessionHandle session_handle = nullptr; }; } // namespace nvprefs diff --git a/src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp b/src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp index b4c04f6a..d03c6bbb 100644 --- a/src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp +++ b/src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp @@ -15,7 +15,7 @@ namespace { std::map interfaces; - HMODULE dll = NULL; + HMODULE dll = nullptr; template NvAPI_Status call_interface(const char *name, Args... args) { @@ -47,7 +47,7 @@ NvAPI_Initialize() { auto dll_name = "nvapi.dll"; #endif - if ((dll = LoadLibraryEx(dll_name, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32))) { + if ((dll = LoadLibraryEx(dll_name, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32))) { if (auto query_interface = (decltype(nvapi_QueryInterface) *) GetProcAddress(dll, "nvapi_QueryInterface")) { for (const auto &item : nvapi_interface_table) { interfaces[item.func] = query_interface(item.id); @@ -64,7 +64,7 @@ NVAPI_INTERFACE NvAPI_Unload() { if (dll) { interfaces.clear(); FreeLibrary(dll); - dll = NULL; + dll = nullptr; } return NVAPI_OK; } diff --git a/src/platform/windows/nvprefs/nvprefs_common.h b/src/platform/windows/nvprefs/nvprefs_common.h index b498c944..61a7a6eb 100644 --- a/src/platform/windows/nvprefs/nvprefs_common.h +++ b/src/platform/windows/nvprefs/nvprefs_common.h @@ -21,7 +21,7 @@ namespace nvprefs { explicit operator bool() const { auto handle = get(); - return handle != NULL && handle != INVALID_HANDLE_VALUE; + return handle != nullptr && handle != INVALID_HANDLE_VALUE; } }; diff --git a/src/platform/windows/nvprefs/undo_file.cpp b/src/platform/windows/nvprefs/undo_file.cpp index ada737c8..477af033 100644 --- a/src/platform/windows/nvprefs/undo_file.cpp +++ b/src/platform/windows/nvprefs/undo_file.cpp @@ -51,7 +51,7 @@ namespace nvprefs { std::optional undo_file_t::open_existing_file(std::filesystem::path file_path, bool &access_denied) { undo_file_t file; - file.file_handle.reset(CreateFileW(file_path.c_str(), GENERIC_READ | DELETE, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)); + file.file_handle.reset(CreateFileW(file_path.c_str(), GENERIC_READ | DELETE, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr)); if (file.file_handle) { access_denied = false; return file; @@ -64,7 +64,7 @@ namespace nvprefs { std::optional undo_file_t::create_new_file(std::filesystem::path file_path) { undo_file_t file; - file.file_handle.reset(CreateFileW(file_path.c_str(), GENERIC_WRITE | STANDARD_RIGHTS_ALL, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL)); + file.file_handle.reset(CreateFileW(file_path.c_str(), GENERIC_WRITE | STANDARD_RIGHTS_ALL, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr)); if (file.file_handle) { // give GENERIC_READ, GENERIC_WRITE and DELETE permissions to Users group diff --git a/src/system_tray.cpp b/src/system_tray.cpp index 255904b0..068c5266 100644 --- a/src/system_tray.cpp +++ b/src/system_tray.cpp @@ -84,7 +84,7 @@ namespace system_tray { #ifdef _WIN32 // If we're running in a service, return a special status to // tell it to terminate too, otherwise it will just respawn us. - if (GetConsoleWindow() == NULL) { + if (GetConsoleWindow() == nullptr) { lifetime::exit_sunshine(ERROR_SHUTDOWN_IN_PROGRESS, true); return; } @@ -230,10 +230,10 @@ namespace system_tray { return; } - tray.notification_title = NULL; - tray.notification_text = NULL; - tray.notification_cb = NULL; - tray.notification_icon = NULL; + tray.notification_title = nullptr; + tray.notification_text = nullptr; + tray.notification_cb = nullptr; + tray.notification_icon = nullptr; tray.icon = TRAY_ICON_PLAYING; tray_update(&tray); tray.icon = TRAY_ICON_PLAYING; @@ -251,10 +251,10 @@ namespace system_tray { return; } - tray.notification_title = NULL; - tray.notification_text = NULL; - tray.notification_cb = NULL; - tray.notification_icon = NULL; + tray.notification_title = nullptr; + tray.notification_text = nullptr; + tray.notification_cb = nullptr; + tray.notification_icon = nullptr; tray.icon = TRAY_ICON_PAUSING; tray_update(&tray); char msg[256]; @@ -272,10 +272,10 @@ namespace system_tray { return; } - tray.notification_title = NULL; - tray.notification_text = NULL; - tray.notification_cb = NULL; - tray.notification_icon = NULL; + tray.notification_title = nullptr; + tray.notification_text = nullptr; + tray.notification_cb = nullptr; + tray.notification_icon = nullptr; tray.icon = TRAY_ICON; tray_update(&tray); char msg[256]; @@ -293,10 +293,10 @@ namespace system_tray { return; } - tray.notification_title = NULL; - tray.notification_text = NULL; - tray.notification_cb = NULL; - tray.notification_icon = NULL; + tray.notification_title = nullptr; + tray.notification_text = nullptr; + tray.notification_cb = nullptr; + tray.notification_icon = nullptr; tray.icon = TRAY_ICON; tray_update(&tray); tray.icon = TRAY_ICON; diff --git a/tools/sunshinesvc.cpp b/tools/sunshinesvc.cpp index bd9522b9..4f3b1a2f 100644 --- a/tools/sunshinesvc.cpp +++ b/tools/sunshinesvc.cpp @@ -52,9 +52,9 @@ DWORD WINAPI HandlerEx(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, L } HANDLE CreateJobObjectForChildProcess() { - HANDLE job_handle = CreateJobObjectW(NULL, NULL); + HANDLE job_handle = CreateJobObjectW(nullptr, nullptr); if (!job_handle) { - return NULL; + return nullptr; } JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_limit_info = {}; @@ -69,7 +69,7 @@ HANDLE CreateJobObjectForChildProcess() { if (!SetInformationJobObject(job_handle, JobObjectExtendedLimitInformation, &job_limit_info, sizeof(job_limit_info))) { CloseHandle(job_handle); - return NULL; + return nullptr; } return job_handle; @@ -77,16 +77,16 @@ HANDLE CreateJobObjectForChildProcess() { LPPROC_THREAD_ATTRIBUTE_LIST AllocateProcThreadAttributeList(DWORD attribute_count) { SIZE_T size; - InitializeProcThreadAttributeList(NULL, attribute_count, 0, &size); + InitializeProcThreadAttributeList(nullptr, attribute_count, 0, &size); auto list = (LPPROC_THREAD_ATTRIBUTE_LIST) HeapAlloc(GetProcessHeap(), 0, size); - if (list == NULL) { - return NULL; + if (list == nullptr) { + return nullptr; } if (!InitializeProcThreadAttributeList(list, attribute_count, 0, &size)) { HeapFree(GetProcessHeap(), 0, list); - return NULL; + return nullptr; } return list; @@ -95,14 +95,14 @@ LPPROC_THREAD_ATTRIBUTE_LIST AllocateProcThreadAttributeList(DWORD attribute_cou HANDLE DuplicateTokenForSession(DWORD console_session_id) { HANDLE current_token; if (!OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, ¤t_token)) { - return NULL; + return nullptr; } // Duplicate our own LocalSystem token HANDLE new_token; - if (!DuplicateTokenEx(current_token, TOKEN_ALL_ACCESS, NULL, SecurityImpersonation, TokenPrimary, &new_token)) { + if (!DuplicateTokenEx(current_token, TOKEN_ALL_ACCESS, nullptr, SecurityImpersonation, TokenPrimary, &new_token)) { CloseHandle(current_token); - return NULL; + return nullptr; } CloseHandle(current_token); @@ -110,7 +110,7 @@ HANDLE DuplicateTokenForSession(DWORD console_session_id) { // Change the duplicated token to the console session ID if (!SetTokenInformation(new_token, TokenSessionId, &console_session_id, sizeof(console_session_id))) { CloseHandle(new_token); - return NULL; + return nullptr; } return new_token; @@ -124,15 +124,15 @@ HANDLE OpenLogFileHandle() { wcscat_s(log_file_name, L"sunshine.log"); // The file handle must be inheritable for our child process to use it - SECURITY_ATTRIBUTES security_attributes = {sizeof(security_attributes), NULL, TRUE}; + SECURITY_ATTRIBUTES security_attributes = {sizeof(security_attributes), nullptr, TRUE}; // Overwrite the old sunshine.log - return CreateFileW(log_file_name, GENERIC_WRITE, FILE_SHARE_READ, &security_attributes, CREATE_ALWAYS, 0, NULL); + return CreateFileW(log_file_name, GENERIC_WRITE, FILE_SHARE_READ, &security_attributes, CREATE_ALWAYS, 0, nullptr); } bool RunTerminationHelper(HANDLE console_token, DWORD pid) { WCHAR module_path[MAX_PATH]; - GetModuleFileNameW(NULL, module_path, _countof(module_path)); + GetModuleFileNameW(nullptr, module_path, _countof(module_path)); std::wstring command; command += L'"'; @@ -147,7 +147,7 @@ bool RunTerminationHelper(HANDLE console_token, DWORD pid) { // Execute ourselves as a detached process in the user session with the --terminate argument. // This will allow us to attach to Sunshine's console and send it a Ctrl-C event. PROCESS_INFORMATION process_info; - if (!CreateProcessAsUserW(console_token, module_path, (LPWSTR) command.c_str(), NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT | DETACHED_PROCESS, NULL, NULL, &startup_info, &process_info)) { + if (!CreateProcessAsUserW(console_token, module_path, (LPWSTR) command.c_str(), nullptr, nullptr, FALSE, CREATE_UNICODE_ENVIRONMENT | DETACHED_PROCESS, nullptr, nullptr, &startup_info, &process_info)) { return false; } @@ -167,8 +167,8 @@ bool RunTerminationHelper(HANDLE console_token, DWORD pid) { } VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { - service_status_handle = RegisterServiceCtrlHandlerEx(SERVICE_NAME, HandlerEx, NULL); - if (service_status_handle == NULL) { + service_status_handle = RegisterServiceCtrlHandlerEx(SERVICE_NAME, HandlerEx, nullptr); + if (service_status_handle == nullptr) { // Nothing we can really do here but terminate ourselves ExitProcess(GetLastError()); return; @@ -185,8 +185,8 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { SetServiceStatus(service_status_handle, &service_status); // Create a manual-reset stop event - stop_event = CreateEventA(NULL, TRUE, FALSE, NULL); - if (stop_event == NULL) { + stop_event = CreateEventA(nullptr, TRUE, FALSE, nullptr); + if (stop_event == nullptr) { // Tell SCM we failed to start service_status.dwWin32ExitCode = GetLastError(); service_status.dwCurrentState = SERVICE_STOPPED; @@ -195,8 +195,8 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { } // Create an auto-reset session change event - session_change_event = CreateEventA(NULL, FALSE, FALSE, NULL); - if (session_change_event == NULL) { + session_change_event = CreateEventA(nullptr, FALSE, FALSE, nullptr); + if (session_change_event == nullptr) { // Tell SCM we failed to start service_status.dwWin32ExitCode = GetLastError(); service_status.dwCurrentState = SERVICE_STOPPED; @@ -218,13 +218,13 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { startup_info.StartupInfo.cb = sizeof(startup_info); startup_info.StartupInfo.lpDesktop = (LPWSTR) L"winsta0\\default"; startup_info.StartupInfo.dwFlags = STARTF_USESTDHANDLES; - startup_info.StartupInfo.hStdInput = NULL; + startup_info.StartupInfo.hStdInput = nullptr; startup_info.StartupInfo.hStdOutput = log_file_handle; startup_info.StartupInfo.hStdError = log_file_handle; // Allocate an attribute list with space for 2 entries startup_info.lpAttributeList = AllocateProcThreadAttributeList(2); - if (startup_info.lpAttributeList == NULL) { + if (startup_info.lpAttributeList == nullptr) { // Tell SCM we failed to start service_status.dwWin32ExitCode = GetLastError(); service_status.dwCurrentState = SERVICE_STOPPED; @@ -233,7 +233,7 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { } // Only allow Sunshine.exe to inherit the log file handle, not all inheritable handles - UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, &log_file_handle, sizeof(log_file_handle), NULL, NULL); + UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, &log_file_handle, sizeof(log_file_handle), nullptr, nullptr); // Tell SCM we're running (and stoppable now) service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PRESHUTDOWN | SERVICE_ACCEPT_SESSIONCHANGE; @@ -249,22 +249,22 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) { } auto console_token = DuplicateTokenForSession(console_session_id); - if (console_token == NULL) { + if (console_token == nullptr) { continue; } // Job objects cannot span sessions, so we must create one for each process auto job_handle = CreateJobObjectForChildProcess(); - if (job_handle == NULL) { + if (job_handle == nullptr) { CloseHandle(console_token); continue; } // Start Sunshine.exe inside our job object - UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, &job_handle, sizeof(job_handle), NULL, NULL); + UpdateProcThreadAttribute(startup_info.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, &job_handle, sizeof(job_handle), nullptr, nullptr); PROCESS_INFORMATION process_info; - if (!CreateProcessAsUserW(console_token, L"Sunshine.exe", NULL, NULL, NULL, TRUE, CREATE_UNICODE_ENVIRONMENT | CREATE_NO_WINDOW | EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (LPSTARTUPINFOW) &startup_info, &process_info)) { + if (!CreateProcessAsUserW(console_token, L"Sunshine.exe", nullptr, nullptr, nullptr, TRUE, CREATE_UNICODE_ENVIRONMENT | CREATE_NO_WINDOW | EXTENDED_STARTUPINFO_PRESENT, nullptr, nullptr, (LPSTARTUPINFOW) &startup_info, &process_info)) { CloseHandle(console_token); CloseHandle(job_handle); continue; @@ -327,7 +327,7 @@ int DoGracefulTermination(DWORD pid) { } // Disable our own Ctrl-C handling - SetConsoleCtrlHandler(NULL, TRUE); + SetConsoleCtrlHandler(nullptr, TRUE); // Send a Ctrl-C event to Sunshine if (!GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0)) { @@ -340,7 +340,7 @@ int DoGracefulTermination(DWORD pid) { int main(int argc, char *argv[]) { static const SERVICE_TABLE_ENTRY service_table[] = { {(LPSTR) SERVICE_NAME, ServiceMain}, - {NULL, NULL} + {nullptr, nullptr} }; // Check if this is a reinvocation of ourselves to send Ctrl-C to Sunshine.exe @@ -352,7 +352,7 @@ int main(int argc, char *argv[]) { // We want to use the directory where Sunshine.exe is located instead of system32. // This requires stripping off 2 path components: the file name and the last folder WCHAR module_path[MAX_PATH]; - GetModuleFileNameW(NULL, module_path, _countof(module_path)); + GetModuleFileNameW(nullptr, module_path, _countof(module_path)); for (auto i = 0; i < 2; i++) { auto last_sep = wcsrchr(module_path, '\\'); if (last_sep) { From 02036920acc4b6ef57f83cdf67efaeaa8f72fecb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 10 Aug 2025 12:22:00 -0500 Subject: [PATCH 09/73] build(deps): Update to FFmpeg 8.0 branch (#4143) --- cmake/dependencies/common.cmake | 4 ++-- src/platform/linux/vaapi.cpp | 10 +++++----- src/video.cpp | 21 ++++++++++++++++----- third-party/build-deps | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index c92b4777..97319be6 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -51,10 +51,10 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES) endif() set(FFMPEG_LIBRARIES "${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a" + "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" "${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a" "${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a" "${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a" - "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx264.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx265.a" ${HDR10_PLUS_LIBRARY} @@ -62,9 +62,9 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES) else() set(FFMPEG_LIBRARIES "${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a" + "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" "${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a" "${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a" - "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" ${FFMPEG_PLATFORM_LIBRARIES}) endif() diff --git a/src/platform/linux/vaapi.cpp b/src/platform/linux/vaapi.cpp index 1a38c4ec..e0cc7930 100644 --- a/src/platform/linux/vaapi.cpp +++ b/src/platform/linux/vaapi.cpp @@ -191,7 +191,7 @@ namespace va { return VAProfileH264High; } else if (ctx->codec_id == AV_CODEC_ID_HEVC) { switch (ctx->profile) { - case FF_PROFILE_HEVC_REXT: + case AV_PROFILE_HEVC_REXT: switch (av_pix_fmt_desc_get(ctx->sw_pix_fmt)->comp[0].depth) { case 10: return VAProfileHEVCMain444_10; @@ -199,16 +199,16 @@ namespace va { return VAProfileHEVCMain444; } break; - case FF_PROFILE_HEVC_MAIN_10: + case AV_PROFILE_HEVC_MAIN_10: return VAProfileHEVCMain10; - case FF_PROFILE_HEVC_MAIN: + case AV_PROFILE_HEVC_MAIN: return VAProfileHEVCMain; } } else if (ctx->codec_id == AV_CODEC_ID_AV1) { switch (ctx->profile) { - case FF_PROFILE_AV1_HIGH: + case AV_PROFILE_AV1_HIGH: return VAProfileAV1Profile1; - case FF_PROFILE_AV1_MAIN: + case AV_PROFILE_AV1_MAIN: return VAProfileAV1Profile0; } } diff --git a/src/video.cpp b/src/video.cpp index 4db957b3..8f6b69c4 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -315,6 +315,12 @@ namespace video { avcodec_encode_session_t(avcodec_encode_session_t &&other) noexcept = default; ~avcodec_encode_session_t() { + // Flush any remaining frames in the encoder + if (avcodec_send_frame(avcodec_ctx.get(), nullptr) == 0) { + packet_raw_avcodec pkt; + while (avcodec_receive_packet(avcodec_ctx.get(), pkt.av_packet) == 0); + } + // Order matters here because the context relies on the hwdevice still being valid avcodec_ctx.reset(); device.reset(); @@ -536,7 +542,7 @@ namespace video { {"forced-idr"s, 1}, {"zerolatency"s, 1}, {"surfaces"s, 1}, - {"filler_data"s, false}, + {"cbr_padding"s, false}, {"preset"s, &config::video.nv_legacy.preset}, {"tune"s, NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY}, {"rc"s, NV_ENC_PARAMS_RC_CBR}, @@ -557,6 +563,7 @@ namespace video { {"forced-idr"s, 1}, {"zerolatency"s, 1}, {"surfaces"s, 1}, + {"cbr_padding"s, false}, {"preset"s, &config::video.nv_legacy.preset}, {"tune"s, NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY}, {"rc"s, NV_ENC_PARAMS_RC_CBR}, @@ -582,6 +589,7 @@ namespace video { {"forced-idr"s, 1}, {"zerolatency"s, 1}, {"surfaces"s, 1}, + {"cbr_padding"s, false}, {"preset"s, &config::video.nv_legacy.preset}, {"tune"s, NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY}, {"rc"s, NV_ENC_PARAMS_RC_CBR}, @@ -730,6 +738,7 @@ namespace video { {"filler_data"s, false}, {"forced_idr"s, 1}, {"latency"s, "lowest_latency"s}, + {"async_depth"s, 1}, {"skip_frame"s, 0}, {"log_to_dbg"s, []() { return config::sunshine.min_log_level < 2 ? 1 : 0; @@ -753,6 +762,7 @@ namespace video { {"filler_data"s, false}, {"forced_idr"s, 1}, {"latency"s, 1}, + {"async_depth"s, 1}, {"skip_frame"s, 0}, {"log_to_dbg"s, []() { return config::sunshine.min_log_level < 2 ? 1 : 0; @@ -791,6 +801,7 @@ namespace video { {"filler_data"s, false}, {"forced_idr"s, 1}, {"latency"s, 1}, + {"async_depth"s, 1}, {"frame_skipping"s, 0}, {"log_to_dbg"s, []() { return config::sunshine.min_log_level < 2 ? 1 : 0; @@ -1526,22 +1537,22 @@ namespace video { case 0: // 10-bit h264 encoding is not supported by our streaming protocol assert(!config.dynamicRange); - ctx->profile = (config.chromaSamplingType == 1) ? FF_PROFILE_H264_HIGH_444_PREDICTIVE : FF_PROFILE_H264_HIGH; + ctx->profile = (config.chromaSamplingType == 1) ? AV_PROFILE_H264_HIGH_444_PREDICTIVE : AV_PROFILE_H264_HIGH; break; case 1: if (config.chromaSamplingType == 1) { // HEVC uses the same RExt profile for both 8 and 10 bit YUV 4:4:4 encoding - ctx->profile = FF_PROFILE_HEVC_REXT; + ctx->profile = AV_PROFILE_HEVC_REXT; } else { - ctx->profile = config.dynamicRange ? FF_PROFILE_HEVC_MAIN_10 : FF_PROFILE_HEVC_MAIN; + ctx->profile = config.dynamicRange ? AV_PROFILE_HEVC_MAIN_10 : AV_PROFILE_HEVC_MAIN; } break; case 2: // AV1 supports both 8 and 10 bit encoding with the same Main profile // but YUV 4:4:4 sampling requires High profile - ctx->profile = (config.chromaSamplingType == 1) ? FF_PROFILE_AV1_HIGH : FF_PROFILE_AV1_MAIN; + ctx->profile = (config.chromaSamplingType == 1) ? AV_PROFILE_AV1_HIGH : AV_PROFILE_AV1_MAIN; break; } diff --git a/third-party/build-deps b/third-party/build-deps index 94369e63..a21ef2e3 160000 --- a/third-party/build-deps +++ b/third-party/build-deps @@ -1 +1 @@ -Subproject commit 94369e63776e3a018df0bdb82992d1a7ba98adf7 +Subproject commit a21ef2e30031628d9e1be3ae250b53d84726cbd8 From 5043d0b13e7b1913eaf8e706c9d99d39dd1c2ca2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 22:15:04 -0400 Subject: [PATCH 10/73] build(deps): bump actions/checkout from 4 to 5 in the github-actions group (#4148) build(deps): bump actions/checkout in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-flatpak.yml | 2 +- .github/workflows/ci-homebrew.yml | 2 +- .github/workflows/ci-linux.yml | 2 +- .github/workflows/ci-windows.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/localize.yml | 2 +- .github/workflows/update-pages.yml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-flatpak.yml b/.github/workflows/ci-flatpak.yml index 22456851..e295c8d4 100644 --- a/.github/workflows/ci-flatpak.yml +++ b/.github/workflows/ci-flatpak.yml @@ -42,7 +42,7 @@ jobs: remove-docker-images: 'true' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive diff --git a/.github/workflows/ci-homebrew.yml b/.github/workflows/ci-homebrew.yml index dfb232be..63994540 100644 --- a/.github/workflows/ci-homebrew.yml +++ b/.github/workflows/ci-homebrew.yml @@ -47,7 +47,7 @@ jobs: release: true steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Fix homebrew python if: matrix.os_name == 'macos' && matrix.os_version == '13' diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index c844300d..50861257 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -38,7 +38,7 @@ jobs: remove-docker-images: 'true' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 03cb909b..ba62e0d7 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -34,7 +34,7 @@ jobs: toolchain: ucrt-x86_64 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4266bfe..85799db9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Release Setup id: release-setup @@ -147,7 +147,7 @@ jobs: coverage: true steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Download coverage artifact uses: actions/download-artifact@v5 diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index cff329c4..17c5594e 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Python 3.9 uses: actions/setup-python@v5 # https://github.com/actions/setup-python diff --git a/.github/workflows/update-pages.yml b/.github/workflows/update-pages.yml index 06b1532f..030033ca 100644 --- a/.github/workflows/update-pages.yml +++ b/.github/workflows/update-pages.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Upload artifact uses: actions/upload-artifact@v4 From b307ab266852805a85c024a176c480177af19f7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 08:34:39 -0400 Subject: [PATCH 11/73] build(deps): bump third-party/tray from `db96aea` to `0309a7c` (#4152) Bumps [third-party/tray](https://github.com/LizardByte/tray) from `db96aea` to `0309a7c`. - [Commits](https://github.com/LizardByte/tray/compare/db96aeab04c4a62477ea5186f1c0d43183df0a98...0309a7cb84aad25079b60c40d1eae0bacd05b26d) --- updated-dependencies: - dependency-name: third-party/tray dependency-version: '0309a7cb84aad25079b60c40d1eae0bacd05b26d' dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/tray | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/tray b/third-party/tray index db96aeab..0309a7cb 160000 --- a/third-party/tray +++ b/third-party/tray @@ -1 +1 @@ -Subproject commit db96aeab04c4a62477ea5186f1c0d43183df0a98 +Subproject commit 0309a7cb84aad25079b60c40d1eae0bacd05b26d From 78954400306bbb0589ee417980901e44f8839e6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 08:35:38 -0400 Subject: [PATCH 12/73] build(deps): bump third-party/libdisplaydevice from `a067474` to `f31e46d` (#4151) build(deps): bump third-party/libdisplaydevice Bumps [third-party/libdisplaydevice](https://github.com/LizardByte/libdisplaydevice) from `a067474` to `f31e46d`. - [Release notes](https://github.com/LizardByte/libdisplaydevice/releases) - [Commits](https://github.com/LizardByte/libdisplaydevice/compare/a0674741ec9a5eea335cddc0e7002b9f50782909...f31e46d8736fa6932d34c1417111e60ca507b29f) --- updated-dependencies: - dependency-name: third-party/libdisplaydevice dependency-version: f31e46d8736fa6932d34c1417111e60ca507b29f dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/libdisplaydevice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/libdisplaydevice b/third-party/libdisplaydevice index a0674741..f31e46d8 160000 --- a/third-party/libdisplaydevice +++ b/third-party/libdisplaydevice @@ -1 +1 @@ -Subproject commit a0674741ec9a5eea335cddc0e7002b9f50782909 +Subproject commit f31e46d8736fa6932d34c1417111e60ca507b29f From b7d921e0ccb5e1e30a1c180e2acc1f87f398fbf5 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 14 Aug 2025 08:16:48 -0400 Subject: [PATCH 13/73] ci(linux): migrate to LizardByte/actions/actions/more_space action (#4141) --- .github/workflows/ci-flatpak.yml | 12 ++++-------- .github/workflows/ci-linux.yml | 12 ++++-------- .github/workflows/ci.yml | 1 - 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-flatpak.yml b/.github/workflows/ci-flatpak.yml index e295c8d4..5f83eab9 100644 --- a/.github/workflows/ci-flatpak.yml +++ b/.github/workflows/ci-flatpak.yml @@ -30,16 +30,12 @@ jobs: - arch: aarch64 runner: ubuntu-22.04-arm steps: - - name: Maximize build space + - name: More space if: matrix.arch == 'x86_64' - uses: easimon/maximize-build-space@v10 + uses: LizardByte/actions/actions/more_space@v2025.814.40518 with: - root-reserve-mb: 10240 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' + analyze-space-savings: true + clean-all: true - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 50861257..d74168f1 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -27,15 +27,11 @@ jobs: EXTRA_ARGS: '--appimage-build' dist: 22.04 steps: - - name: Maximize build space - uses: easimon/maximize-build-space@v10 + - name: More space + uses: LizardByte/actions/actions/more_space@v2025.814.40518 with: - root-reserve-mb: 30720 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' + analyze-space-savings: true + clean-all: true - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85799db9..aebb1744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,6 @@ jobs: uses: LizardByte/.github/.github/workflows/__call-docker.yml@master with: maximize_build_space: true - maximize_build_space_root_reserve_size: 32768 publish_release: ${{ needs.release-setup.outputs.publish_release }} release_commit: ${{ needs.release-setup.outputs.release_commit }} release_tag: ${{ needs.release-setup.outputs.release_tag }} From 5a83b7a7d47252985eab8d139fc9e5df1b8f6ca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 09:41:00 -0400 Subject: [PATCH 14/73] build(deps): bump LizardByte/actions from 2025.715.25226 to 2025.814.40518 in the lizardbyte-actions group (#4155) build(deps): bump LizardByte/actions in the lizardbyte-actions group Bumps the lizardbyte-actions group with 1 update: [LizardByte/actions](https://github.com/lizardbyte/actions). Updates `LizardByte/actions` from 2025.715.25226 to 2025.814.40518 - [Release notes](https://github.com/lizardbyte/actions/releases) - [Commits](https://github.com/lizardbyte/actions/compare/v2025.715.25226...v2025.814.40518) --- updated-dependencies: - dependency-name: LizardByte/actions dependency-version: 2025.814.40518 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lizardbyte-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-copr.yml | 2 +- .github/workflows/ci-homebrew.yml | 2 +- .github/workflows/ci.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-copr.yml b/.github/workflows/ci-copr.yml index f8383942..202601dc 100644 --- a/.github/workflows/ci-copr.yml +++ b/.github/workflows/ci-copr.yml @@ -59,7 +59,7 @@ jobs: run: ls -l artifacts - name: Update GitHub Release - uses: LizardByte/actions/actions/release_create@v2025.715.25226 + uses: LizardByte/actions/actions/release_create@v2025.814.40518 with: allowUpdates: true body: ${{ github.event.release.body }} diff --git a/.github/workflows/ci-homebrew.yml b/.github/workflows/ci-homebrew.yml index 63994540..6fbbd717 100644 --- a/.github/workflows/ci-homebrew.yml +++ b/.github/workflows/ci-homebrew.yml @@ -151,7 +151,7 @@ jobs: - name: Validate Homebrew Formula id: test if: matrix.release != true - uses: LizardByte/actions/actions/release_homebrew@v2025.715.25226 + uses: LizardByte/actions/actions/release_homebrew@v2025.814.40518 with: formula_file: ${{ github.workspace }}/homebrew/sunshine.rb git_email: ${{ secrets.GIT_EMAIL }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aebb1744..3639abef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: Release Setup id: release-setup - uses: LizardByte/actions/actions/release_setup@v2025.715.25226 + uses: LizardByte/actions/actions/release_setup@v2025.814.40518 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -200,7 +200,7 @@ jobs: run: ls -l artifacts - name: Create/Update GitHub Release - uses: LizardByte/actions/actions/release_create@v2025.715.25226 + uses: LizardByte/actions/actions/release_create@v2025.814.40518 with: allowUpdates: false body: ${{ needs.release-setup.outputs.release_body }} @@ -229,7 +229,7 @@ jobs: path: homebrew - name: Upload Homebrew Beta Formula - uses: LizardByte/actions/actions/release_homebrew@v2025.715.25226 + uses: LizardByte/actions/actions/release_homebrew@v2025.814.40518 with: formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb git_email: ${{ secrets.GH_BOT_EMAIL }} From c9ec54e0e20e7bc89343d298dc0f9e3860b63b5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:08:55 -0400 Subject: [PATCH 15/73] build(deps): bump third-party/build-deps from `a21ef2e` to `1ef5735` (#4157) Bumps [third-party/build-deps](https://github.com/LizardByte/build-deps) from `a21ef2e` to `1ef5735`. - [Commits](https://github.com/LizardByte/build-deps/compare/a21ef2e30031628d9e1be3ae250b53d84726cbd8...1ef5735ed33d87f2bf75fb9c3189eceb32f8aa5f) --- updated-dependencies: - dependency-name: third-party/build-deps dependency-version: 1ef5735ed33d87f2bf75fb9c3189eceb32f8aa5f dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/build-deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/build-deps b/third-party/build-deps index a21ef2e3..1ef5735e 160000 --- a/third-party/build-deps +++ b/third-party/build-deps @@ -1 +1 @@ -Subproject commit a21ef2e30031628d9e1be3ae250b53d84726cbd8 +Subproject commit 1ef5735ed33d87f2bf75fb9c3189eceb32f8aa5f From 319319c2df1aeeb12a16c248bdb07534db183823 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 19:49:24 -0400 Subject: [PATCH 16/73] build(deps): bump packaging/linux/flatpak/deps/flatpak-builder-tools from `d2fa57a` to `5c5a6de` (#4156) build(deps): bump packaging/linux/flatpak/deps/flatpak-builder-tools Bumps [packaging/linux/flatpak/deps/flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools) from `d2fa57a` to `5c5a6de`. - [Commits](https://github.com/flatpak/flatpak-builder-tools/compare/d2fa57ab89811efb8d83da6cfa93fc184e94c640...5c5a6deee79b873f4aefcef1c71264e92325fd88) --- updated-dependencies: - dependency-name: packaging/linux/flatpak/deps/flatpak-builder-tools dependency-version: 5c5a6deee79b873f4aefcef1c71264e92325fd88 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packaging/linux/flatpak/deps/flatpak-builder-tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/linux/flatpak/deps/flatpak-builder-tools b/packaging/linux/flatpak/deps/flatpak-builder-tools index d2fa57ab..5c5a6dee 160000 --- a/packaging/linux/flatpak/deps/flatpak-builder-tools +++ b/packaging/linux/flatpak/deps/flatpak-builder-tools @@ -1 +1 @@ -Subproject commit d2fa57ab89811efb8d83da6cfa93fc184e94c640 +Subproject commit 5c5a6deee79b873f4aefcef1c71264e92325fd88 From cc6e853fba02ca64d4e0eb27e4f07bb534003320 Mon Sep 17 00:00:00 2001 From: Kishi <41839133+Kishi85@users.noreply.github.com> Date: Sun, 17 Aug 2025 00:17:04 +0200 Subject: [PATCH 17/73] feat(input/linux): allow ds5 gamepads to have a fixed device mac based on controller index (#4158) --- docs/configuration.md | 24 +++++++++++++++++ src/config.cpp | 1 + src/config.h | 1 + .../linux/input/inputtino_gamepad.cpp | 15 ++++++++--- .../common/assets/web/configs/tabs/Inputs.vue | 26 +++++++++++++++++++ .../assets/web/public/assets/locale/en.json | 3 +++ 6 files changed, 66 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index a1ae900c..70e2a97b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -416,6 +416,30 @@ editing the `conf` file in a text editor. Use the examples as reference. +### ds5_inputtino_randomize_mac + + + + + + + + + + + + + + +
Description + Randomize the MAC-Address for the generated virtual controller. + @hint{Only applies on linux for gamepads created as PS5-style controllers} +
Default@code{} + enabled + @endcode
Example@code{} + ds5_inputtino_randomize_mac = enabled + @endcode
+ ### back_button_timeout diff --git a/src/config.cpp b/src/config.cpp index 24ef2a08..5268af66 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1216,6 +1216,7 @@ namespace config { bool_f(vars, "ds4_back_as_touchpad_click", input.ds4_back_as_touchpad_click); bool_f(vars, "motion_as_ds4", input.motion_as_ds4); bool_f(vars, "touchpad_as_ds4", input.touchpad_as_ds4); + bool_f(vars, "ds5_inputtino_randomize_mac", input.ds5_inputtino_randomize_mac); bool_f(vars, "mouse", input.mouse); bool_f(vars, "keyboard", input.keyboard); diff --git a/src/config.h b/src/config.h index 287efaf5..cda1f7c6 100644 --- a/src/config.h +++ b/src/config.h @@ -193,6 +193,7 @@ namespace config { bool ds4_back_as_touchpad_click; bool motion_as_ds4; bool touchpad_as_ds4; + bool ds5_inputtino_randomize_mac; bool keyboard; bool mouse; diff --git a/src/platform/linux/input/inputtino_gamepad.cpp b/src/platform/linux/input/inputtino_gamepad.cpp index 43814631..7e782b59 100644 --- a/src/platform/linux/input/inputtino_gamepad.cpp +++ b/src/platform/linux/input/inputtino_gamepad.cpp @@ -42,8 +42,15 @@ namespace platf::gamepad { .version = 0x8111}); } - auto create_ds5() { - return inputtino::PS5Joypad::create({.name = "Sunshine PS5 (virtual) pad", .vendor_id = 0x054C, .product_id = 0x0CE6, .version = 0x8111}); + auto create_ds5(int globalIndex) { + std::string device_mac = ""; // Inputtino checks empty() to generate a random MAC + + if (!config::input.ds5_inputtino_randomize_mac && globalIndex >= 0 && globalIndex <= 255) { + // Generate private virtual device MAC based on gamepad globalIndex between 0 (00) and 255 (ff) + device_mac = std::format("02:00:00:00:00:{:02x}", globalIndex); + } + + return inputtino::PS5Joypad::create({.name = "Sunshine PS5 (virtual) pad", .vendor_id = 0x054C, .product_id = 0x0CE6, .version = 0x8111, .device_phys = device_mac, .device_uniq = device_mac}); } int alloc(input_raw_t *raw, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) { @@ -138,7 +145,7 @@ namespace platf::gamepad { } case DualSenseWired: { - auto ds5 = create_ds5(); + auto ds5 = create_ds5(id.globalIndex); if (ds5) { (*ds5).set_on_rumble(on_rumble_fn); (*ds5).set_on_led([feedback_queue, idx = id.clientRelativeIndex, gamepad](int r, int g, int b) { @@ -267,7 +274,7 @@ namespace platf::gamepad { return gps; } - auto ds5 = create_ds5(); + auto ds5 = create_ds5(-1); // Index -1 will result in a random MAC virtual device, which is fine for probing auto switchPro = create_switch(); auto xOne = create_xbox_one(); diff --git a/src_assets/common/assets/web/configs/tabs/Inputs.vue b/src_assets/common/assets/web/configs/tabs/Inputs.vue index 2e7a081f..d639c5e1 100644 --- a/src_assets/common/assets/web/configs/tabs/Inputs.vue +++ b/src_assets/common/assets/web/configs/tabs/Inputs.vue @@ -89,6 +89,32 @@ const config = ref(props.config) + diff --git a/src_assets/common/assets/web/public/assets/locale/en.json b/src_assets/common/assets/web/public/assets/locale/en.json index 160c1386..ab3907c1 100644 --- a/src_assets/common/assets/web/public/assets/locale/en.json +++ b/src_assets/common/assets/web/public/assets/locale/en.json @@ -195,6 +195,8 @@ "dd_wa_hdr_toggle_delay": "High-contrast workaround for HDR", "ds4_back_as_touchpad_click": "Map Back/Select to Touchpad Click", "ds4_back_as_touchpad_click_desc": "When forcing DS4 emulation, map Back/Select to Touchpad Click", + "ds5_inputtino_randomize_mac": "Randomize virtual controller MAC", + "ds5_inputtino_randomize_mac_desc": "Upon controller registration use a random MAC instead of one based on the controllers internal index to avoid mixing configuration settings of different controllers when the are swapped on client-side.", "encoder": "Force a Specific Encoder", "encoder_desc": "Force a specific encoder, otherwise Sunshine will select the best available option. Note: If you specify a hardware encoder on Windows, it must match the GPU where the display is connected.", "encoder_software": "Software", @@ -213,6 +215,7 @@ "gamepad_ds4": "DS4 (PS4)", "gamepad_ds4_manual": "DS4 selection options", "gamepad_ds5": "DS5 (PS5)", + "gamepad_ds5_manual": "DS5 selection options", "gamepad_switch": "Nintendo Pro (Switch)", "gamepad_manual": "Manual DS4 options", "gamepad_x360": "X360 (Xbox 360)", From b8456946beea70501ac7529b9f91a0ffa607ca2a Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 16 Aug 2025 19:15:36 -0400 Subject: [PATCH 18/73] build(toolchain): fix missing dependencies on clion-toolchain (#4163) --- docker/clion-toolchain.dockerfile | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/docker/clion-toolchain.dockerfile b/docker/clion-toolchain.dockerfile index fe3e7cc5..23464190 100644 --- a/docker/clion-toolchain.dockerfile +++ b/docker/clion-toolchain.dockerfile @@ -38,6 +38,7 @@ apt-get install -y --no-install-recommends \ libcurl4-openssl-dev \ libdrm-dev \ libevdev-dev \ + libgbm-dev \ libminiupnpc-dev \ libnotify-dev \ libnuma-dev \ @@ -53,6 +54,7 @@ apt-get install -y --no-install-recommends \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ + npm \ udev \ wget \ x11-xserver-utils \ @@ -83,18 +85,6 @@ chmod a+x "${tmpfile}" rm -f "${tmpfile}" _INSTALL_CUDA -WORKDIR / -# install node -RUN <<_INSTALL_NODE -#!/bin/bash -set -e -wget --max-redirect=0 -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash -source "$HOME/.nvm/nvm.sh" -nvm install node -nvm use node -nvm alias default node -_INSTALL_NODE - WORKDIR /toolchain # Create a shell script that starts Xvfb and then runs a shell RUN <<_ENTRYPOINT From 8107198250f28533617417d759a86652302e1040 Mon Sep 17 00:00:00 2001 From: Kishi <41839133+Kishi85@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:41:55 +0200 Subject: [PATCH 19/73] fix(input): Cleanup and show additional gamepad options correctly on linux (DS5) (#4169) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- .../common/assets/web/configs/tabs/Inputs.vue | 36 +++++-------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/src_assets/common/assets/web/configs/tabs/Inputs.vue b/src_assets/common/assets/web/configs/tabs/Inputs.vue index d639c5e1..1e857335 100644 --- a/src_assets/common/assets/web/configs/tabs/Inputs.vue +++ b/src_assets/common/assets/web/configs/tabs/Inputs.vue @@ -45,28 +45,28 @@ const config = ref(props.config)