1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-08-30 16:06:30 -05:00

Full rebrand

This commit is contained in:
JuanCStar
2024-03-08 09:06:48 +00:00
committed by Crimson Hawk
parent c445fa1e3e
commit 88b901a24e
427 changed files with 55946 additions and 56077 deletions

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Enable modules to include each other's files
@@ -88,7 +88,7 @@ if (MSVC)
/wd4702 # unreachable code (when used with LTO)
)
if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
if (USE_CCACHE OR SUYU_USE_PRECOMPILED_HEADERS)
# when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
add_compile_options(/Z7)
@@ -192,20 +192,20 @@ add_subdirectory(input_common)
add_subdirectory(frontend_common)
add_subdirectory(shader_recompiler)
if (YUZU_ROOM)
if (SUYU_ROOM)
add_subdirectory(dedicated_room)
endif()
if (YUZU_TESTS)
if (SUYU_TESTS)
add_subdirectory(tests)
endif()
if (ENABLE_SDL2)
add_subdirectory(yuzu_cmd)
add_subdirectory(suyu_cmd)
endif()
if (ENABLE_QT)
add_subdirectory(yuzu)
add_subdirectory(suyu)
endif()
if (ENABLE_WEB_SERVICE)
@@ -214,5 +214,5 @@ endif()
if (ANDROID)
add_subdirectory(android/app/src/main/jni)
target_include_directories(yuzu-android PRIVATE android/app/src/main)
target_include_directories(suyu-android PRIVATE android/app/src/main)
endif()

View File

@@ -172,9 +172,9 @@ android {
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
"-DBUNDLE_SPEEX=ON",
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
"-DYUZU_USE_BUNDLED_VCPKG=ON",
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
"-DYUZU_ENABLE_LTO=ON",
"-DSUYU_USE_BUNDLED_VCPKG=ON",
"-DSUYU_USE_BUNDLED_FFMPEG=ON",
"-DSUYU_ENABLE_LTO=ON",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
)

View File

