mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 14:48:17 -05:00
Merge pull request #1781 from DarkLordZach/applet-profile-select
am: Implement HLE profile selector applet
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include <thread>
|
||||
|
||||
// VFS includes must be before glad as they will conflict with Windows file api, which uses defines.
|
||||
#include "applets/profile_select.h"
|
||||
#include "applets/software_keyboard.h"
|
||||
#include "configuration/configure_per_general.h"
|
||||
#include "core/file_sys/vfs.h"
|
||||
@ -208,6 +209,28 @@ GMainWindow::~GMainWindow() {
|
||||
delete render_window;
|
||||
}
|
||||
|
||||
void GMainWindow::ProfileSelectorSelectProfile() {
|
||||
QtProfileSelectionDialog dialog(this);
|
||||
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
||||
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.exec();
|
||||
|
||||
if (!dialog.GetStatus()) {
|
||||
emit ProfileSelectorFinishedSelection(std::nullopt);
|
||||
return;
|
||||
}
|
||||
|
||||
Service::Account::ProfileManager manager;
|
||||
const auto uuid = manager.GetUser(dialog.GetIndex());
|
||||
if (!uuid.has_value()) {
|
||||
emit ProfileSelectorFinishedSelection(std::nullopt);
|
||||
return;
|
||||
}
|
||||
|
||||
emit ProfileSelectorFinishedSelection(uuid);
|
||||
}
|
||||
|
||||
void GMainWindow::SoftwareKeyboardGetText(
|
||||
const Core::Frontend::SoftwareKeyboardParameters& parameters) {
|
||||
QtSoftwareKeyboardDialog dialog(this, parameters);
|
||||
@ -574,6 +597,7 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
||||
|
||||
system.SetGPUDebugContext(debug_context);
|
||||
|
||||
system.SetProfileSelector(std::make_unique<QtProfileSelector>(*this));
|
||||
system.SetSoftwareKeyboard(std::make_unique<QtSoftwareKeyboard>(*this));
|
||||
|
||||
const Core::System::ResultStatus result{system.Load(*render_window, filename.toStdString())};
|
||||
|
Reference in New Issue
Block a user