Compare commits

..

55 commits

Author SHA1 Message Date
b911ac8516 Update README.md 2024-04-02 15:29:13 +02:00
715a3fc83b Update README.md 2024-04-02 15:28:16 +02:00
8032d67619 Upload files to "img" 2024-04-02 15:25:23 +02:00
1d4f0a78f6 revert 242114d862
revert Upload files to "/"
2024-04-02 15:25:09 +02:00
242114d862 Upload files to "/" 2024-04-02 15:24:51 +02:00
a3c8b29607
Updated the links for the Info Popup 2024-04-01 16:56:07 -04:00
4015b1d397 Solves warning about GuestMemory having internal linkage.
It is very hard to explain why this public interface class was defined
in an anonymous namespace inside a header file.
2024-04-01 16:02:12 +02:00
voidanix
d3f67d1e9c Fix GCC builds with Debug build type
When compiling with -DCMAKE_BUILD_TYPE=Debug, GCC would (correctly) fail to
compile intrinsics in stb and host1x due to lack of optimizations.

Sadly, the compilation error given is bogus and Clang completing the builds
without issues does raise some eyebrows.

Therefore, force optimizations for the offending files under GCC when
creating Debug builds.

Signed-off-by: voidanix <voidanix@keyedlimepie.org>
2024-04-01 01:31:43 +02:00
c25bcb6083 Merge branch 'dev' into dev 2024-03-31 00:45:46 +01:00
7215ac9543 Fix NROs crashing and loading infinitely 2024-03-31 00:43:18 +01:00
39eea71e62
fix: resume application when library applets are closed 2024-03-30 15:54:36 -04:00
48e86d6e84 Fixes issue #94: setting Vulkan::Headers before Qt6 can do it 2024-03-30 15:13:23 +00:00
ba3539c517
Use CC0-1.0 for images under ./img 2024-03-29 21:31:40 -03:00
66cf0c1b0c
Clarify that we indeed have builds
Cherry-picked from #65
2024-03-29 18:00:41 -04:00
444a200eef Upload files to "img" 2024-03-29 19:19:28 +01:00
2a672fac30 revert 9e223759e0
revert Add img
2024-03-29 19:19:11 +01:00
9e223759e0 Add img 2024-03-29 19:18:38 +01:00
b5c02fe14a Update README.md 2024-03-29 17:31:07 +01:00
36ede797f3 Vulkan validation error fix.
Different image usage flags between image creation and image view
creation.
2024-03-29 16:35:21 +01:00
ce8f3e802e
Use proper SPDX-FileCopyrightText for Sudachi. Corrects db647d915d 2024-03-29 01:05:07 -03:00
ilonachan
040893da00 formatting 2024-03-28 20:12:04 +01:00
Kelebek1
876d7f90b6 Add option to log synchronously, add tooltip to log filter. 2024-03-28 20:12:04 +01:00
db647d915d Including sudachi Emulator Project as a copyright owner.
To the files where sudachi changes were ported into in the parent
commit.
2024-03-28 11:12:03 +00:00
b3e989343d Added support for Princess Peach: Showtime! 2024-03-28 11:11:57 +00:00
ivchodev
09578d522b revert 925ce2fad3
Reverting potentially plagiarized code. The developer team did not sign off on this commit.
2024-03-26 18:38:52 +01:00
ivchodev
9b77efe2b4 revert eb306775c6
revert fix clong format
2024-03-26 18:37:54 +01:00
ivchodev
224cac988e revert fd1ec51496
revert try 2 fix clang
2024-03-26 18:37:35 +01:00
ivchodev
43c1a4c643 revert 77e9b7b59b
revert try 3 fixing clang omfg its just a space
2024-03-26 18:36:29 +01:00
77e9b7b59b
try 3 fixing clang omfg its just a space 2024-03-26 16:51:43 +08:00
fd1ec51496
try 2 fix clang 2024-03-26 16:49:03 +08:00
eb306775c6
fix clong format 2024-03-26 16:46:05 +08:00
925ce2fad3
preliminary fix to the peach game 2024-03-26 16:39:56 +08:00
068052078f
CI: Enable android artifacts 2024-03-25 14:36:04 -03:00
177bb48d6c Update README.md 2024-03-25 16:59:22 +01:00
1f2bbfdf6d Increase Limit ( FSR Sharp , AUDIO ) Android
Increase Limit FSR Sharp 
( 0 - 200 )
Increase Limit Audio ( 0-120 )
2024-03-25 12:50:04 +01:00
9b3fa0d3da Add 32:9 Android
Fix Issue Aspec Ratio For Android
2024-03-25 12:45:48 +01:00
77042ae6f7 Add 32:9 Android
This Fix Issue Aspec Ratio For Android
2024-03-25 12:42:41 +01:00
dbee1677c4
MR 3 manual merge
Merge branch 'RadsammyT-dev-fork' into dev
2024-03-25 16:22:29 +08:00
4b06697954 Merge branch 'dev' into dev-fork 2024-03-25 05:34:28 +01:00
d4375a21ef
Revert a9312c837e . Use proper GCC binary location and CCACHE changes in
the CI
2024-03-25 01:16:32 -03:00
0c2bdc6f61
Fix wrong URL on DownloadExternals. Change Clang and GCC executables on CI scripts 2024-03-24 23:15:50 -03:00
f033d7e1e9 Merge branch 'dev' into dev-fork 2024-03-25 01:27:14 +01:00
ba411a17e0 change application id
when we enable discord rpc for use this will change the yuzu icon to suyu.
2024-03-25 01:14:35 +01:00
bbe9f86554
ci: Execute CI if verify.yml has been changed 2024-03-24 21:03:20 -03:00
201bff1731
Add missing REUSE files and directories 2024-03-24 20:27:11 -03:00
907f9aa6f2
Rewrite missing keys dialog to be more descriptive
Closes #30
2024-03-24 18:59:04 -03:00
2857540817
resolve merge conflict in .forgejo/workflows/verify.yml
i hope to fucking god this works
2024-03-24 00:23:29 -04:00
ee2caf179e Merge branch 'dev' into dev-fork 2024-03-23 21:58:00 +01:00
f9f4622b28
ci: Container options in verify.yml negaetes the options in the runner configuration 2024-03-23 17:57:35 -03:00
ede4f2d8f4
PR#3 review: remove <filename> from --help + formatting changes
ran clang-format on suyu_cmd/suyu.cpp
and removed one blank line on library_applet_accessor.cpp so formatting CI doesn't complain
2024-03-23 16:40:29 -04:00
cb9f9da7b6 Merge branch 'dev' into dev-fork 2024-03-23 20:41:24 +01:00
bce23c24e0
PR#3 review: fix -l arg breaking
because optarg goes NULL when encountering an optional argument, so I have to do this instead to get the argument. See case 'p'.
2024-03-23 14:51:33 -04:00
caa93cda48
PR#3 review: (hopefully) unfuck formatting changes
squash: re-deanonymize AppletIdToProgramId()
2024-03-23 00:52:56 -04:00
f9c3b8dc75
PR#3 review: -l's arg is now optional 2024-03-23 00:28:01 -04:00
1ed34b1e47 suyu_cmd: allow launching of applets by supplying FrontendAppletParameters as an arg
Based off of a patch i saved before I nuked my local copy of the suyu repo from gitlab and replaced it with the one local-hosted
2024-03-23 03:32:14 +01:00
46 changed files with 845 additions and 274 deletions

