-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
packages/emulators/standalone/suyu/config/SD865/qt-config.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[Controls] | ||
keyboard_enabled=false | ||
player_0_button_a\default=false | ||
player_0_button_a="pad:0,button:1,port:0,guid:03000000202000000130000001000000,engine:sdl" | ||
player_0_button_b="pad:0,button:0,port:0,guid:03000000202000000130000001000000,engine:sdl" | ||
player_0_button_x="pad:0,button:2,port:0,guid:03000000202000000130000001000000,engine:sdl" | ||
player_0_button_y="pad:0,button:3,port:0,guid:03000000202000000130000001000000,engine:sdl" | ||
player_0_button_lstick="engine:sdl,port:0,guid:03000000202000000130000001000000,button:9" | ||
player_0_button_rstick="engine:sdl,port:0,guid:03000000202000000130000001000000,button:10" | ||
player_0_button_l="engine:sdl,port:0,guid:03000000202000000130000001000000,button:4" | ||
player_0_button_r="engine:sdl,port:0,guid:03000000202000000130000001000000,button:5" | ||
player_0_button_zl="engine:sdl,invert:+,port:0,guid:03000000202000000130000001000000,axis:6,threshold:0.500000" | ||
player_0_button_zr="engine:sdl,invert:+,port:0,guid:03000000202000000130000001000000,axis:7,threshold:0.500000" | ||
player_0_button_plus="engine:sdl,port:0,guid:03000000202000000130000001000000,button:7" | ||
player_0_button_minus="engine:sdl,port:0,guid:03000000202000000130000001000000,button:6" | ||
player_0_button_dleft="engine:sdl,port:0,guid:03000000202000000130000001000000,button:13" | ||
player_0_button_dup="engine:sdl,port:0,guid:03000000202000000130000001000000,button:11" | ||
player_0_button_dright="engine:sdl,port:0,guid:03000000202000000130000001000000,button:14" | ||
player_0_button_ddown="engine:sdl,port:0,guid:03000000202000000130000001000000,button:12" | ||
player_0_button_slleft="engine:sdl,port:0,guid:03000000202000000130000001000000,button:4" | ||
player_0_button_srleft="engine:sdl,port:0,guid:03000000202000000130000001000000,button:5" | ||
player_0_button_home="engine:sdl,port:0,guid:03000000202000000130000001000000,button:8" | ||
player_0_button_screenshot="engine:sdl,port:0,guid:03000000202000000130000001000000,button:15" | ||
player_0_button_slright="engine:sdl,port:0,guid:03000000202000000130000001000000,button:4" | ||
player_0_button_srright="engine:sdl,port:0,guid:03000000202000000130000001000000,button:5" | ||
player_0_lstick="engine:sdl,port:0,guid:03000000202000000130000001000000,axis_x:0,offset_x:-0.000000,axis_y:1,offset_y:0.000000,invert_x:+,invert_y:+,deadzone:0.150000" | ||
player_0_rstick="engine:sdl,port:0,guid:03000000202000000130000001000000,axis_x:3,offset_x:-0.000000,axis_y:4,offset_y:0.000000,invert_x:+,invert_y:+,deadzone:0.150000" | ||
|
||
[UI] | ||
Paths\gamedirs\size=1 | ||
Paths\gamedirs\1\path=/storage/games-internal/roms/switch/ | ||
Paths\gamedirs\3\deep_scan=true | ||
Paths\gamedirs\3\expanded=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
||
PKG_NAME="suyu" | ||
PKG_LICENSE="GPLv2" | ||
PKG_DEPENDS_TARGET="toolchain SDL2 boost libevdev libdrm ffmpeg zlib libpng lzo libusb zstd ecm openal-soft pulseaudio alsa-lib llvm qt6 libfmt vulkan-headers" | ||
PKG_LONGDESC="SuYu is a Switch emulator, allowing you to play games for this platforms on PC with improvements. " | ||
PKG_TOOLCHAIN="cmake" | ||
PKG_SITE="https://git.suyu.dev/suyu/suyu" | ||
PKG_URL="${PKG_SITE}.git" | ||
PKG_VERSION="ee365bad9501c73ff49936e72ec91cd9c3ce5c24" | ||
PKG_CMAKE_OPTS_TARGET+=" -DSUYU_USE_BUNDLED_QT=OFF \ | ||
-DENABLE_SDL=ON -DENABLE_QT6=ON \ | ||
-DSUYU_USE_EXTERNAL_SDL2=ON \ | ||
-DSUYU_USE_BUNDLED_FFMPEG=OFF \ | ||
-DSUYU_TESTS=OFF " | ||
|
||
makeinstall_target() { | ||
mkdir -p ${INSTALL}/usr/bin | ||
cp ${PKG_BUILD}/.${TARGET_NAME}/bin/suyu ${INSTALL}/usr/bin/ | ||
cp ${PKG_BUILD}/.${TARGET_NAME}/bin/suyu-cmd ${INSTALL}/usr/bin/ | ||
cp ${PKG_BUILD}/.${TARGET_NAME}/bin/suyu-room ${INSTALL}/usr/bin/ | ||
|
||
mkdir -p ${INSTALL}/usr/config/suyu | ||
cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/suyu | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/emulators/standalone/suyu/patches/01-no-cross-compile-tzdb.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/externals/nx_tzdb/tzdb_to_nx/src/CMakeLists.txt b/externals/nx_tzdb/tzdb_to_nx/src/CMakeLists.txt | ||
--- a/externals/nx_tzdb/tzdb_to_nx/src/CMakeLists.txt | ||
+++ b/externals/nx_tzdb/tzdb_to_nx/src/CMakeLists.txt | ||
@@ -7,5 +7,11 @@ add_compile_options( | ||
|
||
include_directories(.) | ||
|
||
-add_subdirectory(tzdb2nx) | ||
+include(ExternalProject) | ||
+ExternalProject_Add(tzdb2nx | ||
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/tzdb2nx/ | ||
+ CMAKE_ARGS -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= | ||
+ INSTALL_COMMAND cmake -E echo "No install step" | ||
+ BUILD_IN_SOURCE ON) | ||
+set(TZDB2NX_PATH "${CMAKE_CURRENT_LIST_DIR}/tzdb2nx/tzdb2nx" CACHE PATH "Path to tzdb2nx path") | ||
add_subdirectory(tzdb) |
13 changes: 13 additions & 0 deletions
13
packages/emulators/standalone/suyu/patches/02-force-type-cast.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/input_common/helpers/udp_protocol.h b/src/input_common/helpers/udp_protocol.h | ||
index db08fc62c..8111b9ca2 100644 | ||
--- a/src/input_common/helpers/udp_protocol.h | ||
+++ b/src/input_common/helpers/udp_protocol.h | ||
@@ -69,7 +69,7 @@ Message<T> CreateMessage(const u32 magic, const T data, const u32 sender_id) { | ||
}; | ||
Message<T> message{header, data}; | ||
crc.process_bytes(&message, sizeof(Message<T>)); | ||
- message.header.crc = crc.checksum(); | ||
+ message.header.crc = static_cast<std::decay_t<decltype(message.header.crc)>>(crc.checksum()); | ||
return message; | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
packages/emulators/standalone/suyu/patches/03-set-rom-path.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp | ||
index 9362e18c3..99ce7656c 100644 | ||
--- a/src/common/fs/path_util.cpp | ||
+++ b/src/common/fs/path_util.cpp | ||
@@ -122,7 +122,7 @@ public: | ||
GenerateSuyuPath(SuyuPath::CrashDumpsDir, suyu_path / CRASH_DUMPS_DIR); | ||
GenerateSuyuPath(SuyuPath::DumpDir, suyu_path / DUMP_DIR); | ||
GenerateSuyuPath(SuyuPath::IconsDir, suyu_path / ICONS_DIR); | ||
- GenerateSuyuPath(SuyuPath::KeysDir, suyu_path / KEYS_DIR); | ||
+ GenerateSuyuPath(SuyuPath::KeysDir, fs::path("/storage/games-internal/roms/bios/")); | ||
GenerateSuyuPath(SuyuPath::LoadDir, suyu_path / LOAD_DIR); | ||
GenerateSuyuPath(SuyuPath::LogDir, suyu_path / LOG_DIR); | ||
GenerateSuyuPath(SuyuPath::NANDDir, suyu_path / NAND_DIR); | ||
|
12 changes: 12 additions & 0 deletions
12
packages/emulators/standalone/suyu/patches/04-dont-use-native-dialogs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/src/suyu/main.cpp b/src/suyu/main.cpp | ||
index 991ff6776..12c4d1418 100644 | ||
--- a/src/suyu/main.cpp | ||
+++ b/src/suyu/main.cpp | ||
@@ -5641,6 +5641,7 @@ int main(int argc, char* argv[]) { | ||
// Disables the "?" button on all dialogs. Disabled by default on Qt6. | ||
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); | ||
#endif | ||
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs); | ||
|
||
// Enables the core to make the qt created contexts current on std::threads | ||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters