diff --git a/.ci/clang-format.sh b/.ci/clang-format.sh
index 0ccd4062d..c0d8c2c2d 100755
--- a/.ci/clang-format.sh
+++ b/.ci/clang-format.sh
@@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
fi
# Default clang-format points to default 3.5 version one
-CLANG_FORMAT=clang-format-17
+CLANG_FORMAT=clang-format-18
$CLANG_FORMAT --version
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
diff --git a/.github/ISSUE_TEMPLATE/app-bug-report.yaml b/.github/ISSUE_TEMPLATE/app-bug-report.yaml
new file mode 100644
index 000000000..cd540e06e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/app-bug-report.yaml
@@ -0,0 +1,55 @@
+# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
+name: Application Bug Report
+description: Problem with the application itself (ie. bad file path handling, UX issue)
+title: "[APP BUG]: "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ ## Important: Read First
+
+ **Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only.
+ If you have a support request or are unsure about the nature of your issue please contact us on [discord](https://discord.gg/bFJxfftGW6).**
+
+ Please make an effort to make sure your issue isn't already reported.
+
+ Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: Checklist
+ options:
+ - label: I have searched for a similar issue in this repository and did not find one.
+ required: true
+ - label: I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater.
+ required: true
+ - type: textarea
+ id: desc
+ attributes:
+ label: Describe the Bug
+ description: "A clear and concise description of what the bug is"
+ validations:
+ required: true
+ - type: textarea
+ id: repro
+ attributes:
+ label: Reproduction Steps
+ description: "Detailed steps to reproduce the behavior"
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected Behavior
+ description: "A clear and concise description of what you expected to happen"
+ validations:
+ required: false
+ - type: input
+ id: os
+ attributes:
+ label: Specify OS Version
+ placeholder: "Example: Windows 11, Arch Linux, MacOS 15"
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..5adcf1437
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,10 @@
+# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+blank_issues_enabled: false
+contact_links:
+ - name: Discord
+ url: https://discord.gg/bFJxfftGW6
+ about: Get direct support and hang out with us
+ - name: Wiki
+ url: https://github.com/shadps4-emu/shadPS4/wiki
+ about: Information, guides, etc.
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yaml b/.github/ISSUE_TEMPLATE/feature-request.yaml
new file mode 100644
index 000000000..a1b49362a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yaml
@@ -0,0 +1,54 @@
+# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
+name: Feature Request
+description: Suggest a new feature or improve an existing one
+title: "[Feature Request]: "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ ## Important: Read First
+
+ Please make an effort to make sure your issue isn't already reported.
+
+ Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
+
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: Checklist
+ options:
+ - label: I have searched for a similar issue in this repository and did not find one.
+ required: true
+ - type: textarea
+ id: desc
+ attributes:
+ label: Description
+ description: |
+ A concise description of the feature you want
+
+ Include step by step examples of how the feature should work under various circumstances
+ validations:
+ required: true
+ - type: textarea
+ id: reason
+ attributes:
+ label: Reason
+ description: |
+ Give a reason why you want this feature
+ - How will it make things easier for you?
+ - How does this feature help your enjoyment of the emulator?
+ - What does it provide that isn't being provided currently?
+ validations:
+ required: true
+ - type: textarea
+ id: examples
+ attributes:
+ label: Examples
+ description: |
+ Provide examples of the feature as implemented by other software
+
+ Include screenshots or video if you like to help demonstrate how you'd like this feature to work
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/game-bug-report.yaml b/.github/ISSUE_TEMPLATE/game-bug-report.yaml
new file mode 100644
index 000000000..a9c669ff9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/game-bug-report.yaml
@@ -0,0 +1,95 @@
+# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
+name: Game Emulation Bug Report
+description: Problem in a game (ie. graphical artifacts, crashes, etc.)
+title: "[GAME BUG]: "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ ## Important: Read First
+
+ **Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only.
+ If you have a support request or are unsure about the nature of your issue please contact us on [discord](https://discord.gg/bFJxfftGW6).**
+
+ This repository does not provide support for modded games. You should perform and test a clean game installation before submitting an issue.
+
+ This repository does not provide support for game patches. If you are having issues with patches please refer to [Cheats and Patches Repository](https://github.com/shadps4-emu/ps4_cheats).
+
+ Before submitting an issue please check [Game Compatibility Repository](https://github.com/shadps4-emu/shadps4-game-compatibility) for the information about the status of the game.
+
+ Please make an effort to make sure your issue isn't already reported.
+
+ Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: Checklist (we expect you to perform these steps before opening the issue)
+ options:
+ - label: I have searched for a similar issue in this repository and did not find one.
+ required: true
+ - label: I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater.
+ required: true
+ - label: I have re-dumped the game and performed a clean install without mods and the issue is still present.
+ required: true
+ - label: I have disabled all patches and cheats and the issue is still present.
+ required: true
+ - label: I have all the required [system modules](https://github.com/shadps4-emu/shadps4-game-compatibility?tab=readme-ov-file#informations) installed.
+ required: true
+ - type: textarea
+ id: desc
+ attributes:
+ label: Describe the Bug
+ description: "A clear and concise description of what the bug is"
+ validations:
+ required: true
+ - type: textarea
+ id: repro
+ attributes:
+ label: Reproduction Steps
+ description: "Detailed steps to reproduce the behavior"
+ validations:
+ required: true
+ - type: input
+ id: os
+ attributes:
+ label: Specify OS Version
+ placeholder: "Example: Windows 11, Arch Linux, MacOS 15"
+ validations:
+ required: true
+ - type: input
+ id: cpu
+ attributes:
+ label: CPU
+ placeholder: "Example: Intel Core i7-8700"
+ validations:
+ required: true
+ - type: input
+ id: gpu
+ attributes:
+ label: GPU
+ placeholder: "Example: nVidia GTX 1650"
+ validations:
+ required: true
+ - type: input
+ id: ram
+ attributes:
+ label: Amount of RAM in GB
+ placeholder: "Example: 16 GB"
+ validations:
+ required: true
+ - type: input
+ id: vram
+ attributes:
+ label: Amount of VRAM in GB
+ placeholder: "Example: 8 GB"
+ validations:
+ required: true
+ - type: textarea
+ id: logs
+ attributes:
+ label: "Log File"
+ description: Drag and drop the log file here. It can be found by right clicking on a game name -> Open Folder... -> Open Log Folder. Make sure that the log type is set to `sync`.
+ validations:
+ required: true
diff --git a/.github/linux-appimage-qt.sh b/.github/linux-appimage-qt.sh
index 06d5cbc11..776eed61e 100755
--- a/.github/linux-appimage-qt.sh
+++ b/.github/linux-appimage-qt.sh
@@ -27,7 +27,7 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin
-./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --plugin qt
+./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --plugin qt
rm AppDir/usr/plugins/multimedia/libgstreamermediaplugin.so
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
-mv Shadps4-x86_64.AppImage Shadps4-qt.AppImage
+mv shadPS4-x86_64.AppImage Shadps4-qt.AppImage
diff --git a/.github/linux-appimage-sdl.sh b/.github/linux-appimage-sdl.sh
index cc0e9f5fa..7961f5312 100755
--- a/.github/linux-appimage-sdl.sh
+++ b/.github/linux-appimage-sdl.sh
@@ -17,5 +17,5 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
# Build AppImage
./linuxdeploy-x86_64.AppImage --appdir AppDir
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
-./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --output appimage
-mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage
+./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --output appimage
+mv shadPS4-x86_64.AppImage Shadps4-sdl.AppImage
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 44aa3dd37..3da7163dd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,14 +14,14 @@ env:
jobs:
reuse:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- - uses: fsfe/reuse-action@v4
+ - uses: fsfe/reuse-action@v5
clang-format:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
@@ -30,16 +30,16 @@ jobs:
- name: Install
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
+ sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo apt update
- sudo apt install clang-format-17
+ sudo apt install clang-format-18
- name: Build
env:
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
run: ./.ci/clang-format.sh
get-info:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
outputs:
date: ${{ steps.vars.outputs.date }}
shorthash: ${{ steps.vars.outputs.shorthash }}
@@ -57,7 +57,7 @@ jobs:
echo "fullhash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
windows-sdl:
- runs-on: windows-latest
+ runs-on: windows-2025
needs: get-info
steps:
- uses: actions/checkout@v4
@@ -89,10 +89,10 @@ jobs:
arch: amd64
- name: Configure CMake
- run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+ run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
- name: Upload Windows SDL artifact
uses: actions/upload-artifact@v4
@@ -101,7 +101,7 @@ jobs:
path: ${{github.workspace}}/build/shadPS4.exe
windows-qt:
- runs-on: windows-latest
+ runs-on: windows-2025
needs: get-info
steps:
- uses: actions/checkout@v4
@@ -143,10 +143,10 @@ jobs:
arch: amd64
- name: Configure CMake
- run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+ run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
- name: Deploy and Package
run: |
@@ -162,7 +162,7 @@ jobs:
path: upload/
macos-sdl:
- runs-on: macos-latest
+ runs-on: macos-15
needs: get-info
steps:
- uses: actions/checkout@v4
@@ -174,11 +174,6 @@ jobs:
with:
xcode-version: latest
- - name: Install MoltenVK
- run: |
- arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- arch -x86_64 /usr/local/bin/brew install molten-vk
-
- name: Cache CMake Configuration
uses: actions/cache@v4
env:
@@ -201,7 +196,7 @@ jobs:
variant: sccache
- name: Configure CMake
- run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
@@ -210,7 +205,7 @@ jobs:
run: |
mkdir upload
mv ${{github.workspace}}/build/shadps4 upload
- cp $(arch -x86_64 /usr/local/bin/brew --prefix)/opt/molten-vk/lib/libMoltenVK.dylib upload
+ cp ${{github.workspace}}/build/externals/MoltenVK/libMoltenVK.dylib upload
tar cf shadps4-macos-sdl.tar.gz -C upload .
- uses: actions/upload-artifact@v4
with:
@@ -218,7 +213,7 @@ jobs:
path: shadps4-macos-sdl.tar.gz
macos-qt:
- runs-on: macos-latest
+ runs-on: macos-15
needs: get-info
steps:
- uses: actions/checkout@v4
@@ -230,11 +225,8 @@ jobs:
with:
xcode-version: latest
- - name: Install MoltenVK and Setup Qt
- run: |
- arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- arch -x86_64 /usr/local/bin/brew install molten-vk
- - uses: jurplel/install-qt-action@v4
+ - name: Setup Qt
+ uses: jurplel/install-qt-action@v4
with:
version: 6.7.3
host: mac
@@ -265,7 +257,7 @@ jobs:
variant: sccache
- name: Configure CMake
- run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
@@ -312,10 +304,10 @@ jobs:
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Configure CMake
- run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
- name: Package and Upload Linux(ubuntu64) SDL artifact
run: |
@@ -368,10 +360,10 @@ jobs:
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Configure CMake
- run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
- run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel3
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
- name: Run AppImage packaging script
run: ./.github/linux-appimage-qt.sh
@@ -384,6 +376,78 @@ jobs:
name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
path: Shadps4-qt.AppImage
+ linux-sdl-gcc:
+ runs-on: ubuntu-24.04
+ needs: get-info
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install dependencies
+ run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev
+
+ - name: Cache CMake Configuration
+ uses: actions/cache@v4
+ env:
+ cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-configuration
+ with:
+ path: |
+ ${{github.workspace}}/build
+ key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
+ restore-keys: |
+ ${{ env.cache-name }}-
+
+ - name: Cache CMake Build
+ uses: hendrikmuhs/ccache-action@v1.2.14
+ env:
+ cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-build
+ with:
+ append-timestamp: false
+ key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
+
+ - name: Configure CMake
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+
+ - name: Build
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
+
+ linux-qt-gcc:
+ runs-on: ubuntu-24.04
+ needs: get-info
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install dependencies
+ run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev
+
+ - name: Cache CMake Configuration
+ uses: actions/cache@v4
+ env:
+ cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-configuration
+ with:
+ path: |
+ ${{github.workspace}}/build
+ key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
+ restore-keys: |
+ ${{ env.cache-name }}-
+
+ - name: Cache CMake Build
+ uses: hendrikmuhs/ccache-action@v1.2.14
+ env:
+ cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-build
+ with:
+ append-timestamp: false
+ key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
+
+ - name: Configure CMake
+ run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+
+ - name: Build
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
+
pre-release:
if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push'
needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt]
diff --git a/.gitignore b/.gitignore
index 61d9e32e1..683f6f0a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -414,3 +414,7 @@ FodyWeavers.xsd
# for macOS
**/.DS_Store
+
+# JetBrains
+.idea
+cmake-build-*
diff --git a/.gitmodules b/.gitmodules
index 07d1d4ef7..3d0d21c5b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -102,3 +102,20 @@
[submodule "externals/LibAtrac9"]
path = externals/LibAtrac9
url = https://github.com/shadps4-emu/ext-LibAtrac9.git
+ shallow = true
+[submodule "externals/libpng"]
+ path = externals/libpng
+ url = https://github.com/pnggroup/libpng
+ shallow = true
+[submodule "externals/MoltenVK/SPIRV-Cross"]
+ path = externals/MoltenVK/SPIRV-Cross
+ url = https://github.com/KhronosGroup/SPIRV-Cross
+ shallow = true
+[submodule "externals/MoltenVK/MoltenVK"]
+ path = externals/MoltenVK/MoltenVK
+ url = https://github.com/KhronosGroup/MoltenVK
+ shallow = true
+[submodule "externals/MoltenVK/cereal"]
+ path = externals/MoltenVK/cereal
+ url = https://github.com/USCiLab/cereal
+ shallow = true
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9479e851..4822658c6 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
-cmake_minimum_required(VERSION 3.16.3)
+# Version 3.24 needed for FetchContent OVERRIDE_FIND_PACKAGE
+cmake_minimum_required(VERSION 3.24)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
@@ -15,7 +16,7 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
-project(shadPS4)
+project(shadPS4 CXX C ASM)
# Forcing PIE makes sure that the base address is high enough so that it doesn't clash with the PS4 memory.
if(UNIX AND NOT APPLE)
@@ -31,6 +32,7 @@ endif()
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
option(ENABLE_DISCORD_RPC "Enable the Discord RPC integration" ON)
+option(ENABLE_UPDATER "Enables the options to updater" ON)
# First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR.
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
@@ -104,23 +106,55 @@ git_describe(GIT_DESC --always --long --dirty)
git_branch_name(GIT_BRANCH)
string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M:%S")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp" @ONLY)
+# Try to get the upstream remote and branch
+execute_process(
+ COMMAND git rev-parse --abbrev-ref --symbolic-full-name @{u}
+ OUTPUT_VARIABLE GIT_REMOTE_NAME
+ RESULT_VARIABLE GIT_BRANCH_RESULT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+# Default to origin if there's no upstream set or if the command failed
+if (GIT_BRANCH_RESULT OR GIT_REMOTE_NAME STREQUAL "")
+ set(GIT_REMOTE_NAME "origin")
+else()
+ # Extract remote name if the output contains a remote/branch format
+ string(FIND "${GIT_REMOTE_NAME}" "/" INDEX)
+ if (INDEX GREATER -1)
+ string(SUBSTRING "${GIT_REMOTE_NAME}" 0 "${INDEX}" GIT_REMOTE_NAME)
+ else()
+ # If no remote is present (only a branch name), default to origin
+ set(GIT_REMOTE_NAME "origin")
+ endif()
+endif()
+
+# Get remote link
+execute_process(
+ COMMAND git config --get remote.${GIT_REMOTE_NAME}.url
+ OUTPUT_VARIABLE GIT_REMOTE_URL
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/src/common/scm_rev.cpp" @ONLY)
find_package(Boost 1.84.0 CONFIG)
find_package(FFmpeg 5.1.2 MODULE)
find_package(fmt 10.2.0 CONFIG)
-find_package(glslang 14.2.0 CONFIG)
+find_package(glslang 15 CONFIG)
find_package(half 1.12.0 MODULE)
-find_package(magic_enum 0.9.6 CONFIG)
+find_package(magic_enum 0.9.7 CONFIG)
+find_package(PNG 1.6 MODULE)
find_package(RenderDoc 1.6.0 MODULE)
find_package(SDL3 3.1.2 CONFIG)
+find_package(stb MODULE)
find_package(toml11 4.2.0 CONFIG)
find_package(tsl-robin-map 1.3.0 CONFIG)
-find_package(VulkanHeaders 1.3.289 CONFIG)
+find_package(VulkanHeaders 1.4.305 CONFIG)
find_package(VulkanMemoryAllocator 3.1.0 CONFIG)
find_package(xbyak 7.07 CONFIG)
find_package(xxHash 0.8.2 MODULE)
-find_package(zlib-ng 2.1.7 MODULE)
+find_package(ZLIB 1.3 MODULE)
find_package(Zydis 5.0.0 CONFIG)
find_package(pugixml 1.14 CONFIG)
@@ -175,10 +209,6 @@ if(ENABLE_QT_GUI)
qt_add_resources(TRANSLATIONS ${TRANSLATIONS_QRC})
endif()
-set(AUDIO_CORE src/audio_core/sdl_audio.cpp
- src/audio_core/sdl_audio.h
-)
-
set(AJM_LIB src/core/libraries/ajm/ajm.cpp
src/core/libraries/ajm/ajm.h
src/core/libraries/ajm/ajm_at9.cpp
@@ -188,6 +218,8 @@ set(AJM_LIB src/core/libraries/ajm/ajm.cpp
src/core/libraries/ajm/ajm_context.cpp
src/core/libraries/ajm/ajm_context.h
src/core/libraries/ajm/ajm_error.h
+ src/core/libraries/ajm/ajm_instance_statistics.cpp
+ src/core/libraries/ajm/ajm_instance_statistics.h
src/core/libraries/ajm/ajm_instance.cpp
src/core/libraries/ajm/ajm_instance.h
src/core/libraries/ajm/ajm_mp3.cpp
@@ -198,43 +230,64 @@ set(AUDIO_LIB src/core/libraries/audio/audioin.cpp
src/core/libraries/audio/audioin.h
src/core/libraries/audio/audioout.cpp
src/core/libraries/audio/audioout.h
+ src/core/libraries/audio/audioout_backend.h
+ src/core/libraries/audio/audioout_error.h
+ src/core/libraries/audio/sdl_audio.cpp
src/core/libraries/ngs2/ngs2.cpp
src/core/libraries/ngs2/ngs2.h
)
set(GNM_LIB src/core/libraries/gnmdriver/gnmdriver.cpp
src/core/libraries/gnmdriver/gnmdriver.h
+ src/core/libraries/gnmdriver/gnmdriver_init.h
src/core/libraries/gnmdriver/gnm_error.h
)
-set(KERNEL_LIB src/core/libraries/kernel/event_flag/event_flag.cpp
- src/core/libraries/kernel/event_flag/event_flag.h
- src/core/libraries/kernel/event_flag/event_flag_obj.cpp
- src/core/libraries/kernel/event_flag/event_flag_obj.h
+set(KERNEL_LIB src/core/libraries/kernel/sync/mutex.cpp
+ src/core/libraries/kernel/sync/mutex.h
+ src/core/libraries/kernel/sync/semaphore.h
+ src/core/libraries/kernel/threads/condvar.cpp
+ src/core/libraries/kernel/threads/event_flag.cpp
+ src/core/libraries/kernel/threads/exception.cpp
+ src/core/libraries/kernel/threads/exception.h
+ src/core/libraries/kernel/threads/mutex.cpp
+ src/core/libraries/kernel/threads/pthread_attr.cpp
+ src/core/libraries/kernel/threads/pthread_clean.cpp
+ src/core/libraries/kernel/threads/pthread.cpp
+ src/core/libraries/kernel/threads/pthread_spec.cpp
src/core/libraries/kernel/threads/rwlock.cpp
src/core/libraries/kernel/threads/semaphore.cpp
- src/core/libraries/kernel/threads/keys.cpp
- src/core/libraries/kernel/threads/threads.h
- src/core/libraries/kernel/cpu_management.cpp
- src/core/libraries/kernel/cpu_management.h
- src/core/libraries/kernel/event_queue.cpp
- src/core/libraries/kernel/event_queue.h
- src/core/libraries/kernel/event_queues.cpp
- src/core/libraries/kernel/event_queues.h
+ src/core/libraries/kernel/threads/sleepq.cpp
+ src/core/libraries/kernel/threads/sleepq.h
+ src/core/libraries/kernel/threads/stack.cpp
+ src/core/libraries/kernel/threads/tcb.cpp
+ src/core/libraries/kernel/threads/pthread.h
+ src/core/libraries/kernel/threads/thread_state.cpp
+ src/core/libraries/kernel/threads/thread_state.h
+ src/core/libraries/kernel/process.cpp
+ src/core/libraries/kernel/process.h
+ src/core/libraries/kernel/equeue.cpp
+ src/core/libraries/kernel/equeue.h
src/core/libraries/kernel/file_system.cpp
src/core/libraries/kernel/file_system.h
- src/core/libraries/kernel/libkernel.cpp
- src/core/libraries/kernel/libkernel.h
- src/core/libraries/kernel/memory_management.cpp
- src/core/libraries/kernel/memory_management.h
- src/core/libraries/kernel/thread_management.cpp
- src/core/libraries/kernel/thread_management.h
- src/core/libraries/kernel/time_management.cpp
- src/core/libraries/kernel/time_management.h
+ src/core/libraries/kernel/kernel.cpp
+ src/core/libraries/kernel/kernel.h
+ src/core/libraries/kernel/memory.cpp
+ src/core/libraries/kernel/memory.h
+ src/core/libraries/kernel/threads.cpp
+ src/core/libraries/kernel/threads.h
+ src/core/libraries/kernel/time.cpp
+ src/core/libraries/kernel/time.h
+ src/core/libraries/kernel/orbis_error.h
+ src/core/libraries/kernel/posix_error.h
+ src/core/libraries/kernel/aio.cpp
+ src/core/libraries/kernel/aio.h
)
set(NETWORK_LIBS src/core/libraries/network/http.cpp
src/core/libraries/network/http.h
+ src/core/libraries/network/http2.cpp
+ src/core/libraries/network/http2.h
src/core/libraries/network/net.cpp
src/core/libraries/network/netctl.cpp
src/core/libraries/network/netctl.h
@@ -244,6 +297,23 @@ set(NETWORK_LIBS src/core/libraries/network/http.cpp
src/core/libraries/network/net.h
src/core/libraries/network/ssl.cpp
src/core/libraries/network/ssl.h
+ src/core/libraries/network/ssl2.cpp
+ src/core/libraries/network/ssl2.h
+)
+
+set(AVPLAYER_LIB src/core/libraries/avplayer/avplayer_common.cpp
+ src/core/libraries/avplayer/avplayer_common.h
+ src/core/libraries/avplayer/avplayer_file_streamer.cpp
+ src/core/libraries/avplayer/avplayer_file_streamer.h
+ src/core/libraries/avplayer/avplayer_impl.cpp
+ src/core/libraries/avplayer/avplayer_impl.h
+ src/core/libraries/avplayer/avplayer_source.cpp
+ src/core/libraries/avplayer/avplayer_source.h
+ src/core/libraries/avplayer/avplayer_state.cpp
+ src/core/libraries/avplayer/avplayer_state.h
+ src/core/libraries/avplayer/avplayer.cpp
+ src/core/libraries/avplayer/avplayer.h
+ src/core/libraries/avplayer/avplayer_error.h
)
set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
@@ -267,30 +337,22 @@ set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
src/core/libraries/save_data/dialog/savedatadialog_ui.h
src/core/libraries/system/sysmodule.cpp
src/core/libraries/system/sysmodule.h
+ src/core/libraries/system/system_error.h
src/core/libraries/system/systemservice.cpp
src/core/libraries/system/systemservice.h
+ src/core/libraries/system/systemservice_error.h
src/core/libraries/system/userservice.cpp
src/core/libraries/system/userservice.h
+ src/core/libraries/system/userservice_error.h
src/core/libraries/app_content/app_content.cpp
src/core/libraries/app_content/app_content.h
+ src/core/libraries/app_content/app_content_error.h
src/core/libraries/rtc/rtc.cpp
src/core/libraries/rtc/rtc.h
src/core/libraries/rtc/rtc_error.h
src/core/libraries/disc_map/disc_map.cpp
src/core/libraries/disc_map/disc_map.h
src/core/libraries/disc_map/disc_map_codes.h
- src/core/libraries/avplayer/avplayer_common.cpp
- src/core/libraries/avplayer/avplayer_common.h
- src/core/libraries/avplayer/avplayer_file_streamer.cpp
- src/core/libraries/avplayer/avplayer_file_streamer.h
- src/core/libraries/avplayer/avplayer_impl.cpp
- src/core/libraries/avplayer/avplayer_impl.h
- src/core/libraries/avplayer/avplayer_source.cpp
- src/core/libraries/avplayer/avplayer_source.h
- src/core/libraries/avplayer/avplayer_state.cpp
- src/core/libraries/avplayer/avplayer_state.h
- src/core/libraries/avplayer/avplayer.cpp
- src/core/libraries/avplayer/avplayer.h
src/core/libraries/ngs2/ngs2.cpp
src/core/libraries/ngs2/ngs2.h
src/core/libraries/ngs2/ngs2_error.h
@@ -308,6 +370,12 @@ set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
src/core/libraries/remote_play/remoteplay.h
src/core/libraries/share_play/shareplay.cpp
src/core/libraries/share_play/shareplay.h
+ src/core/libraries/razor_cpu/razor_cpu.cpp
+ src/core/libraries/razor_cpu/razor_cpu.h
+ src/core/libraries/mouse/mouse.cpp
+ src/core/libraries/mouse/mouse.h
+ src/core/libraries/web_browser_dialog/webbrowserdialog.cpp
+ src/core/libraries/web_browser_dialog/webbrowserdialog.h
)
set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
@@ -315,6 +383,7 @@ set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
src/core/libraries/videoout/driver.h
src/core/libraries/videoout/video_out.cpp
src/core/libraries/videoout/video_out.h
+ src/core/libraries/videoout/videoout_error.h
)
set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp
@@ -332,18 +401,28 @@ set(IME_LIB src/core/libraries/ime/error_dialog.cpp
src/core/libraries/ime/ime_ui.h
src/core/libraries/ime/ime.cpp
src/core/libraries/ime/ime.h
+ src/core/libraries/ime/ime_error.h
)
set(PAD_LIB src/core/libraries/pad/pad.cpp
src/core/libraries/pad/pad.h
+ src/core/libraries/pad/pad_errors.h
)
set(PNG_LIB src/core/libraries/libpng/pngdec.cpp
src/core/libraries/libpng/pngdec.h
+ src/core/libraries/libpng/pngdec_error.h
+)
+
+set(JPEG_LIB src/core/libraries/jpeg/jpeg_error.h
+ src/core/libraries/jpeg/jpegenc.cpp
+ src/core/libraries/jpeg/jpegenc.h
)
set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp
src/core/libraries/playgo/playgo.h
+ src/core/libraries/playgo/playgo_dialog.cpp
+ src/core/libraries/playgo/playgo_dialog.h
src/core/libraries/playgo/playgo_types.h
)
@@ -356,8 +435,10 @@ set(USBD_LIB src/core/libraries/usbd/usbd.cpp
src/core/libraries/usbd/usbd.h
)
-set(FIBER_LIB src/core/libraries/fiber/fiber.cpp
+set(FIBER_LIB src/core/libraries/fiber/fiber_context.s
+ src/core/libraries/fiber/fiber.cpp
src/core/libraries/fiber/fiber.h
+ src/core/libraries/fiber/fiber_error.h
)
set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp
@@ -365,9 +446,16 @@ set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp
src/core/libraries/videodec/videodec2.cpp
src/core/libraries/videodec/videodec2.h
src/core/libraries/videodec/videodec2_avc.h
+ src/core/libraries/videodec/videodec.cpp
+ src/core/libraries/videodec/videodec.h
+ src/core/libraries/videodec/videodec_error.h
+ src/core/libraries/videodec/videodec_impl.cpp
+ src/core/libraries/videodec/videodec_impl.h
)
-set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
+set(NP_LIBS src/core/libraries/np_common/np_common.cpp
+ src/core/libraries/np_common/np_common.h
+ src/core/libraries/np_manager/np_manager.cpp
src/core/libraries/np_manager/np_manager.h
src/core/libraries/np_score/np_score.cpp
src/core/libraries/np_score/np_score.h
@@ -375,10 +463,22 @@ set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
src/core/libraries/np_trophy/np_trophy.h
src/core/libraries/np_trophy/trophy_ui.cpp
src/core/libraries/np_trophy/trophy_ui.h
+ src/core/libraries/np_trophy/np_trophy_error.h
+ src/core/libraries/np_web_api/np_web_api.cpp
+ src/core/libraries/np_web_api/np_web_api.h
+ src/core/libraries/np_party/np_party.cpp
+ src/core/libraries/np_party/np_party.h
+)
+
+set(ZLIB_LIB src/core/libraries/zlib/zlib.cpp
+ src/core/libraries/zlib/zlib_sce.h
+ src/core/libraries/zlib/zlib_error.h
)
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
src/core/libraries/screenshot/screenshot.h
+ src/core/libraries/move/move.cpp
+ src/core/libraries/move/move.h
)
set(DEV_TOOLS src/core/devtools/layer.cpp
@@ -396,10 +496,14 @@ set(DEV_TOOLS src/core/devtools/layer.cpp
src/core/devtools/widget/frame_graph.cpp
src/core/devtools/widget/frame_graph.h
src/core/devtools/widget/imgui_memory_editor.h
+ src/core/devtools/widget/memory_map.cpp
+ src/core/devtools/widget/memory_map.h
src/core/devtools/widget/reg_popup.cpp
src/core/devtools/widget/reg_popup.h
src/core/devtools/widget/reg_view.cpp
src/core/devtools/widget/reg_view.h
+ src/core/devtools/widget/shader_list.cpp
+ src/core/devtools/widget/shader_list.h
src/core/devtools/widget/text_editor.cpp
src/core/devtools/widget/text_editor.h
)
@@ -448,7 +552,12 @@ set(COMMON src/common/logging/backend.cpp
src/common/signal_context.h
src/common/signal_context.cpp
src/common/singleton.h
+ src/common/slab_heap.h
src/common/slot_vector.h
+ src/common/spin_lock.cpp
+ src/common/spin_lock.h
+ src/common/stb.cpp
+ src/common/stb.h
src/common/string_util.cpp
src/common/string_util.h
src/common/thread.cpp
@@ -456,6 +565,7 @@ set(COMMON src/common/logging/backend.cpp
src/common/types.h
src/common/uint128.h
src/common/unique_function.h
+ src/common/va_ctx.h
src/common/version.h
src/common/ntapi.h
src/common/ntapi.cpp
@@ -463,7 +573,7 @@ set(COMMON src/common/logging/backend.cpp
src/common/number_utils.cpp
src/common/memory_patcher.h
src/common/memory_patcher.cpp
- src/common/scm_rev.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/src/common/scm_rev.cpp
src/common/scm_rev.h
)
@@ -480,6 +590,22 @@ set(CORE src/core/aerolib/stubs.cpp
src/core/crypto/crypto.cpp
src/core/crypto/crypto.h
src/core/crypto/keys.h
+ src/core/devices/base_device.cpp
+ src/core/devices/base_device.h
+ src/core/devices/ioccom.h
+ src/core/devices/logger.cpp
+ src/core/devices/logger.h
+ src/core/devices/nop_device.h
+ src/core/devices/console_device.cpp
+ src/core/devices/console_device.h
+ src/core/devices/deci_tty6_device.cpp
+ src/core/devices/deci_tty6_device.h
+ src/core/devices/random_device.cpp
+ src/core/devices/random_device.h
+ src/core/devices/urandom_device.cpp
+ src/core/devices/urandom_device.h
+ src/core/devices/srandom_device.cpp
+ src/core/devices/srandom_device.h
src/core/file_format/pfs.h
src/core/file_format/pkg.cpp
src/core/file_format/pkg.h
@@ -503,10 +629,10 @@ set(CORE src/core/aerolib/stubs.cpp
src/core/loader/elf.h
src/core/loader/symbols_resolver.h
src/core/loader/symbols_resolver.cpp
- src/core/libraries/error_codes.h
src/core/libraries/libs.h
src/core/libraries/libs.cpp
${AJM_LIB}
+ ${AVPLAYER_LIB}
${AUDIO_LIB}
${GNM_LIB}
${KERNEL_LIB}
@@ -517,9 +643,11 @@ set(CORE src/core/aerolib/stubs.cpp
${VIDEOOUT_LIB}
${NP_LIBS}
${PNG_LIB}
+ ${JPEG_LIB}
${PLAYGO_LIB}
${RANDOM_LIB}
${USBD_LIB}
+ ${ZLIB_LIB}
${MISC_LIBS}
${IME_LIB}
${FIBER_LIB}
@@ -536,10 +664,10 @@ set(CORE src/core/aerolib/stubs.cpp
src/core/platform.h
src/core/signals.cpp
src/core/signals.h
+ src/core/thread.cpp
+ src/core/thread.h
src/core/tls.cpp
src/core/tls.h
- src/core/virtual_memory.cpp
- src/core/virtual_memory.h
)
if (ARCHITECTURE STREQUAL "x86_64")
@@ -570,6 +698,8 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h
src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
src/shader_recompiler/backend/spirv/emit_spirv_logical.cpp
+ src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp
+ src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.h
src/shader_recompiler/backend/spirv/emit_spirv_select.cpp
src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp
src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
@@ -604,12 +734,14 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
src/shader_recompiler/ir/passes/constant_propagation_pass.cpp
src/shader_recompiler/ir/passes/dead_code_elimination_pass.cpp
src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp
+ src/shader_recompiler/ir/passes/hull_shader_transform.cpp
src/shader_recompiler/ir/passes/identity_removal_pass.cpp
src/shader_recompiler/ir/passes/ir_passes.h
src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
src/shader_recompiler/ir/passes/ring_access_elimination.cpp
src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp
+ src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp
src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp
src/shader_recompiler/ir/abstract_syntax_list.h
src/shader_recompiler/ir/attribute.cpp
@@ -623,10 +755,13 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
src/shader_recompiler/ir/opcodes.cpp
src/shader_recompiler/ir/opcodes.h
src/shader_recompiler/ir/opcodes.inc
+ src/shader_recompiler/ir/patch.cpp
+ src/shader_recompiler/ir/patch.h
src/shader_recompiler/ir/post_order.cpp
src/shader_recompiler/ir/post_order.h
src/shader_recompiler/ir/program.cpp
src/shader_recompiler/ir/program.h
+ src/shader_recompiler/ir/reinterpret.h
src/shader_recompiler/ir/reg.h
src/shader_recompiler/ir/type.cpp
src/shader_recompiler/ir/type.h
@@ -652,14 +787,10 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
src/video_core/buffer_cache/word_manager.h
src/video_core/renderer_vulkan/liverpool_to_vk.cpp
src/video_core/renderer_vulkan/liverpool_to_vk.h
- src/video_core/renderer_vulkan/renderer_vulkan.cpp
- src/video_core/renderer_vulkan/renderer_vulkan.h
src/video_core/renderer_vulkan/vk_common.cpp
src/video_core/renderer_vulkan/vk_common.h
src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
src/video_core/renderer_vulkan/vk_compute_pipeline.h
- src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp
- src/video_core/renderer_vulkan/vk_descriptor_update_queue.h
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
src/video_core/renderer_vulkan/vk_graphics_pipeline.h
src/video_core/renderer_vulkan/vk_instance.cpp
@@ -672,12 +803,16 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
src/video_core/renderer_vulkan/vk_pipeline_common.h
src/video_core/renderer_vulkan/vk_platform.cpp
src/video_core/renderer_vulkan/vk_platform.h
+ src/video_core/renderer_vulkan/vk_presenter.cpp
+ src/video_core/renderer_vulkan/vk_presenter.h
src/video_core/renderer_vulkan/vk_rasterizer.cpp
src/video_core/renderer_vulkan/vk_rasterizer.h
src/video_core/renderer_vulkan/vk_resource_pool.cpp
src/video_core/renderer_vulkan/vk_resource_pool.h
src/video_core/renderer_vulkan/vk_scheduler.cpp
src/video_core/renderer_vulkan/vk_scheduler.h
+ src/video_core/renderer_vulkan/vk_shader_hle.cpp
+ src/video_core/renderer_vulkan/vk_shader_hle.h
src/video_core/renderer_vulkan/vk_shader_util.cpp
src/video_core/renderer_vulkan/vk_shader_util.h
src/video_core/renderer_vulkan/vk_swapchain.cpp
@@ -719,6 +854,10 @@ set(IMGUI src/imgui/imgui_config.h
set(INPUT src/input/controller.cpp
src/input/controller.h
+ src/input/input_handler.cpp
+ src/input/input_handler.h
+ src/input/input_mouse.cpp
+ src/input/input_mouse.h
)
set(EMULATOR src/emulator.cpp
@@ -732,6 +871,12 @@ set(EMULATOR src/emulator.cpp
if(ENABLE_QT_GUI)
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
+if (ENABLE_UPDATER)
+ set(UPDATER src/qt_gui/check_update.cpp
+ src/qt_gui/check_update.h
+ )
+endif()
+
set(QT_GUI src/qt_gui/about_dialog.cpp
src/qt_gui/about_dialog.h
src/qt_gui/about_dialog.ui
@@ -739,8 +884,8 @@ set(QT_GUI src/qt_gui/about_dialog.cpp
src/qt_gui/background_music_player.h
src/qt_gui/cheats_patches.cpp
src/qt_gui/cheats_patches.h
- src/qt_gui/check_update.cpp
- src/qt_gui/check_update.h
+ src/qt_gui/compatibility_info.cpp
+ src/qt_gui/compatibility_info.h
src/qt_gui/main_window_ui.h
src/qt_gui/main_window.cpp
src/qt_gui/main_window.h
@@ -762,6 +907,10 @@ set(QT_GUI src/qt_gui/about_dialog.cpp
src/qt_gui/trophy_viewer.h
src/qt_gui/elf_viewer.cpp
src/qt_gui/elf_viewer.h
+ src/qt_gui/kbm_config_dialog.cpp
+ src/qt_gui/kbm_config_dialog.h
+ src/qt_gui/kbm_help_dialog.cpp
+ src/qt_gui/kbm_help_dialog.h
src/qt_gui/main_window_themes.cpp
src/qt_gui/main_window_themes.h
src/qt_gui/settings_dialog.cpp
@@ -771,6 +920,7 @@ set(QT_GUI src/qt_gui/about_dialog.cpp
${EMULATOR}
${RESOURCE_FILES}
${TRANSLATIONS}
+ ${UPDATER}
)
endif()
@@ -807,20 +957,41 @@ endif()
create_target_directory_groups(shadps4)
-target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak::xbyak Tracy::TracyClient RenderDoc::API FFmpeg::ffmpeg Dear_ImGui gcn half::half)
-target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator LibAtrac9 sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::SPIRV glslang::glslang SDL3::SDL3 pugixml::pugixml)
+target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak::xbyak Tracy::TracyClient RenderDoc::API FFmpeg::ffmpeg Dear_ImGui gcn half::half ZLIB::ZLIB PNG::PNG)
+target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator LibAtrac9 sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::glslang SDL3::SDL3 pugixml::pugixml stb::headers)
target_compile_definitions(shadps4 PRIVATE IMGUI_USER_CONFIG="imgui/imgui_config.h")
target_compile_definitions(Dear_ImGui PRIVATE IMGUI_USER_CONFIG="${PROJECT_SOURCE_DIR}/src/imgui/imgui_config.h")
+if (ENABLE_DISCORD_RPC)
+ target_compile_definitions(shadps4 PRIVATE ENABLE_DISCORD_RPC)
+endif()
+
+# Optional due to https://github.com/shadps4-emu/shadPS4/issues/1704
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ENABLE_USERFAULTFD)
+ target_compile_definitions(shadps4 PRIVATE ENABLE_USERFAULTFD)
+endif()
+
if (APPLE)
- option(USE_SYSTEM_VULKAN_LOADER "Enables using the system Vulkan loader instead of directly linking with MoltenVK. Useful for loading validation layers." OFF)
- if (USE_SYSTEM_VULKAN_LOADER)
- target_compile_definitions(shadps4 PRIVATE USE_SYSTEM_VULKAN_LOADER=1)
+ if (ENABLE_QT_GUI)
+ # Include MoltenVK in the app bundle, along with an ICD file so it can be found by the system Vulkan loader if used for loading layers.
+ set(MVK_ICD ${CMAKE_CURRENT_SOURCE_DIR}/externals/MoltenVK/MoltenVK_icd.json)
+ target_sources(shadps4 PRIVATE ${MVK_ICD})
+ set_source_files_properties(${MVK_ICD} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/vulkan/icd.d)
+
+ set(MVK_DYLIB_SRC ${CMAKE_CURRENT_BINARY_DIR}/externals/MoltenVK/libMoltenVK.dylib)
+ set(MVK_DYLIB_DST ${CMAKE_CURRENT_BINARY_DIR}/shadps4.app/Contents/Frameworks/libMoltenVK.dylib)
+ add_custom_command(
+ OUTPUT ${MVK_DYLIB_DST}
+ DEPENDS ${MVK_DYLIB_SRC}
+ COMMAND cmake -E copy ${MVK_DYLIB_SRC} ${MVK_DYLIB_DST})
+ add_custom_target(CopyMoltenVK DEPENDS ${MVK_DYLIB_DST})
+ add_dependencies(CopyMoltenVK MoltenVK)
+ add_dependencies(shadps4 CopyMoltenVK)
+ set_property(TARGET shadps4 APPEND PROPERTY BUILD_RPATH "@executable_path/../Frameworks")
else()
- # Link MoltenVK for Vulkan support
- find_library(MOLTENVK MoltenVK REQUIRED)
- target_link_libraries(shadps4 PRIVATE ${MOLTENVK})
+ # For non-bundled SDL build, just do a normal library link.
+ target_link_libraries(shadps4 PRIVATE MoltenVK)
endif()
if (ARCHITECTURE STREQUAL "x86_64")
@@ -837,14 +1008,17 @@ if (NOT ENABLE_QT_GUI)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
- target_link_libraries(shadps4 PRIVATE cryptoppwin zlib-ng::zlib)
+ target_link_libraries(shadps4 PRIVATE cryptoppwin)
else()
- target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp zlib-ng::zlib)
+ target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp)
endif()
if (ENABLE_QT_GUI)
- target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia)
- add_definitions(-DENABLE_QT_GUI)
+ target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia)
+ add_definitions(-DENABLE_QT_GUI)
+ if (ENABLE_UPDATER)
+ add_definitions(-DENABLE_UPDATER)
+ endif()
endif()
if (WIN32)
@@ -908,7 +1082,10 @@ if (ENABLE_QT_GUI)
set_target_properties(shadps4 PROPERTIES
# WIN32_EXECUTABLE ON
MACOSX_BUNDLE ON
- MACOSX_BUNDLE_ICON_FILE shadPS4.icns)
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/dist/MacOSBundleInfo.plist.in"
+ MACOSX_BUNDLE_ICON_FILE "shadPS4.icns"
+ MACOSX_BUNDLE_SHORT_VERSION_STRING "0.4.1"
+ )
set_source_files_properties(src/images/shadPS4.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
@@ -930,6 +1107,8 @@ endif()
install(TARGETS shadps4 BUNDLE DESTINATION .)
if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
- install(FILES ".github/shadps4.desktop" DESTINATION "share/applications")
- install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps")
+ install(FILES "dist/net.shadps4.shadPS4.desktop" DESTINATION "share/applications")
+ install(FILES "dist/net.shadps4.shadPS4.metainfo.xml" DESTINATION "share/metainfo")
+ install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps" RENAME "net.shadps4.shadPS4.png")
+ install(FILES "src/images/net.shadps4.shadPS4.svg" DESTINATION "share/icons/hicolor/scalable/apps")
endif()
diff --git a/README.md b/README.md
index 18e69546c..97e3ab383 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,9 @@ This project began as a fun project. Given our limited free time, it may take so
# Building
+> [!IMPORTANT]
+> If you want to use shadPS4 to play your games, you don't have to follow the build instructions, you can simply download the emulator from either the [**release tab**](https://github.com/shadps4-emu/shadPS4/releases) or the [**action tab**](https://github.com/shadps4-emu/shadPS4/actions).
+
## Windows
Check the build instructions for [**Windows**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md).
@@ -74,12 +77,22 @@ Check the build instructions for [**macOS**](https://github.com/shadps4-emu/shad
For more information on how to test, debug and report issues with the emulator or games, read the [**Debugging documentation**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md).
-# Keyboard mapping
+# Keyboard and Mouse Mappings
+
+> [!NOTE]
+> Some keyboards may also require you to hold the Fn key to use the F\* keys. Mac users should use the Command key instead of Control, and need to use Command+F11 for full screen to avoid conflicting with system key bindings.
+
+| Button | Function |
+|-------------|-------------|
+F10 | FPS Counter
+Ctrl+F10 | Video Debug Info
+F11 | Fullscreen
+F12 | Trigger RenderDoc Capture
> [!NOTE]
> Xbox and DualShock controllers work out of the box.
-| Controller button | Keyboard equivelant |
+| Controller button | Keyboard equivalent |
|-------------|-------------|
LEFT AXIS UP | W |
LEFT AXIS DOWN | S |
@@ -89,10 +102,10 @@ RIGHT AXIS UP | I |
RIGHT AXIS DOWN | K |
RIGHT AXIS LEFT | J |
RIGHT AXIS RIGHT | L |
-TRIANGLE | Numpad 8 |
-CIRCLE | Numpad 6 |
-CROSS | Numpad 2 |
-SQUARE | Numpad 4 |
+TRIANGLE | Numpad 8 or C |
+CIRCLE | Numpad 6 or B |
+CROSS | Numpad 2 or N |
+SQUARE | Numpad 4 or V |
PAD UP | UP |
PAD DOWN | DOWN |
PAD LEFT | LEFT |
@@ -106,6 +119,9 @@ R2 | O |
L3 | X |
R3 | M |
+Keyboard and mouse inputs can be customized in the settings menu by clicking the Controller button, and further details and help on controls are also found there. Custom bindings are saved per-game. Inputs support up to three keys per binding, mouse buttons, mouse movement mapped to joystick input, and more.
+
+
# Main team
- [**georgemoralis**](https://github.com/georgemoralis)
@@ -114,6 +130,11 @@ R3 | M |
- [**skmp**](https://github.com/skmp)
- [**wheremyfoodat**](https://github.com/wheremyfoodat)
- [**raziel1000**](https://github.com/raziel1000)
+- [**viniciuslrangel**](https://github.com/viniciuslrangel)
+- [**roamic**](https://github.com/vladmikhalin)
+- [**poly**](https://github.com/polybiusproxy)
+- [**squidbus**](https://github.com/squidbus)
+- [**frodo**](https://github.com/baggins183)
Logo is done by [**Xphalnos**](https://github.com/Xphalnos)
diff --git a/REUSE.toml b/REUSE.toml
index e1a266030..a62974bcd 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -5,15 +5,21 @@ path = [
"REUSE.toml",
"CMakeSettings.json",
".github/FUNDING.yml",
- ".github/shadps4.desktop",
".github/shadps4.png",
".gitmodules",
- "documents/changelog.txt",
+ "dist/MacOSBundleInfo.plist.in",
+ "dist/net.shadps4.shadPS4.desktop",
+ "dist/net.shadps4.shadPS4_metadata.pot",
+ "dist/net.shadps4.shadPS4.metainfo.xml",
+ "documents/changelog.md",
"documents/Quickstart/2.png",
"documents/Screenshots/*",
+ "documents/Screenshots/Linux/*",
+ "externals/MoltenVK/MoltenVK_icd.json",
"scripts/ps4_names.txt",
"src/images/about_icon.png",
"src/images/controller_icon.png",
+ "src/images/discord.png",
"src/images/dump_icon.png",
"src/images/exit_icon.png",
"src/images/file_icon.png",
@@ -24,8 +30,10 @@ path = [
"src/images/flag_us.png",
"src/images/flag_world.png",
"src/images/folder_icon.png",
+ "src/images/github.png",
"src/images/grid_icon.png",
"src/images/iconsize_icon.png",
+ "src/images/ko-fi.png",
"src/images/list_icon.png",
"src/images/list_mode_icon.png",
"src/images/pause_icon.png",
@@ -33,10 +41,14 @@ path = [
"src/images/refresh_icon.png",
"src/images/settings_icon.png",
"src/images/stop_icon.png",
+ "src/images/utils_icon.png",
"src/images/shadPS4.icns",
"src/images/shadps4.ico",
+ "src/images/net.shadps4.shadPS4.svg",
"src/images/themes_icon.png",
"src/images/update_icon.png",
+ "src/images/youtube.png",
+ "src/images/website.png",
"src/shadps4.qrc",
"src/shadps4.rc",
]
@@ -57,7 +69,7 @@ SPDX-FileCopyrightText = "2019-2024 Baldur Karlsson"
SPDX-License-Identifier = "MIT"
[[annotations]]
-path = "externals/stb_image.h"
+path = "externals/stb/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2017 Sean Barrett"
SPDX-License-Identifier = "MIT"
diff --git a/cmake/Findstb.cmake b/cmake/Findstb.cmake
new file mode 100644
index 000000000..667911e1d
--- /dev/null
+++ b/cmake/Findstb.cmake
@@ -0,0 +1,19 @@
+# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+find_path(stb_image_INCLUDE_DIR stb_image.h PATH_SUFFIXES stb)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(stb
+ REQUIRED_VARS stb_image_INCLUDE_DIR
+)
+
+if (stb_FOUND AND NOT TARGET stb::headers)
+ add_library(stb::headers INTERFACE IMPORTED)
+ set_property(TARGET stb::headers PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${stb_image_INCLUDE_DIR}"
+ )
+endif()
+
+mark_as_advanced(stb_image_INCLUDE_DIR)
diff --git a/cmake/Findzlib-ng.cmake b/cmake/Findzlib-ng.cmake
deleted file mode 100644
index ec6f14b4a..000000000
--- a/cmake/Findzlib-ng.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-find_package(PkgConfig QUIET)
-pkg_search_module(ZLIB_NG QUIET IMPORTED_TARGET zlib-ng)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(zlib-ng
- REQUIRED_VARS ZLIB_NG_LINK_LIBRARIES
- VERSION_VAR ZLIB_NG_VERSION
-)
-
-if (zlib-ng_FOUND AND NOT TARGET zlib-ng::zlib)
- add_library(zlib-ng::zlib ALIAS PkgConfig::ZLIB_NG)
-endif()
diff --git a/dist/MacOSBundleInfo.plist.in b/dist/MacOSBundleInfo.plist.in
new file mode 100644
index 000000000..70cbfb4ab
--- /dev/null
+++ b/dist/MacOSBundleInfo.plist.in
@@ -0,0 +1,46 @@
+
+
+
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+
+ CFBundleName
+ shadps4
+ CFBundleIdentifier
+ com.shadps4-emu.shadps4
+ CFBundleExecutable
+ shadps4
+
+ CFBundleVersion
+ 1.0.0
+ CFBundleShortVersionString
+ ${MACOSX_BUNDLE_SHORT_VERSION_STRING}
+
+ LSMinimumSystemVersion
+ ${CMAKE_OSX_DEPLOYMENT_TARGET}
+ LSApplicationCategoryType
+ public.app-category.games
+ GCSupportsGameMode
+
+
+ NSHumanReadableCopyright
+
+
+ CFBundleIconFile
+ ${MACOSX_BUNDLE_ICON_FILE}
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleAllowMixedLocalizations
+
+
+ NSPrincipalClass
+ NSApplication
+
+ NSSupportsAutomaticGraphicsSwitching
+
+
+
diff --git a/.github/shadps4.desktop b/dist/net.shadps4.shadPS4.desktop
similarity index 59%
rename from .github/shadps4.desktop
rename to dist/net.shadps4.shadPS4.desktop
index 095acb787..fbefa0566 100644
--- a/.github/shadps4.desktop
+++ b/dist/net.shadps4.shadPS4.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
-Name=Shadps4
+Name=shadPS4
Exec=shadps4
Terminal=false
Type=Application
-Icon=shadps4
-Comment=shadps4 emulator
+Icon=net.shadps4.shadPS4
+Comment=PlayStation 4 emulator
Categories=Game;
StartupWMClass=shadps4;
diff --git a/dist/net.shadps4.shadPS4.metainfo.xml b/dist/net.shadps4.shadPS4.metainfo.xml
new file mode 100644
index 000000000..c8c9d5c23
--- /dev/null
+++ b/dist/net.shadps4.shadPS4.metainfo.xml
@@ -0,0 +1,87 @@
+
+
+ net.shadps4.shadPS4
+ shadPS4
+
+ shadPS4 Contributors
+ https://github.com/shadps4-emu/shadps4/graphs/contributors
+
+ PS4 Emulator
+ CC0-1.0
+ GPL-2.0
+ net.shadps4.shadPS4.desktop
+ https://shadps4.net/
+
+
shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++.
+
The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games.