mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-02-01 15:23:32 +00:00
chore: update project branding to citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)Lorg/citron/citron_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/citron/citron_emu/applets/keyboard/SoftwareKeyboard$KeyboardConfig;)V");
|
||||
}
|
||||
|
||||
void CleanupJNI(JNIEnv* env) {
|
||||
|
||||
@@ -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_citron_input_device_interface;
|
||||
static jmethodID s_citron_input_device_get_name;
|
||||
static jmethodID s_citron_input_device_get_guid;
|
||||
static jmethodID s_citron_input_device_get_port;
|
||||
static jmethodID s_citron_input_device_get_supports_vibration;
|
||||
static jmethodID s_citron_input_device_vibrate;
|
||||
static jmethodID s_citron_input_device_get_axes;
|
||||
static jmethodID s_citron_input_device_has_keys;
|
||||
|
||||
static constexpr jint JNI_VERSION = JNI_VERSION_1_6;
|
||||
|
||||
@@ -357,35 +357,35 @@ jfieldID GetPlayerInputUseSystemVibratorField() {
|
||||
}
|
||||
|
||||
jclass GetYuzuInputDeviceInterface() {
|
||||
return s_yuzu_input_device_interface;
|
||||
return s_citron_input_device_interface;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceGetName() {
|
||||
return s_yuzu_input_device_get_name;
|
||||
return s_citron_input_device_get_name;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceGetGUID() {
|
||||
return s_yuzu_input_device_get_guid;
|
||||
return s_citron_input_device_get_guid;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceGetPort() {
|
||||
return s_yuzu_input_device_get_port;
|
||||
return s_citron_input_device_get_port;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceGetSupportsVibration() {
|
||||
return s_yuzu_input_device_get_supports_vibration;
|
||||
return s_citron_input_device_get_supports_vibration;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceVibrate() {
|
||||
return s_yuzu_input_device_vibrate;
|
||||
return s_citron_input_device_vibrate;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceGetAxes() {
|
||||
return s_yuzu_input_device_get_axes;
|
||||
return s_citron_input_device_get_axes;
|
||||
}
|
||||
|
||||
jmethodID GetYuzuDeviceHasKeys() {
|
||||
return s_yuzu_input_device_has_keys;
|
||||
return s_citron_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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_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/citron/citron_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 citron_input_device_interface =
|
||||
env->FindClass("org/citron/citron_emu/features/input/YuzuInputDevice");
|
||||
s_citron_input_device_interface =
|
||||
reinterpret_cast<jclass>(env->NewGlobalRef(citron_input_device_interface));
|
||||
s_citron_input_device_get_name =
|
||||
env->GetMethodID(citron_input_device_interface, "getName", "()Ljava/lang/String;");
|
||||
s_citron_input_device_get_guid =
|
||||
env->GetMethodID(citron_input_device_interface, "getGUID", "()Ljava/lang/String;");
|
||||
s_citron_input_device_get_port = env->GetMethodID(citron_input_device_interface, "getPort", "()I");
|
||||
s_citron_input_device_get_supports_vibration =
|
||||
env->GetMethodID(citron_input_device_interface, "getSupportsVibration", "()Z");
|
||||
s_citron_input_device_vibrate = env->GetMethodID(citron_input_device_interface, "vibrate", "(F)V");
|
||||
s_citron_input_device_get_axes =
|
||||
env->GetMethodID(citron_input_device_interface, "getAxes", "()[Ljava/lang/Integer;");
|
||||
s_citron_input_device_has_keys =
|
||||
env->GetMethodID(citron_input_device_interface, "hasKeys", "([I)[Z");
|
||||
env->DeleteLocalRef(citron_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_citron_input_device_interface);
|
||||
|
||||
// UnInitialize applets
|
||||
SoftwareKeyboard::CleanupJNI(env);
|
||||
|
||||
@@ -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_citron_mods; ///< Allow citron Moderators to moderate on this room
|
||||
};
|
||||
|
||||
struct Room {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// yuzu data directories
|
||||
// citron data directories
|
||||
|
||||
#define YUZU_DIR "yuzu"
|
||||
#define YUZU_DIR "citron"
|
||||
#define PORTABLE_DIR "user"
|
||||
|
||||
// Sub-directories contained within a yuzu data directory
|
||||
// Sub-directories contained within a citron data directory
|
||||
|
||||
#define AMIIBO_DIR "amiibo"
|
||||
#define CACHE_DIR "cache"
|
||||
@@ -26,6 +26,6 @@
|
||||
#define TAS_DIR "tas"
|
||||
#define ICONS_DIR "icons"
|
||||
|
||||
// yuzu-specific files
|
||||
// citron-specific files
|
||||
|
||||
#define LOG_FILE "yuzu_log.txt"
|
||||
#define LOG_FILE "citron_log.txt"
|
||||
|
||||
@@ -75,62 +75,62 @@ public:
|
||||
PathManagerImpl(PathManagerImpl&&) = delete;
|
||||
PathManagerImpl& operator=(PathManagerImpl&&) = delete;
|
||||
|
||||
[[nodiscard]] const fs::path& GetYuzuPathImpl(YuzuPath yuzu_path) {
|
||||
return yuzu_paths.at(yuzu_path);
|
||||
[[nodiscard]] const fs::path& GetYuzuPathImpl(YuzuPath citron_path) {
|
||||
return citron_paths.at(citron_path);
|
||||
}
|
||||
|
||||
void SetYuzuPathImpl(YuzuPath yuzu_path, const fs::path& new_path) {
|
||||
yuzu_paths.insert_or_assign(yuzu_path, new_path);
|
||||
void SetYuzuPathImpl(YuzuPath citron_path, const fs::path& new_path) {
|
||||
citron_paths.insert_or_assign(citron_path, new_path);
|
||||
}
|
||||
|
||||
void Reinitialize(fs::path yuzu_path = {}) {
|
||||
fs::path yuzu_path_cache;
|
||||
fs::path yuzu_path_config;
|
||||
void Reinitialize(fs::path citron_path = {}) {
|
||||
fs::path citron_path_cache;
|
||||
fs::path citron_path_config;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef YUZU_ENABLE_PORTABLE
|
||||
yuzu_path = GetExeDirectory() / PORTABLE_DIR;
|
||||
citron_path = GetExeDirectory() / PORTABLE_DIR;
|
||||
#endif
|
||||
if (!IsDir(yuzu_path)) {
|
||||
yuzu_path = GetAppDataRoamingDirectory() / YUZU_DIR;
|
||||
if (!IsDir(citron_path)) {
|
||||
citron_path = GetAppDataRoamingDirectory() / YUZU_DIR;
|
||||
}
|
||||
|
||||
yuzu_path_cache = yuzu_path / CACHE_DIR;
|
||||
yuzu_path_config = yuzu_path / CONFIG_DIR;
|
||||
citron_path_cache = citron_path / CACHE_DIR;
|
||||
citron_path_config = citron_path / CONFIG_DIR;
|
||||
#elif ANDROID
|
||||
ASSERT(!yuzu_path.empty());
|
||||
yuzu_path_cache = yuzu_path / CACHE_DIR;
|
||||
yuzu_path_config = yuzu_path / CONFIG_DIR;
|
||||
ASSERT(!citron_path.empty());
|
||||
citron_path_cache = citron_path / CACHE_DIR;
|
||||
citron_path_config = citron_path / CONFIG_DIR;
|
||||
#else
|
||||
#ifdef YUZU_ENABLE_PORTABLE
|
||||
yuzu_path = GetCurrentDir() / PORTABLE_DIR;
|
||||
citron_path = GetCurrentDir() / PORTABLE_DIR;
|
||||
#endif
|
||||
if (Exists(yuzu_path) && IsDir(yuzu_path)) {
|
||||
yuzu_path_cache = yuzu_path / CACHE_DIR;
|
||||
yuzu_path_config = yuzu_path / CONFIG_DIR;
|
||||
if (Exists(citron_path) && IsDir(citron_path)) {
|
||||
citron_path_cache = citron_path / CACHE_DIR;
|
||||
citron_path_config = citron_path / CONFIG_DIR;
|
||||
} else {
|
||||
yuzu_path = GetDataDirectory("XDG_DATA_HOME") / YUZU_DIR;
|
||||
yuzu_path_cache = GetDataDirectory("XDG_CACHE_HOME") / YUZU_DIR;
|
||||
yuzu_path_config = GetDataDirectory("XDG_CONFIG_HOME") / YUZU_DIR;
|
||||
citron_path = GetDataDirectory("XDG_DATA_HOME") / YUZU_DIR;
|
||||
citron_path_cache = GetDataDirectory("XDG_CACHE_HOME") / YUZU_DIR;
|
||||
citron_path_config = GetDataDirectory("XDG_CONFIG_HOME") / YUZU_DIR;
|
||||
}
|
||||
#endif
|
||||
|
||||
GenerateYuzuPath(YuzuPath::YuzuDir, yuzu_path);
|
||||
GenerateYuzuPath(YuzuPath::AmiiboDir, yuzu_path / AMIIBO_DIR);
|
||||
GenerateYuzuPath(YuzuPath::CacheDir, yuzu_path_cache);
|
||||
GenerateYuzuPath(YuzuPath::ConfigDir, yuzu_path_config);
|
||||
GenerateYuzuPath(YuzuPath::CrashDumpsDir, yuzu_path / CRASH_DUMPS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::DumpDir, yuzu_path / DUMP_DIR);
|
||||
GenerateYuzuPath(YuzuPath::KeysDir, yuzu_path / KEYS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::LoadDir, yuzu_path / LOAD_DIR);
|
||||
GenerateYuzuPath(YuzuPath::LogDir, yuzu_path / LOG_DIR);
|
||||
GenerateYuzuPath(YuzuPath::NANDDir, yuzu_path / NAND_DIR);
|
||||
GenerateYuzuPath(YuzuPath::PlayTimeDir, yuzu_path / PLAY_TIME_DIR);
|
||||
GenerateYuzuPath(YuzuPath::ScreenshotsDir, yuzu_path / SCREENSHOTS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::SDMCDir, yuzu_path / SDMC_DIR);
|
||||
GenerateYuzuPath(YuzuPath::ShaderDir, yuzu_path / SHADER_DIR);
|
||||
GenerateYuzuPath(YuzuPath::TASDir, yuzu_path / TAS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::IconsDir, yuzu_path / ICONS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::YuzuDir, citron_path);
|
||||
GenerateYuzuPath(YuzuPath::AmiiboDir, citron_path / AMIIBO_DIR);
|
||||
GenerateYuzuPath(YuzuPath::CacheDir, citron_path_cache);
|
||||
GenerateYuzuPath(YuzuPath::ConfigDir, citron_path_config);
|
||||
GenerateYuzuPath(YuzuPath::CrashDumpsDir, citron_path / CRASH_DUMPS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::DumpDir, citron_path / DUMP_DIR);
|
||||
GenerateYuzuPath(YuzuPath::KeysDir, citron_path / KEYS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::LoadDir, citron_path / LOAD_DIR);
|
||||
GenerateYuzuPath(YuzuPath::LogDir, citron_path / LOG_DIR);
|
||||
GenerateYuzuPath(YuzuPath::NANDDir, citron_path / NAND_DIR);
|
||||
GenerateYuzuPath(YuzuPath::PlayTimeDir, citron_path / PLAY_TIME_DIR);
|
||||
GenerateYuzuPath(YuzuPath::ScreenshotsDir, citron_path / SCREENSHOTS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::SDMCDir, citron_path / SDMC_DIR);
|
||||
GenerateYuzuPath(YuzuPath::ShaderDir, citron_path / SHADER_DIR);
|
||||
GenerateYuzuPath(YuzuPath::TASDir, citron_path / TAS_DIR);
|
||||
GenerateYuzuPath(YuzuPath::IconsDir, citron_path / ICONS_DIR);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -140,13 +140,13 @@ private:
|
||||
|
||||
~PathManagerImpl() = default;
|
||||
|
||||
void GenerateYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) {
|
||||
void GenerateYuzuPath(YuzuPath citron_path, const fs::path& new_path) {
|
||||
void(FS::CreateDir(new_path));
|
||||
|
||||
SetYuzuPathImpl(yuzu_path, new_path);
|
||||
SetYuzuPathImpl(citron_path, new_path);
|
||||
}
|
||||
|
||||
std::unordered_map<YuzuPath, fs::path> yuzu_paths;
|
||||
std::unordered_map<YuzuPath, fs::path> citron_paths;
|
||||
};
|
||||
|
||||
bool ValidatePath(const fs::path& path) {
|
||||
@@ -230,22 +230,22 @@ void SetAppDirectory(const std::string& app_directory) {
|
||||
PathManagerImpl::GetInstance().Reinitialize(app_directory);
|
||||
}
|
||||
|
||||
const fs::path& GetYuzuPath(YuzuPath yuzu_path) {
|
||||
return PathManagerImpl::GetInstance().GetYuzuPathImpl(yuzu_path);
|
||||
const fs::path& GetYuzuPath(YuzuPath citron_path) {
|
||||
return PathManagerImpl::GetInstance().GetYuzuPathImpl(citron_path);
|
||||
}
|
||||
|
||||
std::string GetYuzuPathString(YuzuPath yuzu_path) {
|
||||
return PathToUTF8String(GetYuzuPath(yuzu_path));
|
||||
std::string GetYuzuPathString(YuzuPath citron_path) {
|
||||
return PathToUTF8String(GetYuzuPath(citron_path));
|
||||
}
|
||||
|
||||
void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) {
|
||||
void SetYuzuPath(YuzuPath citron_path, const fs::path& new_path) {
|
||||
if (!FS::IsDir(new_path)) {
|
||||
LOG_ERROR(Common_Filesystem, "Filesystem object at new_path={} is not a directory",
|
||||
PathToUTF8String(new_path));
|
||||
return;
|
||||
}
|
||||
|
||||
PathManagerImpl::GetInstance().SetYuzuPathImpl(yuzu_path, new_path);
|
||||
PathManagerImpl::GetInstance().SetYuzuPathImpl(citron_path, new_path);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
namespace Common::FS {
|
||||
|
||||
enum class YuzuPath {
|
||||
YuzuDir, // Where yuzu stores its data.
|
||||
YuzuDir, // Where citron stores its data.
|
||||
AmiiboDir, // Where Amiibo backups are stored.
|
||||
CacheDir, // Where cached filesystem data is stored.
|
||||
ConfigDir, // Where config files are stored.
|
||||
@@ -22,7 +22,7 @@ enum class YuzuPath {
|
||||
LogDir, // Where log files are stored.
|
||||
NANDDir, // Where the emulated NAND is stored.
|
||||
PlayTimeDir, // Where play time data is stored.
|
||||
ScreenshotsDir, // Where yuzu screenshots are stored.
|
||||
ScreenshotsDir, // Where citron screenshots are stored.
|
||||
SDMCDir, // Where the emulated SDMC is stored.
|
||||
ShaderDir, // Where shaders are stored.
|
||||
TASDir, // Where TAS scripts are stored.
|
||||
@@ -195,37 +195,37 @@ void SetAppDirectory(const std::string& app_directory);
|
||||
/**
|
||||
* Gets the filesystem path associated with the YuzuPath enum.
|
||||
*
|
||||
* @param yuzu_path YuzuPath enum
|
||||
* @param citron_path YuzuPath enum
|
||||
*
|
||||
* @returns The filesystem path associated with the YuzuPath enum.
|
||||
*/
|
||||
[[nodiscard]] const std::filesystem::path& GetYuzuPath(YuzuPath yuzu_path);
|
||||
[[nodiscard]] const std::filesystem::path& GetYuzuPath(YuzuPath citron_path);
|
||||
|
||||
/**
|
||||
* Gets the filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string.
|
||||
*
|
||||
* @param yuzu_path YuzuPath enum
|
||||
* @param citron_path YuzuPath enum
|
||||
*
|
||||
* @returns The filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string.
|
||||
*/
|
||||
[[nodiscard]] std::string GetYuzuPathString(YuzuPath yuzu_path);
|
||||
[[nodiscard]] std::string GetYuzuPathString(YuzuPath citron_path);
|
||||
|
||||
/**
|
||||
* Sets a new filesystem path associated with the YuzuPath enum.
|
||||
* If the filesystem object at new_path is not a directory, this function will not do anything.
|
||||
*
|
||||
* @param yuzu_path YuzuPath enum
|
||||
* @param citron_path YuzuPath enum
|
||||
* @param new_path New filesystem path
|
||||
*/
|
||||
void SetYuzuPath(YuzuPath yuzu_path, const std::filesystem::path& new_path);
|
||||
void SetYuzuPath(YuzuPath citron_path, const std::filesystem::path& new_path);
|
||||
|
||||
#ifdef _WIN32
|
||||
template <typename Path>
|
||||
void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) {
|
||||
void SetYuzuPath(YuzuPath citron_path, const Path& new_path) {
|
||||
if constexpr (IsChar<typename Path::value_type>) {
|
||||
SetYuzuPath(yuzu_path, ToU8String(new_path));
|
||||
SetYuzuPath(citron_path, ToU8String(new_path));
|
||||
} else {
|
||||
SetYuzuPath(yuzu_path, std::filesystem::path{new_path});
|
||||
SetYuzuPath(citron_path, std::filesystem::path{new_path});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -257,14 +257,14 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) {
|
||||
[[nodiscard]] std::filesystem::path GetHomeDirectory();
|
||||
|
||||
/**
|
||||
* Gets the relevant paths for yuzu to store its data based on the given XDG environment variable.
|
||||
* Gets the relevant paths for citron to store its data based on the given XDG environment variable.
|
||||
* See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
* Defaults to $HOME/.local/share for main application data,
|
||||
* $HOME/.cache for cached data, and $HOME/.config for configuration files.
|
||||
*
|
||||
* @param env_name XDG environment variable name
|
||||
*
|
||||
* @returns The path where yuzu should store its data.
|
||||
* @returns The path where citron should store its data.
|
||||
*/
|
||||
[[nodiscard]] std::filesystem::path GetDataDirectory(const std::string& env_name);
|
||||
|
||||
|
||||
@@ -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 citron Web Services
|
||||
Count ///< Total number of logging classes
|
||||
};
|
||||
|
||||
|
||||
@@ -114,10 +114,10 @@ void LogSettings() {
|
||||
LOG_INFO(Config, "{}: {}", name, Common::FS::PathToUTF8String(path));
|
||||
};
|
||||
|
||||
LOG_INFO(Config, "yuzu Configuration:");
|
||||
LOG_INFO(Config, "citron 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.citron_token.Id()) {
|
||||
// Hide the token secret, for security reasons.
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -471,7 +471,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, "citron", "device_name", Category::System, Specialization::Default, true, true};
|
||||
|
||||
Setting<s32> current_user{linkage, 0, "current_user", Category::System};
|
||||
|
||||
@@ -610,11 +610,11 @@ struct Values {
|
||||
|
||||
// WebService
|
||||
Setting<bool> enable_telemetry{linkage, true, "enable_telemetry", Category::WebService};
|
||||
Setting<std::string> web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url",
|
||||
Setting<std::string> web_api_url{linkage, "https://api.citron-emu.org", "web_api_url",
|
||||
Category::WebService};
|
||||
Setting<std::string> yuzu_username{linkage, std::string(), "yuzu_username",
|
||||
Setting<std::string> citron_username{linkage, std::string(), "citron_username",
|
||||
Category::WebService};
|
||||
Setting<std::string> yuzu_token{linkage, std::string(), "yuzu_token", Category::WebService};
|
||||
Setting<std::string> citron_token{linkage, std::string(), "citron_token", Category::WebService};
|
||||
|
||||
// Add-Ons
|
||||
std::map<u64, std::vector<std::string>> disabled_addons;
|
||||
|
||||
@@ -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, ///< citron 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.)
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
// cv_mutex must be held or else there will be a missed wakeup if the other thread is in the
|
||||
// line before cv.wait
|
||||
// TODO(bunnei): This can be replaced with C++20 waitable atomics when properly supported.
|
||||
// See discussion on https://github.com/yuzu-emu/yuzu/pull/3173 for details.
|
||||
// See discussion on https://github.com/citron-emu/citron/pull/3173 for details.
|
||||
std::scoped_lock lock{cv_mutex};
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ struct UUID {
|
||||
u128 AsU128() const;
|
||||
|
||||
/**
|
||||
* Creates a default UUID "yuzu Default UID".
|
||||
* Creates a default UUID "citron 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 "citron Default UID".
|
||||
*/
|
||||
static constexpr UUID MakeDefault() {
|
||||
return UUID{
|
||||
|
||||
@@ -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
|
||||
// citron at all anyway
|
||||
|
||||
int cpu_id[4];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user