summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve <110565931+jonesyUK@users.noreply.github.com>2022-08-05 17:02:04 +0200
committerGitHub <noreply@github.com>2022-08-05 17:02:04 +0200
commitcd5bbf0f04696d6d44dae8c4a4e5f768a70019de (patch)
tree31744b8c027d110ad1554bae85c410867efe0e89
parentMerge pull request #8702 from liamwhite/format-swap (diff)
downloadyuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar.gz
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar.bz2
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar.lz
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar.xz
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.tar.zst
yuzu-cd5bbf0f04696d6d44dae8c4a4e5f768a70019de.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/applets/qt_profile_select.cpp1
-rw-r--r--src/yuzu/main.cpp12
-rw-r--r--src/yuzu/main.h2
3 files changed, 10 insertions, 5 deletions
diff --git a/src/yuzu/applets/qt_profile_select.cpp b/src/yuzu/applets/qt_profile_select.cpp
index 826c6c224..c8bcfb223 100644
--- a/src/yuzu/applets/qt_profile_select.cpp
+++ b/src/yuzu/applets/qt_profile_select.cpp
@@ -100,6 +100,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(Core::HID::HIDCore& hid_core,
}
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);
QCoreApplication::postEvent(tree_view, event);
+ SelectUser(tree_view->currentIndex());
});
const auto& profiles = profile_manager->GetAllUsers();
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f8c234082..dc7b343d9 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1588,17 +1588,18 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
return true;
}
-void GMainWindow::SelectAndSetCurrentUser() {
+bool GMainWindow::SelectAndSetCurrentUser() {
QtProfileSelectionDialog dialog(system->HIDCore(), this);
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
dialog.setWindowModality(Qt::WindowModal);
if (dialog.exec() == QDialog::Rejected) {
- return;
+ return false;
}
Settings::values.current_user = dialog.GetIndex();
+ return true;
}
void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t program_index,
@@ -1632,11 +1633,14 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
Settings::LogSettings();
if (UISettings::values.select_user_on_boot) {
- SelectAndSetCurrentUser();
+ if (SelectAndSetCurrentUser() == false) {
+ return;
+ }
}
- if (!LoadROM(filename, program_id, program_index))
+ if (!LoadROM(filename, program_id, program_index)) {
return;
+ }
system->SetShuttingDown(false);
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 23b67a14e..e13b38b24 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -218,7 +218,7 @@ private:
void SetDiscordEnabled(bool state);
void LoadAmiibo(const QString& filename);
- void SelectAndSetCurrentUser();
+ bool SelectAndSetCurrentUser();
/**
* Stores the filename in the recently loaded files list.