diff options
author | Steve <110565931+jonesyUK@users.noreply.github.com> | 2022-08-05 08:02:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 10:02:04 -0500 |
commit | cd5bbf0f04696d6d44dae8c4a4e5f768a70019de (patch) | |
tree | 31744b8c027d110ad1554bae85c410867efe0e89 /src/yuzu/main.cpp | |
parent | 1f7e62e86ef8d370834c1c2f8c0c0430d2a89712 (diff) |
Controller bugfixes in profile select (#8716)
* Controller bugfixes in profile select, closes #8265
2 fixes for using a controller in profile select dialog.
Pressing 'B' cancels the launch of the game
Using controller to select a profile now correctly sets the index to use for the launch
* Added brackets to if statements as requested.
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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); |