@@ -262,7 +262,7 @@ if (ANDROID)
target_compile_definitions(audio_core PRIVATE HAVE_OBOE)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(audio_core PRIVATE precompiled_headers.h)
endif()

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <span>
@@ -208,7 +208,7 @@ CubebSink::CubebSink(std::string_view target_device_name) {
com_init_result = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
#endif
if (cubeb_init(&ctx, "yuzu", nullptr) != CUBEB_OK) {
if (cubeb_init(&ctx, "suyu", nullptr) != CUBEB_OK) {
LOG_CRITICAL(Audio_Sink, "cubeb_init failed");
return;
}
@@ -304,7 +304,7 @@ std::vector<std::string> ListCubebSinkDevices(bool capture) {
auto com_init_result = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
#endif
if (cubeb_init(&ctx, "yuzu Device Enumerator", nullptr) != CUBEB_OK) {
if (cubeb_init(&ctx, "suyu Device Enumerator", nullptr) != CUBEB_OK) {
LOG_CRITICAL(Audio_Sink, "cubeb_init failed");
return {};
}
@@ -352,7 +352,7 @@ bool IsCubebSuitable() {
#endif
// Init cubeb
if (cubeb_init(&ctx, "yuzu Latency Getter", nullptr) != CUBEB_OK) {
if (cubeb_init(&ctx, "suyu Latency Getter", nullptr) != CUBEB_OK) {
LOG_ERROR(Audio_Sink, "Cubeb failed to init, it is not suitable.");
return false;
}
@@ -386,7 +386,7 @@ bool IsCubebSuitable() {
// Test opening a device with standard parameters
cubeb_devid output_device{0};
cubeb_devid input_device{0};
std::string name{"Yuzu test"};
std::string name{"Suyu test"};
cubeb_stream* stream{nullptr};
if (cubeb_stream_init(ctx, &stream, name.c_str(), input_device, nullptr, output_device, &params,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <array>
@@ -32,11 +32,11 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span<s16> samples) {
constexpr s32 min{std::numeric_limits<s16>::min()};
constexpr s32 max{std::numeric_limits<s16>::max()};
auto yuzu_volume{Settings::Volume()};
if (yuzu_volume > 1.0f) {
yuzu_volume = 0.6f + 20 * std::log10(yuzu_volume);
auto suyu_volume{Settings::Volume()};
if (suyu_volume > 1.0f) {
suyu_volume = 0.6f + 20 * std::log10(suyu_volume);
}
auto volume{system_volume * device_volume * yuzu_volume};
auto volume{system_volume * device_volume * suyu_volume};
if (system_channels == 6 && device_channels == 2) {
// We're given 6 channels, but our device only outputs 2, so downmix.

View File

@@ -262,7 +262,7 @@ if (ANDROID)
target_link_libraries(common PRIVATE android)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(common PRIVATE precompiled_headers.h)
endif()

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <map>
@@ -253,19 +253,19 @@ void AndroidKeyboard::SubmitNormalText(const ResultData& data) const {
void InitJNI(JNIEnv* env) {
s_software_keyboard_class = reinterpret_cast<jclass>(
env->NewGlobalRef(env->FindClass("org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard")));
env->NewGlobalRef(env->FindClass("org/suyu/suyu_emu/applets/keyboard/SoftwareKeyboard")));
s_keyboard_config_class = reinterpret_cast<jclass>(env->NewGlobalRef(
env->FindClass("org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig")));
env->FindClass("org/suyu/suyu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig")));
s_keyboard_data_class = reinterpret_cast<jclass>(env->NewGlobalRef(
env->FindClass("org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard$KeyboardData")));
env->FindClass("org/suyu/suyu_emu/applets/keyboard/SoftwareKeyboard$KeyboardData")));
s_swkbd_execute_normal = env->GetStaticMethodID(
s_software_keyboard_class, "executeNormal",
"(Lorg/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)Lorg/yuzu/yuzu_emu/"
"(Lorg/suyu/suyu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)Lorg/suyu/suyu_emu/"
"applets/keyboard/SoftwareKeyboard$KeyboardData;");
s_swkbd_execute_inline = env->GetStaticMethodID(
s_software_keyboard_class, "executeInline",
"(Lorg/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)V");
"(Lorg/suyu/suyu_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)V");
}
void CleanupJNI(JNIEnv* env) {

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <jni.h>
@@ -80,14 +80,14 @@ static jfieldID s_player_input_button_color_right_field;
static jfieldID s_player_input_profile_name_field;
static jfieldID s_player_input_use_system_vibrator_field;
static jclass s_yuzu_input_device_interface;
static jmethodID s_yuzu_input_device_get_name;
static jmethodID s_yuzu_input_device_get_guid;
static jmethodID s_yuzu_input_device_get_port;
static jmethodID s_yuzu_input_device_get_supports_vibration;
static jmethodID s_yuzu_input_device_vibrate;
static jmethodID s_yuzu_input_device_get_axes;
static jmethodID s_yuzu_input_device_has_keys;
static jclass s_suyu_input_device_interface;
static jmethodID s_suyu_input_device_get_name;
static jmethodID s_suyu_input_device_get_guid;
static jmethodID s_suyu_input_device_get_port;
static jmethodID s_suyu_input_device_get_supports_vibration;
static jmethodID s_suyu_input_device_vibrate;
static jmethodID s_suyu_input_device_get_axes;
static jmethodID s_suyu_input_device_has_keys;
static constexpr jint JNI_VERSION = JNI_VERSION_1_6;
@@ -356,36 +356,36 @@ jfieldID GetPlayerInputUseSystemVibratorField() {
return s_player_input_use_system_vibrator_field;
}
jclass GetYuzuInputDeviceInterface() {
return s_yuzu_input_device_interface;
jclass GetSuyuInputDeviceInterface() {
return s_suyu_input_device_interface;
}
jmethodID GetYuzuDeviceGetName() {
return s_yuzu_input_device_get_name;
jmethodID GetSuyuDeviceGetName() {
return s_suyu_input_device_get_name;
}
jmethodID GetYuzuDeviceGetGUID() {
return s_yuzu_input_device_get_guid;
jmethodID GetSuyuDeviceGetGUID() {
return s_suyu_input_device_get_guid;
}
jmethodID GetYuzuDeviceGetPort() {
return s_yuzu_input_device_get_port;
jmethodID GetSuyuDeviceGetPort() {
return s_suyu_input_device_get_port;
}
jmethodID GetYuzuDeviceGetSupportsVibration() {
return s_yuzu_input_device_get_supports_vibration;
jmethodID GetSuyuDeviceGetSupportsVibration() {
return s_suyu_input_device_get_supports_vibration;
}
jmethodID GetYuzuDeviceVibrate() {
return s_yuzu_input_device_vibrate;
jmethodID GetSuyuDeviceVibrate() {
return s_suyu_input_device_vibrate;
}
jmethodID GetYuzuDeviceGetAxes() {
return s_yuzu_input_device_get_axes;
jmethodID GetSuyuDeviceGetAxes() {
return s_suyu_input_device_get_axes;
}
jmethodID GetYuzuDeviceHasKeys() {
return s_yuzu_input_device_has_keys;
jmethodID GetSuyuDeviceHasKeys() {
return s_suyu_input_device_has_keys;
}
#ifdef __cplusplus
@@ -400,14 +400,14 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
return JNI_ERR;
// Initialize Java classes
const jclass native_library_class = env->FindClass("org/yuzu/yuzu_emu/NativeLibrary");
const jclass native_library_class = env->FindClass("org/suyu/suyu_emu/NativeLibrary");
s_native_library_class = reinterpret_cast<jclass>(env->NewGlobalRef(native_library_class));
s_disk_cache_progress_class = reinterpret_cast<jclass>(env->NewGlobalRef(
env->FindClass("org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress")));
env->FindClass("org/suyu/suyu_emu/disk_shader_cache/DiskShaderCacheProgress")));
s_load_callback_stage_class = reinterpret_cast<jclass>(env->NewGlobalRef(env->FindClass(
"org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress$LoadCallbackStage")));
"org/suyu/suyu_emu/disk_shader_cache/DiskShaderCacheProgress$LoadCallbackStage")));
const jclass game_dir_class = env->FindClass("org/yuzu/yuzu_emu/model/GameDir");
const jclass game_dir_class = env->FindClass("org/suyu/suyu_emu/model/GameDir");
s_game_dir_class = reinterpret_cast<jclass>(env->NewGlobalRef(game_dir_class));
s_game_dir_constructor = env->GetMethodID(game_dir_class, "<init>", "(Ljava/lang/String;Z)V");
env->DeleteLocalRef(game_dir_class);
@@ -424,7 +424,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
s_on_program_changed =
env->GetStaticMethodID(s_native_library_class, "onProgramChanged", "(I)V");
const jclass game_class = env->FindClass("org/yuzu/yuzu_emu/model/Game");
const jclass game_class = env->FindClass("org/suyu/suyu_emu/model/Game");
s_game_class = reinterpret_cast<jclass>(env->NewGlobalRef(game_class));
s_game_constructor = env->GetMethodID(game_class, "<init>",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/"
@@ -450,7 +450,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env->DeleteLocalRef(pair_class);
const jclass overlay_control_data_class =
env->FindClass("org/yuzu/yuzu_emu/overlay/model/OverlayControlData");
env->FindClass("org/suyu/suyu_emu/overlay/model/OverlayControlData");
s_overlay_control_data_class =
reinterpret_cast<jclass>(env->NewGlobalRef(overlay_control_data_class));
s_overlay_control_data_constructor =
@@ -468,7 +468,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env->GetFieldID(overlay_control_data_class, "foldablePosition", "Lkotlin/Pair;");
env->DeleteLocalRef(overlay_control_data_class);
const jclass patch_class = env->FindClass("org/yuzu/yuzu_emu/model/Patch");
const jclass patch_class = env->FindClass("org/suyu/suyu_emu/model/Patch");
s_patch_class = reinterpret_cast<jclass>(env->NewGlobalRef(patch_class));
s_patch_constructor = env->GetMethodID(
patch_class, "<init>",
@@ -500,7 +500,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env->DeleteLocalRef(boolean_class);
const jclass player_input_class =
env->FindClass("org/yuzu/yuzu_emu/features/input/model/PlayerInput");
env->FindClass("org/suyu/suyu_emu/features/input/model/PlayerInput");
s_player_input_class = reinterpret_cast<jclass>(env->NewGlobalRef(player_input_class));
s_player_input_constructor = env->GetMethodID(
player_input_class, "<init>",
@@ -530,23 +530,23 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env->GetFieldID(player_input_class, "useSystemVibrator", "Z");
env->DeleteLocalRef(player_input_class);
const jclass yuzu_input_device_interface =
env->FindClass("org/yuzu/yuzu_emu/features/input/YuzuInputDevice");
s_yuzu_input_device_interface =
reinterpret_cast<jclass>(env->NewGlobalRef(yuzu_input_device_interface));
s_yuzu_input_device_get_name =
env->GetMethodID(yuzu_input_device_interface, "getName", "()Ljava/lang/String;");
s_yuzu_input_device_get_guid =
env->GetMethodID(yuzu_input_device_interface, "getGUID", "()Ljava/lang/String;");
s_yuzu_input_device_get_port = env->GetMethodID(yuzu_input_device_interface, "getPort", "()I");
s_yuzu_input_device_get_supports_vibration =
env->GetMethodID(yuzu_input_device_interface, "getSupportsVibration", "()Z");
s_yuzu_input_device_vibrate = env->GetMethodID(yuzu_input_device_interface, "vibrate", "(F)V");
s_yuzu_input_device_get_axes =
env->GetMethodID(yuzu_input_device_interface, "getAxes", "()[Ljava/lang/Integer;");
s_yuzu_input_device_has_keys =
env->GetMethodID(yuzu_input_device_interface, "hasKeys", "([I)[Z");
env->DeleteLocalRef(yuzu_input_device_interface);
const jclass suyu_input_device_interface =
env->FindClass("org/suyu/suyu_emu/features/input/SuyuInputDevice");
s_suyu_input_device_interface =
reinterpret_cast<jclass>(env->NewGlobalRef(suyu_input_device_interface));
s_suyu_input_device_get_name =
env->GetMethodID(suyu_input_device_interface, "getName", "()Ljava/lang/String;");
s_suyu_input_device_get_guid =
env->GetMethodID(suyu_input_device_interface, "getGUID", "()Ljava/lang/String;");
s_suyu_input_device_get_port = env->GetMethodID(suyu_input_device_interface, "getPort", "()I");
s_suyu_input_device_get_supports_vibration =
env->GetMethodID(suyu_input_device_interface, "getSupportsVibration", "()Z");
s_suyu_input_device_vibrate = env->GetMethodID(suyu_input_device_interface, "vibrate", "(F)V");
s_suyu_input_device_get_axes =
env->GetMethodID(suyu_input_device_interface, "getAxes", "()[Ljava/lang/Integer;");
s_suyu_input_device_has_keys =
env->GetMethodID(suyu_input_device_interface, "hasKeys", "([I)[Z");
env->DeleteLocalRef(suyu_input_device_interface);
// Initialize Android Storage
Common::FS::Android::RegisterCallbacks(env, s_native_library_class);
@@ -578,7 +578,7 @@ void JNI_OnUnload(JavaVM* vm, void* reserved) {
env->DeleteGlobalRef(s_integer_class);
env->DeleteGlobalRef(s_boolean_class);
env->DeleteGlobalRef(s_player_input_class);
env->DeleteGlobalRef(s_yuzu_input_device_interface);
env->DeleteGlobalRef(s_suyu_input_device_interface);
// UnInitialize applets
SoftwareKeyboard::CleanupJNI(env);

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@@ -100,13 +100,13 @@ jfieldID GetPlayerInputButtonColorRightField();
jfieldID GetPlayerInputProfileNameField();
jfieldID GetPlayerInputUseSystemVibratorField();
jclass GetYuzuInputDeviceInterface();
jmethodID GetYuzuDeviceGetName();
jmethodID GetYuzuDeviceGetGUID();
jmethodID GetYuzuDeviceGetPort();
jmethodID GetYuzuDeviceGetSupportsVibration();
jmethodID GetYuzuDeviceVibrate();
jmethodID GetYuzuDeviceGetAxes();
jmethodID GetYuzuDeviceHasKeys();
jclass GetSuyuInputDeviceInterface();
jmethodID GetSuyuDeviceGetName();
jmethodID GetSuyuDeviceGetGUID();
jmethodID GetSuyuDeviceGetPort();
jmethodID GetSuyuDeviceGetSupportsVibration();
jmethodID GetSuyuDeviceVibrate();
jmethodID GetSuyuDeviceGetAxes();
jmethodID GetSuyuDeviceHasKeys();
} // namespace Common::Android

View File

@@ -35,7 +35,7 @@ struct RoomInformation {
u16 port; ///< The port of this room
GameInfo preferred_game; ///< Game to advertise that you want to play
std::string host_username; ///< Forum username of the host
bool enable_yuzu_mods; ///< Allow yuzu Moderators to moderate on this room
bool enable_suyu_mods; ///< Allow suyu Moderators to moderate on this room
};
struct Room {

View File

@@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -14,13 +14,13 @@ void assert_fail_impl();
[[noreturn]] void unreachable_impl();
#ifdef _MSC_VER
#define YUZU_NO_INLINE __declspec(noinline)
#define SUYU_NO_INLINE __declspec(noinline)
#else
#define YUZU_NO_INLINE __attribute__((noinline))
#define SUYU_NO_INLINE __attribute__((noinline))
#endif
#define ASSERT(_a_) \
([&]() YUZU_NO_INLINE { \
([&]() SUYU_NO_INLINE { \
if (!(_a_)) [[unlikely]] { \
LOG_CRITICAL(Debug, "Assertion Failed!"); \
assert_fail_impl(); \
@@ -28,7 +28,7 @@ void assert_fail_impl();
}())
#define ASSERT_MSG(_a_, ...) \
([&]() YUZU_NO_INLINE { \
([&]() SUYU_NO_INLINE { \
if (!(_a_)) [[unlikely]] { \
LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); \
assert_fail_impl(); \

View File

@@ -138,7 +138,7 @@ void PrintMessageToLogcat(const Entry& entry) {
case Level::Count:
UNREACHABLE();
}
__android_log_print(android_log_priority, "YuzuNative", "%s", str.c_str());
__android_log_print(android_log_priority, "SuyuNative", "%s", str.c_str());
#endif
}
} // namespace Common::Log

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -128,7 +128,7 @@ enum class Class : u8 {
Crypto, ///< Cryptographic engine/functions
Input, ///< Input emulation
Network, ///< Network emulation
WebService, ///< Interface to yuzu Web Services
WebService, ///< Interface to suyu Web Services
Count ///< Total number of logging classes
};

View File

@@ -117,7 +117,7 @@ void LogSettings() {
LOG_INFO(Config, "suyu Configuration:");
for (auto& [category, settings] : values.linkage.by_category) {
for (const auto& setting : settings) {
if (setting->Id() == values.yuzu_token.Id()) {
if (setting->Id() == values.suyu_token.Id()) {
// Hide the token secret, for security reasons.
continue;
}

View File

@@ -473,7 +473,7 @@ struct Values {
linkage, 0, "rng_seed", Category::System, Specialization::Hex,
true, true, &rng_seed_enabled};
Setting<std::string> device_name{
linkage, "yuzu", "device_name", Category::System, Specialization::Default, true, true};
linkage, "suyu", "device_name", Category::System, Specialization::Default, true, true};
Setting<s32> current_user{linkage, 0, "current_user", Category::System};
@@ -614,9 +614,9 @@ struct Values {
Setting<bool> enable_telemetry{linkage, false, "enable_telemetry", Category::WebService};
Setting<std::string> web_api_url{linkage, "https://api.suyu.dev", "web_api_url",
Category::WebService};
Setting<std::string> yuzu_username{linkage, std::string(), "yuzu_username",
Setting<std::string> suyu_username{linkage, std::string(), "suyu_username",
Category::WebService};
Setting<std::string> yuzu_token{linkage, std::string(), "yuzu_token", Category::WebService};
Setting<std::string> suyu_token{linkage, std::string(), "suyu_token", Category::WebService};
// Add-Ons
std::map<u64, std::vector<std::string>> disabled_addons;

View File

@@ -15,7 +15,7 @@ namespace Common::Telemetry {
/// Field type, used for grouping fields together in the final submitted telemetry log
enum class FieldType : u8 {
None = 0, ///< No specified field group
App, ///< yuzu application fields (e.g. version, branch, etc.)
App, ///< suyu application fields (e.g. version, branch, etc.)
Session, ///< Emulated session fields (e.g. title ID, log, etc.)
Performance, ///< Emulated performance (e.g. fps, emulated CPU speed, etc.)
UserFeedback, ///< User submitted feedback (e.g. star rating, user notes, etc.)

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -76,9 +76,9 @@ struct UUID {
u128 AsU128() const;
/**
* Creates a default UUID "yuzu Default UID".
* Creates a default UUID "suyu Default UID".
*
* @returns A UUID with its bytes set to the ASCII values of "yuzu Default UID".
* @returns A UUID with its bytes set to the ASCII values of "suyu Default UID".
*/
static constexpr UUID MakeDefault() {
return UUID{

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2013 Dolphin Emulator Project / 2015 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -78,7 +78,7 @@ static CPUCaps Detect() {
CPUCaps caps = {};
// Assumes the CPU supports the CPUID instruction. Those that don't would likely not support
// yuzu at all anyway
// suyu at all anyway
int cpu_id[4];

View File

@@ -1223,11 +1223,11 @@ else()
hle/service/ssl/ssl_backend_none.cpp)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(core PRIVATE precompiled_headers.h)
endif()
if (YUZU_ENABLE_LTO)
if (SUYU_ENABLE_LTO)
set_property(TARGET core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <cinttypes>
@@ -160,8 +160,8 @@ bool ArmNce::HandleGuestAccessFault(GuestContext* guest_ctx, void* raw_info, voi
// Try to handle an invalid access.
// TODO: handle accesses which split a page?
const Common::ProcessAddress addr =
(reinterpret_cast<u64>(info->si_addr) & ~Memory::YUZU_PAGEMASK);
if (guest_ctx->system->ApplicationMemory().InvalidateNCE(addr, Memory::YUZU_PAGESIZE)) {
(reinterpret_cast<u64>(info->si_addr) & ~Memory::SUYU_PAGEMASK);
if (guest_ctx->system->ApplicationMemory().InvalidateNCE(addr, Memory::SUYU_PAGESIZE)) {
// We handled the access successfully and are returning to guest code.
return true;
}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/arm64/native_clock.h"
@@ -213,7 +213,7 @@ bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base,
}
size_t Patcher::GetSectionSize() const noexcept {
return Common::AlignUp(m_patch_instructions.size() * sizeof(u32), Core::Memory::YUZU_PAGESIZE);
return Common::AlignUp(m_patch_instructions.size() * sizeof(u32), Core::Memory::SUYU_PAGESIZE);
}
void Patcher::WriteLoadContext() {

View File

@@ -6,7 +6,7 @@
#include <array>
#include "common/common_types.h"
// This is to consolidate system-wide constants that are used by multiple components of yuzu.
// This is to consolidate system-wide constants that are used by multiple components of suyu.
// This is especially to prevent the case of something in frontend duplicating a constexpr array or
// directly including some service header for the sole purpose of data.
namespace Core::Constants {

View File

@@ -640,22 +640,22 @@ KeyManager::KeyManager() {
void KeyManager::ReloadKeys() {
// Initialize keys
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
const auto suyu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
if (!Common::FS::CreateDir(yuzu_keys_dir)) {
if (!Common::FS::CreateDir(suyu_keys_dir)) {
LOG_ERROR(Core, "Failed to create the keys directory.");
}
if (Settings::values.use_dev_keys) {
dev_mode = true;
LoadFromFile(yuzu_keys_dir / "dev.keys", false);
LoadFromFile(suyu_keys_dir / "dev.keys", false);
} else {
dev_mode = false;
LoadFromFile(yuzu_keys_dir / "prod.keys", false);
LoadFromFile(suyu_keys_dir / "prod.keys", false);
}
LoadFromFile(yuzu_keys_dir / "title.keys", true);
LoadFromFile(yuzu_keys_dir / "console.keys", false);
LoadFromFile(suyu_keys_dir / "title.keys", true);
LoadFromFile(suyu_keys_dir / "console.keys", false);
}
static bool ValidCryptoRevisionString(std::string_view base, size_t begin, size_t length) {
@@ -861,17 +861,17 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) {
}
bool KeyManager::KeyFileExists(bool title) {
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
const auto suyu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
if (title) {
return Common::FS::Exists(yuzu_keys_dir / "title.keys");
return Common::FS::Exists(suyu_keys_dir / "title.keys");
}
if (Settings::values.use_dev_keys) {
return Common::FS::Exists(yuzu_keys_dir / "dev.keys");
return Common::FS::Exists(suyu_keys_dir / "dev.keys");
}
return Common::FS::Exists(yuzu_keys_dir / "prod.keys");
return Common::FS::Exists(suyu_keys_dir / "prod.keys");
}
void KeyManager::DeriveSDSeedLazy() {

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <atomic>
@@ -132,7 +132,7 @@ struct EmptyAllocator {
template <typename DTraits>
struct DeviceMemoryManagerAllocator {
static constexpr size_t device_virtual_bits = DTraits::device_virtual_bits;
static constexpr DAddr first_address = 1ULL << Memory::YUZU_PAGEBITS;
static constexpr DAddr first_address = 1ULL << Memory::SUYU_PAGEBITS;
static constexpr DAddr max_device_area = 1ULL << device_virtual_bits;
DeviceMemoryManagerAllocator() : main_allocator(first_address) {}
@@ -162,18 +162,18 @@ struct DeviceMemoryManagerAllocator {
template <typename Traits>
DeviceMemoryManager<Traits>::DeviceMemoryManager(const DeviceMemory& device_memory_)
: physical_base{reinterpret_cast<const uintptr_t>(device_memory_.buffer.BackingBasePointer())},
device_inter{nullptr}, compressed_physical_ptr(device_as_size >> Memory::YUZU_PAGEBITS),
device_inter{nullptr}, compressed_physical_ptr(device_as_size >> Memory::SUYU_PAGEBITS),
compressed_device_addr(1ULL << ((Settings::values.memory_layout_mode.GetValue() ==
Settings::MemoryLayout::Memory_4Gb
? physical_min_bits
: physical_max_bits) -
Memory::YUZU_PAGEBITS)),
continuity_tracker(device_as_size >> Memory::YUZU_PAGEBITS),
cpu_backing_address(device_as_size >> Memory::YUZU_PAGEBITS) {
Memory::SUYU_PAGEBITS)),
continuity_tracker(device_as_size >> Memory::SUYU_PAGEBITS),
cpu_backing_address(device_as_size >> Memory::SUYU_PAGEBITS) {
impl = std::make_unique<DeviceMemoryManagerAllocator<Traits>>();
cached_pages = std::make_unique<CachedPages>();
const size_t total_virtual = device_as_size >> Memory::YUZU_PAGEBITS;
const size_t total_virtual = device_as_size >> Memory::SUYU_PAGEBITS;
for (size_t i = 0; i < total_virtual; i++) {
compressed_physical_ptr[i] = 0;
continuity_tracker[i] = 1;
@@ -183,7 +183,7 @@ DeviceMemoryManager<Traits>::DeviceMemoryManager(const DeviceMemory& device_memo
Settings::MemoryLayout::Memory_4Gb
? physical_min_bits
: physical_max_bits) -
Memory::YUZU_PAGEBITS);
Memory::SUYU_PAGEBITS);
for (size_t i = 0; i < total_phys; i++) {
compressed_device_addr[i] = 0;
}
@@ -216,17 +216,17 @@ template <typename Traits>
void DeviceMemoryManager<Traits>::Map(DAddr address, VAddr virtual_address, size_t size, Asid asid,
bool track) {
Core::Memory::Memory* process_memory = registered_processes[asid.id];
size_t start_page_d = address >> Memory::YUZU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
size_t start_page_d = address >> Memory::SUYU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::SUYU_PAGESIZE) >> Memory::SUYU_PAGEBITS;
std::scoped_lock lk(mapping_guard);
for (size_t i = 0; i < num_pages; i++) {
const VAddr new_vaddress = virtual_address + i * Memory::YUZU_PAGESIZE;
const VAddr new_vaddress = virtual_address + i * Memory::SUYU_PAGESIZE;
auto* ptr = process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress));
if (ptr == nullptr) [[unlikely]] {
compressed_physical_ptr[start_page_d + i] = 0;
continue;
}
auto phys_addr = static_cast<u32>(GetRawPhysicalAddr(ptr) >> Memory::YUZU_PAGEBITS) + 1U;
auto phys_addr = static_cast<u32>(GetRawPhysicalAddr(ptr) >> Memory::SUYU_PAGEBITS) + 1U;
compressed_physical_ptr[start_page_d + i] = phys_addr;
InsertCPUBacking(start_page_d + i, new_vaddress, asid);
const u32 base_dev = compressed_device_addr[phys_addr - 1U];
@@ -249,8 +249,8 @@ void DeviceMemoryManager<Traits>::Map(DAddr address, VAddr virtual_address, size
template <typename Traits>
void DeviceMemoryManager<Traits>::Unmap(DAddr address, size_t size) {
size_t start_page_d = address >> Memory::YUZU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
size_t start_page_d = address >> Memory::SUYU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::SUYU_PAGESIZE) >> Memory::SUYU_PAGEBITS;
device_inter->InvalidateRegion(address, size);
std::scoped_lock lk(mapping_guard);
for (size_t i = 0; i < num_pages; i++) {
@@ -278,13 +278,13 @@ template <typename Traits>
void DeviceMemoryManager<Traits>::TrackContinuityImpl(DAddr address, VAddr virtual_address,
size_t size, Asid asid) {
Core::Memory::Memory* process_memory = registered_processes[asid.id];
size_t start_page_d = address >> Memory::YUZU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
size_t start_page_d = address >> Memory::SUYU_PAGEBITS;
size_t num_pages = Common::AlignUp(size, Memory::SUYU_PAGESIZE) >> Memory::SUYU_PAGEBITS;
uintptr_t last_ptr = 0;
size_t page_count = 1;
for (size_t i = num_pages; i > 0; i--) {
size_t index = i - 1;
const VAddr new_vaddress = virtual_address + index * Memory::YUZU_PAGESIZE;
const VAddr new_vaddress = virtual_address + index * Memory::SUYU_PAGESIZE;
const uintptr_t new_ptr = reinterpret_cast<uintptr_t>(
process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress)));
if (new_ptr + page_size == last_ptr) {
@@ -333,26 +333,26 @@ void DeviceMemoryManager<Traits>::InnerGatherDeviceAddresses(Common::ScratchBuff
template <typename Traits>
template <typename T>
T* DeviceMemoryManager<Traits>::GetPointer(DAddr address) {
const size_t index = address >> Memory::YUZU_PAGEBITS;
const size_t offset = address & Memory::YUZU_PAGEMASK;
const size_t index = address >> Memory::SUYU_PAGEBITS;
const size_t offset = address & Memory::SUYU_PAGEMASK;
auto phys_addr = compressed_physical_ptr[index];
if (phys_addr == 0) [[unlikely]] {
return nullptr;
}
return GetPointerFromRaw<T>((static_cast<PAddr>(phys_addr - 1) << Memory::YUZU_PAGEBITS) +
return GetPointerFromRaw<T>((static_cast<PAddr>(phys_addr - 1) << Memory::SUYU_PAGEBITS) +
offset);
}
template <typename Traits>
template <typename T>
const T* DeviceMemoryManager<Traits>::GetPointer(DAddr address) const {
const size_t index = address >> Memory::YUZU_PAGEBITS;
const size_t offset = address & Memory::YUZU_PAGEMASK;
const size_t index = address >> Memory::SUYU_PAGEBITS;
const size_t offset = address & Memory::SUYU_PAGEMASK;
auto phys_addr = compressed_physical_ptr[index];
if (phys_addr == 0) [[unlikely]] {
return nullptr;
}
return GetPointerFromRaw<T>((static_cast<PAddr>(phys_addr - 1) << Memory::YUZU_PAGEBITS) +
return GetPointerFromRaw<T>((static_cast<PAddr>(phys_addr - 1) << Memory::SUYU_PAGEBITS) +
offset);
}
@@ -382,15 +382,15 @@ template <typename Traits>
void DeviceMemoryManager<Traits>::WalkBlock(DAddr addr, std::size_t size, auto on_unmapped,
auto on_memory, auto increment) {
std::size_t remaining_size = size;
std::size_t page_index = addr >> Memory::YUZU_PAGEBITS;
std::size_t page_offset = addr & Memory::YUZU_PAGEMASK;
std::size_t page_index = addr >> Memory::SUYU_PAGEBITS;
std::size_t page_offset = addr & Memory::SUYU_PAGEMASK;
while (remaining_size) {
const size_t next_pages = static_cast<std::size_t>(continuity_tracker[page_index]);
const std::size_t copy_amount =
std::min((next_pages << Memory::YUZU_PAGEBITS) - page_offset, remaining_size);
std::min((next_pages << Memory::SUYU_PAGEBITS) - page_offset, remaining_size);
const auto current_vaddr =
static_cast<u64>((page_index << Memory::YUZU_PAGEBITS) + page_offset);
static_cast<u64>((page_index << Memory::SUYU_PAGEBITS) + page_offset);
SCOPE_EXIT{
page_index += next_pages;
page_offset = 0;
@@ -404,7 +404,7 @@ void DeviceMemoryManager<Traits>::WalkBlock(DAddr addr, std::size_t size, auto o
continue;
}
auto* mem_ptr = GetPointerFromRaw<u8>(
(static_cast<PAddr>(phys_addr - 1) << Memory::YUZU_PAGEBITS) + page_offset);
(static_cast<PAddr>(phys_addr - 1) << Memory::SUYU_PAGEBITS) + page_offset);
on_memory(copy_amount, mem_ptr);
}
}
@@ -516,31 +516,31 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
const auto MarkRegionCaching = &DeviceMemoryManager<Traits>::DeviceMethods::MarkRegionCaching;
std::atomic_thread_fence(std::memory_order_acquire);
const size_t page_end = Common::DivCeil(addr + size, Memory::YUZU_PAGESIZE);
size_t page = addr >> Memory::YUZU_PAGEBITS;
const size_t page_end = Common::DivCeil(addr + size, Memory::SUYU_PAGESIZE);
size_t page = addr >> Memory::SUYU_PAGEBITS;
auto [asid, base_vaddress] = ExtractCPUBacking(page);
auto* memory_device_inter = registered_processes[asid.id];
const auto release_pending = [&] {
if (uncache_bytes > 0) {
if (memory_device_inter != nullptr) {
MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS,
MarkRegionCaching(memory_device_inter, uncache_begin << Memory::SUYU_PAGEBITS,
uncache_bytes, false);
}
uncache_bytes = 0;
}
if (cache_bytes > 0) {
if (memory_device_inter != nullptr) {
MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS,
MarkRegionCaching(memory_device_inter, cache_begin << Memory::SUYU_PAGEBITS,
cache_bytes, true);
}
cache_bytes = 0;
}
};
size_t old_vpage = (base_vaddress >> Memory::YUZU_PAGEBITS) - 1;
size_t old_vpage = (base_vaddress >> Memory::SUYU_PAGEBITS) - 1;
for (; page != page_end; ++page) {
CounterAtomicType& count = cached_pages->at(page >> subentries_shift).Count(page);
auto [asid_2, vpage] = ExtractCPUBacking(page);
vpage >>= Memory::YUZU_PAGEBITS;
vpage >>= Memory::SUYU_PAGEBITS;
if (vpage == 0) [[unlikely]] {
release_pending();
@@ -566,9 +566,9 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
if (uncache_bytes == 0) {
uncache_begin = vpage;
}
uncache_bytes += Memory::YUZU_PAGESIZE;
uncache_bytes += Memory::SUYU_PAGESIZE;
} else if (uncache_bytes > 0) {
MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS,
MarkRegionCaching(memory_device_inter, uncache_begin << Memory::SUYU_PAGEBITS,
uncache_bytes, false);
uncache_bytes = 0;
}
@@ -576,9 +576,9 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
if (cache_bytes == 0) {
cache_begin = vpage;
}
cache_bytes += Memory::YUZU_PAGESIZE;
cache_bytes += Memory::SUYU_PAGESIZE;
} else if (cache_bytes > 0) {
MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS,
MarkRegionCaching(memory_device_inter, cache_begin << Memory::SUYU_PAGEBITS,
cache_bytes, true);
cache_bytes = 0;
}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -370,7 +370,7 @@ std::optional<NcaID> RegisteredCache::GetNcaIDFromMetadata(u64 title_id,
if (type == ContentRecordType::Meta && meta_id.find(title_id) != meta_id.end())
return meta_id.at(title_id);
const auto res1 = CheckMapForContentRecord(yuzu_meta, title_id, type);
const auto res1 = CheckMapForContentRecord(suyu_meta, title_id, type);
if (res1)
return res1;
return CheckMapForContentRecord(meta, title_id, type);
@@ -437,8 +437,8 @@ void RegisteredCache::ProcessFiles(const std::vector<NcaID>& ids) {
}
}
void RegisteredCache::AccumulateYuzuMeta() {
const auto meta_dir = dir->GetSubdirectory("yuzu_meta");
void RegisteredCache::AccumulateSuyuMeta() {
const auto meta_dir = dir->GetSubdirectory("suyu_meta");
if (meta_dir == nullptr) {
return;
}
@@ -449,7 +449,7 @@ void RegisteredCache::AccumulateYuzuMeta() {
}
CNMT cnmt(file);
yuzu_meta.insert_or_assign(cnmt.GetTitleID(), std::move(cnmt));
suyu_meta.insert_or_assign(cnmt.GetTitleID(), std::move(cnmt));
}
}
@@ -460,7 +460,7 @@ void RegisteredCache::Refresh() {
const auto ids = AccumulateFiles();
ProcessFiles(ids);
AccumulateYuzuMeta();
AccumulateSuyuMeta();
}
RegisteredCache::RegisteredCache(VirtualDir dir_, ContentProviderParsingFunction parsing_function)
@@ -485,9 +485,9 @@ std::optional<u32> RegisteredCache::GetEntryVersion(u64 title_id) const {
return meta_iter->second.GetTitleVersion();
}
const auto yuzu_meta_iter = yuzu_meta.find(title_id);
if (yuzu_meta_iter != yuzu_meta.cend()) {
return yuzu_meta_iter->second.GetTitleVersion();
const auto suyu_meta_iter = suyu_meta.find(title_id);
if (suyu_meta_iter != suyu_meta.cend()) {
return suyu_meta_iter->second.GetTitleVersion();
}
return std::nullopt;
@@ -519,7 +519,7 @@ void RegisteredCache::IterateAllMetadata(
}
}
}
for (const auto& kv : yuzu_meta) {
for (const auto& kv : suyu_meta) {
const auto& cnmt = kv.second;
for (const auto& rec : cnmt.GetContentRecords()) {
if (GetFileAtID(rec.nca_id) != nullptr && filter(cnmt, rec)) {
@@ -668,7 +668,7 @@ InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type,
mbedtls_sha256_ret(data.data(), data.size(), c_rec.hash.data(), 0);
std::memcpy(&c_rec.nca_id, &c_rec.hash, 16);
const CNMT new_cnmt(header, opt_header, {c_rec}, {});
if (!RawInstallYuzuMeta(new_cnmt)) {
if (!RawInstallSuyuMeta(new_cnmt)) {
return InstallResult::ErrorMetaFailed;
}
return RawInstallNCA(nca, copy, overwrite_if_exists, c_rec.nca_id);
@@ -693,7 +693,7 @@ InstallResult RegisteredCache::InstallEntry(const NCA& nca, const CNMTHeader& ba
};
const OptionalHeader opt_header{0, 0};
const CNMT new_cnmt(header, opt_header, {base_record}, {});
if (!RawInstallYuzuMeta(new_cnmt)) {
if (!RawInstallSuyuMeta(new_cnmt)) {
return InstallResult::ErrorMetaFailed;
}
return RawInstallNCA(nca, copy, overwrite_if_exists, base_record.nca_id);
@@ -749,9 +749,9 @@ bool RegisteredCache::RemoveExistingEntry(u64 title_id) const {
deleted_html || deleted_legal);
}
// If patch entries for any program exist in yuzu meta, remove them
// If patch entries for any program exist in suyu meta, remove them
for (u8 i = 0; i < 0x10; i++) {
const auto meta_dir = dir->CreateDirectoryRelative("yuzu_meta");
const auto meta_dir = dir->CreateDirectoryRelative("suyu_meta");
const auto filename = GetCNMTName(TitleType::Update, title_id + i);
if (meta_dir->GetFile(filename)) {
removed_data |= meta_dir->DeleteFile(filename);
@@ -802,9 +802,9 @@ InstallResult RegisteredCache::RawInstallNCA(const NCA& nca, const VfsCopyFuncti
: InstallResult::ErrorCopyFailed;
}
bool RegisteredCache::RawInstallYuzuMeta(const CNMT& cnmt) {
bool RegisteredCache::RawInstallSuyuMeta(const CNMT& cnmt) {
// Reasoning behind this method can be found in the comment for InstallEntry, NCA overload.
const auto meta_dir = dir->CreateDirectoryRelative("yuzu_meta");
const auto meta_dir = dir->CreateDirectoryRelative("suyu_meta");
const auto filename = GetCNMTName(cnmt.GetType(), cnmt.GetTitleID());
if (meta_dir->GetFile(filename) == nullptr) {
auto out = meta_dir->CreateFile(filename);
@@ -823,11 +823,11 @@ bool RegisteredCache::RawInstallYuzuMeta(const CNMT& cnmt) {
}
}
Refresh();
return std::find_if(yuzu_meta.begin(), yuzu_meta.end(),
return std::find_if(suyu_meta.begin(), suyu_meta.end(),
[&cnmt](const std::pair<u64, CNMT>& kv) {
return kv.second.GetType() == cnmt.GetType() &&
kv.second.GetTitleID() == cnmt.GetTitleID();
}) != yuzu_meta.end();
}) != suyu_meta.end();
}
ContentProviderUnion::~ContentProviderUnion() = default;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -164,8 +164,8 @@ public:
const VfsCopyFunction& copy = &VfsRawCopy);
// Due to the fact that we must use Meta-type NCAs to determine the existence of files, this
// poses quite a challenge. Instead of creating a new meta NCA for this file, yuzu will create a
// dir inside the NAND called 'yuzu_meta' and store the raw CNMT there.
// poses quite a challenge. Instead of creating a new meta NCA for this file, suyu will create a
// dir inside the NAND called 'suyu_meta' and store the raw CNMT there.
// TODO(DarkLordZach): Author real meta-type NCAs and install those.
InstallResult InstallEntry(const NCA& nca, TitleType type, bool overwrite_if_exists = false,
const VfsCopyFunction& copy = &VfsRawCopy);
@@ -184,13 +184,13 @@ private:
std::function<bool(const CNMT&, const ContentRecord&)> filter) const;
std::vector<NcaID> AccumulateFiles() const;
void ProcessFiles(const std::vector<NcaID>& ids);
void AccumulateYuzuMeta();
void AccumulateSuyuMeta();
std::optional<NcaID> GetNcaIDFromMetadata(u64 title_id, ContentRecordType type) const;
VirtualFile GetFileAtID(NcaID id) const;
VirtualFile OpenFileOrDirectoryConcat(const VirtualDir& open_dir, std::string_view path) const;
InstallResult RawInstallNCA(const NCA& nca, const VfsCopyFunction& copy,
bool overwrite_if_exists, std::optional<NcaID> override_id = {});
bool RawInstallYuzuMeta(const CNMT& cnmt);
bool RawInstallSuyuMeta(const CNMT& cnmt);
VirtualDir dir;
ContentProviderParsingFunction parser;
@@ -199,8 +199,8 @@ private:
std::map<u64, NcaID> meta_id;
// maps tid -> meta
std::map<u64, CNMT> meta;
// maps tid -> meta for CNMT in yuzu_meta
std::map<u64, CNMT> yuzu_meta;
// maps tid -> meta for CNMT in suyu_meta
std::map<u64, CNMT> suyu_meta;
};
enum class ContentProviderUnionSlot {

View File

@@ -18,7 +18,7 @@ class System;
namespace FileSys {
constexpr const char* GetSaveDataSizeFileName() {
return ".yuzu_save_size";
return ".suyu_save_size";
}
using ProgramId = u64;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <thread>
@@ -65,7 +65,7 @@ void DefaultSoftwareKeyboardApplet::ShowNormalKeyboard() const {
LOG_WARNING(Service_AM,
"(STUBBED) called, backend requested to show the normal software keyboard.");
SubmitNormalText(u"yuzu");
SubmitNormalText(u"suyu");
}
void DefaultSoftwareKeyboardApplet::ShowTextCheckDialog(
@@ -100,7 +100,7 @@ void DefaultSoftwareKeyboardApplet::ShowInlineKeyboard(
appear_parameters.key_top_as_floating, appear_parameters.enable_backspace_button,
appear_parameters.enable_return_button, appear_parameters.disable_cancel_button);
std::thread([this] { SubmitInlineText(u"yuzu"); }).detach();
std::thread([this] { SubmitInlineText(u"suyu"); }).detach();
}
void DefaultSoftwareKeyboardApplet::HideInlineKeyboard() const {

View File

@@ -1,11 +1,11 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_types.h"
// This file contains yuzu's HLE API version constants.
// This file contains suyu's HLE API version constants.
namespace HLE::ApiVersion {

View File

@@ -442,7 +442,7 @@ void KScheduler::ScheduleImplFiber() {
// The next thread is nullptr!
// Switch to the idle thread. Note: HOS treats idling as a special case for
// performance. This is not *required* for yuzu's purposes, and for singlecore
// performance. This is not *required* for suyu's purposes, and for singlecore
// compatibility, we can just move the logic that would go here into the execution
// of the idle thread. If we ever remove singlecore, we should implement this
// accurately to HOS.

View File

@@ -833,7 +833,7 @@ Result Module::Interface::InitializeApplicationInfoBase() {
case FileSys::StorageId::Host:
case FileSys::StorageId::NandUser:
case FileSys::StorageId::SdCard:
case FileSys::StorageId::None: // Yuzu specific, differs from hardware
case FileSys::StorageId::None: // Suyu specific, differs from hardware
application_info.application_type = ApplicationType::Digital;
break;
default:
@@ -891,7 +891,7 @@ void Module::Interface::InitializeApplicationInfoV2(HLERequestContext& ctx) {
void Module::Interface::BeginUserRegistration(HLERequestContext& ctx) {
const auto user_id = Common::UUID::MakeRandom();
profile_manager->CreateNewUser(user_id, "yuzu");
profile_manager->CreateNewUser(user_id, "suyu");
LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString());

View File

@@ -46,7 +46,7 @@ ProfileManager::ProfileManager() {
// Create an user if none are present
if (user_count == 0) {
CreateNewUser(UUID::MakeRandom(), "yuzu");
CreateNewUser(UUID::MakeRandom(), "suyu");
WriteUserSaveFile();
}
@@ -383,14 +383,14 @@ void ProfileManager::ParseUserSaveFile() {
if (!save.IsOpen()) {
LOG_WARNING(Service_ACC, "Failed to load profile data from save data... Generating new "
"user 'yuzu' with random UUID.");
"user 'suyu' with random UUID.");
return;
}
ProfileDataRaw data;
if (!save.ReadObject(data)) {
LOG_WARNING(Service_ACC, "profiles.dat is smaller than expected... Generating new user "
"'yuzu' with random UUID.");
"'suyu' with random UUID.");
return;
}

View File

@@ -340,7 +340,7 @@ Result ISelfController::GetAccumulatedSuspendedTickValue(
LOG_DEBUG(Service_AM, "called.");
// This command returns the total number of system ticks since ISelfController creation
// where the game was suspended. Since Yuzu doesn't implement game suspension, this command
// where the game was suspended. Since Suyu doesn't implement game suspension, this command
// can just always return 0 ticks.
std::scoped_lock lk{m_applet->lock};
*out_accumulated_suspended_tick_value = m_applet->suspended_ticks;

View File

@@ -66,7 +66,7 @@ enum class FatalType : u32 {
static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) {
const auto title_id = system.GetApplicationProcessProgramID();
std::string crash_report = fmt::format(
"Yuzu {}-{} crash report\n"
"Suyu {}-{} crash report\n"
"Title ID: {:016x}\n"
"Result: 0x{:X} ({:04}-{:04d})\n"
"Set flags: 0x{:16X}\n"

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -109,7 +109,7 @@ protected:
void SendPacket(const Network::LDNPacket& packet);
static const LanEventFunc empty_func;
static constexpr Ssid fake_ssid{"YuzuFakeSsidForLdn"};
static constexpr Ssid fake_ssid{"SuyuFakeSsidForLdn"};
bool inited{};
std::mutex packet_mutex;

View File

@@ -271,9 +271,9 @@ void Cipher(const DerivedKeys& keys, const NTAG215File& in_data, NTAG215File& ou
}
bool LoadKeys(InternalKey& locked_secret, InternalKey& unfixed_info) {
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
const auto suyu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
const Common::FS::IOFile keys_file{yuzu_keys_dir / "key_retail.bin",
const Common::FS::IOFile keys_file{suyu_keys_dir / "key_retail.bin",
Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@@ -295,8 +295,8 @@ bool LoadKeys(InternalKey& locked_secret, InternalKey& unfixed_info) {
}
bool IsKeyAvailable() {
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
return Common::FS::Exists(yuzu_keys_dir / "key_retail.bin");
const auto suyu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
return Common::FS::Exists(suyu_keys_dir / "key_retail.bin");
}
bool DecodeAmiibo(const EncryptedNTAG215File& encrypted_tag_data, NTAG215File& tag_data) {

View File

@@ -623,7 +623,7 @@ Result NfcDevice::Restore() {
}
}
// Restore mii data in case is corrupted by previous instances of yuzu
// Restore mii data in case is corrupted by previous instances of suyu
if (tag_data.settings.settings.amiibo_initialized && !tag_data.owner_mii.IsValid()) {
LOG_ERROR(Service_NFP, "Regenerating mii data");
Mii::StoreData new_mii{};
@@ -1261,11 +1261,11 @@ Result NfcDevice::BreakTag(NFP::BreakType break_type) {
Result NfcDevice::HasBackup(const UniqueSerialNumber& uid, std::size_t uuid_size) const {
ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size");
constexpr auto backup_dir = "backup";
const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto suyu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto file_name =
fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, ""));
if (!Common::FS::Exists(yuzu_amiibo_dir / backup_dir / file_name)) {
if (!Common::FS::Exists(suyu_amiibo_dir / backup_dir / file_name)) {
return ResultUnableToAccessBackupFile;
}
@@ -1282,11 +1282,11 @@ Result NfcDevice::ReadBackupData(const UniqueSerialNumber& uid, std::size_t uuid
std::span<u8> data) const {
ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size");
constexpr auto backup_dir = "backup";
const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto suyu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto file_name =
fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, ""));
const Common::FS::IOFile keys_file{yuzu_amiibo_dir / backup_dir / file_name,
const Common::FS::IOFile keys_file{suyu_amiibo_dir / backup_dir / file_name,
Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@@ -1313,21 +1313,21 @@ Result NfcDevice::WriteBackupData(const UniqueSerialNumber& uid, std::size_t uui
std::span<const u8> data) {
ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size");
constexpr auto backup_dir = "backup";
const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto suyu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir);
const auto file_name =
fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, ""));
if (HasBackup(uid, uuid_size).IsError()) {
if (!Common::FS::CreateDir(yuzu_amiibo_dir / backup_dir)) {
if (!Common::FS::CreateDir(suyu_amiibo_dir / backup_dir)) {
return ResultBackupPathAlreadyExist;
}
if (!Common::FS::NewFile(yuzu_amiibo_dir / backup_dir / file_name)) {
if (!Common::FS::NewFile(suyu_amiibo_dir / backup_dir / file_name)) {
return ResultBackupPathAlreadyExist;
}
}
const Common::FS::IOFile keys_file{yuzu_amiibo_dir / backup_dir / file_name,
const Common::FS::IOFile keys_file{suyu_amiibo_dir / backup_dir / file_name,
Common::FS::FileAccessMode::ReadWrite,
Common::FS::FileType::BinaryFile};

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core.h"
@@ -396,11 +396,11 @@ void IGeneralService::GetCurrentNetworkProfile(HLERequestContext& ctx) {
.mtu{1500},
},
.uuid{0xdeadbeef, 0xdeadbeef},
.network_name{"yuzu Network"},
.network_name{"suyu Network"},
.wireless_setting_data{
.ssid_length{12},
.ssid{"yuzu Network"},
.passphrase{"yuzupassword"},
.ssid{"suyu Network"},
.passphrase{"suyupassword"},
},
};
}();

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-FileCopyrightText: 2022 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -13,8 +13,8 @@
#include "core/memory.h"
#include "video_core/host1x/host1x.h"
using Core::Memory::YUZU_PAGESIZE;
constexpr size_t BIG_PAGE_SIZE = YUZU_PAGESIZE * 16;
using Core::Memory::SUYU_PAGESIZE;
constexpr size_t BIG_PAGE_SIZE = SUYU_PAGESIZE * 16;
namespace Service::Nvidia::NvCore {
NvMap::Handle::Handle(u64 size_, Id id_)
@@ -32,7 +32,7 @@ NvResult NvMap::Handle::Alloc(Flags pFlags, u32 pAlign, u8 pKind, u64 pAddress,
flags = pFlags;
kind = pKind;
align = pAlign < YUZU_PAGESIZE ? YUZU_PAGESIZE : pAlign;
align = pAlign < SUYU_PAGESIZE ? SUYU_PAGESIZE : pAlign;
session_id = pSessionId;
// This flag is only applicable for handles with an address passed
@@ -43,7 +43,7 @@ NvResult NvMap::Handle::Alloc(Flags pFlags, u32 pAlign, u8 pKind, u64 pAddress,
"Mapping nvmap handles without a CPU side address is unimplemented!");
}
size = Common::AlignUp(size, YUZU_PAGESIZE);
size = Common::AlignUp(size, SUYU_PAGESIZE);
aligned_size = Common::AlignUp(size, align);
address = pAddress;
allocated = true;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-FileCopyrightText: 2021 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -152,7 +152,7 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) {
return NvResult::BadValue;
}
if (params.page_size != VM::YUZU_PAGESIZE && params.page_size != vm.big_page_size) {
if (params.page_size != VM::SUYU_PAGESIZE && params.page_size != vm.big_page_size) {
return NvResult::BadValue;
}
@@ -162,10 +162,10 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) {
return NvResult::NotImplemented;
}
const u32 page_size_bits{params.page_size == VM::YUZU_PAGESIZE ? VM::PAGE_SIZE_BITS
const u32 page_size_bits{params.page_size == VM::SUYU_PAGESIZE ? VM::PAGE_SIZE_BITS
: vm.big_page_size_bits};
auto& allocator{params.page_size == VM::YUZU_PAGESIZE ? *vm.small_page_allocator
auto& allocator{params.page_size == VM::SUYU_PAGESIZE ? *vm.small_page_allocator
: *vm.big_page_allocator};
if ((params.flags & MappingFlags::Fixed) != MappingFlags::None) {
@@ -189,7 +189,7 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) {
.mappings{},
.page_size = params.page_size,
.sparse = (params.flags & MappingFlags::Sparse) != MappingFlags::None,
.big_pages = params.page_size != VM::YUZU_PAGESIZE,
.big_pages = params.page_size != VM::SUYU_PAGESIZE,
};
return NvResult::Success;
@@ -201,7 +201,7 @@ void nvhost_as_gpu::FreeMappingLocked(u64 offset) {
if (!mapping->fixed) {
auto& allocator{mapping->big_page ? *vm.big_page_allocator : *vm.small_page_allocator};
u32 page_size_bits{mapping->big_page ? vm.big_page_size_bits : VM::PAGE_SIZE_BITS};
u32 page_size{mapping->big_page ? vm.big_page_size : VM::YUZU_PAGESIZE};
u32 page_size{mapping->big_page ? vm.big_page_size : VM::SUYU_PAGESIZE};
u64 aligned_size{Common::AlignUp(mapping->size, page_size)};
allocator.Free(static_cast<u32>(mapping->offset >> page_size_bits),
@@ -248,9 +248,9 @@ NvResult nvhost_as_gpu::FreeSpace(IoctlFreeSpace& params) {
gmmu->Unmap(params.offset, allocation.size);
}
auto& allocator{params.page_size == VM::YUZU_PAGESIZE ? *vm.small_page_allocator
auto& allocator{params.page_size == VM::SUYU_PAGESIZE ? *vm.small_page_allocator
: *vm.big_page_allocator};
u32 page_size_bits{params.page_size == VM::YUZU_PAGESIZE ? VM::PAGE_SIZE_BITS
u32 page_size_bits{params.page_size == VM::SUYU_PAGESIZE ? VM::PAGE_SIZE_BITS
: vm.big_page_size_bits};
allocator.Free(static_cast<u32>(params.offset >> page_size_bits),
@@ -360,7 +360,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
bool big_page{[&]() {
if (Common::IsAligned(handle->align, vm.big_page_size)) {
return true;
} else if (Common::IsAligned(handle->align, VM::YUZU_PAGESIZE)) {
} else if (Common::IsAligned(handle->align, VM::SUYU_PAGESIZE)) {
return false;
} else {
ASSERT(false);
@@ -387,7 +387,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
mapping_map[params.offset] = mapping;
} else {
auto& allocator{big_page ? *vm.big_page_allocator : *vm.small_page_allocator};
u32 page_size{big_page ? vm.big_page_size : VM::YUZU_PAGESIZE};
u32 page_size{big_page ? vm.big_page_size : VM::SUYU_PAGESIZE};
u32 page_size_bits{big_page ? vm.big_page_size_bits : VM::PAGE_SIZE_BITS};
params.offset = static_cast<u64>(allocator.Allocate(
@@ -461,7 +461,7 @@ void nvhost_as_gpu::GetVARegionsImpl(IoctlGetVaRegions& params) {
params.regions = std::array<VaRegion, 2>{
VaRegion{
.offset = vm.small_page_allocator->GetVAStart() << VM::PAGE_SIZE_BITS,
.page_size = VM::YUZU_PAGESIZE,
.page_size = VM::SUYU_PAGESIZE,
._pad0_{},
.pages = vm.small_page_allocator->GetVALimit() - vm.small_page_allocator->GetVAStart(),
},

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-FileCopyrightText: 2021 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -190,8 +190,8 @@ private:
std::mutex mutex; //!< Locks all AS operations
struct VM {
static constexpr u32 YUZU_PAGESIZE{0x1000};
static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(YUZU_PAGESIZE)};
static constexpr u32 SUYU_PAGESIZE{0x1000};
static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(SUYU_PAGESIZE)};
static constexpr u32 SUPPORTED_BIG_PAGE_SIZES{0x30000};
static constexpr u32 DEFAULT_BIG_PAGE_SIZE{0x20000};

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -17,7 +17,7 @@
#include "core/hle/service/nvdrv/devices/nvmap.h"
#include "core/memory.h"
using Core::Memory::YUZU_PAGESIZE;
using Core::Memory::SUYU_PAGESIZE;
namespace Service::Nvidia::Devices {
@@ -82,7 +82,7 @@ NvResult nvmap::IocCreate(IocCreateParams& params) {
std::shared_ptr<NvCore::NvMap::Handle> handle_description{};
auto result =
file.CreateHandle(Common::AlignUp(params.size, YUZU_PAGESIZE), handle_description);
file.CreateHandle(Common::AlignUp(params.size, SUYU_PAGESIZE), handle_description);
if (result != NvResult::Success) {
LOG_CRITICAL(Service_NVDRV, "Failed to create Object");
return result;
@@ -108,8 +108,8 @@ NvResult nvmap::IocAlloc(IocAllocParams& params, DeviceFD fd) {
}
// Force page size alignment at a minimum
if (params.align < YUZU_PAGESIZE) {
params.align = YUZU_PAGESIZE;
if (params.align < SUYU_PAGESIZE) {
params.align = SUYU_PAGESIZE;
}
auto handle_description{file.GetHandle(params.handle)};

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <mbedtls/sha256.h>
@@ -228,10 +228,10 @@ struct ProcessContext {
R_UNLESS(bss_size == expected_bss_size, RO::ResultInvalidNro);
// Validate all sizes are aligned.
R_UNLESS(Common::IsAligned(text_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(ro_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(rw_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(bss_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(text_size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(ro_size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(rw_size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidNro);
R_UNLESS(Common::IsAligned(bss_size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidNro);
// Validate sections are in order.
R_UNLESS(text_ofs <= ro_ofs, RO::ResultInvalidNro);
@@ -286,16 +286,16 @@ private:
};
Result ValidateAddressAndNonZeroSize(u64 address, u64 size) {
R_UNLESS(Common::IsAligned(address, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidAddress);
R_UNLESS(Common::IsAligned(address, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidAddress);
R_UNLESS(size != 0, RO::ResultInvalidSize);
R_UNLESS(Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidSize);
R_UNLESS(Common::IsAligned(size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidSize);
R_UNLESS(address < address + size, RO::ResultInvalidSize);
R_SUCCEED();
}
Result ValidateAddressAndSize(u64 address, u64 size) {
R_UNLESS(Common::IsAligned(address, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidAddress);
R_UNLESS(Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidSize);
R_UNLESS(Common::IsAligned(address, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidAddress);
R_UNLESS(Common::IsAligned(size, Core::Memory::SUYU_PAGESIZE), RO::ResultInvalidSize);
R_UNLESS(size == 0 || address < address + size, RO::ResultInvalidSize);
R_SUCCEED();
}
@@ -369,7 +369,7 @@ public:
ASSERT(context != nullptr);
// Validate address.
R_UNLESS(Common::IsAligned(nrr_address, Core::Memory::YUZU_PAGESIZE),
R_UNLESS(Common::IsAligned(nrr_address, Core::Memory::SUYU_PAGESIZE),
RO::ResultInvalidAddress);
// Check the NRR is loaded.
@@ -436,7 +436,7 @@ public:
ASSERT(context != nullptr);
// Validate address.
R_UNLESS(Common::IsAligned(nro_address, Core::Memory::YUZU_PAGESIZE),
R_UNLESS(Common::IsAligned(nro_address, Core::Memory::SUYU_PAGESIZE),
RO::ResultInvalidAddress);
// Check the NRO is loaded.

View File

@@ -932,7 +932,7 @@ Result ISystemSettingsServer::SetPrimaryAlbumStorage(PrimaryAlbumStorage primary
Result ISystemSettingsServer::GetBatteryLot(Out<BatteryLot> out_battery_lot) {
LOG_INFO(Service_SET, "called");
*out_battery_lot = {"YUZU0EMULATOR14022024"};
*out_battery_lot = {"SUYU0EMULATOR14022024"};
R_SUCCEED();
}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <mutex>
@@ -34,7 +34,7 @@ static void OneTimeInit() {
SCH_USE_STRONG_CRYPTO | // don't allow insecure protocols
SCH_CRED_NO_SERVERNAME_CHECK | // don't validate server names
SCH_CRED_NO_DEFAULT_CREDS; // don't automatically present a client certificate
// ^ I'm assuming that nobody would want to connect Yuzu to a
// ^ I'm assuming that nobody would want to connect Suyu to a
// service that requires some OS-provided corporate client
// certificate, and presenting one to some arbitrary server
// might be a privacy concern? Who knows, though.

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <random>
@@ -23,7 +23,7 @@ namespace {
Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_group,
Core::System& system, u32 size) {
using Core::Memory::YUZU_PAGESIZE;
using Core::Memory::SUYU_PAGESIZE;
// Allocate memory for the system shared buffer.
auto& kernel = system.Kernel();
@@ -34,7 +34,7 @@ Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_
// Allocate memory from secure pool.
R_TRY(kernel.MemoryManager().AllocateAndOpen(
pg.get(), size / YUZU_PAGESIZE,
pg.get(), size / SUYU_PAGESIZE,
Kernel::KMemoryManager::EncodeOption(Kernel::KMemoryManager::Pool::Secure,
Kernel::KMemoryManager::Direction::FromBack)));
@@ -58,13 +58,13 @@ Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_
Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_address,
std::unique_ptr<Kernel::KPageGroup>& pg,
Kernel::KProcess* process, Core::System& system) {
using Core::Memory::YUZU_PAGESIZE;
using Core::Memory::SUYU_PAGESIZE;
auto& page_table = process->GetPageTable();
// Get bounds of where mapping is possible.
const VAddr alias_code_begin = GetInteger(page_table.GetAliasCodeRegionStart());
const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / YUZU_PAGESIZE;
const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / SUYU_PAGESIZE;
const auto state = Kernel::KMemoryState::IoMemory;
const auto perm = Kernel::KMemoryPermission::UserReadWrite;
std::mt19937_64 rng{process->GetRandomEntropy(0)};
@@ -73,7 +73,7 @@ Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_ad
Result res = ResultSuccess;
int i;
for (i = 0; i < 64; i++) {
*out_map_address = alias_code_begin + ((rng() % alias_code_size) * YUZU_PAGESIZE);
*out_map_address = alias_code_begin + ((rng() % alias_code_size) * SUYU_PAGESIZE);
res = page_table.MapPageGroup(*out_map_address, *pg, state, perm);
if (R_SUCCEEDED(res)) {
break;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <cstring>
@@ -14,7 +14,7 @@ namespace Loader {
namespace {
constexpr u32 PageAlignSize(u32 size) {
return static_cast<u32>((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK);
return static_cast<u32>((size + Core::Memory::SUYU_PAGEMASK) & ~Core::Memory::SUYU_PAGEMASK);
}
} // Anonymous namespace

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <utility>
@@ -140,7 +140,7 @@ bool AppLoader_NRO::IsHomebrew() {
}
static constexpr u32 PageAlignSize(u32 size) {
return static_cast<u32>((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK);
return static_cast<u32>((size + Core::Memory::SUYU_PAGEMASK) & ~Core::Memory::SUYU_PAGEMASK);
}
static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <cinttypes>
@@ -49,7 +49,7 @@ std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data,
}
constexpr u32 PageAlignSize(u32 size) {
return static_cast<u32>((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK);
return static_cast<u32>((size + Core::Memory::SUYU_PAGEMASK) & ~Core::Memory::SUYU_PAGEMASK);
}
} // Anonymous namespace

View File

@@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
// SPDX-FileCopyrightText: 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -67,11 +67,11 @@ struct Memory::Impl {
void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,
Common::PhysicalAddress target, Common::MemoryPermission perms,
bool separate_heap) {
ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
ASSERT_MSG((size & SUYU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & SUYU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
ASSERT_MSG(target >= DramMemoryMap::Base, "Out of bounds target: {:016X}",
GetInteger(target));
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, target,
MapPages(page_table, base / SUYU_PAGESIZE, size / SUYU_PAGESIZE, target,
Common::PageType::Memory);
if (current_page_table->fastmem_arena) {
@@ -82,9 +82,9 @@ struct Memory::Impl {
void UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,
bool separate_heap) {
ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, 0,
ASSERT_MSG((size & SUYU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & SUYU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
MapPages(page_table, base / SUYU_PAGESIZE, size / SUYU_PAGESIZE, 0,
Common::PageType::Unmapped);
if (current_page_table->fastmem_arena) {
@@ -94,8 +94,8 @@ struct Memory::Impl {
void ProtectRegion(Common::PageTable& page_table, VAddr vaddr, u64 size,
Common::MemoryPermission perms) {
ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((vaddr & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", vaddr);
ASSERT_MSG((size & SUYU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((vaddr & SUYU_PAGEMASK) == 0, "non-page aligned base: {:016X}", vaddr);
if (!current_page_table->fastmem_arena) {
return;
@@ -103,9 +103,9 @@ struct Memory::Impl {
u64 protect_bytes{};
u64 protect_begin{};
for (u64 addr = vaddr; addr < vaddr + size; addr += YUZU_PAGESIZE) {
for (u64 addr = vaddr; addr < vaddr + size; addr += SUYU_PAGESIZE) {
const Common::PageType page_type{
current_page_table->pointers[addr >> YUZU_PAGEBITS].Type()};
current_page_table->pointers[addr >> SUYU_PAGEBITS].Type()};
switch (page_type) {
case Common::PageType::RasterizerCachedMemory:
if (protect_bytes > 0) {
@@ -117,7 +117,7 @@ struct Memory::Impl {
if (protect_bytes == 0) {
protect_begin = addr;
}
protect_bytes += YUZU_PAGESIZE;
protect_bytes += SUYU_PAGESIZE;
}
}
@@ -128,7 +128,7 @@ struct Memory::Impl {
[[nodiscard]] u8* GetPointerFromRasterizerCachedMemory(u64 vaddr) const {
const Common::PhysicalAddress paddr{
current_page_table->backing_addr[vaddr >> YUZU_PAGEBITS]};
current_page_table->backing_addr[vaddr >> SUYU_PAGEBITS]};
if (!paddr) {
return {};
@@ -139,7 +139,7 @@ struct Memory::Impl {
[[nodiscard]] u8* GetPointerFromDebugMemory(u64 vaddr) const {
const Common::PhysicalAddress paddr{
current_page_table->backing_addr[vaddr >> YUZU_PAGEBITS]};
current_page_table->backing_addr[vaddr >> SUYU_PAGEBITS]};
if (paddr == 0) {
return {};
@@ -248,8 +248,8 @@ struct Memory::Impl {
auto on_memory, auto on_rasterizer, auto increment) {
const auto& page_table = *current_page_table;
std::size_t remaining_size = size;
std::size_t page_index = addr >> YUZU_PAGEBITS;
std::size_t page_offset = addr & YUZU_PAGEMASK;
std::size_t page_index = addr >> SUYU_PAGEBITS;
std::size_t page_offset = addr & SUYU_PAGEMASK;
bool user_accessible = true;
if (!AddressSpaceContains(page_table, addr, size)) [[unlikely]] {
@@ -259,9 +259,9 @@ struct Memory::Impl {
while (remaining_size) {
const std::size_t copy_amount =
std::min(static_cast<std::size_t>(YUZU_PAGESIZE) - page_offset, remaining_size);
std::min(static_cast<std::size_t>(SUYU_PAGESIZE) - page_offset, remaining_size);
const auto current_vaddr =
static_cast<u64>((page_index << YUZU_PAGEBITS) + page_offset);
static_cast<u64>((page_index << SUYU_PAGEBITS) + page_offset);
const auto [pointer, type] = page_table.pointers[page_index].PointerType();
switch (type) {
@@ -272,7 +272,7 @@ struct Memory::Impl {
}
case Common::PageType::Memory: {
u8* mem_ptr =
reinterpret_cast<u8*>(pointer + page_offset + (page_index << YUZU_PAGEBITS));
reinterpret_cast<u8*>(pointer + page_offset + (page_index << SUYU_PAGEBITS));
on_memory(copy_amount, mem_ptr);
break;
}
@@ -337,16 +337,16 @@ struct Memory::Impl {
}
const u8* GetSpan(const VAddr src_addr, const std::size_t size) const {
if (current_page_table->blocks[src_addr >> YUZU_PAGEBITS] ==
current_page_table->blocks[(src_addr + size) >> YUZU_PAGEBITS]) {
if (current_page_table->blocks[src_addr >> SUYU_PAGEBITS] ==
current_page_table->blocks[(src_addr + size) >> SUYU_PAGEBITS]) {
return GetPointerSilent(src_addr);
}
return nullptr;
}
u8* GetSpan(const VAddr src_addr, const std::size_t size) {
if (current_page_table->blocks[src_addr >> YUZU_PAGEBITS] ==
current_page_table->blocks[(src_addr + size) >> YUZU_PAGEBITS]) {
if (current_page_table->blocks[src_addr >> SUYU_PAGEBITS] ==
current_page_table->blocks[(src_addr + size) >> SUYU_PAGEBITS]) {
return GetPointerSilent(src_addr);
}
return nullptr;
@@ -500,10 +500,10 @@ struct Memory::Impl {
// Iterate over a contiguous CPU address space, marking/unmarking the region.
// The region is at a granularity of CPU pages.
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
const u64 num_pages = ((vaddr + size - 1) >> SUYU_PAGEBITS) - (vaddr >> SUYU_PAGEBITS) + 1;
for (u64 i = 0; i < num_pages; ++i, vaddr += SUYU_PAGESIZE) {
const Common::PageType page_type{
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Type()};
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Type()};
if (debug) {
// Switch page type to debug if now debug
switch (page_type) {
@@ -515,7 +515,7 @@ struct Memory::Impl {
// Page is already marked.
break;
case Common::PageType::Memory:
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store(
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Store(
0, Common::PageType::DebugMemory);
break;
default:
@@ -532,9 +532,9 @@ struct Memory::Impl {
// Don't mess with already non-debug or rasterizer memory.
break;
case Common::PageType::DebugMemory: {
u8* const pointer{GetPointerFromDebugMemory(vaddr & ~YUZU_PAGEMASK)};
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store(
reinterpret_cast<uintptr_t>(pointer) - (vaddr & ~YUZU_PAGEMASK),
u8* const pointer{GetPointerFromDebugMemory(vaddr & ~SUYU_PAGEMASK)};
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Store(
reinterpret_cast<uintptr_t>(pointer) - (vaddr & ~SUYU_PAGEMASK),
Common::PageType::Memory);
break;
}
@@ -566,10 +566,10 @@ struct Memory::Impl {
// granularity of CPU pages, hence why we iterate on a CPU page basis (note: GPU page size
// is different). This assumes the specified GPU address region is contiguous as well.
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
const u64 num_pages = ((vaddr + size - 1) >> SUYU_PAGEBITS) - (vaddr >> SUYU_PAGEBITS) + 1;
for (u64 i = 0; i < num_pages; ++i, vaddr += SUYU_PAGESIZE) {
const Common::PageType page_type{
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Type()};
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Type()};
if (cached) {
// Switch page type to cached if now cached
switch (page_type) {
@@ -579,7 +579,7 @@ struct Memory::Impl {
break;
case Common::PageType::DebugMemory:
case Common::PageType::Memory:
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store(
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Store(
0, Common::PageType::RasterizerCachedMemory);
break;
case Common::PageType::RasterizerCachedMemory:
@@ -602,16 +602,16 @@ struct Memory::Impl {
// that this area is already unmarked as cached.
break;
case Common::PageType::RasterizerCachedMemory: {
u8* const pointer{GetPointerFromRasterizerCachedMemory(vaddr & ~YUZU_PAGEMASK)};
u8* const pointer{GetPointerFromRasterizerCachedMemory(vaddr & ~SUYU_PAGEMASK)};
if (pointer == nullptr) {
// It's possible that this function has been called while updating the
// pagetable after unmapping a VMA. In that case the underlying VMA will no
// longer exist, and we should just leave the pagetable entry blank.
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store(
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Store(
0, Common::PageType::Unmapped);
} else {
current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store(
reinterpret_cast<uintptr_t>(pointer) - (vaddr & ~YUZU_PAGEMASK),
current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Store(
reinterpret_cast<uintptr_t>(pointer) - (vaddr & ~SUYU_PAGEMASK),
Common::PageType::Memory);
}
break;
@@ -637,7 +637,7 @@ struct Memory::Impl {
auto base = GetInteger(base_address);
LOG_DEBUG(HW_Memory, "Mapping {:016X} onto {:016X}-{:016X}", GetInteger(target),
base * YUZU_PAGESIZE, (base + size) * YUZU_PAGESIZE);
base * SUYU_PAGESIZE, (base + size) * SUYU_PAGESIZE);
const auto end = base + size;
ASSERT_MSG(end <= page_table.pointers.size(), "out of range mapping at {:016X}",
@@ -645,7 +645,7 @@ struct Memory::Impl {
if (!target) {
ASSERT_MSG(type != Common::PageType::Memory,
"Mapping memory page without a pointer @ {:016x}", base * YUZU_PAGESIZE);
"Mapping memory page without a pointer @ {:016x}", base * SUYU_PAGESIZE);
while (base != end) {
page_table.pointers[base].Store(0, type);
@@ -658,17 +658,17 @@ struct Memory::Impl {
while (base != end) {
auto host_ptr =
reinterpret_cast<uintptr_t>(system.DeviceMemory().GetPointer<u8>(target)) -
(base << YUZU_PAGEBITS);
auto backing = GetInteger(target) - (base << YUZU_PAGEBITS);
(base << SUYU_PAGEBITS);
auto backing = GetInteger(target) - (base << SUYU_PAGEBITS);
page_table.pointers[base].Store(host_ptr, type);
page_table.backing_addr[base] = backing;
page_table.blocks[base] = orig_base << YUZU_PAGEBITS;
page_table.blocks[base] = orig_base << SUYU_PAGEBITS;
ASSERT_MSG(page_table.pointers[base].Pointer(),
"memory mapping base yield a nullptr within the table");
base += 1;
target += YUZU_PAGESIZE;
target += SUYU_PAGESIZE;
}
}
}
@@ -683,7 +683,7 @@ struct Memory::Impl {
}
// Avoid adding any extra logic to this fast-path block
const uintptr_t raw_pointer = current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Raw();
const uintptr_t raw_pointer = current_page_table->pointers[vaddr >> SUYU_PAGEBITS].Raw();
if (const uintptr_t pointer = Common::PageTable::PageInfo::ExtractPointer(raw_pointer)) {
return reinterpret_cast<u8*>(pointer + vaddr);
}
@@ -838,7 +838,7 @@ struct Memory::Impl {
};
gpu_device_memory->ApplyOpOnPointer(p, scratch_buffers[core], [&](DAddr address) {
auto& current_area = rasterizer_write_areas[core];
PAddr subaddress = address >> YUZU_PAGEBITS;
PAddr subaddress = address >> SUYU_PAGEBITS;
bool do_collection = current_area.last_address == subaddress;
if (!do_collection) [[unlikely]] {
do_collection = system.GPU().OnCPUWrite(address, size);
@@ -926,7 +926,7 @@ void Memory::ProtectRegion(Common::PageTable& page_table, Common::ProcessAddress
bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const {
const auto& page_table = *impl->current_page_table;
const size_t page = vaddr >> YUZU_PAGEBITS;
const size_t page = vaddr >> SUYU_PAGEBITS;
if (page >= page_table.pointers.size()) {
return false;
}
@@ -937,9 +937,9 @@ bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const {
bool Memory::IsValidVirtualAddressRange(Common::ProcessAddress base, u64 size) const {
Common::ProcessAddress end = base + size;
Common::ProcessAddress page = Common::AlignDown(GetInteger(base), YUZU_PAGESIZE);
Common::ProcessAddress page = Common::AlignDown(GetInteger(base), SUYU_PAGESIZE);
for (; page < end; page += YUZU_PAGESIZE) {
for (; page < end; page += SUYU_PAGESIZE) {
if (!IsValidVirtualAddress(page)) {
return false;
}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -39,9 +39,9 @@ namespace Core::Memory {
* Page size used by the ARM architecture. This is the smallest granularity with which memory can
* be mapped.
*/
constexpr std::size_t YUZU_PAGEBITS = 12;
constexpr u64 YUZU_PAGESIZE = 1ULL << YUZU_PAGEBITS;
constexpr u64 YUZU_PAGEMASK = YUZU_PAGESIZE - 1;
constexpr std::size_t SUYU_PAGEBITS = 12;
constexpr u64 SUYU_PAGESIZE = 1ULL << SUYU_PAGEBITS;
constexpr u64 SUYU_PAGEMASK = SUYU_PAGESIZE - 1;
/// Virtual user-space memory regions
enum : u64 {

View File

@@ -261,7 +261,7 @@ struct CheatVmOpcode {
class DmntCheatVm {
public:
/// Helper Type for DmntCheatVm <=> yuzu Interface
/// Helper Type for DmntCheatVm <=> suyu Interface
class Callbacks {
public:
virtual ~Callbacks();

View File

@@ -51,7 +51,7 @@ void SaveToFile(const json& json, const std::filesystem::path& filename) {
file << std::setw(4) << json << std::endl;
}
json GetYuzuVersionData() {
json GetSuyuVersionData() {
return {
{"scm_rev", std::string(Common::g_scm_rev)},
{"scm_branch", std::string(Common::g_scm_branch)},
@@ -112,7 +112,7 @@ json GetProcessorStateData(const std::string& architecture, u64 entry_point, u64
json GetFullDataAuto(const std::string& timestamp, u64 title_id, Core::System& system) {
json out;
out["yuzu_version"] = GetYuzuVersionData();
out["suyu_version"] = GetSuyuVersionData();
out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp);
return out;
@@ -180,7 +180,7 @@ void Reporter::SaveCrashReport(u64 title_id, Result result, u64 set_flags, u64 e
const auto timestamp = GetTimestamp();
json out;
out["yuzu_version"] = GetYuzuVersionData();
out["suyu_version"] = GetSuyuVersionData();
out["report_common"] = GetReportCommonData(title_id, result, timestamp);
auto proc_out = GetProcessorStateData(arch, entry_point, sp, pc, pstate, registers, backtrace);
@@ -291,7 +291,7 @@ void Reporter::SavePlayReport(PlayReportType type, u64 title_id,
const auto timestamp = GetTimestamp();
json out;
out["yuzu_version"] = GetYuzuVersionData();
out["suyu_version"] = GetSuyuVersionData();
out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp, user_id);
auto data_out = json::array();
@@ -319,7 +319,7 @@ void Reporter::SaveErrorReport(u64 title_id, Result result,
const auto timestamp = GetTimestamp();
json out;
out["yuzu_version"] = GetYuzuVersionData();
out["suyu_version"] = GetSuyuVersionData();
out["report_common"] = GetReportCommonData(title_id, result, timestamp);
out["error_custom_text"] = {

View File

@@ -35,7 +35,7 @@ static u64 GenerateTelemetryId() {
mbedtls_entropy_context entropy;
mbedtls_entropy_init(&entropy);
mbedtls_ctr_drbg_context ctr_drbg;
static constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}};
static constexpr std::array<char, 18> personalization{{"suyu Telemetry ID"}};
mbedtls_ctr_drbg_init(&ctr_drbg);
ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
@@ -192,8 +192,8 @@ TelemetrySession::~TelemetrySession() {
#ifdef ENABLE_WEB_SERVICE
auto backend = std::make_unique<WebService::TelemetryJson>(
Settings::values.web_api_url.GetValue(), Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
Settings::values.web_api_url.GetValue(), Settings::values.suyu_username.GetValue(),
Settings::values.suyu_token.GetValue());
#else
auto backend = std::make_unique<Telemetry::NullVisitor>();
#endif
@@ -282,8 +282,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader,
bool TelemetrySession::SubmitTestcase() {
#ifdef ENABLE_WEB_SERVICE
auto backend = std::make_unique<WebService::TelemetryJson>(
Settings::values.web_api_url.GetValue(), Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
Settings::values.web_api_url.GetValue(), Settings::values.suyu_username.GetValue(),
Settings::values.suyu_token.GetValue());
field_collection.Accept(*backend);
return backend->SubmitTestcase();
#else

View File

@@ -92,8 +92,8 @@ u64 RegenerateTelemetryId();
/**
* Verifies the username and token.
* @param username yuzu username to use for authentication.
* @param token yuzu token to use for authentication.
* @param username suyu username to use for authentication.
* @param token suyu token to use for authentication.
* @returns Future with bool indicating whether the verification succeeded
*/
bool VerifyLogin(const std::string& username, const std::string& token);

View File

@@ -1,30 +1,30 @@
# SPDX-FileCopyrightText: 2017 Citra Emulator Project
# SPDX-FileCopyrightText: 2017 Citra Emulator Project & 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
add_executable(yuzu-room
add_executable(suyu-room
precompiled_headers.h
yuzu_room.cpp
yuzu_room.rc
suyu_room.cpp
suyu_room.rc
)
target_link_libraries(yuzu-room PRIVATE common network)
target_link_libraries(suyu-room PRIVATE common network)
if (ENABLE_WEB_SERVICE)
target_compile_definitions(yuzu-room PRIVATE -DENABLE_WEB_SERVICE)
target_link_libraries(yuzu-room PRIVATE web_service)
target_compile_definitions(suyu-room PRIVATE -DENABLE_WEB_SERVICE)
target_link_libraries(suyu-room PRIVATE web_service)
endif()
target_link_libraries(yuzu-room PRIVATE mbedtls mbedcrypto)
target_link_libraries(suyu-room PRIVATE mbedtls mbedcrypto)
if (MSVC)
target_link_libraries(yuzu-room PRIVATE getopt)
target_link_libraries(suyu-room PRIVATE getopt)
endif()
target_link_libraries(yuzu-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
target_link_libraries(suyu-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
if(UNIX AND NOT APPLE)
install(TARGETS yuzu-room)
install(TARGETS suyu-room)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(yuzu-room PRIVATE precompiled_headers.h)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(suyu-room PRIVATE precompiled_headers.h)
endif()
create_target_directory_groups(yuzu-room)
create_target_directory_groups(suyu-room)

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <chrono>
@@ -57,22 +57,22 @@ static void PrintHelp(const char* argv0) {
"--preferred-game-id The preferred game-id for this room\n"
"--username The username used for announce\n"
"--token The token used for announce\n"
"--web-api-url yuzu Web API url\n"
"--web-api-url suyu Web API url\n"
"--ban-list-file The file for storing the room ban list\n"
"--log-file The file for storing the room log\n"
"--enable-yuzu-mods Allow yuzu Community Moderators to moderate on your room\n"
"--enable-suyu-mods Allow suyu Community Moderators to moderate on your room\n"
"-h, --help Display this help and exit\n"
"-v, --version Output version information and exit\n",
argv0);
}
static void PrintVersion() {
LOG_INFO(Network, "yuzu dedicated room {} {} Libnetwork: {}", Common::g_scm_branch,
LOG_INFO(Network, "suyu dedicated room {} {} Libnetwork: {}", Common::g_scm_branch,
Common::g_scm_desc, Network::network_version);
}
/// The magic text at the beginning of a yuzu-room ban list file.
static constexpr char BanListMagic[] = "YuzuRoom-BanList-1";
/// The magic text at the beginning of a suyu-room ban list file.
static constexpr char BanListMagic[] = "SuyuRoom-BanList-1";
static constexpr char token_delimiter{':'};
@@ -195,12 +195,12 @@ int main(int argc, char** argv) {
std::string token;
std::string web_api_url;
std::string ban_list_file;
std::string log_file = "yuzu-room.log";
std::string log_file = "suyu-room.log";
std::string bind_address;
u64 preferred_game_id = 0;
u32 port = Network::DefaultRoomPort;
u32 max_members = 16;
bool enable_yuzu_mods = false;
bool enable_suyu_mods = false;
static struct option long_options[] = {
{"room-name", required_argument, 0, 'n'},
@@ -216,7 +216,7 @@ int main(int argc, char** argv) {
{"web-api-url", required_argument, 0, 'a'},
{"ban-list-file", required_argument, 0, 'b'},
{"log-file", required_argument, 0, 'l'},
{"enable-yuzu-mods", no_argument, 0, 'e'},
{"enable-suyu-mods", no_argument, 0, 'e'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{0, 0, 0, 0},
@@ -269,7 +269,7 @@ int main(int argc, char** argv) {
log_file.assign(optarg);
break;
case 'e':
enable_yuzu_mods = true;
enable_suyu_mods = true;
break;
case 'h':
PrintHelp(argv[0]);
@@ -328,19 +328,19 @@ int main(int argc, char** argv) {
LOG_INFO(Network, "Hosting a public room");
Settings::values.web_api_url = web_api_url;
PadToken(token);
Settings::values.yuzu_username = UsernameFromDisplayToken(token);
username = Settings::values.yuzu_username.GetValue();
Settings::values.yuzu_token = TokenFromDisplayToken(token);
Settings::values.suyu_username = UsernameFromDisplayToken(token);
username = Settings::values.suyu_username.GetValue();
Settings::values.suyu_token = TokenFromDisplayToken(token);
} else {
LOG_INFO(Network, "Hosting a public room");
Settings::values.web_api_url = web_api_url;
Settings::values.yuzu_username = username;
Settings::values.yuzu_token = token;
Settings::values.suyu_username = username;
Settings::values.suyu_token = token;
}
}
if (!announce && enable_yuzu_mods) {
enable_yuzu_mods = false;
LOG_INFO(Network, "Can not enable yuzu Moderators for private rooms");
if (!announce && enable_suyu_mods) {
enable_suyu_mods = false;
LOG_INFO(Network, "Can not enable suyu Moderators for private rooms");
}
// Load the ban list
@@ -356,7 +356,7 @@ int main(int argc, char** argv) {
std::make_unique<WebService::VerifyUserJWT>(Settings::values.web_api_url.GetValue());
#else
LOG_INFO(Network,
"yuzu Web Services is not available with this build: validation is disabled.");
"suyu Web Services is not available with this build: validation is disabled.");
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
#endif
} else {
@@ -370,7 +370,7 @@ int main(int argc, char** argv) {
.id = preferred_game_id};
if (!room->Create(room_name, room_description, bind_address, static_cast<u16>(port),
password, max_members, username, preferred_game_info,
std::move(verify_backend), ban_list, enable_yuzu_mods)) {
std::move(verify_backend), ban_list, enable_suyu_mods)) {
LOG_INFO(Network, "Failed to create room: ");
return -1;
}

View File

@@ -161,6 +161,6 @@ endif()
create_target_directory_groups(hid_core)
target_link_libraries(hid_core PUBLIC core)
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(hid_core PRIVATE precompiled_headers.h)
endif()

View File

@@ -405,7 +405,7 @@ void NPad::RequestPadStateUpdate(u64 aruid, Core::HID::NpadIdType npad_id) {
InitNewlyAddedController(aruid, npad_id);
}
// This function is unique to yuzu for the turbo buttons and motion to work properly
// This function is unique to suyu for the turbo buttons and motion to work properly
controller.device->StatusUpdate();
auto& pad_entry = controller.npad_pad_state;

View File

@@ -89,7 +89,7 @@ endif()
create_target_directory_groups(input_common)
target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers)
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(input_common PRIVATE precompiled_headers.h)
endif()

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include <set>
@@ -28,8 +28,8 @@ void Android::RegisterController(jobject j_input_device) {
auto env = Common::Android::GetEnvForThread();
const std::string guid = Common::Android::GetJString(
env, static_cast<jstring>(
env->CallObjectMethod(j_input_device, Common::Android::GetYuzuDeviceGetGUID())));
const s32 port = env->CallIntMethod(j_input_device, Common::Android::GetYuzuDeviceGetPort());
env->CallObjectMethod(j_input_device, Common::Android::GetSuyuDeviceGetGUID())));
const s32 port = env->CallIntMethod(j_input_device, Common::Android::GetSuyuDeviceGetPort());
const auto identifier = GetIdentifier(guid, static_cast<size_t>(port));
PreSetController(identifier);
@@ -81,7 +81,7 @@ bool Android::IsVibrationEnabled([[maybe_unused]] const PadIdentifier& identifie
if (device != input_devices.end()) {
return Common::Android::RunJNIOnFiber<bool>([&](JNIEnv* env) {
return static_cast<bool>(env->CallBooleanMethod(
device->second, Common::Android::GetYuzuDeviceGetSupportsVibration()));
device->second, Common::Android::GetSuyuDeviceGetSupportsVibration()));
});
}
return false;
@@ -92,7 +92,7 @@ std::vector<Common::ParamPackage> Android::GetInputDevices() const {
auto env = Common::Android::GetEnvForThread();
for (const auto& [key, value] : input_devices) {
auto name_object = static_cast<jstring>(
env->CallObjectMethod(value, Common::Android::GetYuzuDeviceGetName()));
env->CallObjectMethod(value, Common::Android::GetSuyuDeviceGetName()));
const std::string name =
fmt::format("{} {}", Common::Android::GetJString(env, name_object), key.port);
devices.emplace_back(Common::ParamPackage{
@@ -107,7 +107,7 @@ std::vector<Common::ParamPackage> Android::GetInputDevices() const {
std::set<s32> Android::GetDeviceAxes(JNIEnv* env, jobject& j_device) const {
auto j_axes = static_cast<jobjectArray>(
env->CallObjectMethod(j_device, Common::Android::GetYuzuDeviceGetAxes()));
env->CallObjectMethod(j_device, Common::Android::GetSuyuDeviceGetAxes()));
std::set<s32> axes;
for (int i = 0; i < env->GetArrayLength(j_axes); ++i) {
jobject axis = env->GetObjectArrayElement(j_axes, i);
@@ -215,7 +215,7 @@ ButtonMapping Android::GetButtonMappingForDevice(const Common::ParamPackage& par
jintArray j_keys = env->NewIntArray(static_cast<int>(keycode_ids.size()));
env->SetIntArrayRegion(j_keys, 0, static_cast<int>(keycode_ids.size()), keycode_ids.data());
auto j_has_keys_object = static_cast<jbooleanArray>(
env->CallObjectMethod(j_device, Common::Android::GetYuzuDeviceHasKeys(), j_keys));
env->CallObjectMethod(j_device, Common::Android::GetSuyuDeviceHasKeys(), j_keys));
jboolean isCopy = false;
jboolean* j_has_keys = env->GetBooleanArrayElements(j_has_keys_object, &isCopy);
@@ -359,7 +359,7 @@ void Android::SendVibrations(JNIEnv* env, std::stop_token token) {
if (device != input_devices.end()) {
float average_intensity = static_cast<float>(
(request.vibration.high_amplitude + request.vibration.low_amplitude) / 2.0);
env->CallVoidMethod(device->second, Common::Android::GetYuzuDeviceVibrate(),
env->CallVoidMethod(device->second, Common::Android::GetSuyuDeviceVibrate(),
average_intensity);
}
}

View File

@@ -21,7 +21,7 @@ public:
/**
* Registers controller number to accept new inputs.
* @param j_input_device YuzuInputDevice object from the Android frontend to register.
* @param j_input_device SuyuInputDevice object from the Android frontend to register.
*/
void RegisterController(jobject j_input_device);
@@ -62,9 +62,9 @@ public:
std::vector<Common::ParamPackage> GetInputDevices() const override;
/**
* Gets the axes reported by the YuzuInputDevice.
* Gets the axes reported by the SuyuInputDevice.
* @param env JNI environment pointer.
* @param j_device YuzuInputDevice from the Android frontend.
* @param j_device SuyuInputDevice from the Android frontend.
* @return Set of the axes reported by the underlying Android InputDevice
*/
std::set<s32> GetDeviceAxes(JNIEnv* env, jobject& j_device) const;

View File

@@ -489,7 +489,7 @@ void SDLDriver::CloseJoysticks() {
SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
// Set our application name. Currently passed to DBus by SDL and visible to the user through
// their desktop environment.
SDL_SetHint(SDL_HINT_APP_NAME, "yuzu");
SDL_SetHint(SDL_HINT_APP_NAME, "suyu");
if (!Settings::values.enable_raw_input) {
// Disable raw input. When enabled this setting causes SDL to die when a web applet opens

View File

@@ -11,7 +11,7 @@
#include "input_common/input_engine.h"
/*
To play back TAS scripts on Yuzu, select the folder with scripts in the configuration menu below
To play back TAS scripts on Suyu, select the folder with scripts in the configuration menu below
Tools -> Configure TAS. The file itself has normal text format and has to be called script0-1.txt
for controller 1, script0-2.txt for controller 2 and so forth (with max. 8 players).
@@ -26,7 +26,7 @@ A script file has the same format as TAS-nx uses, so final files will look like
46 KEY_A 32767;0 0;0
47 KEY_A 32767;0 0;0
After placing the file at the correct location, it can be read into Yuzu with the (default) hotkey
After placing the file at the correct location, it can be read into Suyu with the (default) hotkey
CTRL+F6 (refresh). In the bottom left corner, it will display the amount of frames the script file
has. Playback can be started or stopped using CTRL+F5.

View File

@@ -42,7 +42,7 @@ Common::Input::DriverResult JoyconDriver::RequestDeviceAccess(SDL_hid_device_inf
SDL_hid_open(device_info->vendor_id, device_info->product_id, device_info->serial_number);
std::memcpy(&handle_serial_number, device_info->serial_number, 15);
if (!hidapi_handle->handle) {
LOG_ERROR(Input, "Yuzu can't gain access to this device: ID {:04X}:{:04X}.",
LOG_ERROR(Input, "Suyu can't gain access to this device: ID {:04X}:{:04X}.",
device_info->vendor_id, device_info->product_id);
return Common::Input::DriverResult::HandleInUse;
}

View File

@@ -48,7 +48,7 @@ Common::Input::DriverResult JoyconCommonProtocol::CheckDeviceAccess(
SDL_hid_open(device_info->vendor_id, device_info->product_id, device_info->serial_number);
if (!hidapi_handle->handle) {
LOG_ERROR(Input, "Yuzu can't gain access to this device: ID {:04X}:{:04X}.",
LOG_ERROR(Input, "Suyu can't gain access to this device: ID {:04X}:{:04X}.",
device_info->vendor_id, device_info->product_id);
return Common::Input::DriverResult::HandleInUse;
}

View File

@@ -84,7 +84,7 @@ enum RegisterFlags : u8 {
struct Version {};
/**
* Requests the server to send information about what controllers are plugged into the ports
* In yuzu's case, we only have one controller, so for simplicity's sake, we can just send a
* In suyu's case, we only have one controller, so for simplicity's sake, we can just send a
* request explicitly for the first controller port and leave it at that. In the future it would be
* nice to make this configurable
*/

View File

@@ -184,7 +184,7 @@ public:
.raw_value = input_engine->GetAxis(identifier, axis_y),
.properties = properties_y,
};
// This is a workaround to keep compatibility with old yuzu versions. Vertical axis is
// This is a workaround to keep compatibility with old suyu versions. Vertical axis is
// inverted on SDL compared to Nintendo
if (invert_axis_y) {
status.y.raw_value = -status.y.raw_value;

View File

@@ -25,6 +25,6 @@ if (ENABLE_WEB_SERVICE)
target_link_libraries(network PRIVATE web_service)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(network PRIVATE precompiled_headers.h)
endif()

View File

@@ -23,8 +23,8 @@ AnnounceMultiplayerSession::AnnounceMultiplayerSession(Network::RoomNetwork& roo
: room_network{room_network_} {
#ifdef ENABLE_WEB_SERVICE
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
Settings::values.suyu_username.GetValue(),
Settings::values.suyu_token.GetValue());
#else
backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
#endif
@@ -156,8 +156,8 @@ void AnnounceMultiplayerSession::UpdateCredentials() {
#ifdef ENABLE_WEB_SERVICE
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
Settings::values.yuzu_username.GetValue(),
Settings::values.yuzu_token.GetValue());
Settings::values.suyu_username.GetValue(),
Settings::values.suyu_token.GetValue());
#endif
}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -574,7 +574,7 @@ bool Room::RoomImpl::HasModPermission(const ENetPeer* client) const {
if (sending_member == members.end()) {
return false;
}
if (room_information.enable_yuzu_mods &&
if (room_information.enable_suyu_mods &&
sending_member->user_data.moderator) { // Community moderator
return true;
@@ -1047,7 +1047,7 @@ bool Room::Create(const std::string& name, const std::string& description,
const u32 max_connections, const std::string& host_username,
const GameInfo preferred_game,
std::unique_ptr<VerifyUser::Backend> verify_backend,
const Room::BanList& ban_list, bool enable_yuzu_mods) {
const Room::BanList& ban_list, bool enable_suyu_mods) {
ENetAddress address;
address.host = ENET_HOST_ANY;
if (!server_address.empty()) {
@@ -1069,7 +1069,7 @@ bool Room::Create(const std::string& name, const std::string& description,
room_impl->room_information.port = server_port;
room_impl->room_information.preferred_game = preferred_game;
room_impl->room_information.host_username = host_username;
room_impl->room_information.enable_yuzu_mods = enable_yuzu_mods;
room_impl->room_information.enable_suyu_mods = enable_suyu_mods;
room_impl->password = password;
room_impl->verify_backend = std::move(verify_backend);
room_impl->username_ban_list = ban_list.first;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -123,7 +123,7 @@ public:
const u32 max_connections = MaxConcurrentConnections,
const std::string& host_username = "", const GameInfo = {},
std::unique_ptr<VerifyUser::Backend> verify_backend = nullptr,
const BanList& ban_list = {}, bool enable_yuzu_mods = false);
const BanList& ban_list = {}, bool enable_suyu_mods = false);
/**
* Sets the verification GUID of the room.

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 Citra Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 Citra Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -12,7 +12,7 @@ struct UserData {
std::string username;
std::string display_name;
std::string avatar_url;
bool moderator = false; ///< Whether the user is a yuzu Moderator.
bool moderator = false; ///< Whether the user is a suyu Moderator.
};
/**

View File

@@ -263,6 +263,6 @@ endif()
create_target_directory_groups(shader_recompiler)
if (YUZU_USE_PRECOMPILED_HEADERS)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.h)
endif()

View File

@@ -7,12 +7,12 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Set the RPATH for Qt Libraries
# This must be done before the `yuzu` target is created
if (YUZU_USE_BUNDLED_QT AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
# This must be done before the `suyu` target is created
if (SUYU_USE_BUNDLED_QT AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/bin/lib/")
endif()
add_executable(yuzu
add_executable(suyu
Info.plist
about_dialog.cpp
about_dialog.h
@@ -233,18 +233,18 @@ add_executable(yuzu
suyu.rc
)
if (YUZU_CRASH_DUMPS)
target_sources(yuzu PRIVATE
if (SUYU_CRASH_DUMPS)
target_sources(suyu PRIVATE
breakpad.cpp
breakpad.h
)
target_link_libraries(yuzu PRIVATE libbreakpad_client)
target_compile_definitions(yuzu PRIVATE YUZU_CRASH_DUMPS)
target_link_libraries(suyu PRIVATE libbreakpad_client)
target_compile_definitions(suyu PRIVATE SUYU_CRASH_DUMPS)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_definitions(yuzu PRIVATE
target_compile_definitions(suyu PRIVATE
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:CANNOT_EXPLICITLY_INSTANTIATE>
)
endif()
@@ -256,24 +256,24 @@ file(GLOB_RECURSE ICONS ${PROJECT_SOURCE_DIR}/dist/icons/*)
file(GLOB_RECURSE THEMES ${PROJECT_SOURCE_DIR}/dist/qt_themes/*)
if (ENABLE_QT_TRANSLATION)
set(YUZU_QT_LANGUAGES "${PROJECT_SOURCE_DIR}/dist/languages" CACHE PATH "Path to the translation bundle for the Qt frontend")
set(SUYU_QT_LANGUAGES "${PROJECT_SOURCE_DIR}/dist/languages" CACHE PATH "Path to the translation bundle for the Qt frontend")
option(GENERATE_QT_TRANSLATION "Generate en.ts as the translation source file" OFF)
option(WORKAROUND_BROKEN_LUPDATE "Run lupdate directly through CMake if Qt's convenience wrappers don't work" OFF)
# Update source TS file if enabled
if (GENERATE_QT_TRANSLATION)
get_target_property(SRCS yuzu SOURCES)
get_target_property(SRCS suyu SOURCES)
# these calls to qt_create_translation also creates a rule to generate en.qm which conflicts with providing english plurals
# so we have to set a OUTPUT_LOCATION so that we don't have multiple rules to generate en.qm
set_source_files_properties(${YUZU_QT_LANGUAGES}/en.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations")
set_source_files_properties(${SUYU_QT_LANGUAGES}/en.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations")
if (WORKAROUND_BROKEN_LUPDATE)
add_custom_command(OUTPUT ${YUZU_QT_LANGUAGES}/en.ts
add_custom_command(OUTPUT ${SUYU_QT_LANGUAGES}/en.ts
COMMAND lupdate
-source-language en_US
-target-language en_US
${SRCS}
${UIS}
-ts ${YUZU_QT_LANGUAGES}/en.ts
-ts ${SUYU_QT_LANGUAGES}/en.ts
DEPENDS
${SRCS}
${UIS}
@@ -284,7 +284,7 @@ if (ENABLE_QT_TRANSLATION)
qt_create_translation(QM_FILES
${SRCS}
${UIS}
${YUZU_QT_LANGUAGES}/en.ts
${SUYU_QT_LANGUAGES}/en.ts
OPTIONS
-source-language en_US
-target-language en_US
@@ -312,12 +312,12 @@ if (ENABLE_QT_TRANSLATION)
qt_create_translation(QM_FILES ${SRCS} ${UIS} ${GENERATED_PLURALS_FILE} OPTIONS -pluralonly -source-language en_US -target-language en_US)
endif()
add_custom_target(translation ALL DEPENDS ${YUZU_QT_LANGUAGES}/en.ts ${GENERATED_PLURALS_FILE})
add_custom_target(translation ALL DEPENDS ${SUYU_QT_LANGUAGES}/en.ts ${GENERATED_PLURALS_FILE})
endif()
# Find all TS files except en.ts
file(GLOB_RECURSE LANGUAGES_TS ${YUZU_QT_LANGUAGES}/*.ts)
list(REMOVE_ITEM LANGUAGES_TS ${YUZU_QT_LANGUAGES}/en.ts)
file(GLOB_RECURSE LANGUAGES_TS ${SUYU_QT_LANGUAGES}/*.ts)
list(REMOVE_ITEM LANGUAGES_TS ${SUYU_QT_LANGUAGES}/en.ts)
# Compile TS files to QM files
qt_add_translation(LANGUAGES_QM ${LANGUAGES_TS})
@@ -340,7 +340,7 @@ else()
set(LANGUAGES)
endif()
target_sources(yuzu
target_sources(suyu
PRIVATE
${COMPAT_LIST}
${ICONS}
@@ -351,9 +351,9 @@ target_sources(yuzu
if (APPLE)
set(MACOSX_ICON "../../dist/suyu.icns")
set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
target_sources(yuzu PRIVATE ${MACOSX_ICON})
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE)
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
target_sources(suyu PRIVATE ${MACOSX_ICON})
set_target_properties(suyu PROPERTIES MACOSX_BUNDLE TRUE)
set_target_properties(suyu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
if (NOT USE_SYSTEM_MOLTENVK)
set(MOLTENVK_PLATFORM "macOS")
@@ -364,36 +364,36 @@ if (APPLE)
message(STATUS "Using MoltenVK at ${MOLTENVK_LIBRARY}.")
set_source_files_properties(${MOLTENVK_LIBRARY} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks
XCODE_FILE_ATTRIBUTES "CodeSignOnCopy")
target_sources(yuzu PRIVATE ${MOLTENVK_LIBRARY})
target_sources(suyu PRIVATE ${MOLTENVK_LIBRARY})
elseif(WIN32)
# compile as a win32 gui application instead of a console application
if (QT_VERSION VERSION_GREATER_EQUAL 6)
target_link_libraries(yuzu PRIVATE Qt6::EntryPointPrivate)
target_link_libraries(suyu PRIVATE Qt6::EntryPointPrivate)
else()
target_link_libraries(yuzu PRIVATE Qt5::WinMain)
target_link_libraries(suyu PRIVATE Qt5::WinMain)
endif()
if(MSVC)
target_link_libraries(yuzu PRIVATE version.lib)
set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
target_link_libraries(suyu PRIVATE version.lib)
set_target_properties(suyu PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
elseif(MINGW)
set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "-Wl,--subsystem,windows")
set_target_properties(suyu PROPERTIES LINK_FLAGS_RELEASE "-Wl,--subsystem,windows")
endif()
endif()
target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core)
target_link_libraries(yuzu PRIVATE Boost::headers glad Qt${QT_MAJOR_VERSION}::Widgets)
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
target_link_libraries(suyu PRIVATE common core input_common frontend_common network video_core)
target_link_libraries(suyu PRIVATE Boost::headers glad Qt${QT_MAJOR_VERSION}::Widgets)
target_link_libraries(suyu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
target_link_libraries(yuzu PRIVATE Vulkan::Headers)
target_link_libraries(suyu PRIVATE Vulkan::Headers)
if (NOT WIN32)
target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
target_include_directories(suyu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
endif()
if (UNIX AND NOT APPLE)
target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus)
target_link_libraries(suyu PRIVATE Qt${QT_MAJOR_VERSION}::DBus)
endif()
target_compile_definitions(yuzu PRIVATE
target_compile_definitions(suyu PRIVATE
# Use QStringBuilder for string concatenation to reduce
# the overall number of temporary strings created.
-DQT_USE_QSTRINGBUILDER
@@ -412,69 +412,69 @@ target_compile_definitions(yuzu PRIVATE
-DQT_NO_URL_CAST_FROM_STRING
)
if (YUZU_ENABLE_COMPATIBILITY_REPORTING)
target_compile_definitions(yuzu PRIVATE -DYUZU_ENABLE_COMPATIBILITY_REPORTING)
if (SUYU_ENABLE_COMPATIBILITY_REPORTING)
target_compile_definitions(suyu PRIVATE -DSUYU_ENABLE_COMPATIBILITY_REPORTING)
endif()
if (USE_DISCORD_PRESENCE)
target_sources(yuzu PUBLIC
target_sources(suyu PUBLIC
discord_impl.cpp
discord_impl.h
)
target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib Qt${QT_MAJOR_VERSION}::Network)
target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
target_link_libraries(suyu PRIVATE DiscordRPC::discord-rpc httplib::httplib Qt${QT_MAJOR_VERSION}::Network)
target_compile_definitions(suyu PRIVATE -DUSE_DISCORD_PRESENCE)
endif()
if (ENABLE_WEB_SERVICE)
target_compile_definitions(yuzu PRIVATE -DENABLE_WEB_SERVICE)
target_compile_definitions(suyu PRIVATE -DENABLE_WEB_SERVICE)
endif()
if (SUYU_USE_QT_MULTIMEDIA)
target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::Multimedia)
target_compile_definitions(yuzu PRIVATE -DSUYU_USE_QT_MULTIMEDIA)
target_link_libraries(suyu PRIVATE Qt${QT_MAJOR_VERSION}::Multimedia)
target_compile_definitions(suyu PRIVATE -DSUYU_USE_QT_MULTIMEDIA)
endif ()
if (YUZU_USE_QT_WEB_ENGINE)
target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::WebEngineCore Qt${QT_MAJOR_VERSION}::WebEngineWidgets)
target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_WEB_ENGINE)
if (SUYU_USE_QT_WEB_ENGINE)
target_link_libraries(suyu PRIVATE Qt${QT_MAJOR_VERSION}::WebEngineCore Qt${QT_MAJOR_VERSION}::WebEngineWidgets)
target_compile_definitions(suyu PRIVATE -DSUYU_USE_QT_WEB_ENGINE)
endif ()
if(UNIX AND NOT APPLE)
install(TARGETS yuzu)
install(TARGETS suyu)
endif()
if (WIN32 AND QT_VERSION VERSION_GREATER_EQUAL 6)
set(YUZU_EXE_DIR "$<TARGET_FILE_DIR:yuzu>")
add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/yuzu.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
set(SUYU_EXE_DIR "$<TARGET_FILE_DIR:suyu>")
add_custom_command(TARGET suyu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${SUYU_EXE_DIR}/suyu.exe" --dir "${SUYU_EXE_DIR}" --libdir "${SUYU_EXE_DIR}" --plugindir "${SUYU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
endif()
if (YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6)
include(CopyYuzuQt5Deps)
copy_yuzu_Qt5_deps(yuzu)
if (SUYU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6)
include(CopySuyuQt5Deps)
copy_suyu_Qt5_deps(suyu)
endif()
if (ENABLE_SDL2)
target_link_libraries(yuzu PRIVATE SDL2::SDL2)
target_compile_definitions(yuzu PRIVATE HAVE_SDL2)
target_link_libraries(suyu PRIVATE SDL2::SDL2)
target_compile_definitions(suyu PRIVATE HAVE_SDL2)
endif()
if (MSVC)
include(CopyYuzuSDLDeps)
include(CopyYuzuFFmpegDeps)
copy_yuzu_SDL_deps(yuzu)
copy_yuzu_FFmpeg_deps(yuzu)
include(CopySuyuSDLDeps)
include(CopySuyuFFmpegDeps)
copy_suyu_SDL_deps(suyu)
copy_suyu_FFmpeg_deps(suyu)
endif()
if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(yuzu PRIVATE HAS_OPENGL)
target_compile_definitions(suyu PRIVATE HAS_OPENGL)
endif()
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
target_link_libraries(suyu PRIVATE dynarmic::dynarmic)
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(yuzu PRIVATE precompiled_headers.h)
if (SUYU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(suyu PRIVATE precompiled_headers.h)
endif()
create_target_directory_groups(yuzu)
create_target_directory_groups(suyu)

View File

@@ -17,13 +17,13 @@ SPDX-License-Identifier: GPL-2.0-or-later
<key>CFBundleIconFile</key>
<string>suyu.icns</string>
<key>CFBundleIdentifier</key>
<string>com.yuzu-emu.yuzu</string>
<string>com.suyu-emu.suyu</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>yuzu</string>
<string>suyu</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@@ -5,7 +5,7 @@
#include <fmt/format.h>
#include "common/scm_rev.h"
#include "ui_aboutdialog.h"
#include "yuzu/about_dialog.h"
#include "suyu/about_dialog.h"
AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent), ui{std::make_unique<Ui::AboutDialog>()} {

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>About yuzu</string>
<string>About suyu</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@@ -36,7 +36,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../dist/qt_themes/default/default.qrc">:/icons/default/256x256/yuzu.png</pixmap>
<pixmap resource="../../dist/qt_themes/default/default.qrc">:/icons/default/256x256/suyu.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@@ -61,7 +61,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="labelYuzu">
<widget class="QLabel" name="labelSuyu">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -16,8 +16,8 @@
#ifdef ENABLE_WEB_SERVICE
#include "web_service/web_backend.h"
#endif
#include "yuzu/applets/qt_amiibo_settings.h"
#include "yuzu/main.h"
#include "suyu/applets/qt_amiibo_settings.h"
#include "suyu/main.h"
QtAmiiboSettingsDialog::QtAmiiboSettingsDialog(QWidget* parent,
Core::Frontend::CabinetParameters parameters_,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -15,14 +15,14 @@
#include "hid_core/hid_types.h"
#include "hid_core/resources/npad/npad.h"
#include "ui_qt_controller.h"
#include "yuzu/applets/qt_controller.h"
#include "yuzu/configuration/configure_input.h"
#include "yuzu/configuration/configure_input_profile_dialog.h"
#include "yuzu/configuration/configure_motion_touch.h"
#include "yuzu/configuration/configure_vibration.h"
#include "yuzu/configuration/input_profiles.h"
#include "yuzu/main.h"
#include "yuzu/util/controller_navigation.h"
#include "suyu/applets/qt_controller.h"
#include "suyu/configuration/configure_input.h"
#include "suyu/configuration/configure_input_profile_dialog.h"
#include "suyu/configuration/configure_motion_touch.h"
#include "suyu/configuration/configure_vibration.h"
#include "suyu/configuration/input_profiles.h"
#include "suyu/main.h"
#include "suyu/util/controller_navigation.h"
namespace {

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

View File

@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QDateTime>
#include "yuzu/applets/qt_error.h"
#include "yuzu/main.h"
#include "suyu/applets/qt_error.h"
#include "suyu/main.h"
QtErrorDisplay::QtErrorDisplay(GMainWindow& parent) {
connect(this, &QtErrorDisplay::MainWindowDisplayError, &parent,

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

View File

@@ -16,9 +16,9 @@
#include "core/constants.h"
#include "core/core.h"
#include "core/hle/service/acc/profile_manager.h"
#include "yuzu/applets/qt_profile_select.h"
#include "yuzu/main.h"
#include "yuzu/util/controller_navigation.h"
#include "suyu/applets/qt_profile_select.h"
#include "suyu/main.h"
#include "suyu/util/controller_navigation.h"
namespace {
QString FormatUserEntryText(const QString& username, Common::UUID uuid) {

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QCursor>
@@ -14,9 +14,9 @@
#include "hid_core/hid_core.h"
#include "hid_core/hid_types.h"
#include "ui_qt_software_keyboard.h"
#include "yuzu/applets/qt_software_keyboard.h"
#include "yuzu/main.h"
#include "yuzu/util/overlay_dialog.h"
#include "suyu/applets/qt_software_keyboard.h"
#include "suyu/main.h"
#include "suyu/util/overlay_dialog.h"
namespace {

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

View File

@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#ifdef YUZU_USE_QT_WEB_ENGINE
#ifdef SUYU_USE_QT_WEB_ENGINE
#include <bit>
#include <QApplication>
@@ -14,17 +14,17 @@
#include <QWebEngineUrlScheme>
#include "hid_core/frontend/input_interpreter.h"
#include "yuzu/applets/qt_web_browser_scripts.h"
#include "suyu/applets/qt_web_browser_scripts.h"
#endif
#include "common/fs/path_util.h"
#include "core/core.h"
#include "input_common/drivers/keyboard.h"
#include "yuzu/applets/qt_web_browser.h"
#include "yuzu/main.h"
#include "yuzu/util/url_request_interceptor.h"
#include "suyu/applets/qt_web_browser.h"
#include "suyu/main.h"
#include "suyu/util/url_request_interceptor.h"
#ifdef YUZU_USE_QT_WEB_ENGINE
#ifdef SUYU_USE_QT_WEB_ENGINE
namespace {
@@ -216,7 +216,7 @@ void QtNXWebEngineView::HandleWindowFooterButtonPressedOnce() {
const auto button_index = std::countr_zero(static_cast<u64>(button));
page()->runJavaScript(
QStringLiteral("yuzu_key_callbacks[%1] == null;").arg(button_index),
QStringLiteral("suyu_key_callbacks[%1] == null;").arg(button_index),
[this, button](const QVariant& variant) {
if (variant.toBool()) {
switch (button) {
@@ -239,7 +239,7 @@ void QtNXWebEngineView::HandleWindowFooterButtonPressedOnce() {
});
page()->runJavaScript(
QStringLiteral("if (yuzu_key_callbacks[%1] != null) { yuzu_key_callbacks[%1](); }")
QStringLiteral("if (suyu_key_callbacks[%1] != null) { suyu_key_callbacks[%1](); }")
.arg(button_index));
}
};

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -8,7 +8,7 @@
#include <QObject>
#ifdef YUZU_USE_QT_WEB_ENGINE
#ifdef SUYU_USE_QT_WEB_ENGINE
#include <QWebEngineView>
#endif
@@ -30,7 +30,7 @@ namespace InputCommon {
class InputSubsystem;
}
#ifdef YUZU_USE_QT_WEB_ENGINE
#ifdef SUYU_USE_QT_WEB_ENGINE
enum class UserAgent {
WebApplet,
@@ -108,11 +108,11 @@ protected:
private:
/**
* Handles button presses to execute functions assigned in yuzu_key_callbacks.
* yuzu_key_callbacks contains specialized functions for the buttons in the window footer
* Handles button presses to execute functions assigned in suyu_key_callbacks.
* suyu_key_callbacks contains specialized functions for the buttons in the window footer
* that can be overridden by games to achieve desired functionality.
*
* @tparam HIDButton The list of buttons contained in yuzu_key_callbacks
* @tparam HIDButton The list of buttons contained in suyu_key_callbacks
*/
template <Core::HID::NpadButton... T>
void HandleWindowFooterButtonPressedOnce();

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -91,13 +91,13 @@ window.addEventListener("gamepaddisconnected", function(e) {
constexpr char WINDOW_NX_SCRIPT[] = R"(
var end_applet = false;
var yuzu_key_callbacks = [];
var suyu_key_callbacks = [];
(function() {
class WindowNX {
constructor() {
yuzu_key_callbacks[1] = function() { window.history.back(); };
yuzu_key_callbacks[2] = function() { window.nx.endApplet(); };
suyu_key_callbacks[1] = function() { window.history.back(); };
suyu_key_callbacks[2] = function() { window.nx.endApplet(); };
}
addEventListener(type, listener, options) {
@@ -131,22 +131,22 @@ var yuzu_key_callbacks = [];
switch (key) {
case "A":
yuzu_key_callbacks[0] = func;
suyu_key_callbacks[0] = func;
break;
case "B":
yuzu_key_callbacks[1] = func;
suyu_key_callbacks[1] = func;
break;
case "X":
yuzu_key_callbacks[2] = func;
suyu_key_callbacks[2] = func;
break;
case "Y":
yuzu_key_callbacks[3] = func;
suyu_key_callbacks[3] = func;
break;
case "L":
yuzu_key_callbacks[6] = func;
suyu_key_callbacks[6] = func;
break;
case "R":
yuzu_key_callbacks[7] = func;
suyu_key_callbacks[7] = func;
break;
}
}
@@ -160,22 +160,22 @@ var yuzu_key_callbacks = [];
switch (key) {
case "A":
yuzu_key_callbacks[0] = function() {};
suyu_key_callbacks[0] = function() {};
break;
case "B":
yuzu_key_callbacks[1] = function() {};
suyu_key_callbacks[1] = function() {};
break;
case "X":
yuzu_key_callbacks[2] = function() {};
suyu_key_callbacks[2] = function() {};
break;
case "Y":
yuzu_key_callbacks[3] = function() {};
suyu_key_callbacks[3] = function() {};
break;
case "L":
yuzu_key_callbacks[6] = function() {};
suyu_key_callbacks[6] = function() {};
break;
case "R":
yuzu_key_callbacks[7] = function() {};
suyu_key_callbacks[7] = function() {};
break;
}
}

View File

@@ -57,9 +57,9 @@
#include "video_core/gpu.h"
#include "video_core/rasterizer_interface.h"
#include "video_core/renderer_base.h"
#include "yuzu/bootmanager.h"
#include "yuzu/main.h"
#include "yuzu/qt_common.h"
#include "suyu/bootmanager.h"
#include "suyu/main.h"
#include "suyu/qt_common.h"
class QObject;
class QPaintEngine;

View File

@@ -14,7 +14,7 @@
#include "common/fs/fs_paths.h"
#include "common/fs/path_util.h"
#include "yuzu/breakpad.h"
#include "suyu/breakpad.h"
namespace Breakpad {

Some files were not shown because too many files have changed in this diff Show More