early-access version 2379
This commit is contained in:
@@ -747,15 +747,16 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() {
|
||||
const auto first_engine = devices[0].Get("engine", "");
|
||||
const auto first_guid = devices[0].Get("guid", "");
|
||||
const auto first_port = devices[0].Get("port", 0);
|
||||
const auto first_pad = devices[0].Get("pad", 0);
|
||||
|
||||
if (devices.size() == 1) {
|
||||
const auto devices_it =
|
||||
std::find_if(input_devices.begin(), input_devices.end(),
|
||||
[first_engine, first_guid, first_port](const Common::ParamPackage param) {
|
||||
return param.Get("engine", "") == first_engine &&
|
||||
param.Get("guid", "") == first_guid &&
|
||||
param.Get("port", 0) == first_port;
|
||||
});
|
||||
const auto devices_it = std::find_if(
|
||||
input_devices.begin(), input_devices.end(),
|
||||
[first_engine, first_guid, first_port, first_pad](const Common::ParamPackage param) {
|
||||
return param.Get("engine", "") == first_engine &&
|
||||
param.Get("guid", "") == first_guid && param.Get("port", 0) == first_port &&
|
||||
param.Get("pad", 0) == first_pad;
|
||||
});
|
||||
const int device_index =
|
||||
devices_it != input_devices.end()
|
||||
? static_cast<int>(std::distance(input_devices.begin(), devices_it))
|
||||
|
||||
@@ -206,7 +206,6 @@ void ControllerShortcut::ControllerUpdateEvent(Core::HID::ControllerTriggerType
|
||||
player_capture_buttons == button_sequence.capture.raw &&
|
||||
player_home_buttons == button_sequence.home.raw && !active) {
|
||||
// Force user to press the home or capture button again
|
||||
emulated_controller->ResetSystemButtons();
|
||||
active = true;
|
||||
emit Activated();
|
||||
return;
|
||||
|
||||
@@ -2825,6 +2825,11 @@ void GMainWindow::OnTasStartStop() {
|
||||
if (!emulation_running) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable system buttons to prevent TAS from executing a hotkey
|
||||
auto* controller = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1);
|
||||
controller->ResetSystemButtons();
|
||||
|
||||
input_subsystem->GetTas()->StartStop();
|
||||
OnTasStateChanged();
|
||||
}
|
||||
@@ -2836,6 +2841,11 @@ void GMainWindow::OnTasRecord() {
|
||||
if (is_tas_recording_dialog_active) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable system buttons to prevent TAS from recording a hotkey
|
||||
auto* controller = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1);
|
||||
controller->ResetSystemButtons();
|
||||
|
||||
const bool is_recording = input_subsystem->GetTas()->Record();
|
||||
if (!is_recording) {
|
||||
is_tas_recording_dialog_active = true;
|
||||
|
||||
Reference in New Issue
Block a user