mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-26 09:07:50 -05:00
kraken: Fix errors from rebase and format files
This commit is contained in:
@ -10,7 +10,8 @@
|
||||
#include "yuzu/configuration/configure_input_player_widget.h"
|
||||
#include "yuzu/debugger/controller.h"
|
||||
|
||||
ControllerDialog::ControllerDialog(QWidget* parent) : QWidget(parent, Qt::Dialog) {
|
||||
ControllerDialog::ControllerDialog(Core::System& system, QWidget* parent)
|
||||
: QWidget(parent, Qt::Dialog) {
|
||||
setObjectName(QStringLiteral("Controller"));
|
||||
setWindowTitle(tr("Controller P1"));
|
||||
resize(500, 350);
|
||||
@ -20,7 +21,7 @@ ControllerDialog::ControllerDialog(QWidget* parent) : QWidget(parent, Qt::Dialog
|
||||
Qt::WindowMaximizeButtonHint);
|
||||
|
||||
widget = new PlayerControlPreview(this);
|
||||
widget->SetController(Core::System::GetInstance().HIDCore().GetEmulatedController(
|
||||
widget->SetController(system.HIDCore().GetEmulatedController(
|
||||
Core::HID::NpadIdType::Player1));
|
||||
QLayout* layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
@ -45,6 +46,10 @@ QAction* ControllerDialog::toggleViewAction() {
|
||||
return toggle_view_action;
|
||||
}
|
||||
|
||||
void ControllerDialog::UnloadController() {
|
||||
widget->UnloadController();
|
||||
}
|
||||
|
||||
void ControllerDialog::showEvent(QShowEvent* ev) {
|
||||
if (toggle_view_action) {
|
||||
toggle_view_action->setChecked(isVisible());
|
||||
|
@ -11,6 +11,10 @@ class QHideEvent;
|
||||
class QShowEvent;
|
||||
class PlayerControlPreview;
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace InputCommon {
|
||||
class InputSubsystem;
|
||||
}
|
||||
@ -19,11 +23,14 @@ class ControllerDialog : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ControllerDialog(QWidget* parent = nullptr);
|
||||
explicit ControllerDialog(Core::System& system, QWidget* parent = nullptr);
|
||||
|
||||
/// Returns a QAction that can be used to toggle visibility of this dialog.
|
||||
QAction* toggleViewAction();
|
||||
|
||||
// Disables events from the emulated controller
|
||||
void UnloadController();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* ev) override;
|
||||
void hideEvent(QHideEvent* ev) override;
|
||||
|
Reference in New Issue
Block a user