summaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorFlorian <fl.david.53@gmail.com>2023-08-26 21:23:02 +0200
committerflodavid <fl.david.53@gmail.com>2023-10-12 01:51:53 +0200
commit6c246f2ac5ce2ede656bf0d2def3b32f87e620b3 (patch)
treed6f9fd1a9965f95cd3f22102b79b02f09340ac04 /src/yuzu/main.cpp
parenta34565727b6eba66cf20d32f3ec2ad073f29f9e1 (diff)
yuzu: Use new setting method for stop emulation
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 26fa3e191..2727f9d06 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -3426,7 +3426,7 @@ void GMainWindow::OnPauseContinueGame() {
void GMainWindow::OnStopGame() {
// Open (or not) the right confirm dialog based on current setting and game exit lock
- if (UISettings::values.confirm_before_stopping.GetValue() == UISettings::AskStopIndex::Always) {
+ if (UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Always) {
if (system->GetExitLocked()) {
if (!ConfirmForceLockedExit()) {
return;
@@ -3438,7 +3438,7 @@ void GMainWindow::OnStopGame() {
}
} else {
if (UISettings::values.confirm_before_stopping.GetValue() ==
- UISettings::AskStopIndex::Game &&
+ ConfirmStop::Ask_Based_On_Game &&
system->GetExitLocked()) {
if (!ConfirmForceLockedExit()) {
return;
@@ -4081,13 +4081,15 @@ void GMainWindow::OnLoadAmiibo() {
bool GMainWindow::question(QWidget* parent, const QString& title, const QString& text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton) {
- ControllerNavigation* controller_navigation = new ControllerNavigation(system->HIDCore(), this);
QMessageBox* box_dialog = new QMessageBox(parent);
box_dialog->setWindowTitle(title);
box_dialog->setText(text);
box_dialog->setStandardButtons(buttons);
box_dialog->setDefaultButton(defaultButton);
+
+ ControllerNavigation* controller_navigation =
+ new ControllerNavigation(system->HIDCore(), box_dialog);
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
[box_dialog](Qt::Key key) {
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);