chore: update project branding to Citron

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-05-06 16:08:59 +10:00
parent bfb82e577c
commit 5e16e20427
122 changed files with 448 additions and 448 deletions

View File

@@ -356,35 +356,35 @@ jfieldID GetPlayerInputUseSystemVibratorField() {
return s_player_input_use_system_vibrator_field;
}
jclass GetYuzuInputDeviceInterface() {
jclass GetCitronInputDeviceInterface() {
return s_citron_input_device_interface;
}
jmethodID GetYuzuDeviceGetName() {
jmethodID GetCitronDeviceGetName() {
return s_citron_input_device_get_name;
}
jmethodID GetYuzuDeviceGetGUID() {
jmethodID GetCitronDeviceGetGUID() {
return s_citron_input_device_get_guid;
}
jmethodID GetYuzuDeviceGetPort() {
jmethodID GetCitronDeviceGetPort() {
return s_citron_input_device_get_port;
}
jmethodID GetYuzuDeviceGetSupportsVibration() {
jmethodID GetCitronDeviceGetSupportsVibration() {
return s_citron_input_device_get_supports_vibration;
}
jmethodID GetYuzuDeviceVibrate() {
jmethodID GetCitronDeviceVibrate() {
return s_citron_input_device_vibrate;
}
jmethodID GetYuzuDeviceGetAxes() {
jmethodID GetCitronDeviceGetAxes() {
return s_citron_input_device_get_axes;
}
jmethodID GetYuzuDeviceHasKeys() {
jmethodID GetCitronDeviceHasKeys() {
return s_citron_input_device_has_keys;
}
@@ -531,7 +531,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env->DeleteLocalRef(player_input_class);
const jclass citron_input_device_interface =
env->FindClass("org/citron/citron_emu/features/input/YuzuInputDevice");
env->FindClass("org/citron/citron_emu/features/input/CitronInputDevice");
s_citron_input_device_interface =
reinterpret_cast<jclass>(env->NewGlobalRef(citron_input_device_interface));
s_citron_input_device_get_name =

View File

@@ -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 GetCitronInputDeviceInterface();
jmethodID GetCitronDeviceGetName();
jmethodID GetCitronDeviceGetGUID();
jmethodID GetCitronDeviceGetPort();
jmethodID GetCitronDeviceGetSupportsVibration();
jmethodID GetCitronDeviceVibrate();
jmethodID GetCitronDeviceGetAxes();
jmethodID GetCitronDeviceHasKeys();
} // namespace Common::Android

View File

@@ -56,10 +56,10 @@ namespace fs = std::filesystem;
/**
* The PathManagerImpl is a singleton allowing to manage the mapping of
* YuzuPath enums to real filesystem paths.
* This class provides 2 functions: GetYuzuPathImpl and SetYuzuPathImpl.
* These are used by GetYuzuPath and SetYuzuPath respectively to get or modify
* the path mapped by the YuzuPath enum.
* CitronPath enums to real filesystem paths.
* This class provides 2 functions: GetCitronPathImpl and SetCitronPathImpl.
* These are used by GetCitronPath and SetCitronPath respectively to get or modify
* the path mapped by the CitronPath enum.
*/
class PathManagerImpl {
public:
@@ -75,11 +75,11 @@ public:
PathManagerImpl(PathManagerImpl&&) = delete;
PathManagerImpl& operator=(PathManagerImpl&&) = delete;
[[nodiscard]] const fs::path& GetYuzuPathImpl(YuzuPath citron_path) {
[[nodiscard]] const fs::path& GetCitronPathImpl(CitronPath citron_path) {
return citron_paths.at(citron_path);
}
void SetYuzuPathImpl(YuzuPath citron_path, const fs::path& new_path) {
void SetCitronPathImpl(CitronPath citron_path, const fs::path& new_path) {
citron_paths.insert_or_assign(citron_path, new_path);
}
@@ -115,22 +115,22 @@ public:
}
#endif
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);
GenerateCitronPath(CitronPath::CitronDir, citron_path);
GenerateCitronPath(CitronPath::AmiiboDir, citron_path / AMIIBO_DIR);
GenerateCitronPath(CitronPath::CacheDir, citron_path_cache);
GenerateCitronPath(CitronPath::ConfigDir, citron_path_config);
GenerateCitronPath(CitronPath::CrashDumpsDir, citron_path / CRASH_DUMPS_DIR);
GenerateCitronPath(CitronPath::DumpDir, citron_path / DUMP_DIR);
GenerateCitronPath(CitronPath::KeysDir, citron_path / KEYS_DIR);
GenerateCitronPath(CitronPath::LoadDir, citron_path / LOAD_DIR);
GenerateCitronPath(CitronPath::LogDir, citron_path / LOG_DIR);
GenerateCitronPath(CitronPath::NANDDir, citron_path / NAND_DIR);
GenerateCitronPath(CitronPath::PlayTimeDir, citron_path / PLAY_TIME_DIR);
GenerateCitronPath(CitronPath::ScreenshotsDir, citron_path / SCREENSHOTS_DIR);
GenerateCitronPath(CitronPath::SDMCDir, citron_path / SDMC_DIR);
GenerateCitronPath(CitronPath::ShaderDir, citron_path / SHADER_DIR);
GenerateCitronPath(CitronPath::TASDir, citron_path / TAS_DIR);
GenerateCitronPath(CitronPath::IconsDir, citron_path / ICONS_DIR);
}
private:
@@ -140,13 +140,13 @@ private:
~PathManagerImpl() = default;
void GenerateYuzuPath(YuzuPath citron_path, const fs::path& new_path) {
void GenerateCitronPath(CitronPath citron_path, const fs::path& new_path) {
void(FS::CreateDir(new_path));
SetYuzuPathImpl(citron_path, new_path);
SetCitronPathImpl(citron_path, new_path);
}
std::unordered_map<YuzuPath, fs::path> citron_paths;
std::unordered_map<CitronPath, 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 citron_path) {
return PathManagerImpl::GetInstance().GetYuzuPathImpl(citron_path);
const fs::path& GetCitronPath(CitronPath citron_path) {
return PathManagerImpl::GetInstance().GetCitronPathImpl(citron_path);
}
std::string GetYuzuPathString(YuzuPath citron_path) {
return PathToUTF8String(GetYuzuPath(citron_path));
std::string GetCitronPathString(CitronPath citron_path) {
return PathToUTF8String(GetCitronPath(citron_path));
}
void SetYuzuPath(YuzuPath citron_path, const fs::path& new_path) {
void SetCitronPath(CitronPath 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(citron_path, new_path);
PathManagerImpl::GetInstance().SetCitronPathImpl(citron_path, new_path);
}
#ifdef _WIN32

View File

@@ -10,8 +10,8 @@
namespace Common::FS {
enum class YuzuPath {
YuzuDir, // Where citron stores its data.
enum class CitronPath {
CitronDir, // Where citron stores its data.
AmiiboDir, // Where Amiibo backups are stored.
CacheDir, // Where cached filesystem data is stored.
ConfigDir, // Where config files are stored.
@@ -193,39 +193,39 @@ template <typename Path>
void SetAppDirectory(const std::string& app_directory);
/**
* Gets the filesystem path associated with the YuzuPath enum.
* Gets the filesystem path associated with the CitronPath enum.
*
* @param citron_path YuzuPath enum
* @param citron_path CitronPath enum
*
* @returns The filesystem path associated with the YuzuPath enum.
* @returns The filesystem path associated with the CitronPath enum.
*/
[[nodiscard]] const std::filesystem::path& GetYuzuPath(YuzuPath citron_path);
[[nodiscard]] const std::filesystem::path& GetCitronPath(CitronPath citron_path);
/**
* Gets the filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string.
* Gets the filesystem path associated with the CitronPath enum as a UTF-8 encoded std::string.
*
* @param citron_path YuzuPath enum
* @param citron_path CitronPath enum
*
* @returns The filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string.
* @returns The filesystem path associated with the CitronPath enum as a UTF-8 encoded std::string.
*/
[[nodiscard]] std::string GetYuzuPathString(YuzuPath citron_path);
[[nodiscard]] std::string GetCitronPathString(CitronPath citron_path);
/**
* Sets a new filesystem path associated with the YuzuPath enum.
* Sets a new filesystem path associated with the CitronPath enum.
* If the filesystem object at new_path is not a directory, this function will not do anything.
*
* @param citron_path YuzuPath enum
* @param citron_path CitronPath enum
* @param new_path New filesystem path
*/
void SetYuzuPath(YuzuPath citron_path, const std::filesystem::path& new_path);
void SetCitronPath(CitronPath citron_path, const std::filesystem::path& new_path);
#ifdef _WIN32
template <typename Path>
void SetYuzuPath(YuzuPath citron_path, const Path& new_path) {
void SetCitronPath(CitronPath citron_path, const Path& new_path) {
if constexpr (IsChar<typename Path::value_type>) {
SetYuzuPath(citron_path, ToU8String(new_path));
SetCitronPath(citron_path, ToU8String(new_path));
} else {
SetYuzuPath(citron_path, std::filesystem::path{new_path});
SetCitronPath(citron_path, std::filesystem::path{new_path});
}
}
#endif
@@ -288,11 +288,11 @@ enum class DirectorySeparator {
};
// Splits the path on '/' or '\' and put the components into a vector
// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" }
// i.e. "C:\Users\Citron\Documents\save.bin" becomes {"C:", "Users", "Citron", "Documents", "save.bin" }
[[nodiscard]] std::vector<std::string_view> SplitPathComponents(std::string_view filename);
// Splits the path on '/' or '\' and put the components into a vector
// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" }
// i.e. "C:\Users\Citron\Documents\save.bin" becomes {"C:", "Users", "Citron", "Documents", "save.bin" }
[[nodiscard]] std::vector<std::string> SplitPathComponentsCopy(std::string_view filename);
// Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\'

View File

@@ -195,7 +195,7 @@ public:
return;
}
using namespace Common::FS;
const auto& log_dir = GetYuzuPath(YuzuPath::LogDir);
const auto& log_dir = GetCitronPath(CitronPath::LogDir);
void(CreateDir(log_dir));
Filter filter;
filter.ParseFilterString(Settings::values.log_filter.GetValue());

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, "CitronNative", "%s", str.c_str());
#endif
}
} // namespace Common::Log

View File

@@ -14,7 +14,7 @@ namespace Common {
void ConfigureNvidiaEnvironmentFlags() {
#ifdef _WIN32
const auto nvidia_shader_dir =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir) / "nvidia";
Common::FS::GetCitronPath(Common::FS::CitronPath::ShaderDir) / "nvidia";
if (!Common::FS::CreateDirs(nvidia_shader_dir)) {
return;

View File

@@ -130,11 +130,11 @@ void LogSettings() {
log_setting(name, setting->Canonicalize());
}
}
log_path("DataStorage_CacheDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir));
log_path("DataStorage_ConfigDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir));
log_path("DataStorage_LoadDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::LoadDir));
log_path("DataStorage_NANDDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir));
log_path("DataStorage_SDMCDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir));
log_path("DataStorage_CacheDir", Common::FS::GetCitronPath(Common::FS::CitronPath::CacheDir));
log_path("DataStorage_ConfigDir", Common::FS::GetCitronPath(Common::FS::CitronPath::ConfigDir));
log_path("DataStorage_LoadDir", Common::FS::GetCitronPath(Common::FS::CitronPath::LoadDir));
log_path("DataStorage_NANDDir", Common::FS::GetCitronPath(Common::FS::CitronPath::NANDDir));
log_path("DataStorage_SDMCDir", Common::FS::GetCitronPath(Common::FS::CitronPath::SDMCDir));
}
void UpdateGPUAccuracy() {