mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 14:48:17 -05:00
Merge pull request #1942 from DarkLordZach/profile-select-game-boot
qt: Add setting to prompt for user on game boot
This commit is contained in:
@ -687,10 +687,26 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void GMainWindow::SelectAndSetCurrentUser() {
|
||||
QtProfileSelectionDialog dialog(this);
|
||||
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
||||
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.exec();
|
||||
|
||||
if (dialog.GetStatus()) {
|
||||
Settings::values.current_user = static_cast<s32>(dialog.GetIndex());
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::BootGame(const QString& filename) {
|
||||
LOG_INFO(Frontend, "yuzu starting...");
|
||||
StoreRecentFile(filename); // Put the filename on top of the list
|
||||
|
||||
if (UISettings::values.select_user_on_boot) {
|
||||
SelectAndSetCurrentUser();
|
||||
}
|
||||
|
||||
if (!LoadROM(filename))
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user