qt_common init

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-07-22 16:31:36 -04:00
parent 28d26b0d76
commit 11db0f0dbf
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
56 changed files with 233 additions and 153 deletions

View file

@ -11,6 +11,7 @@
#include "core/loader/nca.h"
#include "core/tools/renderdoc.h"
#include "frontend_common/firmware_manager.h"
#include "qt_common/qt_common.h"
#include <JlCompress.h>
@ -156,7 +157,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "yuzu/compatibility_list.h"
#include "yuzu/configuration/configure_dialog.h"
#include "yuzu/configuration/configure_input_per_game.h"
#include "yuzu/configuration/qt_config.h"
#include "qt_common/qt_config.h"
#include "yuzu/debugger/console.h"
#include "yuzu/debugger/controller.h"
#include "yuzu/debugger/wait_tree.h"
@ -170,7 +171,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "yuzu/main.h"
#include "yuzu/play_time_manager.h"
#include "yuzu/startup_checks.h"
#include "yuzu/uisettings.h"
#include "qt_common/uisettings.h"
#include "yuzu/util/clickable_label.h"
#include "yuzu/vk_device_info.h"
@ -559,7 +560,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
game_list->LoadCompatibilityList();
// force reload on first load to ensure add-ons get updated
game_list->PopulateAsync(UISettings::values.game_dirs, false);
game_list->PopulateAsync(UISettings::values.game_dirs);
// make sure menubar has the arrow cursor instead of inheriting from this
ui->menubar->setCursor(QCursor());
@ -4609,9 +4610,11 @@ void GMainWindow::OnToggleStatusBar() {
statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
}
void GMainWindow::OnGameListRefresh() {
// force reload add-ons etc
game_list->ForceRefreshGameDirectory();
void GMainWindow::OnGameListRefresh()
{
// Resets metadata cache and reloads
QtCommon::ResetMetadata();
game_list->RefreshGameDirectory();
SetFirmwareVersion();
}
@ -4620,7 +4623,7 @@ void GMainWindow::OnAlbum() {
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use the Album applet."));
tr("Please install firmware to use the Album applet."));
return;
}
@ -4643,7 +4646,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use the Cabinet applet."));
tr("Please install firmware to use the Cabinet applet."));
return;
}
@ -4667,7 +4670,7 @@ void GMainWindow::OnMiiEdit() {
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use the Mii editor."));
tr("Please install firmware to use the Mii editor."));
return;
}
@ -4690,7 +4693,7 @@ void GMainWindow::OnOpenControllerMenu() {
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use the Controller Menu."));
tr("Please install firmware to use the Controller Menu."));
return;
}
@ -4745,6 +4748,8 @@ void GMainWindow::OnHomeMenu() {
break;
}
// TODO(crueter): So much of this crap is common to qt that I should just move it all tbh
constexpr u64 QLaunchId = static_cast<u64>(Service::AM::AppletProgramId::QLaunch);
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
@ -4767,7 +4772,7 @@ void GMainWindow::OnInitialSetup() {
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
QMessageBox::warning(this, tr("No firmware available"),
tr("Please install the firmware to use Starter."));
tr("Please install firmware to use Starter."));
return;
}