summaryrefslogtreecommitdiff
path: root/src/yuzu/debugger
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-05-30 10:57:20 -0500
committergerman77 <juangerman-13@hotmail.com>2021-05-30 10:57:20 -0500
commitac48e059bc3b00b83ba02a527869f105d4a6bfef (patch)
tree14e3c59c81085305adbf448010a08915e5ad39ed /src/yuzu/debugger
parente41c8b6780cb8339281d5563c2f5009b64462e06 (diff)
settings: Disable controller preview if controller is not active
Diffstat (limited to 'src/yuzu/debugger')
-rw-r--r--src/yuzu/debugger/controller.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuzu/debugger/controller.cpp b/src/yuzu/debugger/controller.cpp
index d85408ac6..c1fc69578 100644
--- a/src/yuzu/debugger/controller.cpp
+++ b/src/yuzu/debugger/controller.cpp
@@ -28,6 +28,7 @@ ControllerDialog::ControllerDialog(QWidget* parent) : QWidget(parent, Qt::Dialog
// Configure focus so that widget is focusable and the dialog automatically forwards focus to
// it.
setFocusProxy(widget);
+ widget->SetConnectedStatus(false);
widget->setFocusPolicy(Qt::StrongFocus);
widget->setFocus();
}
@@ -36,9 +37,8 @@ void ControllerDialog::refreshConfiguration() {
const auto& players = Settings::values.players.GetValue();
constexpr std::size_t player = 0;
widget->SetPlayerInputRaw(player, players[player].buttons, players[player].analogs);
- widget->SetConnectedStatus(players[player].connected);
widget->SetControllerType(players[player].controller_type);
- widget->repaint();
+ widget->SetConnectedStatus(players[player].connected);
}
QAction* ControllerDialog::toggleViewAction() {
@@ -56,6 +56,7 @@ void ControllerDialog::showEvent(QShowEvent* ev) {
if (toggle_view_action) {
toggle_view_action->setChecked(isVisible());
}
+ refreshConfiguration();
QWidget::showEvent(ev);
}
@@ -63,5 +64,6 @@ void ControllerDialog::hideEvent(QHideEvent* ev) {
if (toggle_view_action) {
toggle_view_action->setChecked(isVisible());
}
+ widget->SetConnectedStatus(false);
QWidget::hideEvent(ev);
}