yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #7185 from Morph1984/make_unique_ui

yuzu: Use make_unique instead of operator new for constructing ui
This commit is contained in:
Mai M 2021-10-15 16:58:45 -04:00 committed by GitHub
commit 5b7b7276d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 157 additions and 151 deletions

View File

@ -8,7 +8,8 @@
#include "ui_aboutdialog.h" #include "ui_aboutdialog.h"
#include "yuzu/about_dialog.h" #include "yuzu/about_dialog.h"
AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent), ui{std::make_unique<Ui::AboutDialog>()} {
const auto branch_name = std::string(Common::g_scm_branch); const auto branch_name = std::string(Common::g_scm_branch);
const auto description = std::string(Common::g_scm_desc); const auto description = std::string(Common::g_scm_desc);
const auto build_id = std::string(Common::g_build_id); const auto build_id = std::string(Common::g_build_id);

View File

@ -14,7 +14,7 @@
#include "yuzu/configuration/configure_cpu.h" #include "yuzu/configuration/configure_cpu.h"
ConfigureCpu::ConfigureCpu(const Core::System& system_, QWidget* parent) ConfigureCpu::ConfigureCpu(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureCpu), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureCpu>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
SetupPerGameUI(); SetupPerGameUI();

View File

@ -12,7 +12,7 @@
#include "yuzu/configuration/configure_cpu_debug.h" #include "yuzu/configuration/configure_cpu_debug.h"
ConfigureCpuDebug::ConfigureCpuDebug(const Core::System& system_, QWidget* parent) ConfigureCpuDebug::ConfigureCpuDebug(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureCpuDebug), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureCpuDebug>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
SetConfiguration(); SetConfiguration();

View File

@ -15,7 +15,7 @@
#include "yuzu/uisettings.h" #include "yuzu/uisettings.h"
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent) ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureDebug), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
SetConfiguration(); SetConfiguration();

View File

@ -9,8 +9,8 @@
#include "yuzu/configuration/configure_debug_tab.h" #include "yuzu/configuration/configure_debug_tab.h"
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent) ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
: QWidget(parent), : QWidget(parent), ui{std::make_unique<Ui::ConfigureDebugTab>()},
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)}, debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} { cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
ui->setupUi(this); ui->setupUi(this);

View File

@ -36,7 +36,7 @@
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
InputCommon::InputSubsystem* input_subsystem, InputCommon::InputSubsystem* input_subsystem,
Core::System& system_) Core::System& system_)
: QDialog(parent), ui(new Ui::ConfigureDialog), : QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
registry(registry), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_, registry(registry), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_,
this)}, this)},
cpu_tab{std::make_unique<ConfigureCpu>(system_, this)}, cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},

View File

@ -16,7 +16,7 @@
#include "yuzu/uisettings.h" #include "yuzu/uisettings.h"
ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent) ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGeneral), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureGeneral>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
SetupPerGameUI(); SetupPerGameUI();

View File

@ -20,7 +20,7 @@
#include "yuzu/configuration/configure_graphics.h" #include "yuzu/configuration/configure_graphics.h"
ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* parent) ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGraphics), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphics>()}, system{system_} {
vulkan_device = Settings::values.vulkan_device.GetValue(); vulkan_device = Settings::values.vulkan_device.GetValue();
RetrieveVulkanDevices(); RetrieveVulkanDevices();

View File

@ -9,7 +9,7 @@
#include "yuzu/configuration/configure_graphics_advanced.h" #include "yuzu/configuration/configure_graphics_advanced.h"
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent) ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGraphicsAdvanced), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphicsAdvanced>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);

View File

@ -27,7 +27,7 @@
#include "yuzu/util/util.h" #include "yuzu/util/util.h"
ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent) ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigurePerGameAddons), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigurePerGameAddons>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
layout = new QVBoxLayout; layout = new QVBoxLayout;

View File

@ -77,7 +77,7 @@ QString GetProfileUsernameFromUser(QWidget* parent, const QString& description_t
} // Anonymous namespace } // Anonymous namespace
ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent) ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureProfileManager), : QWidget(parent), ui{std::make_unique<Ui::ConfigureProfileManager>()},
profile_manager(std::make_unique<Service::Account::ProfileManager>()), system{system_} { profile_manager(std::make_unique<Service::Account::ProfileManager>()), system{system_} {
ui->setupUi(this); ui->setupUi(this);

View File

@ -18,7 +18,7 @@
#include "yuzu/configuration/configure_system.h" #include "yuzu/configuration/configure_system.h"
ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent) ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureSystem), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureSystem>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, connect(ui->button_regenerate_console_id, &QPushButton::clicked, this,
&ConfigureSystem::RefreshConsoleID); &ConfigureSystem::RefreshConsoleID);

View File