View file

@ -1,6 +1,7 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
export NDK_CCACHE="$(which ccache)"
@ -9,7 +10,7 @@ ccache -s
BUILD_FLAVOR="mainline"
BUILD_TYPE="release"
if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then
if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then
BUILD_TYPE="relWithDebInfo"
fi

View file

@ -11,7 +11,7 @@ BUILD_FLAVOR="mainline"
BUILD_TYPE_LOWER="release"
BUILD_TYPE_UPPER="Release"
if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then
if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then
BUILD_TYPE_LOWER="relWithDebInfo"
BUILD_TYPE_UPPER="RelWithDebInfo"
fi

View file

@ -1,19 +1,22 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Exit on error, rather than continuing with the rest of the script.
set -e
ccache -s
ccache -sv
mkdir build || true && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
@ -22,11 +25,12 @@ cmake .. \
-DSUYU_CRASH_DUMPS=ON \
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_USE_FASTER_LD=ON \
-GNinja
ninja
ccache -s
ccache -sv
ctest -VV -C Release

View file

@ -6,7 +6,7 @@
# Exit on error, rather than continuing with the rest of the script.
set -e
ccache -s
ccache -sv
mkdir build || true && cd build
cmake .. \
@ -15,8 +15,8 @@ cmake .. \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
-DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
-DCMAKE_C_COMPILER=/usr/local/bin/gcc \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
@ -24,14 +24,14 @@ cmake .. \
-DUSE_DISCORD_PRESENCE=ON \
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_ENABLE_LTO=ON \
-DSUYU_ENABLE_LTO=OFF \
-DSUYU_CRASH_DUMPS=ON \
-DSUYU_USE_FASTER_LD=ON \
-GNinja
ninja
ccache -s
ccache -sv
ctest -VV -C Release

View file

@ -14,9 +14,10 @@ on:
- 'CMakeModules/**'
- 'dist/**'
- 'externals/**'
- 'CMakeLists.txt'
- 'vcpkg.json'
paths-ignore:
- 'src/android/**'
# paths-ignore:
# - 'src/android/**'
push:
branches: [ "dev" ]
paths:
@ -24,13 +25,15 @@ on:
- 'CMakeModules/**'
- 'dist/**'
- 'externals/**'
- 'CMakeLists.txt'
- 'vcpkg.json'
paths-ignore:
- 'src/android/**'
- '.forgejo/workflows/verify.yml'
- '.ci/**'
# paths-ignore:
# - 'src/android/**'
env:
PR_NUMBER: pr${{ github.event.number }}
CCACHE_DIR: '.ccache'
jobs:
format:
@ -60,8 +63,8 @@ jobs:
image: linux-fresh
- type: linux
image: linux-fresh
- type: windows
image: linux-mingw
# - type: windows
# image: linux-mingw
container: fijxu/build-environments:${{ matrix.image }}
# User 1001 doesn't exists on the images.
# options: -u 1001
@ -74,13 +77,13 @@ jobs:
uses: https://code.forgejo.org/actions/cache@v3
id: ccache-restore
with:
path: .ccache
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.type }}-
- name: Create ccache directory
if: steps.ccache-restore.outputs.cache-hit != 'true'
run: mkdir -p .ccache
run: mkdir -p ~/.ccache
- name: Build
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
env:
@ -173,6 +176,7 @@ jobs:
# path: ${{ env.INDIVIDUAL_EXE }}
android:
runs-on: ubuntu-latest
container: fijxu/build-environments:android
needs: format
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
@ -190,17 +194,13 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
.ccache
~/.ccache
key: ${{ runner.os }}-android-${{ github.sha }}
restore-keys: |
${{ runner.os }}-android-
- name: Query tag name
uses: https://github.com/olegtarasov/get-tag@v2.1.2
id: tagName
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
- name: Build
run: ./.ci/scripts/android/build.sh
- name: Copy and sign artifacts

View file

