summaryrefslogtreecommitdiff
path: root/src/yuzu/debugger/controller.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-15 19:07:47 -0500
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-24 20:30:24 -0600
commite0da5c1bbcdf85676f968b63c8ae2587f0464193 (patch)
tree588837d1181d6b9d3bd4536fd4d2c5877335632d /src/yuzu/debugger/controller.cpp
parent06a5ef5874144a70e30e577a83ba68d1dad79e78 (diff)
kraken: Fix errors from rebase and format files
Diffstat (limited to 'src/yuzu/debugger/controller.cpp')
-rw-r--r--src/yuzu/debugger/controller.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/yuzu/debugger/controller.cpp b/src/yuzu/debugger/controller.cpp
index d8e41f8b6..3619aed26 100644
--- a/src/yuzu/debugger/controller.cpp
+++ b/src/yuzu/debugger/controller.cpp
@@ -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());