From 0afbd81ebbd50788408b9783ce8f276cbdb84edf Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Wed, 28 Jan 2026 00:14:55 +0900 Subject: [PATCH] [Build] Fix building misc subprojects --- src/xenia/app/emulator_window.cc | 12 ++++++++++++ src/xenia/gpu/gpu_flags.cc | 3 +-- src/xenia/kernel/xboxkrnl/xboxkrnl_video.cc | 3 ++- src/xenia/ui/game_list_dialog_qt.cc | 21 ++++++--------------- src/xenia/ui/game_list_dialog_qt.h | 5 +++++ 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index 3e90fae90..82e9201fb 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -372,6 +372,18 @@ void EmulatorWindow::OnEmulatorInitialized() { QWidget* central_widget = qt_window->qwindow()->centralWidget(); if (central_widget && central_widget->layout()) { game_list_dialog_qt_ = new GameListDialogQt(central_widget, this); + // Connect signals from game list dialog + QObject::connect(game_list_dialog_qt_, + &GameListDialogQt::fileOpenRequested, + [this]() { FileOpen(); }); + QObject::connect(game_list_dialog_qt_, + &GameListDialogQt::launchGameRequested, + [this](const std::filesystem::path& path) { + LaunchTitleInNewProcess(path); + }); + QObject::connect(game_list_dialog_qt_, + &GameListDialogQt::settingsRequested, + [this]() { ToggleConfigDialog(); }); // Add it to the layout so it fills the window central_widget->layout()->addWidget(game_list_dialog_qt_); } diff --git a/src/xenia/gpu/gpu_flags.cc b/src/xenia/gpu/gpu_flags.cc index 8e43cd775..62c73bd8a 100644 --- a/src/xenia/gpu/gpu_flags.cc +++ b/src/xenia/gpu/gpu_flags.cc @@ -12,8 +12,7 @@ #include "xenia/base/logging.h" #include "xenia/ui/renderdoc_api.h" -// Declared in xboxkrnl_video.cc -DECLARE_bool(use_50Hz_mode); +DEFINE_bool(use_50Hz_mode, false, "Enables usage of PAL-50 mode.", "Video"); DEFINE_path(trace_gpu_prefix, "scratch/gpu/", "Prefix path for GPU trace files.", "GPU"); diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_video.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_video.cc index 2f012c073..d67b2d3e6 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_video.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_video.cc @@ -24,7 +24,8 @@ DEFINE_int32( "2=NTSC-J\n 3=PAL\n", "Video"); -DEFINE_bool(use_50Hz_mode, false, "Enables usage of PAL-50 mode.", "Video"); +// Defined in gpu_flags.cc +DECLARE_bool(use_50Hz_mode); DEFINE_bool(interlaced, false, "Toggles interlaced mode.", "Video"); // TODO: This is stored in XConfig somewhere, probably in video flags. diff --git a/src/xenia/ui/game_list_dialog_qt.cc b/src/xenia/ui/game_list_dialog_qt.cc index 359c8f3c0..56ef2e72c 100644 --- a/src/xenia/ui/game_list_dialog_qt.cc +++ b/src/xenia/ui/game_list_dialog_qt.cc @@ -146,11 +146,8 @@ void GameListDialogQt::SetupUI() { open_button->setIconSize(QSize(64, 64)); open_button->setMinimumSize(100, 80); open_button->setMaximumSize(100, 80); - connect(open_button, &QToolButton::clicked, [this]() { - if (emulator_window_) { - emulator_window_->FileOpen(); - } - }); + connect(open_button, &QToolButton::clicked, + [this]() { emit fileOpenRequested(); }); open_label_ = new QLabel("Open", this); open_label_->setAlignment(Qt::AlignCenter); @@ -1154,11 +1151,11 @@ void GameListDialogQt::LaunchGame(const std::filesystem::path& path, LoadGameList(); // Open file picker - emulator_window_->FileOpen(); + emit fileOpenRequested(); return; } - emulator_window_->LaunchTitleInNewProcess(path); + emit launchGameRequested(path); } } @@ -1169,9 +1166,7 @@ void GameListDialogQt::LaunchGameWithFilePicker() { "Please select the game file to launch it."); // Open file picker - if (emulator_window_) { - emulator_window_->FileOpen(); - } + emit fileOpenRequested(); } void GameListDialogQt::OpenContainingFolder(const std::filesystem::path& path) { @@ -1306,11 +1301,7 @@ void GameListDialogQt::OnPlayClicked() { } } -void GameListDialogQt::OnSettingsClicked() { - if (emulator_window_) { - emulator_window_->ToggleConfigDialog(); - } -} +void GameListDialogQt::OnSettingsClicked() { emit settingsRequested(); } void GameListDialogQt::OnProfileClicked() { // Left click always opens profile dialog (Qt version for UI process) diff --git a/src/xenia/ui/game_list_dialog_qt.h b/src/xenia/ui/game_list_dialog_qt.h index 8811c23fb..8aed117a1 100644 --- a/src/xenia/ui/game_list_dialog_qt.h +++ b/src/xenia/ui/game_list_dialog_qt.h @@ -67,6 +67,11 @@ class GameListDialogQt : public QWidget { void RefreshIcons(); void UpdateProfileButtonState(); + signals: + void fileOpenRequested(); + void launchGameRequested(const std::filesystem::path& path); + void settingsRequested(); + private slots: void OnFilterTextChanged(const QString& text); void OnGameDoubleClicked(int row, int column);