@ -9,7 +9,8 @@ Files: dist/english_plurals/*
dist/qt_themes/*/icons/48x48/sd_card.png
dist/qt_themes/*/icons/index.theme
dist/qt_themes/default/style.qss
Copyright: suyu Emulator Project
Copyright: yuzu Emulator Project
suyu Emulator Project
License: GPL-2.0-or-later
Files: dist/qt_themes/default/icons/256x256/suyu.png
@ -159,3 +160,27 @@ License: BSD-3-Clause
Files: src/android/app/debug.keystore
Copyright: 2023 yuzu Emulator Project
License: GPL-3.0-or-later
Files: .github-archive/ISSUE_TEMPLATE/*
Copyright: 2022 yuzu Emulator Project
License: GPL-2.0-or-later
Files: .forgejo/ISSUE_TEMPLATE/*
Copyright: 2024 suyu Emulator Project
License: GPL-3.0-or-later
Files: .gitea/ISSUE_TEMPLATE/*
Copyright: 2024 suyu Emulator Project
License: GPL-3.0-or-later
Files: .gitlab-ci.yml
Copyright: 2024 suyu Emulator Project
License: GPL-3.0-or-later
Files: dist/icns_generator.sh
Copyright: 2024 suyu Emulator Project
License: GPL-3.0-or-later
Files: img/*
Copyright: 2024 suyu Emulator Project
License: CC0-1.0

View file

@ -132,7 +132,7 @@ if (SUYU_USE_BUNDLED_VCPKG)
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
set(NASM_VERSION "2.16.01")
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
set(NASM_DOWNLOAD_URL "https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
set(NASM_DOWNLOAD_URL "https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/nasm/nasm-${NASM_VERSION}-win64.zip")
if (NOT EXISTS ${NASM_DESTINATION_PATH})
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
@ -374,8 +374,6 @@ if(ENABLE_QT6 AND Qt6_LOCATION)
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
endif()
# QT6 searches for Vulkan::Headers, too, so we have to define it before QT6 has a chance to do it.
add_subdirectory(externals)
function(set_suyu_qt_components)
# Best practice is to ask for all components at once, so they are from the same version
@ -398,7 +396,71 @@ function(set_suyu_qt_components)
set(SUYU_QT_COMPONENTS ${SUYU_QT_COMPONENTS2} PARENT_SCOPE)
endfunction(set_suyu_qt_components)
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the suyu_find_package
if (ENABLE_SDL2)
if (SUYU_USE_BUNDLED_SDL2)
# Detect toolchain and platform
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
set(SDL2_VER "SDL2-2.28.2")
else()
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable SUYU_USE_BUNDLED_SDL2 and provide your own.")
endif()
if (DEFINED SDL2_VER)
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
endif()
set(SDL2_FOUND YES)
set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
add_library(SDL2::SDL2 INTERFACE IMPORTED)
target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}")
target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
elseif (SUYU_USE_EXTERNAL_SDL2)
message(STATUS "Using SDL2 from externals.")
else()
find_package(SDL2 2.26.4 REQUIRED)
endif()
endif()
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
avcodec
avfilter
avutil
swscale)
if (UNIX AND NOT APPLE AND NOT ANDROID)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVA libva)
endif()
if (NOT SUYU_USE_BUNDLED_FFMPEG)
# Use system installed FFmpeg
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
endif()
if (WIN32 AND SUYU_CRASH_DUMPS)
set(BREAKPAD_VER "breakpad-c89f9dd")
download_bundled_external("breakpad/" ${BREAKPAD_VER} BREAKPAD_PREFIX)
set(BREAKPAD_CLIENT_INCLUDE_DIR "${BREAKPAD_PREFIX}/include")
set(BREAKPAD_CLIENT_LIBRARY "${BREAKPAD_PREFIX}/lib/libbreakpad_client.lib")
add_library(libbreakpad_client INTERFACE IMPORTED)
target_link_libraries(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_LIBRARY}")
target_include_directories(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_INCLUDE_DIR}")
endif()
# Prefer the -pthread flag on Linux.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
add_subdirectory(externals)
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
# Qt6 sets Vulkan::Headers, so Qt search has to come after externals, so it doesn't get to do it.
if(ENABLE_QT)
set(QT_VERSION 5.15)
# These are used to specify minimum versions
@ -537,67 +599,6 @@ if(ENABLE_QT)
endif()
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the suyu_find_package
if (ENABLE_SDL2)
if (SUYU_USE_BUNDLED_SDL2)
# Detect toolchain and platform
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
set(SDL2_VER "SDL2-2.28.2")
else()
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable SUYU_USE_BUNDLED_SDL2 and provide your own.")
endif()
if (DEFINED SDL2_VER)
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
endif()
set(SDL2_FOUND YES)
set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
add_library(SDL2::SDL2 INTERFACE IMPORTED)
target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}")
target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
elseif (SUYU_USE_EXTERNAL_SDL2)
message(STATUS "Using SDL2 from externals.")
else()
find_package(SDL2 2.26.4 REQUIRED)
endif()
endif()
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
avcodec
avfilter
avutil
swscale)
if (UNIX AND NOT APPLE AND NOT ANDROID)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVA libva)
endif()
if (NOT SUYU_USE_BUNDLED_FFMPEG)
# Use system installed FFmpeg
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
endif()
if (WIN32 AND SUYU_CRASH_DUMPS)
set(BREAKPAD_VER "breakpad-c89f9dd")
download_bundled_external("breakpad/" ${BREAKPAD_VER} BREAKPAD_PREFIX)
set(BREAKPAD_CLIENT_INCLUDE_DIR "${BREAKPAD_PREFIX}/include")
set(BREAKPAD_CLIENT_LIBRARY "${BREAKPAD_PREFIX}/lib/libbreakpad_client.lib")
add_library(libbreakpad_client INTERFACE IMPORTED)
target_link_libraries(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_LIBRARY}")
target_include_directories(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_INCLUDE_DIR}")
endif()
# Prefer the -pthread flag on Linux.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# Platform-specific library requirements
# ======================================
@ -632,7 +633,7 @@ if (NOT CLANG_FORMAT)
message(STATUS "Clang format not found! Downloading...")
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
file(DOWNLOAD
https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
"${CLANG_FORMAT}" SHOW_PROGRESS
STATUS DOWNLOAD_SUCCESS)
if (NOT DOWNLOAD_SUCCESS EQUAL 0)

View file

@ -7,21 +7,21 @@
# prefix_var: name of a variable which will be set with the path to the extracted contents
function(download_bundled_external remote_path lib_name prefix_var)
set(package_base_url "https://git.suyu.dev/suyu")
set(package_base_url "https://git.suyu.dev/suyu/")
set(package_repo "no_platform")
set(package_extension "no_platform")
set(package_head "?ref_type=heads")
if (WIN32)
set(package_repo "ext-windows-bin/-/raw/master/")
set(package_repo "ext-windows-bin/raw/branch/master/")
set(package_extension ".7z")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(package_repo "ext-linux-bin/-/raw/main/")
set(package_repo "ext-linux-bin/raw/branch/main/")
set(package_extension ".tar.xz")
# elseif (APPLE)
# set(package_repo "ext-osx-bin/-/raw/main/")
# set(package_extension ".dmg")
elseif (ANDROID)
set(package_repo "ext-android-bin/-/raw/main/")
set(package_repo "ext-android-bin/raw/branch/main/")
set(package_extension ".tar.xz")
else()
message(FATAL_ERROR "No package available for this platform")

View file

@ -0,0 +1,438 @@
Attribution-NonCommercial-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-NC-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution, NonCommercial, and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. NonCommercial means not primarily intended for or directed towards
commercial advantage or monetary compensation. For purposes of
this Public License, the exchange of the Licensed Material for
other material subject to Copyright and Similar Rights by digital
file-sharing or similar means is NonCommercial provided there is
no payment of monetary compensation in connection with the
exchange.
l. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
m. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
n. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for
NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties, including when
the Licensed Material is used other than for NonCommercial
purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-NC-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database for NonCommercial purposes
only;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View file

@ -35,9 +35,12 @@ It is written in C++ with portability in mind, and we're actively working on bui
<a href="https://git.suyu.dev/suyu/suyu/actions">Pipelines</a>
</p>
## Hardware Requirements
[Click here to see the Hardware Requirements](https://git.suyu.dev/suyu/suyu/wiki/Hardware-Requirements)
## Status
Although we're able to make builds, we don't have a version ready for distribution yet. But we can always use more help! You can make a merge request if you'd like to see something changed, or you can [chat with other developers to find out what needs work](https://discord.gg/suyu).
We currently have builds over at the [Releases](https://git.suyu.dev/suyu/suyu/releases) page.
**Note**: We try to update this README whenever we can, but some links might be broken, and some information may be outdated or irrelevant.
@ -57,6 +60,10 @@ You can also contact any of the developers on Discord to learn more about the cu
* __macOS__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
* __Android__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
If you want daily builds then [Click here](https://git.suyu.dev/suyu/suyu/actions)
If you don't know how to download the daily builds then [Click here](https://git.suyu.dev/suyu/suyu/raw/branch/dev/img/daily-builds.png)
Right now we only have daily builds for Linux and Android.
We have official builds [here.](https://git.suyu.dev/suyu/suyu/releases) If any website or person is claiming to have a build for suyu, take that with a grain of salt.
## Building

View file

@ -1,3 +1,8 @@
<!--
SPDX-FileCopyrightText: © 2024 Realmy
SPDX-License-Identifier: CC-BY-NC-SA-4.0
-->
<svg width="2421" height="912" viewBox="0 0 2421 912" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="2421" height="912" rx="456" fill="black"/>
<path d="M1981.76 562.559C2048.26 562.559 2085.29 540.974 2097.74 494.87H2098.58C2098.58 516.024 2097.74 543.446 2096.9 558.402H2150.07V353.155H2096.9V437.082C2096.9 489.051 2052 518.972 1999.23 518.972C1940.61 518.972 1921.48 495.702 1921.48 457.882V353.155H1868.34V469.104C1868.34 518.559 1901.97 562.559 1981.76 562.559Z" fill="white"/>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
img/daily-builds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
img/maximum-clocks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -241,6 +241,8 @@ abstract class SettingsItem(
IntSetting.FSR_SHARPENING_SLIDER,
titleId = R.string.fsr_sharpness,
descriptionId = R.string.fsr_sharpness_description,
min = 0,
max = 200,
units = "%"
)
)
@ -327,6 +329,8 @@ abstract class SettingsItem(
ByteSetting.AUDIO_VOLUME,
titleId = R.string.audio_volume,
descriptionId = R.string.audio_volume_description,
min = 0,
max = 120,
units = "%"
)
)

View file

@ -142,6 +142,7 @@
<item>@string/ratio_force_four_three</item>
<item>@string/ratio_force_twenty_one_nine</item>
<item>@string/ratio_force_sixteen_ten</item>
<item>@string/ratio_force_thirty_two_nine</item>
<item>@string/ratio_stretch</item>
</string-array>
@ -151,6 +152,7 @@
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</integer-array>
<string-array name="rendererScalingFilterNames">

View file

@ -601,6 +601,7 @@
<string name="ratio_force_four_three">Force 4:3</string>
<string name="ratio_force_twenty_one_nine">Force 21:9</string>
<string name="ratio_force_sixteen_ten">Force 16:10</string>
<string name="ratio_force_thirty_two_nine">Force 32:9</string>
<string name="ratio_stretch">Stretch to window</string>
<!-- CPU Backend -->

65
src/android/gradlew vendored
View file

@ -1,65 +1,12 @@
#!/bin/sh
#!/usr/bin/env sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME

View file

@ -1,20 +1,7 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-FileCopyrightText: 2023 yuzu Emulator Project
@rem SPDX-License-Identifier: GPL-3.0-or-later
@if "%DEBUG%"=="" @echo off
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows

View file

@ -240,6 +240,15 @@ if (MSVC)
)
else()
set_source_files_properties(stb.cpp PROPERTIES COMPILE_OPTIONS "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers")
# Get around GCC failing with intrinsics in Debug
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
set_property(
SOURCE stb.cpp
APPEND
PROPERTY COMPILE_OPTIONS ";-O2"
)
endif()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

View file

@ -4,6 +4,7 @@
#include <atomic>
#include <chrono>
#include <climits>
#include <mutex>
#include <thread>
#include <fmt/format.h>
@ -231,8 +232,15 @@ public:
if (!filter.CheckMessage(log_class, log_level)) {
return;
}
message_queue.EmplaceWait(
CreateEntry(log_class, log_level, filename, line_num, function, std::move(message)));
auto entry =
CreateEntry(log_class, log_level, filename, line_num, function, std::move(message));
if (Settings::values.log_async) {
message_queue.EmplaceWait(entry);
} else {
std::scoped_lock l{sync_mutex};
ForEachBackend([&entry](Backend& backend) { backend.Write(entry); });
}
}
private:
@ -313,6 +321,7 @@ private:
#endif
MPSCQueue<Entry> message_queue{};
std::mutex sync_mutex;
std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};
std::jthread backend_thread;
};
@ -345,9 +354,11 @@ void SetColorConsoleBackendEnabled(bool enabled) {
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
unsigned int line_num, const char* function, fmt::string_view format,
const fmt::format_args& args) {
if (!initialization_in_progress_suppress_logging) {
Impl::Instance().PushEntry(log_class, log_level, filename, line_num, function,
fmt::vformat(format, args));
if (initialization_in_progress_suppress_logging) {
return;
}
Impl::Instance().PushEntry(log_class, log_level, filename, line_num, function,
fmt::vformat(format, args));
}
} // namespace Common::Log

View file

@ -171,6 +171,7 @@ const char* GetLogClassName(Class log_class) {
#define SUB(x, y) \
case Class::x##_##y: \
return #x "." #y;
// return #x "_" #y;
ALL_LOG_CLASSES()
#undef CLS
#undef SUB

View file

@ -604,6 +604,7 @@ struct Values {
// Miscellaneous
Setting<std::string> log_filter{linkage, "*:Info", "log_filter", Category::Miscellaneous};
Setting<bool> log_async{linkage, true, "log_async", Category::Miscellaneous};
Setting<bool> use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous};
// Network

View file

@ -31,7 +31,6 @@ enum GuestMemoryFlags : u32 {
UnsafeReadCachedWrite = UnsafeReadWrite | Cached,
};
namespace {
template <typename M, typename T, GuestMemoryFlags FLAGS>
class GuestMemory {
using iterator = T*;
@ -219,6 +218,5 @@ public:
}
}
};
} // namespace
} // namespace Core::Memory

View file

@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings.h"
@ -336,9 +335,4 @@ void AppletManager::SetWindowSystem(WindowSystem* window_system) {
applet->process->Run();
}
void AppletManager::TrackApplet(std::shared_ptr<Applet> applet, bool is_application) {
m_window_system->TrackApplet(applet, false);
m_window_system->RequestApplicationToGetForeground();
}
} // namespace Service::AM

View file

@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -47,7 +46,6 @@ public:
public:
void SetWindowSystem(WindowSystem* window_system);
void TrackApplet(std::shared_ptr<Applet> applet, bool is_application);
private:
Core::System& m_system;

View file

@ -106,6 +106,7 @@ std::unique_ptr<Process> CreateApplicationProcess(std::vector<u8>& out_control,
out_control = nacp.GetRawBytes();
} else {
out_control.resize(sizeof(FileSys::RawNACP));
memset(out_control.data(), 0, sizeof(u8) * out_control.size());
}
auto& storage = system.GetContentProviderUnion();

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/am/applet_data_broker.h"
@ -101,6 +102,22 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer<IStorage> storage) {
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> out_storage) {
LOG_DEBUG(Service_AM, "called");
// suyu todo: move library applet fix to another function
// since this function is only called for applets that give a result,
// applets that don't (e.g. info applets in 1st party games) simply freeze
if (auto caller = m_applet->caller_applet.lock(); caller != nullptr) {
caller->SetInteractibleLocked(true);
caller->lifecycle_manager.SetFocusState(FocusState::InFocus);
caller->lifecycle_manager.UpdateRequestedFocusState();
caller->lifecycle_manager.SetResumeNotificationEnabled(true);
caller->lifecycle_manager.RequestResumeNotification();
caller->UpdateSuspensionStateLocked(true);
} else {
LOG_CRITICAL(Service_AM, "Caller applet pointer is invalid.");
LOG_CRITICAL(Service_AM, "The emulator will freeze!");
}
R_RETURN(m_broker->GetOutData().Pop(out_storage.Get()));
}

View file

@ -47,53 +47,6 @@ bool ShouldCreateGuestApplet(AppletId applet_id) {
return true;
}
AppletProgramId AppletIdToProgramId(AppletId applet_id) {
switch (applet_id) {
case AppletId::OverlayDisplay:
return AppletProgramId::OverlayDisplay;
case AppletId::QLaunch:
return AppletProgramId::QLaunch;
case AppletId::Starter:
return AppletProgramId::Starter;
case AppletId::Auth:
return AppletProgramId::Auth;
case AppletId::Cabinet:
return AppletProgramId::Cabinet;
case AppletId::Controller:
return AppletProgramId::Controller;
case AppletId::DataErase:
return AppletProgramId::DataErase;
case AppletId::Error:
return AppletProgramId::Error;
case AppletId::NetConnect:
return AppletProgramId::NetConnect;
case AppletId::ProfileSelect:
return AppletProgramId::ProfileSelect;
case AppletId::SoftwareKeyboard:
return AppletProgramId::SoftwareKeyboard;
case AppletId::MiiEdit:
return AppletProgramId::MiiEdit;
case AppletId::Web:
return AppletProgramId::Web;
case AppletId::Shop:
return AppletProgramId::Shop;
case AppletId::PhotoViewer:
return AppletProgramId::PhotoViewer;
case AppletId::Settings:
return AppletProgramId::Settings;
case AppletId::OfflineWeb:
return AppletProgramId::OfflineWeb;
case AppletId::LoginShare:
return AppletProgramId::LoginShare;
case AppletId::WebAuth:
return AppletProgramId::WebAuth;
case AppletId::MyPage:
return AppletProgramId::MyPage;
default:
return static_cast<AppletProgramId>(0);
}
}
std::shared_ptr<ILibraryAppletAccessor> CreateGuestApplet(Core::System& system,
WindowSystem& window_system,
std::shared_ptr<Applet> caller_applet,
@ -163,6 +116,53 @@ std::shared_ptr<ILibraryAppletAccessor> CreateFrontendApplet(Core::System& syste
} // namespace
AppletProgramId AppletIdToProgramId(AppletId applet_id) {
switch (applet_id) {
case AppletId::OverlayDisplay:
return AppletProgramId::OverlayDisplay;
case AppletId::QLaunch:
return AppletProgramId::QLaunch;
case AppletId::Starter:
return AppletProgramId::Starter;
case AppletId::Auth:
return AppletProgramId::Auth;
case AppletId::Cabinet:
return AppletProgramId::Cabinet;
case AppletId::Controller:
return AppletProgramId::Controller;
case AppletId::DataErase:
return AppletProgramId::DataErase;
case AppletId::Error:
return AppletProgramId::Error;
case AppletId::NetConnect:
return AppletProgramId::NetConnect;
case AppletId::ProfileSelect:
return AppletProgramId::ProfileSelect;
case AppletId::SoftwareKeyboard:
return AppletProgramId::SoftwareKeyboard;
case AppletId::MiiEdit:
return AppletProgramId::MiiEdit;
case AppletId::Web:
return AppletProgramId::Web;
case AppletId::Shop:
return AppletProgramId::Shop;
case AppletId::PhotoViewer:
return AppletProgramId::PhotoViewer;
case AppletId::Settings:
return AppletProgramId::Settings;
case AppletId::OfflineWeb:
return AppletProgramId::OfflineWeb;
case AppletId::LoginShare:
return AppletProgramId::LoginShare;
case AppletId::WebAuth:
return AppletProgramId::WebAuth;
case AppletId::MyPage:
return AppletProgramId::MyPage;
default:
return static_cast<AppletProgramId>(0);
}
}
ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_, std::shared_ptr<Applet> applet,
WindowSystem& window_system)
: ServiceFramework{system_, "ILibraryAppletCreator"},

View file

@ -35,4 +35,6 @@ private:
const std::shared_ptr<Applet> m_applet;
};
AppletProgramId AppletIdToProgramId(AppletId applet_id);
} // namespace Service::AM

View file

@ -1,5 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
@ -178,14 +177,6 @@ Result ILibraryAppletSelfAccessor::GetMainAppletStorageId(Out<FileSys::StorageId
Result ILibraryAppletSelfAccessor::ExitProcessAndReturn() {
LOG_INFO(Service_AM, "called");
m_applet->process->Terminate();
if(!m_applet->caller_applet.expired()) {
std::shared_ptr<Applet> applet = m_applet->caller_applet.lock();
if(applet == nullptr) R_SUCCEED();
LOG_INFO(Service_AM, "tracking caller applet");
// todo: is_application is set to false as window_system doesn't allow re-tracking without replacing the application
system.GetAppletManager().TrackApplet(applet, false);
applet->lifecycle_manager.SetFocusState(FocusState::InFocus);
}
R_SUCCEED();
}

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string_view>
@ -7,6 +8,7 @@
#include "shader_recompiler/backend/glasm/glasm_emit_context.h"
#include "shader_recompiler/frontend/ir/value.h"
#include "shader_recompiler/profile.h"
#include "shader_recompiler/runtime_info.h"
#include "shader_recompiler/shader_info.h"
namespace Shader::Backend::GLASM {
@ -406,6 +408,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) {
case Stage::TessellationEval:
ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst);
break;
case Stage::Geometry:
ctx.Add("SHL.U {}.x,{},16;", inst,
InputTopologyVertices::vertices(ctx.runtime_info.input_topology));
break;
default:
LOG_WARNING(Shader, "(STUBBED) called");
ctx.Add("MOV.S {}.x,0x00ff0000;", inst);

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string_view>
@ -426,6 +427,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) {
case Stage::TessellationEval:
ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst);
break;
case Stage::Geometry:
ctx.AddU32("{}=uint({}<<16);", inst,
InputTopologyVertices::vertices(ctx.runtime_info.input_topology));
break;
default:
LOG_WARNING(Shader, "(STUBBED) called");
ctx.AddU32("{}=uint(0x00ff0000);", inst);

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <bit>
@ -549,6 +550,8 @@ Id EmitInvocationInfo(EmitContext& ctx) {
case Stage::TessellationEval:
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in),
ctx.Const(16u));
case Stage::Geometry:
return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16);
default:
LOG_WARNING(Shader, "(STUBBED) called");
return ctx.Const(0x00ff0000u);

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -30,6 +31,24 @@ enum class InputTopology {
TrianglesAdjacency,
};
struct InputTopologyVertices {
static u32 vertices(InputTopology input_topology) {
switch (input_topology) {
case InputTopology::Lines:
return 2;
case InputTopology::LinesAdjacency:
return 4;
case InputTopology::Triangles:
return 3;
case InputTopology::TrianglesAdjacency:
return 6;
case InputTopology::Points:
default:
return 1;
}
}
};
enum class CompareFunction {
Never,
Less,

View file

@ -127,7 +127,7 @@ p, li { white-space: pre-wrap; }
<item>
<widget class="QLabel" name="labelLinks">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://gitlab.com/suyu-emu/suyu&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Website&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://discord.com/invite/2gQRBp44KT&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Discord&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://gitlab.com/suyu-emu/suyu&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Source Code&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://gitlab.com/suyu-emu/suyu/-/graphs/master&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Contributors&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://gitlab.com/suyu-emu/suyu/-/blob/master/LICENSE.txt&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;License&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://suyu.dev&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Website&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://discord.com/invite/2gQRBp44KT&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Discord&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://git.suyu.dev/suyu/suyu&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Source Code&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://git.suyu.dev/suyu/suyu/activity&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;Contributors&lt;/span&gt;&lt;/a&gt; | &lt;a href=&quot;https://git.suyu.dev/suyu/suyu/src/branch/dev/LICENSE.txt&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;License&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

View file

@ -73,6 +73,7 @@ void ConfigureDebug::SetConfiguration() {
ui->disable_loop_safety_checks->setChecked(
Settings::values.disable_shader_loop_safety_checks.GetValue());
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
ui->log_async->setChecked(Settings::values.log_async.GetValue());
ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue());
#ifdef SUYU_USE_QT_WEB_ENGINE
@ -115,6 +116,7 @@ void ConfigureDebug::ApplyConfiguration() {
Common::Log::Filter filter;
filter.ParseFilterString(Settings::values.log_filter.GetValue());
Common::Log::SetGlobalFilter(filter);
Settings::values.log_async = ui->log_async->isChecked();
}
void ConfigureDebug::changeEvent(QEvent* event) {

View file

@ -164,6 +164,20 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="log_async">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>When checked, logging will run asynchronously. This may cut the log on crashes.
When unchecked, logging will run synchronously. This will slow down the emulator, but allow all logs to be written. Useful for debugging.</string>
</property>
<property name="text">
<string>Log asynchronously</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QWidget" name="logging_widget" native="true">
<property name="sizePolicy">
@ -199,7 +213,14 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="log_filter_edit"/>
<widget class="QLineEdit" name="log_filter_edit">
<property name="toolTip">
<string>Log filter in the form class:level.
Separate multiple filters with a space.
Levels: Trace, Debug, Info, Warning, Error, Critical
Classes: See Common/logging/types.h</string>
</property>
</widget>
</item>
</layout>
</widget>

View file

@ -24,7 +24,8 @@ DiscordImpl::DiscordImpl(Core::System& system_) : system{system_} {
DiscordEventHandlers handlers{};
// The number is the client ID for suyu, it's used for images and the
// application name
Discord_Initialize("712465656758665259", &handlers, 1, nullptr);
// NOTE: This application is owned by million1156 (million@alyocord.com)
Discord_Initialize("1221314350216646828", &handlers, 1, nullptr);
}
DiscordImpl::~DiscordImpl() {

View file

@ -1756,11 +1756,10 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
}
if (!ContentManager::AreKeysPresent()) {
QMessageBox::warning(this, tr("Derivation Components Missing"),
tr("Encryption keys are missing. "
"In order to use this emulator, "
"you need to provide your own encryption keys "
"in order to play them."));
QMessageBox::warning(
this, tr("Encryption Keys Missing"),
tr("In order to use suyu you need to provide your own encryption keys. "
"You can install them by going to Tools -> Install encryption keys."));
return false;
}
}

View file

@ -5,6 +5,7 @@
#include <iostream>
#include <memory>
#include <regex>
#include <sstream>
#include <string>
#include <thread>
@ -23,9 +24,12 @@
#include "core/core_timing.h"
#include "core/cpu_manager.h"
#include "core/crypto/key_manager.h"
#include "core/file_sys/content_archive.h"
#include "core/file_sys/nca_metadata.h"
#include "core/file_sys/registered_cache.h"
#include "core/file_sys/vfs/vfs_real.h"
#include "core/hle/service/am/applet_manager.h"
#include "core/hle/service/am/service/library_applet_creator.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/loader.h"
#include "frontend_common/config.h"
@ -68,7 +72,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
static void PrintHelp(const char* argv0) {
std::cout << "Usage: " << argv0
<< " [options] <filename>\n"
<< " [options]\n"
"-c, --config Load the specified configuration file\n"
"-f, --fullscreen Start in fullscreen mode\n"
"-g, --game File path of the game to load\n"
@ -77,7 +81,13 @@ static void PrintHelp(const char* argv0) {
" Nickname, password, address and port for multiplayer\n"
"-p, --program Pass following string as arguments to executable\n"
"-u, --user Select a specific user profile from 0 to 7\n"
"-v, --version Output version information and exit\n";
"-v, --version Output version information and exit\n"
"-l, "
"--applet-params="
"\"program_id,applet_id,applet_type,launch_type,prog_index,prev_prog_index\"\n"
" Numerical parameters for launching an applet. If no\n"
" game is provided, then the applet will launch off of\n"
" the applet_id.\n";
}
static void PrintVersion() {
@ -212,6 +222,7 @@ int main(int argc, char** argv) {
bool use_multiplayer = false;
bool fullscreen = false;
Service::AM::FrontendAppletParameters load_parameters{};
std::string nickname{};
std::string password{};
std::string address{};
@ -223,6 +234,7 @@ int main(int argc, char** argv) {
{"fullscreen", no_argument, 0, 'f'},
{"help", no_argument, 0, 'h'},
{"game", required_argument, 0, 'g'},
{"applet-params", optional_argument, 0, 'l'},
{"multiplayer", required_argument, 0, 'm'},
{"program", optional_argument, 0, 'p'},
{"user", required_argument, 0, 'u'},
@ -232,7 +244,7 @@ int main(int argc, char** argv) {
};
while (optind < argc) {
int arg = getopt_long(argc, argv, "g:fhvp::c:u:", long_options, &option_index);
int arg = getopt_long(argc, argv, "g:fhvp::c:u:l::", long_options, &option_index);
if (arg != -1) {
switch (static_cast<char>(arg)) {
case 'c':
@ -250,6 +262,27 @@ int main(int argc, char** argv) {
filepath = str_arg;
break;
}
case 'l': {
std::string str_arg(argv[optind++]);
str_arg.append(",0"); // FALLBACK: if string is partially completed ("1234,3")
// this will set all those unset to 0. otherwise we get
// all 3s.
std::stringstream stream(str_arg);
std::string sub;
std::getline(stream, sub, ',');
load_parameters.program_id = std::stoull(sub);
std::getline(stream, sub, ',');
load_parameters.applet_id = static_cast<Service::AM::AppletId>(std::stoul(sub));
std::getline(stream, sub, ',');
load_parameters.applet_type = static_cast<Service::AM::AppletType>(std::stoi(sub));
std::getline(stream, sub, ',');
load_parameters.launch_type = static_cast<Service::AM::LaunchType>(std::stoi(sub));
std::getline(stream, sub, ',');
load_parameters.program_index = std::stoi(sub);
std::getline(stream, sub, ',');
load_parameters.previous_program_index = std::stoi(sub);
break;
}
case 'm': {
use_multiplayer = true;
const std::string str_arg(optarg);
@ -331,7 +364,7 @@ int main(int argc, char** argv) {
Common::ConfigureNvidiaEnvironmentFlags();
if (filepath.empty()) {
if (filepath.empty() && !static_cast<u32>(load_parameters.applet_id)) {
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
return -1;
}
@ -367,9 +400,27 @@ int main(int argc, char** argv) {
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
system.GetUserChannel().clear();
Service::AM::FrontendAppletParameters load_parameters{
.applet_id = Service::AM::AppletId::Application,
};
if (static_cast<u32>(load_parameters.applet_id)) {
// code below based off of suyu/main.cpp : GMainWindow::OnHomeMenu()
Service::AM::AppletProgramId applet_prog_id =
Service::AM::AppletIdToProgramId(load_parameters.applet_id);
auto sysnand = system.GetFileSystemController().GetSystemNANDContents();
if (!sysnand) {
LOG_CRITICAL(Frontend, "Failed to load applet: Firmware not installed.");
return -1;
}
auto user_applet_nca = sysnand->GetEntry(static_cast<u64>(applet_prog_id),
FileSys::ContentRecordType::Program);
if (!user_applet_nca) {
LOG_CRITICAL(Frontend, "Failed to load applet: applet cannot be found.");
return -1;
}
if (filepath.empty())
filepath = user_applet_nca->GetFullPath();
} else {
load_parameters.applet_id = Service::AM::AppletId::Application;
}
const Core::SystemResultStatus load_result{system.Load(*emu_window, filepath, load_parameters)};
switch (load_result) {

View file

@ -425,6 +425,11 @@ else()
# VMA
set_source_files_properties(vulkan_common/vma.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers")
# Get around GCC failing with intrinsics in Debug
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
set_source_files_properties(host1x/vic.cpp PROPERTIES COMPILE_OPTIONS "-O2")
endif()
endif()
if (ARCHITECTURE_x86_64)

View file

@ -1406,7 +1406,7 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
if (runtime->device.HasDebuggingToolAttached()) {
original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str());
}
current_image = *original_image;
current_image = &Image::original_image;
storage_image_views.resize(info.resources.levels);
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported() &&
Settings::values.astc_recompression.GetValue() ==
@ -1550,8 +1550,8 @@ VkImageView Image::StorageImageView(s32 level) noexcept {
if (!view) {
const auto format_info =
MaxwellToVK::SurfaceFormat(runtime->device, FormatType::Optimal, true, info.format);
view =
MakeStorageView(runtime->device.GetLogical(), level, current_image, format_info.format);
view = MakeStorageView(runtime->device.GetLogical(), level, *(this->*current_image),
format_info.format);
}
return *view;
}
@ -1582,7 +1582,7 @@ bool Image::ScaleUp(bool ignore) {
runtime->ViewFormats(info.format));
ignore = false;
}
current_image = *scaled_image;
current_image = &Image::scaled_image;
if (ignore) {
return true;
}
@ -1607,7 +1607,7 @@ bool Image::ScaleDown(bool ignore) {
}
ASSERT(info.type != ImageType::Linear);
flags &= ~ImageFlagBits::Rescaled;
current_image = *original_image;
current_image = &Image::original_image;
if (ignore) {
return true;
}
@ -1726,7 +1726,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
const VkImageViewUsageCreateInfo image_view_usage{
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
.pNext = nullptr,
.usage = ImageUsageFlags(format_info, format),
.usage = image.UsageFlags(),
};
const VkImageViewCreateInfo create_info{
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,

View file

@ -24,7 +24,6 @@ using Common::SlotVector;
using VideoCommon::ImageId;
using VideoCommon::NUM_RT;
using VideoCommon::Region2D;
using VideoCommon::RenderTargets;
using VideoCore::Surface::PixelFormat;
class BlitImageHelper;
@ -157,13 +156,17 @@ public:
std::span<const VideoCommon::BufferImageCopy> copies);
[[nodiscard]] VkImage Handle() const noexcept {
return current_image;
return *(this->*current_image);
}
[[nodiscard]] VkImageAspectFlags AspectMask() const noexcept {
return aspect_mask;
}
[[nodiscard]] VkImageUsageFlags UsageFlags() const noexcept {
return (this->*current_image).UsageFlags();
}
/// Returns true when the image is already initialized and mark it as initialized
[[nodiscard]] bool ExchangeInitialization() noexcept {
return std::exchange(initialized, true);
@ -186,11 +189,15 @@ private:
TextureCacheRuntime* runtime{};
vk::Image original_image;
vk::Image scaled_image;
// Use a pointer to field because it is relative, so that the object can be
// moved without breaking the reference.
vk::Image Image::*current_image{};
std::vector<vk::ImageView> storage_image_views;
VkImageAspectFlags aspect_mask = 0;
bool initialized = false;
vk::Image scaled_image{};
VkImage current_image{};
std::unique_ptr<Framebuffer> scale_framebuffer;
std::unique_ptr<ImageView> scale_view;

View file

@ -247,7 +247,7 @@ vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const {
vk::Check(vmaCreateImage(allocator, &ci, &alloc_ci, &handle, &allocation, nullptr));
return vk::Image(handle, *device.GetLogical(), allocator, allocation,
return vk::Image(handle, ci.usage, *device.GetLogical(), allocator, allocation,
device.GetDispatchLoader());
}

View file

@ -623,9 +623,10 @@ public:
class Image {
public:
explicit Image(VkImage handle_, VkDevice owner_, VmaAllocator allocator_,
VmaAllocation allocation_, const DeviceDispatch& dld_) noexcept
: handle{handle_}, owner{owner_}, allocator{allocator_},
explicit Image(VkImage handle_, VkImageUsageFlags usage_, VkDevice owner_,
VmaAllocator allocator_, VmaAllocation allocation_,
const DeviceDispatch& dld_) noexcept
: handle{handle_}, usage{usage_}, owner{owner_}, allocator{allocator_},
allocation{allocation_}, dld{&dld_} {}
Image() = default;
@ -633,12 +634,13 @@ public:
Image& operator=(const Image&) = delete;
Image(Image&& rhs) noexcept
: handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator},
allocation{rhs.allocation}, dld{rhs.dld} {}
: handle{std::exchange(rhs.handle, nullptr)}, usage{rhs.usage}, owner{rhs.owner},
allocator{rhs.allocator}, allocation{rhs.allocation}, dld{rhs.dld} {}
Image& operator=(Image&& rhs) noexcept {
Release();
handle = std::exchange(rhs.handle, nullptr);
usage = rhs.usage;
owner = rhs.owner;
allocator = rhs.allocator;
allocation = rhs.allocation;
@ -665,10 +667,15 @@ public:
void SetObjectNameEXT(const char* name) const;
[[nodiscard]] VkImageUsageFlags UsageFlags() const noexcept {
return usage;
}
private:
void Release() const noexcept;
VkImage handle = nullptr;
VkImageUsageFlags usage{};
VkDevice owner = nullptr;
VmaAllocator allocator = nullptr;
VmaAllocation allocation = nullptr;