mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-25 06:37:17 +02:00
TAS: Record sanitized instead of raw stick inputs
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
This commit is contained in:
parent
a12a4f2a13
commit
d46c9c4659
@ -93,7 +93,7 @@ void ControllerDialog::ControllerUpdate(Core::HID::ControllerTriggerType type) {
|
|||||||
case Core::HID::ControllerTriggerType::Button:
|
case Core::HID::ControllerTriggerType::Button:
|
||||||
case Core::HID::ControllerTriggerType::Stick: {
|
case Core::HID::ControllerTriggerType::Stick: {
|
||||||
const auto buttons_values = controller->GetButtonsValues();
|
const auto buttons_values = controller->GetButtonsValues();
|
||||||
const auto stick_values = controller->GetSticksValues();
|
const auto stick_values = controller->GetSticks();
|
||||||
u64 buttons = 0;
|
u64 buttons = 0;
|
||||||
std::size_t index = 0;
|
std::size_t index = 0;
|
||||||
for (const auto& button : buttons_values) {
|
for (const auto& button : buttons_values) {
|
||||||
@ -101,12 +101,12 @@ void ControllerDialog::ControllerUpdate(Core::HID::ControllerTriggerType type) {
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
const InputCommon::TasInput::TasAnalog left_axis = {
|
const InputCommon::TasInput::TasAnalog left_axis = {
|
||||||
.x = stick_values[Settings::NativeAnalog::LStick].x.value,
|
.x = stick_values.left.x / 32767.f,
|
||||||
.y = stick_values[Settings::NativeAnalog::LStick].y.value,
|
.y = stick_values.left.y / 32767.f,
|
||||||
};
|
};
|
||||||
const InputCommon::TasInput::TasAnalog right_axis = {
|
const InputCommon::TasInput::TasAnalog right_axis = {
|
||||||
.x = stick_values[Settings::NativeAnalog::RStick].x.value,
|
.x = stick_values.right.x / 32767.f,
|
||||||
.y = stick_values[Settings::NativeAnalog::RStick].y.value,
|
.y = stick_values.right.y / 32767.f,
|
||||||
};
|
};
|
||||||
input_subsystem->GetTas()->RecordInput(buttons, left_axis, right_axis);
|
input_subsystem->GetTas()->RecordInput(buttons, left_axis, right_axis);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user