early-access version 2890

This commit is contained in:
pineappleEA 2022-08-05 18:38:07 +02:00
parent 5105aef684
commit 3f64006179
4 changed files with 11 additions and 6 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 2889.
This is the source code for early-access 2890.
## Legal Notice

View File

@ -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();

View File

@ -1589,17 +1589,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,
@ -1633,11 +1634,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);

View File

@ -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.