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

@@ -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::GetCitronDeviceGetGUID())));
const s32 port = env->CallIntMethod(j_input_device, Common::Android::GetCitronDeviceGetPort());
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::GetCitronDeviceGetSupportsVibration()));
});
}
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::GetCitronDeviceGetName()));
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::GetCitronDeviceGetAxes()));
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::GetCitronDeviceHasKeys(), 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::GetCitronDeviceVibrate(),
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 CitronInputDevice 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 CitronInputDevice.
* @param env JNI environment pointer.
* @param j_device YuzuInputDevice from the Android frontend.
* @param j_device CitronInputDevice 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

@@ -82,7 +82,7 @@ void Tas::LoadTasFile(size_t player_index, size_t file_index) {
commands[player_index].clear();
std::string file = Common::FS::ReadStringFromFile(
Common::FS::GetYuzuPath(Common::FS::YuzuPath::TASDir) /
Common::FS::GetCitronPath(Common::FS::CitronPath::TASDir) /
fmt::format("script{}-{}.txt", file_index, player_index + 1),
Common::FS::FileType::BinaryFile);
std::istringstream command_line(file);
@@ -137,7 +137,7 @@ void Tas::WriteTasFile(std::u8string_view file_name) {
WriteCommandAxis(line.l_axis), WriteCommandAxis(line.r_axis));
}
const auto tas_file_name = Common::FS::GetYuzuPath(Common::FS::YuzuPath::TASDir) / file_name;
const auto tas_file_name = Common::FS::GetCitronPath(Common::FS::CitronPath::TASDir) / file_name;
const auto bytes_written =
Common::FS::WriteStringToFile(tas_file_name, Common::FS::FileType::TextFile, output_text);
if (bytes_written == output_text.size()) {

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 Citron, 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 Citron 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, "Citron 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, "Citron can't gain access to this device: ID {:04X}:{:04X}.",
device_info->vendor_id, device_info->product_id);
return Common::Input::DriverResult::HandleInUse;
}