@ -55,7 +55,7 @@ QString GetTranslatedRowTextName(size_t index) {
} // Anonymous namespace } // Anonymous namespace
ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureUi), system{system_} { : QWidget(parent), ui{std::make_unique<Ui::ConfigureUi>()}, system{system_} {
ui->setupUi(this); ui->setupUi(this);
InitializeLanguageComboBox(); InitializeLanguageComboBox();

View File

@ -104,6 +104,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "core/telemetry_session.h" #include "core/telemetry_session.h"
#include "input_common/main.h" #include "input_common/main.h"
#include "input_common/tas/tas_input.h" #include "input_common/tas/tas_input.h"
#include "ui_main.h"
#include "util/overlay_dialog.h" #include "util/overlay_dialog.h"
#include "video_core/gpu.h" #include "video_core/gpu.h"
#include "video_core/renderer_base.h" #include "video_core/renderer_base.h"
@ -199,7 +200,7 @@ GMainWindow::GMainWindow(Core::System& system_)
LoadTranslation(); LoadTranslation();
setAcceptDrops(true); setAcceptDrops(true);
ui.setupUi(this); ui->setupUi(this);
statusBar()->hide(); statusBar()->hide();
default_theme_paths = QIcon::themeSearchPaths(); default_theme_paths = QIcon::themeSearchPaths();
@ -274,16 +275,16 @@ GMainWindow::GMainWindow(Core::System& system_)
ShowTelemetryCallout(); ShowTelemetryCallout();
// make sure menubar has the arrow cursor instead of inheriting from this // make sure menubar has the arrow cursor instead of inheriting from this
ui.menubar->setCursor(QCursor()); ui->menubar->setCursor(QCursor());
statusBar()->setCursor(QCursor()); statusBar()->setCursor(QCursor());
mouse_hide_timer.setInterval(default_mouse_timeout); mouse_hide_timer.setInterval(default_mouse_timeout);
connect(&mouse_hide_timer, &QTimer::timeout, this, &GMainWindow::HideMouseCursor); connect(&mouse_hide_timer, &QTimer::timeout, this, &GMainWindow::HideMouseCursor);
connect(ui.menubar, &QMenuBar::hovered, this, &GMainWindow::ShowMouseCursor); connect(ui->menubar, &QMenuBar::hovered, this, &GMainWindow::ShowMouseCursor);
MigrateConfigFiles(); MigrateConfigFiles();
ui.action_Fullscreen->setChecked(false); ui->action_Fullscreen->setChecked(false);
QStringList args = QApplication::arguments(); QStringList args = QApplication::arguments();
@ -302,7 +303,7 @@ GMainWindow::GMainWindow(Core::System& system_)
// Launch game in fullscreen mode // Launch game in fullscreen mode
if (args[i] == QStringLiteral("-f")) { if (args[i] == QStringLiteral("-f")) {
ui.action_Fullscreen->setChecked(true); ui->action_Fullscreen->setChecked(true);
continue; continue;
} }
@ -568,9 +569,9 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
QtNXWebEngineView web_browser_view(this, system, input_subsystem.get()); QtNXWebEngineView web_browser_view(this, system, input_subsystem.get());
ui.action_Pause->setEnabled(false); ui->action_Pause->setEnabled(false);
ui.action_Restart->setEnabled(false); ui->action_Restart->setEnabled(false);
ui.action_Stop->setEnabled(false); ui->action_Stop->setEnabled(false);
{ {
QProgressDialog loading_progress(this); QProgressDialog loading_progress(this);
@ -634,7 +635,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
web_browser_view.SetFinished(true); web_browser_view.SetFinished(true);
} }
}); });
ui.menubar->addAction(exit_action); ui->menubar->addAction(exit_action);
while (!web_browser_view.IsFinished()) { while (!web_browser_view.IsFinished()) {
QCoreApplication::processEvents(); QCoreApplication::processEvents();
@ -676,11 +677,11 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
render_window->show(); render_window->show();
} }
ui.action_Pause->setEnabled(true); ui->action_Pause->setEnabled(true);
ui.action_Restart->setEnabled(true); ui->action_Restart->setEnabled(true);
ui.action_Stop->setEnabled(true); ui->action_Stop->setEnabled(true);
ui.menubar->removeAction(exit_action); ui->menubar->removeAction(exit_action);
QCoreApplication::processEvents(); QCoreApplication::processEvents();
@ -696,21 +697,21 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
void GMainWindow::InitializeWidgets() { void GMainWindow::InitializeWidgets() {
#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING #ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING
ui.action_Report_Compatibility->setVisible(true); ui->action_Report_Compatibility->setVisible(true);
#endif #endif
render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem, system); render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem, system);
render_window->hide(); render_window->hide();
game_list = new GameList(vfs, provider.get(), system, this); game_list = new GameList(vfs, provider.get(), system, this);
ui.horizontalLayout->addWidget(game_list); ui->horizontalLayout->addWidget(game_list);
game_list_placeholder = new GameListPlaceholder(this); game_list_placeholder = new GameListPlaceholder(this);
ui.horizontalLayout->addWidget(game_list_placeholder); ui->horizontalLayout->addWidget(game_list_placeholder);
game_list_placeholder->setVisible(false); game_list_placeholder->setVisible(false);
loading_screen = new LoadingScreen(this); loading_screen = new LoadingScreen(this);
loading_screen->hide(); loading_screen->hide();
ui.horizontalLayout->addWidget(loading_screen); ui->horizontalLayout->addWidget(loading_screen);
connect(loading_screen, &LoadingScreen::Hidden, [&] { connect(loading_screen, &LoadingScreen::Hidden, [&] {
loading_screen->Clear(); loading_screen->Clear();
if (emulation_running) { if (emulation_running) {
@ -835,7 +836,7 @@ void GMainWindow::InitializeWidgets() {
} }
void GMainWindow::InitializeDebugWidgets() { void GMainWindow::InitializeDebugWidgets() {
QMenu* debug_menu = ui.menu_View_Debugging; QMenu* debug_menu = ui->menu_View_Debugging;
#if MICROPROFILE_ENABLED #if MICROPROFILE_ENABLED
microProfileDialog = new MicroProfileDialog(this); microProfileDialog = new MicroProfileDialog(this);
@ -864,16 +865,16 @@ void GMainWindow::InitializeRecentFileMenuActions() {
actions_recent_files[i]->setVisible(false); actions_recent_files[i]->setVisible(false);
connect(actions_recent_files[i], &QAction::triggered, this, &GMainWindow::OnMenuRecentFile); connect(actions_recent_files[i], &QAction::triggered, this, &GMainWindow::OnMenuRecentFile);
ui.menu_recent_files->addAction(actions_recent_files[i]); ui->menu_recent_files->addAction(actions_recent_files[i]);
} }
ui.menu_recent_files->addSeparator(); ui->menu_recent_files->addSeparator();
QAction* action_clear_recent_files = new QAction(this); QAction* action_clear_recent_files = new QAction(this);
action_clear_recent_files->setText(tr("&Clear Recent Files")); action_clear_recent_files->setText(tr("&Clear Recent Files"));
connect(action_clear_recent_files, &QAction::triggered, this, [this] { connect(action_clear_recent_files, &QAction::triggered, this, [this] {
UISettings::values.recent_files.clear(); UISettings::values.recent_files.clear();
UpdateRecentFiles(); UpdateRecentFiles();
}); });
ui.menu_recent_files->addAction(action_clear_recent_files); ui->menu_recent_files->addAction(action_clear_recent_files);
UpdateRecentFiles(); UpdateRecentFiles();
} }
@ -892,43 +893,43 @@ void GMainWindow::InitializeHotkeys() {
const QString fullscreen = QStringLiteral("Fullscreen"); const QString fullscreen = QStringLiteral("Fullscreen");
const QString capture_screenshot = QStringLiteral("Capture Screenshot"); const QString capture_screenshot = QStringLiteral("Capture Screenshot");
ui.action_Load_File->setShortcut(hotkey_registry.GetKeySequence(main_window, load_file)); ui->action_Load_File->setShortcut(hotkey_registry.GetKeySequence(main_window, load_file));
ui.action_Load_File->setShortcutContext( ui->action_Load_File->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, load_file)); hotkey_registry.GetShortcutContext(main_window, load_file));
ui.action_Load_Amiibo->setShortcut(hotkey_registry.GetKeySequence(main_window, load_amiibo)); ui->action_Load_Amiibo->setShortcut(hotkey_registry.GetKeySequence(main_window, load_amiibo));
ui.action_Load_Amiibo->setShortcutContext( ui->action_Load_Amiibo->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, load_amiibo)); hotkey_registry.GetShortcutContext(main_window, load_amiibo));
ui.action_Exit->setShortcut(hotkey_registry.GetKeySequence(main_window, exit_yuzu)); ui->action_Exit->setShortcut(hotkey_registry.GetKeySequence(main_window, exit_yuzu));
ui.action_Exit->setShortcutContext(hotkey_registry.GetShortcutContext(main_window, exit_yuzu)); ui->action_Exit->setShortcutContext(hotkey_registry.GetShortcutContext(main_window, exit_yuzu));
ui.action_Restart->setShortcut(hotkey_registry.GetKeySequence(main_window, restart_emulation)); ui->action_Restart->setShortcut(hotkey_registry.GetKeySequence(main_window, restart_emulation));
ui.action_Restart->setShortcutContext( ui->action_Restart->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, restart_emulation)); hotkey_registry.GetShortcutContext(main_window, restart_emulation));
ui.action_Stop->setShortcut(hotkey_registry.GetKeySequence(main_window, stop_emulation)); ui->action_Stop->setShortcut(hotkey_registry.GetKeySequence(main_window, stop_emulation));
ui.action_Stop->setShortcutContext( ui->action_Stop->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, stop_emulation)); hotkey_registry.GetShortcutContext(main_window, stop_emulation));
ui.action_Show_Filter_Bar->setShortcut( ui->action_Show_Filter_Bar->setShortcut(
hotkey_registry.GetKeySequence(main_window, toggle_filter_bar)); hotkey_registry.GetKeySequence(main_window, toggle_filter_bar));
ui.action_Show_Filter_Bar->setShortcutContext( ui->action_Show_Filter_Bar->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, toggle_filter_bar)); hotkey_registry.GetShortcutContext(main_window, toggle_filter_bar));
ui.action_Show_Status_Bar->setShortcut( ui->action_Show_Status_Bar->setShortcut(
hotkey_registry.GetKeySequence(main_window, toggle_status_bar)); hotkey_registry.GetKeySequence(main_window, toggle_status_bar));
ui.action_Show_Status_Bar->setShortcutContext( ui->action_Show_Status_Bar->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, toggle_status_bar)); hotkey_registry.GetShortcutContext(main_window, toggle_status_bar));
ui.action_Capture_Screenshot->setShortcut( ui->action_Capture_Screenshot->setShortcut(
hotkey_registry.GetKeySequence(main_window, capture_screenshot)); hotkey_registry.GetKeySequence(main_window, capture_screenshot));
ui.action_Capture_Screenshot->setShortcutContext( ui->action_Capture_Screenshot->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, capture_screenshot)); hotkey_registry.GetShortcutContext(main_window, capture_screenshot));
ui.action_Fullscreen->setShortcut( ui->action_Fullscreen->setShortcut(
hotkey_registry.GetHotkey(main_window, fullscreen, this)->key()); hotkey_registry.GetHotkey(main_window, fullscreen, this)->key());
ui.action_Fullscreen->setShortcutContext( ui->action_Fullscreen->setShortcutContext(
hotkey_registry.GetShortcutContext(main_window, fullscreen)); hotkey_registry.GetShortcutContext(main_window, fullscreen));
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Load File"), this), connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Load File"), this),
@ -952,13 +953,13 @@ void GMainWindow::InitializeHotkeys() {
BootGame(game_path); BootGame(game_path);
}); });
connect(hotkey_registry.GetHotkey(main_window, fullscreen, render_window), connect(hotkey_registry.GetHotkey(main_window, fullscreen, render_window),
&QShortcut::activated, ui.action_Fullscreen, &QAction::trigger); &QShortcut::activated, ui->action_Fullscreen, &QAction::trigger);
connect(hotkey_registry.GetHotkey(main_window, fullscreen, render_window), connect(hotkey_registry.GetHotkey(main_window, fullscreen, render_window),
&QShortcut::activatedAmbiguously, ui.action_Fullscreen, &QAction::trigger); &QShortcut::activatedAmbiguously, ui->action_Fullscreen, &QAction::trigger);
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Exit Fullscreen"), this), connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Exit Fullscreen"), this),
&QShortcut::activated, this, [&] { &QShortcut::activated, this, [&] {
if (emulation_running) { if (emulation_running) {
ui.action_Fullscreen->setChecked(false); ui->action_Fullscreen->setChecked(false);
ToggleFullscreen(); ToggleFullscreen();
} }
}); });
@ -987,7 +988,7 @@ void GMainWindow::InitializeHotkeys() {
}); });
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Load Amiibo"), this), connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Load Amiibo"), this),
&QShortcut::activated, this, [&] { &QShortcut::activated, this, [&] {
if (ui.action_Load_Amiibo->isEnabled()) { if (ui->action_Load_Amiibo->isEnabled()) {
OnLoadAmiibo(); OnLoadAmiibo();
} }
}); });
@ -1068,20 +1069,20 @@ void GMainWindow::RestoreUIState() {
game_list->LoadInterfaceLayout(); game_list->LoadInterfaceLayout();
ui.action_Single_Window_Mode->setChecked(UISettings::values.single_window_mode.GetValue()); ui->action_Single_Window_Mode->setChecked(UISettings::values.single_window_mode.GetValue());
ToggleWindowMode(); ToggleWindowMode();
ui.action_Fullscreen->setChecked(UISettings::values.fullscreen.GetValue()); ui->action_Fullscreen->setChecked(UISettings::values.fullscreen.GetValue());
ui.action_Display_Dock_Widget_Headers->setChecked( ui->action_Display_Dock_Widget_Headers->setChecked(
UISettings::values.display_titlebar.GetValue()); UISettings::values.display_titlebar.GetValue());
OnDisplayTitleBars(ui.action_Display_Dock_Widget_Headers->isChecked()); OnDisplayTitleBars(ui->action_Display_Dock_Widget_Headers->isChecked());
ui.action_Show_Filter_Bar->setChecked(UISettings::values.show_filter_bar.GetValue()); ui->action_Show_Filter_Bar->setChecked(UISettings::values.show_filter_bar.GetValue());
game_list->SetFilterVisible(ui.action_Show_Filter_Bar->isChecked()); game_list->SetFilterVisible(ui->action_Show_Filter_Bar->isChecked());
ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar.GetValue()); ui->action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar.GetValue());
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked()); statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
Debugger::ToggleConsole(); Debugger::ToggleConsole();
} }
@ -1093,11 +1094,11 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
state != Qt::ApplicationActive) { state != Qt::ApplicationActive) {
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state); LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
} }
if (ui.action_Pause->isEnabled() && if (ui->action_Pause->isEnabled() &&
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) { (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
auto_paused = true; auto_paused = true;
OnPauseGame(); OnPauseGame();
} else if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) { } else if (ui->action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) {
auto_paused = false; auto_paused = false;
OnStartGame(); OnStartGame();
} }
@ -1142,59 +1143,60 @@ void GMainWindow::ConnectWidgetEvents() {
void GMainWindow::ConnectMenuEvents() { void GMainWindow::ConnectMenuEvents() {
// File // File
connect(ui.action_Load_File, &QAction::triggered, this, &GMainWindow::OnMenuLoadFile); connect(ui->action_Load_File, &QAction::triggered, this, &GMainWindow::OnMenuLoadFile);
connect(ui.action_Load_Folder, &QAction::triggered, this, &GMainWindow::OnMenuLoadFolder); connect(ui->action_Load_Folder, &QAction::triggered, this, &GMainWindow::OnMenuLoadFolder);
connect(ui.action_Install_File_NAND, &QAction::triggered, this, connect(ui->action_Install_File_NAND, &QAction::triggered, this,
&GMainWindow::OnMenuInstallToNAND); &GMainWindow::OnMenuInstallToNAND);
connect(ui.action_Exit, &QAction::triggered, this, &QMainWindow::close); connect(ui->action_Exit, &QAction::triggered, this, &QMainWindow::close);
connect(ui.action_Load_Amiibo, &QAction::triggered, this, &GMainWindow::OnLoadAmiibo); connect(ui->action_Load_Amiibo, &QAction::triggered, this, &GMainWindow::OnLoadAmiibo);
// Emulation // Emulation
connect(ui.action_Start, &QAction::triggered, this, &GMainWindow::OnStartGame); connect(ui->action_Start, &QAction::triggered, this, &GMainWindow::OnStartGame);
connect(ui.action_Pause, &QAction::triggered, this, &GMainWindow::OnPauseGame); connect(ui->action_Pause, &QAction::triggered, this, &GMainWindow::OnPauseGame);
connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui->action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
connect(ui.action_Report_Compatibility, &QAction::triggered, this, connect(ui->action_Report_Compatibility, &QAction::triggered, this,
&GMainWindow::OnMenuReportCompatibility); &GMainWindow::OnMenuReportCompatibility);
connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); connect(ui->action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage);
connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, connect(ui->action_Open_Quickstart_Guide, &QAction::triggered, this,
&GMainWindow::OnOpenQuickstartGuide); &GMainWindow::OnOpenQuickstartGuide);
connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnOpenFAQ); connect(ui->action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnOpenFAQ);
connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui->action_Restart, &QAction::triggered, this,
connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); [this] { BootGame(QString(game_path)); });
connect(ui.action_Configure_Tas, &QAction::triggered, this, &GMainWindow::OnConfigureTas); connect(ui->action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
connect(ui.action_Configure_Current_Game, &QAction::triggered, this, connect(ui->action_Configure_Tas, &QAction::triggered, this, &GMainWindow::OnConfigureTas);
connect(ui->action_Configure_Current_Game, &QAction::triggered, this,
&GMainWindow::OnConfigurePerGame); &GMainWindow::OnConfigurePerGame);
// View // View
connect(ui.action_Single_Window_Mode, &QAction::triggered, this, connect(ui->action_Single_Window_Mode, &QAction::triggered, this,
&GMainWindow::ToggleWindowMode); &GMainWindow::ToggleWindowMode);
connect(ui.action_Display_Dock_Widget_Headers, &QAction::triggered, this, connect(ui->action_Display_Dock_Widget_Headers, &QAction::triggered, this,
&GMainWindow::OnDisplayTitleBars); &GMainWindow::OnDisplayTitleBars);
connect(ui.action_Show_Filter_Bar, &QAction::triggered, this, &GMainWindow::OnToggleFilterBar); connect(ui->action_Show_Filter_Bar, &QAction::triggered, this, &GMainWindow::OnToggleFilterBar);
connect(ui.action_Show_Status_Bar, &QAction::triggered, statusBar(), &QStatusBar::setVisible); connect(ui->action_Show_Status_Bar, &QAction::triggered, statusBar(), &QStatusBar::setVisible);
connect(ui.action_Reset_Window_Size_720, &QAction::triggered, this, connect(ui->action_Reset_Window_Size_720, &QAction::triggered, this,
&GMainWindow::ResetWindowSize720); &GMainWindow::ResetWindowSize720);
connect(ui.action_Reset_Window_Size_900, &QAction::triggered, this, connect(ui->action_Reset_Window_Size_900, &QAction::triggered, this,
&GMainWindow::ResetWindowSize900); &GMainWindow::ResetWindowSize900);
connect(ui.action_Reset_Window_Size_1080, &QAction::triggered, this, connect(ui->action_Reset_Window_Size_1080, &QAction::triggered, this,
&GMainWindow::ResetWindowSize1080); &GMainWindow::ResetWindowSize1080);
ui.menu_Reset_Window_Size->addAction(ui.action_Reset_Window_Size_720); ui->menu_Reset_Window_Size->addAction(ui->action_Reset_Window_Size_720);
ui.menu_Reset_Window_Size->addAction(ui.action_Reset_Window_Size_900); ui->menu_Reset_Window_Size->addAction(ui->action_Reset_Window_Size_900);
ui.menu_Reset_Window_Size->addAction(ui.action_Reset_Window_Size_1080); ui->menu_Reset_Window_Size->addAction(ui->action_Reset_Window_Size_1080);
// Fullscreen // Fullscreen
connect(ui.action_Fullscreen, &QAction::triggered, this, &GMainWindow::ToggleFullscreen); connect(ui->action_Fullscreen, &QAction::triggered, this, &GMainWindow::ToggleFullscreen);
// Movie // Movie
connect(ui.action_Capture_Screenshot, &QAction::triggered, this, connect(ui->action_Capture_Screenshot, &QAction::triggered, this,
&GMainWindow::OnCaptureScreenshot); &GMainWindow::OnCaptureScreenshot);
// Help // Help
connect(ui.action_Open_yuzu_Folder, &QAction::triggered, this, &GMainWindow::OnOpenYuzuFolder); connect(ui->action_Open_yuzu_Folder, &QAction::triggered, this, &GMainWindow::OnOpenYuzuFolder);
connect(ui.action_Rederive, &QAction::triggered, this, connect(ui->action_Rederive, &QAction::triggered, this,
std::bind(&GMainWindow::OnReinitializeKeys, this, ReinitializeKeyBehavior::Warning)); std::bind(&GMainWindow::OnReinitializeKeys, this, ReinitializeKeyBehavior::Warning));
connect(ui.action_About, &QAction::triggered, this, &GMainWindow::OnAbout); connect(ui->action_About, &QAction::triggered, this, &GMainWindow::OnAbout);
} }
void GMainWindow::OnDisplayTitleBars(bool show) { void GMainWindow::OnDisplayTitleBars(bool show) {
@ -1405,7 +1407,7 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
// Update the GUI // Update the GUI
UpdateStatusButtons(); UpdateStatusButtons();
if (ui.action_Single_Window_Mode->isChecked()) { if (ui->action_Single_Window_Mode->isChecked()) {
game_list->hide(); game_list->hide();
game_list_placeholder->hide(); game_list_placeholder->hide();
} }
@ -1451,7 +1453,7 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
loading_screen->show(); loading_screen->show();
emulation_running = true; emulation_running = true;
if (ui.action_Fullscreen->isChecked()) { if (ui->action_Fullscreen->isChecked()) {
ShowFullscreen(); ShowFullscreen();
} }
OnStartGame(); OnStartGame();
@ -1462,7 +1464,7 @@ void GMainWindow::ShutdownGame() {
return; return;
} }
if (ui.action_Fullscreen->isChecked()) { if (ui->action_Fullscreen->isChecked()) {
HideFullscreen(); HideFullscreen();
} }
@ -1483,15 +1485,15 @@ void GMainWindow::ShutdownGame() {
disconnect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame); disconnect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
// Update the GUI // Update the GUI
ui.action_Start->setEnabled(false); ui->action_Start->setEnabled(false);
ui.action_Start->setText(tr("Start")); ui->action_Start->setText(tr("Start"));
ui.action_Pause->setEnabled(false); ui->action_Pause->setEnabled(false);
ui.action_Stop->setEnabled(false); ui->action_Stop->setEnabled(false);
ui.action_Restart->setEnabled(false); ui->action_Restart->setEnabled(false);
ui.action_Configure_Current_Game->setEnabled(false); ui->action_Configure_Current_Game->setEnabled(false);
ui.action_Report_Compatibility->setEnabled(false); ui->action_Report_Compatibility->setEnabled(false);
ui.action_Load_Amiibo->setEnabled(false); ui->action_Load_Amiibo->setEnabled(false);
ui.action_Capture_Screenshot->setEnabled(false); ui->action_Capture_Screenshot->setEnabled(false);
render_window->hide(); render_window->hide();
loading_screen->hide(); loading_screen->hide();
loading_screen->Clear(); loading_screen->Clear();
@ -1553,7 +1555,7 @@ void GMainWindow::UpdateRecentFiles() {
} }
// Enable the recent files menu if the list isn't empty // Enable the recent files menu if the list isn't empty
ui.menu_recent_files->setEnabled(num_recent_files != 0); ui->menu_recent_files->setEnabled(num_recent_files != 0);
} }
void GMainWindow::OnGameListLoadFile(QString game_path, u64 program_id) { void GMainWindow::OnGameListLoadFile(QString game_path, u64 program_id) {
@ -2079,7 +2081,7 @@ void GMainWindow::OnGameListAddDirectory() {
} }
void GMainWindow::OnGameListShowList(bool show) { void GMainWindow::OnGameListShowList(bool show) {
if (emulation_running && ui.action_Single_Window_Mode->isChecked()) if (emulation_running && ui->action_Single_Window_Mode->isChecked())
return; return;
game_list->setVisible(show); game_list->setVisible(show);
game_list_placeholder->setVisible(!show); game_list_placeholder->setVisible(!show);
@ -2181,7 +2183,7 @@ void GMainWindow::OnMenuInstallToNAND() {
QStringList failed_files{}; // Files that failed to install due to errors QStringList failed_files{}; // Files that failed to install due to errors
bool detected_base_install{}; // Whether a base game was attempted to be installed bool detected_base_install{}; // Whether a base game was attempted to be installed
ui.action_Install_File_NAND->setEnabled(false); ui->action_Install_File_NAND->setEnabled(false);
install_progress = new QProgressDialog(QString{}, tr("Cancel"), 0, total_size, this); install_progress = new QProgressDialog(QString{}, tr("Cancel"), 0, total_size, this);
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint & install_progress->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint &
@ -2257,7 +2259,7 @@ void GMainWindow::OnMenuInstallToNAND() {
Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
"game_list"); "game_list");
game_list->PopulateAsync(UISettings::values.game_dirs); game_list->PopulateAsync(UISettings::values.game_dirs);
ui.action_Install_File_NAND->setEnabled(true); ui->action_Install_File_NAND->setEnabled(true);
} }
InstallResult GMainWindow::InstallNSPXCI(const QString& filename) { InstallResult GMainWindow::InstallNSPXCI(const QString& filename) {
@ -2421,27 +2423,27 @@ void GMainWindow::OnStartGame() {
connect(emu_thread.get(), &EmuThread::ErrorThrown, this, &GMainWindow::OnCoreError); connect(emu_thread.get(), &EmuThread::ErrorThrown, this, &GMainWindow::OnCoreError);
ui.action_Start->setEnabled(false); ui->action_Start->setEnabled(false);
ui.action_Start->setText(tr("&Continue")); ui->action_Start->setText(tr("&Continue"));
ui.action_Pause->setEnabled(true); ui->action_Pause->setEnabled(true);
ui.action_Stop->setEnabled(true); ui->action_Stop->setEnabled(true);
ui.action_Restart->setEnabled(true); ui->action_Restart->setEnabled(true);
ui.action_Configure_Current_Game->setEnabled(true); ui->action_Configure_Current_Game->setEnabled(true);
ui.action_Report_Compatibility->setEnabled(true); ui->action_Report_Compatibility->setEnabled(true);
discord_rpc->Update(); discord_rpc->Update();
ui.action_Load_Amiibo->setEnabled(true); ui->action_Load_Amiibo->setEnabled(true);
ui.action_Capture_Screenshot->setEnabled(true); ui->action_Capture_Screenshot->setEnabled(true);
} }
void GMainWindow::OnPauseGame() { void GMainWindow::OnPauseGame() {
emu_thread->SetRunning(false); emu_thread->SetRunning(false);
ui.action_Start->setEnabled(true); ui->action_Start->setEnabled(true);
ui.action_Pause->setEnabled(false); ui->action_Pause->setEnabled(false);
ui.action_Stop->setEnabled(true); ui->action_Stop->setEnabled(true);
ui.action_Capture_Screenshot->setEnabled(false); ui->action_Capture_Screenshot->setEnabled(false);
AllowOSSleep(); AllowOSSleep();
} }
@ -2517,7 +2519,7 @@ void GMainWindow::ToggleFullscreen() {
if (!emulation_running) { if (!emulation_running) {
return; return;
} }
if (ui.action_Fullscreen->isChecked()) { if (ui->action_Fullscreen->isChecked()) {
ShowFullscreen(); ShowFullscreen();
} else { } else {
HideFullscreen(); HideFullscreen();
@ -2525,10 +2527,10 @@ void GMainWindow::ToggleFullscreen() {
} }
void GMainWindow::ShowFullscreen() { void GMainWindow::ShowFullscreen() {
if (ui.action_Single_Window_Mode->isChecked()) { if (ui->action_Single_Window_Mode->isChecked()) {
UISettings::values.geometry = saveGeometry(); UISettings::values.geometry = saveGeometry();
ui.menubar->hide(); ui->menubar->hide();
statusBar()->hide(); statusBar()->hide();
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) {
@ -2562,7 +2564,7 @@ void GMainWindow::ShowFullscreen() {
} }
void GMainWindow::HideFullscreen() { void GMainWindow::HideFullscreen() {
if (ui.action_Single_Window_Mode->isChecked()) { if (ui->action_Single_Window_Mode->isChecked()) {
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) {
showNormal(); showNormal();
restoreGeometry(UISettings::values.geometry); restoreGeometry(UISettings::values.geometry);
@ -2574,8 +2576,8 @@ void GMainWindow::HideFullscreen() {
show(); show();
} }
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked()); statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
ui.menubar->show(); ui->menubar->show();
} else { } else {
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) {
render_window->showNormal(); render_window->showNormal();
@ -2591,10 +2593,10 @@ void GMainWindow::HideFullscreen() {
} }
void GMainWindow::ToggleWindowMode() { void GMainWindow::ToggleWindowMode() {
if (ui.action_Single_Window_Mode->isChecked()) { if (ui->action_Single_Window_Mode->isChecked()) {
// Render in the main window... // Render in the main window...
render_window->BackupGeometry(); render_window->BackupGeometry();
ui.horizontalLayout->addWidget(render_window); ui->horizontalLayout->addWidget(render_window);
render_window->setFocusPolicy(Qt::StrongFocus); render_window->setFocusPolicy(Qt::StrongFocus);
if (emulation_running) { if (emulation_running) {
render_window->setVisible(true); render_window->setVisible(true);
@ -2604,7 +2606,7 @@ void GMainWindow::ToggleWindowMode() {
} else { } else {
// Render in a separate window... // Render in a separate window...
ui.horizontalLayout->removeWidget(render_window); ui->horizontalLayout->removeWidget(render_window);
render_window->setParent(nullptr); render_window->setParent(nullptr);
render_window->setFocusPolicy(Qt::NoFocus); render_window->setFocusPolicy(Qt::NoFocus);
if (emulation_running) { if (emulation_running) {
@ -2619,10 +2621,10 @@ void GMainWindow::ResetWindowSize(u32 width, u32 height) {
const auto aspect_ratio = Layout::EmulationAspectRatio( const auto aspect_ratio = Layout::EmulationAspectRatio(
static_cast<Layout::AspectRatio>(Settings::values.aspect_ratio.GetValue()), static_cast<Layout::AspectRatio>(Settings::values.aspect_ratio.GetValue()),
static_cast<float>(height) / width); static_cast<float>(height) / width);
if (!ui.action_Single_Window_Mode->isChecked()) { if (!ui->action_Single_Window_Mode->isChecked()) {
render_window->resize(height / aspect_ratio, height); render_window->resize(height / aspect_ratio, height);
} else { } else {
const bool show_status_bar = ui.action_Show_Status_Bar->isChecked(); const bool show_status_bar = ui->action_Show_Status_Bar->isChecked();
const auto status_bar_height = show_status_bar ? statusBar()->height() : 0; const auto status_bar_height = show_status_bar ? statusBar()->height() : 0;
resize(height / aspect_ratio, height + menuBar()->height() + status_bar_height); resize(height / aspect_ratio, height + menuBar()->height() + status_bar_height);
} }
@ -2833,8 +2835,8 @@ void GMainWindow::OnAbout() {
} }
void GMainWindow::OnToggleFilterBar() { void GMainWindow::OnToggleFilterBar() {
game_list->SetFilterVisible(ui.action_Show_Filter_Bar->isChecked()); game_list->SetFilterVisible(ui->action_Show_Filter_Bar->isChecked());
if (ui.action_Show_Filter_Bar->isChecked()) { if (ui->action_Show_Filter_Bar->isChecked()) {
game_list->SetFilterFocus(); game_list->SetFilterFocus();
} else { } else {
game_list->ClearFilter(); game_list->ClearFilter();
@ -3011,7 +3013,7 @@ void GMainWindow::UpdateStatusButtons() {
} }
void GMainWindow::UpdateUISettings() { void GMainWindow::UpdateUISettings() {
if (!ui.action_Fullscreen->isChecked()) { if (!ui->action_Fullscreen->isChecked()) {
UISettings::values.geometry = saveGeometry(); UISettings::values.geometry = saveGeometry();
UISettings::values.renderwindow_geometry = render_window->saveGeometry(); UISettings::values.renderwindow_geometry = render_window->saveGeometry();
} }
@ -3020,11 +3022,11 @@ void GMainWindow::UpdateUISettings() {
UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry(); UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry();
UISettings::values.microprofile_visible = microProfileDialog->isVisible(); UISettings::values.microprofile_visible = microProfileDialog->isVisible();
#endif #endif
UISettings::values.single_window_mode = ui.action_Single_Window_Mode->isChecked(); UISettings::values.single_window_mode = ui->action_Single_Window_Mode->isChecked();
UISettings::values.fullscreen = ui.action_Fullscreen->isChecked(); UISettings::values.fullscreen = ui->action_Fullscreen->isChecked();
UISettings::values.display_titlebar = ui.action_Display_Dock_Widget_Headers->isChecked(); UISettings::values.display_titlebar = ui->action_Display_Dock_Widget_Headers->isChecked();
UISettings::values.show_filter_bar = ui.action_Show_Filter_Bar->isChecked(); UISettings::values.show_filter_bar = ui->action_Show_Filter_Bar->isChecked();
UISettings::values.show_status_bar = ui.action_Show_Status_Bar->isChecked(); UISettings::values.show_status_bar = ui->action_Show_Status_Bar->isChecked();
UISettings::values.first_start = false; UISettings::values.first_start = false;
} }
@ -3354,7 +3356,7 @@ void GMainWindow::RequestGameExit() {
} }
void GMainWindow::filterBarSetChecked(bool state) { void GMainWindow::filterBarSetChecked(bool state) {
ui.action_Show_Filter_Bar->setChecked(state); ui->action_Show_Filter_Bar->setChecked(state);
emit(OnToggleFilterBar()); emit(OnToggleFilterBar());
} }
@ -3422,11 +3424,11 @@ void GMainWindow::OnLanguageChanged(const QString& locale) {
UISettings::values.language = locale; UISettings::values.language = locale;
LoadTranslation(); LoadTranslation();
ui.retranslateUi(this); ui->retranslateUi(this);
UpdateWindowTitle(); UpdateWindowTitle();
if (emulation_running) if (emulation_running)
ui.action_Start->setText(tr("&Continue")); ui->action_Start->setText(tr("&Continue"));
} }
void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) { void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {

View File

@ -15,7 +15,6 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/acc/profile_manager.h"
#include "ui_main.h"
#include "yuzu/compatibility_list.h" #include "yuzu/compatibility_list.h"
#include "yuzu/hotkeys.h" #include "yuzu/hotkeys.h"
@ -73,6 +72,10 @@ enum class SwkbdReplyType : u32;
enum class WebExitReason : u32; enum class WebExitReason : u32;
} // namespace Service::AM::Applets } // namespace Service::AM::Applets
namespace Ui {
class MainWindow;
}
enum class EmulatedDirectoryTarget { enum class EmulatedDirectoryTarget {
NAND, NAND,
SDMC, SDMC,
@ -306,7 +309,7 @@ private:
void OpenPerGameConfiguration(u64 title_id, const std::string& file_name); void OpenPerGameConfiguration(u64 title_id, const std::string& file_name);
QString GetTasStateDescription() const; QString GetTasStateDescription() const;
Ui::MainWindow ui; std::unique_ptr<Ui::MainWindow> ui;
std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc; std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc;
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem; std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;