Revert "Merge branch 'master' into 'dev'"

This reverts merge request !17
This commit is contained in:
Crimson Hawk 2024-03-06 05:26:38 +00:00
parent fdadc50fff
commit cdbdf63ebe
2887 changed files with 18295 additions and 18366 deletions

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 yuzu 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::GetsuyuDeviceGetGUID())));
const s32 port = env->CallIntMethod(j_input_device, Common::Android::GetsuyuDeviceGetPort());
env->CallObjectMethod(j_input_device, Common::Android::GetYuzuDeviceGetGUID())));
const s32 port = env->CallIntMethod(j_input_device, Common::Android::GetYuzuDeviceGetPort());
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::GetsuyuDeviceGetSupportsVibration()));
device->second, Common::Android::GetYuzuDeviceGetSupportsVibration()));
});
}
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::GetsuyuDeviceGetName()));
env->CallObjectMethod(value, Common::Android::GetYuzuDeviceGetName()));
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::GetsuyuDeviceGetAxes()));
env->CallObjectMethod(j_device, Common::Android::GetYuzuDeviceGetAxes()));
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::GetsuyuDeviceHasKeys(), j_keys));
env->CallObjectMethod(j_device, Common::Android::GetYuzuDeviceHasKeys(), 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::GetsuyuDeviceVibrate(),
env->CallVoidMethod(device->second, Common::Android::GetYuzuDeviceVibrate(),
average_intensity);
}
}

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@ -21,7 +21,7 @@ public:
/**
* Registers controller number to accept new inputs.
* @param j_input_device suyuInputDevice object from the Android frontend to register.
* @param j_input_device YuzuInputDevice 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 suyuInputDevice.
* Gets the axes reported by the YuzuInputDevice.
* @param env JNI environment pointer.
* @param j_device suyuInputDevice from the Android frontend.
* @param j_device YuzuInputDevice 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

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <fmt/format.h>

View file

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

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <fmt/format.h>

View file

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

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/param_package.h"

View file

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

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <thread>

View file

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

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, "suyu");
SDL_SetHint(SDL_HINT_APP_NAME, "yuzu");
if (!Settings::values.enable_raw_input) {
// Disable raw input. When enabled this setting causes SDL to die when a web applet opens

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <cstring>
@ -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::GetsuyuPath(Common::FS::suyuPath::TASDir) /
Common::FS::GetYuzuPath(Common::FS::YuzuPath::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::GetsuyuPath(Common::FS::suyuPath::TASDir) / file_name;
const auto tas_file_name = Common::FS::GetYuzuPath(Common::FS::YuzuPath::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

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2020 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -11,7 +11,7 @@
#include "input_common/input_engine.h"
/*
To play back TAS scripts on suyu, select the folder with scripts in the configuration menu below
To play back TAS scripts on Yuzu, 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 suyu with the (default) hotkey
After placing the file at the correct location, it can be read into Yuzu 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

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/param_package.h"

View file

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

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include <cstring>

View file

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

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2022 suyu Emulator Project
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "input_common/drivers/virtual_gamepad.h"

View file

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