mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-25 16:07:50 -05:00
kraken: Fix errors from rebase and format files
This commit is contained in:
@ -74,7 +74,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
||||
hotkeys_tab->Populate(registry);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
input_tab->Initialize(input_subsystem);
|
||||
input_tab->Initialize(input_subsystem, system_);
|
||||
|
||||
general_tab->SetResetCallback([&] { this->close(); });
|
||||
|
||||
|
@ -146,10 +146,11 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem, Co
|
||||
advanced = new ConfigureInputAdvanced(this);
|
||||
ui->tabAdvanced->setLayout(new QHBoxLayout(ui->tabAdvanced));
|
||||
ui->tabAdvanced->layout()->addWidget(advanced);
|
||||
connect(advanced, &ConfigureInputAdvanced::CallDebugControllerDialog, [this, input_subsystem] {
|
||||
CallConfigureDialog<ConfigureDebugController>(*this, input_subsystem, profiles.get(),
|
||||
system);
|
||||
});
|
||||
connect(advanced, &ConfigureInputAdvanced::CallDebugControllerDialog,
|
||||
[this, input_subsystem, &system] {
|
||||
CallConfigureDialog<ConfigureDebugController>(*this, input_subsystem,
|
||||
profiles.get(), system);
|
||||
});
|
||||
connect(advanced, &ConfigureInputAdvanced::CallMouseConfigDialog, [this, input_subsystem] {
|
||||
CallConfigureDialog<ConfigureMouseAdvanced>(*this, input_subsystem);
|
||||
});
|
||||
|
@ -19,15 +19,11 @@ PlayerControlPreview::PlayerControlPreview(QWidget* parent) : QFrame(parent) {
|
||||
}
|
||||
|
||||
PlayerControlPreview::~PlayerControlPreview() {
|
||||
if (is_controller_set) {
|
||||
controller->DeleteCallback(callback_key);
|
||||
}
|
||||
UnloadController();
|
||||
};
|
||||
|
||||
void PlayerControlPreview::SetController(Core::HID::EmulatedController* controller_) {
|
||||
if (is_controller_set) {
|
||||
controller->DeleteCallback(callback_key);
|
||||
}
|
||||
UnloadController();
|
||||
is_controller_set = true;
|
||||
controller = controller_;
|
||||
Core::HID::ControllerUpdateCallback engine_callback{
|
||||
@ -36,14 +32,21 @@ void PlayerControlPreview::SetController(Core::HID::EmulatedController* controll
|
||||
ControllerUpdate(Core::HID::ControllerTriggerType::All);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::BeginMappingButton(std::size_t index) {
|
||||
button_mapping_index = index;
|
||||
void PlayerControlPreview::UnloadController() {
|
||||
if (is_controller_set) {
|
||||
controller->DeleteCallback(callback_key);
|
||||
is_controller_set = false;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerControlPreview::BeginMappingButton(std::size_t button_id) {
|
||||
button_mapping_index = button_id;
|
||||
mapping_active = true;
|
||||
}
|
||||
|
||||
void PlayerControlPreview::BeginMappingAnalog(std::size_t index) {
|
||||
button_mapping_index = Settings::NativeButton::LStick + index;
|
||||
analog_mapping_index = index;
|
||||
void PlayerControlPreview::BeginMappingAnalog(std::size_t stick_id) {
|
||||
button_mapping_index = Settings::NativeButton::LStick + stick_id;
|
||||
analog_mapping_index = stick_id;
|
||||
mapping_active = true;
|
||||
}
|
||||
|
||||
|
@ -25,11 +25,25 @@ public:
|
||||
explicit PlayerControlPreview(QWidget* parent);
|
||||
~PlayerControlPreview() override;
|
||||
|
||||
// Sets the emulated controller to be displayed
|
||||
void SetController(Core::HID::EmulatedController* controller);
|
||||
|
||||
// Disables events from the emulated controller
|
||||
void UnloadController();
|
||||
|
||||
// Starts blinking animation at the button specified
|
||||
void BeginMappingButton(std::size_t button_id);
|
||||
void BeginMappingAnalog(std::size_t button_id);
|
||||
|
||||
// Starts moving animation at the stick specified
|
||||
void BeginMappingAnalog(std::size_t stick_id);
|
||||
|
||||
// Stops any ongoing animation
|
||||
void EndMapping();
|
||||
|
||||
// Handles emulated controller events
|
||||
void ControllerUpdate(Core::HID::ControllerTriggerType type);
|
||||
|
||||
// Updates input on sheduled interval
|
||||
void UpdateInput();
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user