2026-01-12 05:18:12 -05:00
|
|
|
// SPDX-FileCopyrightText: 2002-2026 PCSX2 Dev Team
|
2024-07-30 13:42:36 +02:00
|
|
|
// SPDX-License-Identifier: GPL-3.0+
|
2021-12-13 22:12:54 +10:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-10-15 19:03:52 +10:00
|
|
|
#include "common/WindowInfo.h"
|
|
|
|
|
|
2022-04-03 23:46:05 +10:00
|
|
|
#include <QtWidgets/QLabel>
|
2021-12-13 22:12:54 +10:00
|
|
|
#include <QtWidgets/QMainWindow>
|
2023-02-28 19:29:41 +01:00
|
|
|
#include <QtWidgets/QMenu>
|
2026-04-13 19:45:19 +07:00
|
|
|
#include <QtWidgets/QSlider>
|
|
|
|
|
#include <QtWidgets/QToolButton>
|
2022-04-06 20:49:00 +10:00
|
|
|
#include <functional>
|
2021-12-13 22:12:54 +10:00
|
|
|
#include <optional>
|
|
|
|
|
|
2022-06-15 20:44:14 -04:00
|
|
|
#include "Tools/InputRecording/InputRecordingViewer.h"
|
2023-10-14 18:45:09 +10:00
|
|
|
#include "Settings/ControllerSettingsWindow.h"
|
|
|
|
|
#include "Settings/SettingsWindow.h"
|
2026-06-20 20:27:55 -07:00
|
|
|
#ifdef ENABLE_QT_DEBUGGER
|
2022-12-24 01:51:44 -05:00
|
|
|
#include "Debugger/DebuggerWindow.h"
|
2026-06-20 20:27:55 -07:00
|
|
|
#endif
|
2021-12-13 22:12:54 +10:00
|
|
|
#include "ui_MainWindow.h"
|
|
|
|
|
|
|
|
|
|
class QProgressBar;
|
|
|
|
|
|
2022-04-04 21:27:23 +10:00
|
|
|
class AutoUpdaterDialog;
|
2025-10-30 20:54:07 +00:00
|
|
|
class DisplaySurface;
|
2021-12-13 22:12:54 +10:00
|
|
|
class DisplayContainer;
|
|
|
|
|
class GameListWidget;
|
2023-10-14 18:45:09 +10:00
|
|
|
class ControllerSettingsWindow;
|
2021-12-13 22:12:54 +10:00
|
|
|
|
|
|
|
|
class EmuThread;
|
|
|
|
|
|
2023-07-27 19:24:55 +10:00
|
|
|
namespace Achievements
|
|
|
|
|
{
|
|
|
|
|
enum class LoginRequestReason;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-19 10:32:53 -07:00
|
|
|
#include "QtMetaTypes.h"
|
|
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
namespace GameList
|
|
|
|
|
{
|
|
|
|
|
struct Entry;
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-28 23:34:45 +10:00
|
|
|
enum class CDVD_SourceType : uint8_t;
|
|
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
class MainWindow final : public QMainWindow
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2022-05-07 13:52:13 +10:00
|
|
|
/// This class is a scoped lock on the VM, which prevents it from running while
|
|
|
|
|
/// the object exists. Its purpose is to be used for blocking/modal popup boxes,
|
|
|
|
|
/// where the VM needs to exit fullscreen temporarily.
|
|
|
|
|
class VMLock
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
VMLock(VMLock&& lock);
|
|
|
|
|
VMLock(const VMLock&) = delete;
|
|
|
|
|
~VMLock();
|
|
|
|
|
|
2024-01-07 15:27:39 +10:00
|
|
|
VMLock& operator=(VMLock&& lock);
|
|
|
|
|
VMLock& operator=(const VMLock&) = delete;
|
|
|
|
|
|
2022-05-07 13:52:13 +10:00
|
|
|
/// Returns the parent widget, which can be used for any popup dialogs.
|
|
|
|
|
__fi QWidget* getDialogParent() const { return m_dialog_parent; }
|
|
|
|
|
|
|
|
|
|
/// Cancels any pending unpause/fullscreen transition.
|
|
|
|
|
/// Call when you're going to destroy the VM anyway.
|
|
|
|
|
void cancelResume();
|
|
|
|
|
|
|
|
|
|
private:
|
2025-11-21 22:35:19 +00:00
|
|
|
VMLock(QWidget* dialog_parent, bool was_paused, bool was_exclusive_fullscreen, bool owns_parent);
|
2022-05-07 13:52:13 +10:00
|
|
|
friend MainWindow;
|
|
|
|
|
|
|
|
|
|
QWidget* m_dialog_parent;
|
2025-11-15 16:26:08 +00:00
|
|
|
bool m_has_lock;
|
2022-05-07 13:52:13 +10:00
|
|
|
bool m_was_paused;
|
|
|
|
|
bool m_was_fullscreen;
|
2025-11-21 22:35:19 +00:00
|
|
|
bool m_owns_dialog_parent;
|
2022-05-07 13:52:13 +10:00
|
|
|
};
|
|
|
|
|
|
2022-12-04 18:03:30 +10:00
|
|
|
/// Default filter for opening a file.
|
|
|
|
|
static const char* OPEN_FILE_FILTER;
|
|
|
|
|
|
|
|
|
|
/// Default filter for opening a disc image.
|
|
|
|
|
static const char* DISC_IMAGE_FILTER;
|
|
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
public:
|
2022-11-20 14:26:23 +10:00
|
|
|
MainWindow();
|
2021-12-13 22:12:54 +10:00
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
|
|
void initialize();
|
|
|
|
|
void connectVMThreadSignals(EmuThread* thread);
|
2022-04-04 21:27:23 +10:00
|
|
|
void startupUpdateCheck();
|
2022-09-07 17:44:10 +10:00
|
|
|
void resetSettings(bool ui);
|
2024-03-22 22:01:42 +10:00
|
|
|
void quit();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-05-07 13:52:13 +10:00
|
|
|
/// Locks the VM by pausing it, while a popup dialog is displayed.
|
|
|
|
|
VMLock pauseAndLockVM();
|
|
|
|
|
|
2022-07-03 23:30:03 +10:00
|
|
|
/// Accessors for the status bar widgets, updated by the emulation thread.
|
|
|
|
|
__fi QLabel* getStatusVerboseWidget() const { return m_status_verbose_widget; }
|
2026-04-13 19:45:19 +07:00
|
|
|
__fi QToolButton* getStatusSpeedWidget() const { return m_status_speed_widget; }
|
|
|
|
|
__fi QToolButton* getStatusVolumeWidget() const { return m_status_volume_widget; }
|
2022-07-03 23:30:03 +10:00
|
|
|
__fi QLabel* getStatusRendererWidget() const { return m_status_renderer_widget; }
|
|
|
|
|
__fi QLabel* getStatusResolutionWidget() const { return m_status_resolution_widget; }
|
2026-04-13 19:45:19 +07:00
|
|
|
__fi QLabel* getStatusGPUWidget() const { return m_status_gpu_widget; }
|
2022-07-03 23:30:03 +10:00
|
|
|
__fi QLabel* getStatusFPSWidget() const { return m_status_fps_widget; }
|
|
|
|
|
__fi QLabel* getStatusVPSWidget() const { return m_status_vps_widget; }
|
|
|
|
|
|
2022-12-04 18:03:30 +10:00
|
|
|
/// Rescans a single file. NOTE: Happens on UI thread.
|
|
|
|
|
void rescanFile(const std::string& path);
|
|
|
|
|
|
2025-06-10 19:32:13 -05:00
|
|
|
/// Start a file from a user action (e.g. dragging a file onto the main window or with macOS open with)
|
|
|
|
|
bool startFile(const QString& path);
|
|
|
|
|
|
2025-02-26 20:25:55 +00:00
|
|
|
void doSettings(const char* category = nullptr);
|
|
|
|
|
void doGameSettings(const char* category = nullptr);
|
|
|
|
|
|
2026-06-20 20:27:55 -07:00
|
|
|
#ifdef ENABLE_QT_DEBUGGER
|
2023-02-01 12:53:31 +01:00
|
|
|
void openDebugger();
|
2026-06-20 20:27:55 -07:00
|
|
|
#endif
|
2025-02-17 10:41:31 -05:00
|
|
|
void checkMousePosition(int x, int y);
|
2021-12-13 22:12:54 +10:00
|
|
|
public Q_SLOTS:
|
2023-01-27 01:25:37 +10:00
|
|
|
void checkForUpdates(bool display_message, bool force_check);
|
2025-11-06 14:36:16 +00:00
|
|
|
void refreshGameList(bool invalidate_cache, bool popup_on_error);
|
2022-05-15 18:16:24 +10:00
|
|
|
void cancelGameListRefresh();
|
2025-12-14 09:08:34 -05:00
|
|
|
void updateGameListBackground();
|
2025-03-02 23:04:19 +00:00
|
|
|
void reportInfo(const QString& title, const QString& message);
|
2021-12-13 22:12:54 +10:00
|
|
|
void reportError(const QString& title, const QString& message);
|
2022-08-20 20:20:36 +10:00
|
|
|
bool confirmMessage(const QString& title, const QString& message);
|
2024-05-15 07:42:19 +10:00
|
|
|
void onStatusMessage(const QString& message);
|
2025-11-30 20:15:57 +00:00
|
|
|
void reportStateLoadError(const QString& message, std::optional<s32> slot, bool backup);
|
2025-11-30 22:24:00 +00:00
|
|
|
void reportStateSaveError(const QString& message, std::optional<s32> slot);
|
2024-05-15 07:42:19 +10:00
|
|
|
|
2026-04-13 19:45:19 +07:00
|
|
|
void setStatusVerboseText(const QString& text);
|
|
|
|
|
void setStatusRendererText(const QString& text);
|
|
|
|
|
void setStatusResolutionText(const QString& text);
|
|
|
|
|
void setStatusVolumeText(const QString& text, int volume, bool muted);
|
|
|
|
|
void setStatusGPUText(const QString& text);
|
|
|
|
|
void setStatusFPSText(const QString& text);
|
|
|
|
|
void setStatusVPSText(const QString& text);
|
|
|
|
|
void setStatusSpeedText(const QString& text);
|
|
|
|
|
|
2022-04-06 20:49:00 +10:00
|
|
|
void runOnUIThread(const std::function<void()>& func);
|
2023-12-08 01:44:50 -05:00
|
|
|
void requestReset();
|
2023-01-28 13:33:51 +10:00
|
|
|
bool requestShutdown(bool allow_confirm = true, bool allow_save_to_state = true, bool default_save_to_state = true);
|
|
|
|
|
void requestExit(bool allow_confirm = true);
|
2022-05-15 18:15:27 +10:00
|
|
|
void checkForSettingChanges();
|
2022-10-15 19:03:52 +10:00
|
|
|
std::optional<WindowInfo> getWindowInfo();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2022-04-04 21:27:23 +10:00
|
|
|
void onUpdateCheckComplete();
|
|
|
|
|
|
2023-04-25 22:52:41 +10:00
|
|
|
std::optional<WindowInfo> acquireRenderWindow(bool recreate_window, bool fullscreen, bool render_to_main, bool surfaceless);
|
2021-12-13 22:12:54 +10:00
|
|
|
void displayResizeRequested(qint32 width, qint32 height);
|
2023-07-23 15:07:46 +10:00
|
|
|
void mouseModeRequested(bool relative_mode, bool hide_cursor);
|
2026-02-13 14:02:14 -06:00
|
|
|
void mouseLockRequested(bool state);
|
2023-04-25 22:52:41 +10:00
|
|
|
void releaseRenderWindow();
|
2025-02-17 10:41:31 -05:00
|
|
|
void setupMouseMoveHandler();
|
2021-12-13 22:12:54 +10:00
|
|
|
void onGameListRefreshComplete();
|
|
|
|
|
void onGameListRefreshProgress(const QString& status, int current, int total);
|
|
|
|
|
void onGameListSelectionChanged();
|
|
|
|
|
void onGameListEntryActivated();
|
|
|
|
|
void onGameListEntryContextMenuRequested(const QPoint& point);
|
|
|
|
|
|
|
|
|
|
void onStartFileActionTriggered();
|
2022-06-28 23:34:45 +10:00
|
|
|
void onStartDiscActionTriggered();
|
2021-12-13 22:12:54 +10:00
|
|
|
void onStartBIOSActionTriggered();
|
|
|
|
|
void onChangeDiscFromFileActionTriggered();
|
|
|
|
|
void onChangeDiscFromGameListActionTriggered();
|
|
|
|
|
void onChangeDiscFromDeviceActionTriggered();
|
2022-06-29 00:00:51 +10:00
|
|
|
void onRemoveDiscActionTriggered();
|
2021-12-13 22:12:54 +10:00
|
|
|
void onChangeDiscMenuAboutToShow();
|
|
|
|
|
void onChangeDiscMenuAboutToHide();
|
|
|
|
|
void onLoadStateMenuAboutToShow();
|
|
|
|
|
void onSaveStateMenuAboutToShow();
|
2023-09-04 21:34:57 +10:00
|
|
|
void onStartFullscreenUITriggered();
|
|
|
|
|
void onFullscreenUIStateChange(bool running);
|
2021-12-13 22:12:54 +10:00
|
|
|
void onViewToolbarActionToggled(bool checked);
|
|
|
|
|
void onViewLockToolbarActionToggled(bool checked);
|
|
|
|
|
void onViewStatusBarActionToggled(bool checked);
|
|
|
|
|
void onViewGameListActionTriggered();
|
|
|
|
|
void onViewGameGridActionTriggered();
|
|
|
|
|
void onViewSystemDisplayTriggered();
|
|
|
|
|
void onViewGamePropertiesActionTriggered();
|
|
|
|
|
void onGitHubRepositoryActionTriggered();
|
2025-01-23 22:45:19 -06:00
|
|
|
void onWikiActionTriggered();
|
|
|
|
|
void onDocumentationActionTriggered();
|
2021-12-13 22:12:54 +10:00
|
|
|
void onAboutActionTriggered();
|
|
|
|
|
void onToolsOpenDataDirectoryTriggered();
|
2022-09-03 21:29:02 +10:00
|
|
|
void onToolsCoverDownloaderTriggered();
|
2025-05-29 19:25:09 +07:00
|
|
|
#if !defined(__APPLE__)
|
|
|
|
|
void onCreateGameShortcutTriggered();
|
|
|
|
|
#endif
|
2023-09-09 14:47:26 +10:00
|
|
|
void onToolsEditCheatsPatchesTriggered(bool cheats);
|
2024-01-18 21:10:32 +10:00
|
|
|
void onCreateMemoryCardOpenRequested();
|
2022-07-24 23:52:22 +10:00
|
|
|
void updateTheme();
|
2023-09-09 15:55:38 +10:00
|
|
|
void reloadThemeSpecificImages();
|
2023-06-19 22:03:10 +10:00
|
|
|
void updateLanguage();
|
2024-06-23 06:40:25 +10:00
|
|
|
void onThemeChanged();
|
|
|
|
|
void onLanguageChanged();
|
2022-05-12 14:53:40 -07:00
|
|
|
void onScreenshotActionTriggered();
|
2022-05-16 21:10:34 +10:00
|
|
|
void onSaveGSDumpActionTriggered();
|
2022-05-24 22:22:15 +10:00
|
|
|
void onBlockDumpActionToggled(bool checked);
|
2022-11-23 23:20:49 +10:00
|
|
|
void onShowAdvancedSettingsToggled(bool checked);
|
2024-07-19 22:42:42 +07:00
|
|
|
void onVideoCaptureToggled(bool checked);
|
2023-02-28 19:29:41 +01:00
|
|
|
void onSettingsTriggeredFromToolbar();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-04-03 20:06:59 -04:00
|
|
|
// Input Recording
|
|
|
|
|
void onInputRecNewActionTriggered();
|
|
|
|
|
void onInputRecPlayActionTriggered();
|
|
|
|
|
void onInputRecStopActionTriggered();
|
2022-06-15 20:44:14 -04:00
|
|
|
void onInputRecOpenViewer();
|
2021-12-13 22:12:54 +10:00
|
|
|
void onVMStarting();
|
|
|
|
|
void onVMStarted();
|
|
|
|
|
void onVMPaused();
|
|
|
|
|
void onVMResumed();
|
|
|
|
|
void onVMStopped();
|
|
|
|
|
|
2023-06-13 22:43:11 +10:00
|
|
|
void onGameChanged(const QString& title, const QString& elf_override, const QString& disc_path,
|
|
|
|
|
const QString& serial, quint32 disc_crc, quint32 crc);
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2023-07-06 23:18:30 +10:00
|
|
|
void onCaptureStarted(const QString& filename);
|
|
|
|
|
void onCaptureStopped();
|
|
|
|
|
|
2023-07-27 19:24:55 +10:00
|
|
|
void onAchievementsLoginRequested(Achievements::LoginRequestReason reason);
|
2023-09-17 20:19:51 +10:00
|
|
|
void onAchievementsHardcoreModeChanged(bool enabled);
|
2023-07-27 19:24:55 +10:00
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
protected:
|
2022-06-05 02:13:05 +10:00
|
|
|
void showEvent(QShowEvent* event) override;
|
2022-03-04 18:04:05 +10:00
|
|
|
void closeEvent(QCloseEvent* event) override;
|
2023-09-09 15:55:38 +10:00
|
|
|
void changeEvent(QEvent* event) override;
|
2022-05-26 17:49:40 +10:00
|
|
|
void dragEnterEvent(QDragEnterEvent* event) override;
|
|
|
|
|
void dropEvent(QDropEvent* event) override;
|
2024-01-11 19:38:28 +10:00
|
|
|
void moveEvent(QMoveEvent* event) override;
|
|
|
|
|
void resizeEvent(QResizeEvent* event) override;
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-10-15 21:20:05 +10:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override;
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
private:
|
|
|
|
|
void setupAdditionalUi();
|
2026-04-13 19:45:19 +07:00
|
|
|
void setupStatusBarWidgets();
|
|
|
|
|
void applyStatusBarVolumeChanges(std::optional<int> volume, bool toggle_mute, std::optional<bool> override_per_game = std::nullopt);
|
2021-12-13 22:12:54 +10:00
|
|
|
void connectSignals();
|
2023-12-31 17:45:13 +10:00
|
|
|
void createRendererSwitchMenu();
|
2022-09-07 17:44:10 +10:00
|
|
|
void recreate();
|
|
|
|
|
void recreateSettings();
|
2023-10-14 18:45:09 +10:00
|
|
|
void destroySubWindows();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-10-15 21:20:05 +10:00
|
|
|
void registerForDeviceNotifications();
|
|
|
|
|
void unregisterForDeviceNotifications();
|
|
|
|
|
|
2021-12-13 22:12:54 +10:00
|
|
|
void saveStateToConfig();
|
|
|
|
|
void restoreStateFromConfig();
|
|
|
|
|
|
2023-03-03 21:30:40 +10:00
|
|
|
void updateEmulationActions(bool starting, bool running, bool stopping);
|
2022-09-15 19:43:21 +10:00
|
|
|
void updateDisplayRelatedActions(bool has_surface, bool render_to_main, bool fullscreen);
|
2023-09-09 14:47:26 +10:00
|
|
|
void updateGameDependentActions();
|
2026-06-17 12:17:40 -04:00
|
|
|
void updateGameGridActions(const bool show_game_grid, const bool show_grid_cover_titles);
|
2022-04-03 23:46:05 +10:00
|
|
|
void updateStatusBarWidgetVisibility();
|
2024-01-13 01:19:51 +10:00
|
|
|
void updateAdvancedSettingsVisibility();
|
2021-12-13 22:12:54 +10:00
|
|
|
void updateWindowTitle();
|
2022-06-28 22:16:45 +10:00
|
|
|
void updateWindowState(bool force_visible = false);
|
2021-12-13 22:12:54 +10:00
|
|
|
void setProgressBar(int current, int total);
|
|
|
|
|
void clearProgressBar();
|
|
|
|
|
|
|
|
|
|
bool isShowingGameList() const;
|
2022-05-06 21:03:16 +10:00
|
|
|
bool isRenderingFullscreen() const;
|
|
|
|
|
bool isRenderingToMain() const;
|
2022-05-15 18:15:27 +10:00
|
|
|
bool shouldHideMouseCursor() const;
|
2022-07-09 19:14:48 +10:00
|
|
|
bool shouldHideMainWindow() const;
|
2025-02-17 10:41:31 -05:00
|
|
|
bool shouldMouseLock() const;
|
2021-12-13 22:12:54 +10:00
|
|
|
void switchToGameListView();
|
|
|
|
|
void switchToEmulationView();
|
|
|
|
|
|
2023-12-08 01:44:50 -05:00
|
|
|
bool shouldAbortForMemcardBusy(const VMLock& lock);
|
|
|
|
|
|
2022-07-09 16:59:13 +10:00
|
|
|
QWidget* getContentParent();
|
2021-12-13 22:12:54 +10:00
|
|
|
void saveDisplayWindowGeometryToConfig();
|
|
|
|
|
void restoreDisplayWindowGeometryFromConfig();
|
2023-04-01 15:54:04 +10:00
|
|
|
void createDisplayWidget(bool fullscreen, bool render_to_main);
|
2022-07-09 16:59:13 +10:00
|
|
|
void destroyDisplayWidget(bool show_game_list);
|
2022-12-05 01:00:06 +10:00
|
|
|
void updateDisplayWidgetCursor();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2023-10-14 18:45:09 +10:00
|
|
|
SettingsWindow* getSettingsWindow();
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-06-15 20:44:14 -04:00
|
|
|
InputRecordingViewer* getInputRecordingViewer();
|
|
|
|
|
void updateInputRecordingActions(bool started);
|
|
|
|
|
|
2023-10-14 18:45:09 +10:00
|
|
|
void doControllerSettings(ControllerSettingsWindow::Category category = ControllerSettingsWindow::Category::Count);
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-06-28 23:34:45 +10:00
|
|
|
QString getDiscDevicePath(const QString& title);
|
|
|
|
|
|
2022-12-04 18:03:30 +10:00
|
|
|
void startGameListEntry(
|
2025-11-05 03:39:53 +00:00
|
|
|
const GameList::Entry& entry, std::optional<s32> save_slot = std::nullopt, std::optional<bool> fast_boot = std::nullopt, bool load_backup = false);
|
|
|
|
|
void setGameListEntryCoverImage(const GameList::Entry& entry);
|
|
|
|
|
void clearGameListEntryPlayTime(const GameList::Entry& entry, const time_t entry_played_time);
|
|
|
|
|
void goToWikiPage(const GameList::Entry& entry);
|
2026-03-23 00:45:25 +07:00
|
|
|
void openMemoryCardFolder();
|
2025-11-05 03:39:53 +00:00
|
|
|
void openSnapshotsFolderForGame(const GameList::Entry& entry);
|
2026-03-23 00:45:25 +07:00
|
|
|
void openTextureFolderForGame(const GameList::Entry& entry);
|
|
|
|
|
void openVideoCaptureFolder(const GameList::Entry& entry);
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2022-05-07 22:56:44 +10:00
|
|
|
std::optional<bool> promptForResumeState(const QString& save_state_path);
|
2025-04-26 19:19:34 +07:00
|
|
|
void loadSaveStateSlot(s32 slot, bool load_backup = false);
|
2021-12-13 22:12:54 +10:00
|
|
|
void loadSaveStateFile(const QString& filename, const QString& state_filename);
|
|
|
|
|
void populateLoadStateMenu(QMenu* menu, const QString& filename, const QString& serial, quint32 crc);
|
|
|
|
|
void populateSaveStateMenu(QMenu* menu, const QString& serial, quint32 crc);
|
2022-06-28 23:34:45 +10:00
|
|
|
void doStartFile(std::optional<CDVD_SourceType> source, const QString& path);
|
|
|
|
|
void doDiscChange(CDVD_SourceType source, const QString& path);
|
2021-12-13 22:12:54 +10:00
|
|
|
|
|
|
|
|
Ui::MainWindow m_ui;
|
|
|
|
|
|
|
|
|
|
GameListWidget* m_game_list_widget = nullptr;
|
2025-10-30 20:54:07 +00:00
|
|
|
DisplaySurface* m_display_surface = nullptr;
|
|
|
|
|
QWidget* m_display_container = nullptr;
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2023-10-15 00:44:11 -05:00
|
|
|
SettingsWindow* m_settings_window = nullptr;
|
2023-10-14 18:45:09 +10:00
|
|
|
ControllerSettingsWindow* m_controller_settings_window = nullptr;
|
2022-06-15 20:44:14 -04:00
|
|
|
InputRecordingViewer* m_input_recording_viewer = nullptr;
|
2022-04-04 21:27:23 +10:00
|
|
|
AutoUpdaterDialog* m_auto_updater_dialog = nullptr;
|
2021-12-13 22:12:54 +10:00
|
|
|
|
|
|
|
|
QProgressBar* m_status_progress_widget = nullptr;
|
2022-07-03 23:30:03 +10:00
|
|
|
QLabel* m_status_verbose_widget = nullptr;
|
|
|
|
|
QLabel* m_status_renderer_widget = nullptr;
|
2026-04-13 19:45:19 +07:00
|
|
|
QToolButton* m_status_volume_widget = nullptr;
|
|
|
|
|
QMenu* m_status_volume_menu = nullptr;
|
|
|
|
|
QAction* m_status_volume_per_game_action = nullptr;
|
|
|
|
|
QAction* m_status_volume_toggle_mute_action = nullptr;
|
|
|
|
|
QSlider* m_status_volume_slider = nullptr;
|
|
|
|
|
QLabel* m_status_gpu_widget = nullptr;
|
2022-04-03 23:46:05 +10:00
|
|
|
QLabel* m_status_fps_widget = nullptr;
|
2022-07-03 23:30:03 +10:00
|
|
|
QLabel* m_status_vps_widget = nullptr;
|
2026-04-13 19:45:19 +07:00
|
|
|
QToolButton* m_status_speed_widget = nullptr;
|
|
|
|
|
QMenu* m_status_speed_menu = nullptr;
|
2022-07-03 23:30:03 +10:00
|
|
|
QLabel* m_status_resolution_widget = nullptr;
|
2021-12-13 22:12:54 +10:00
|
|
|
|
2023-02-28 19:29:41 +01:00
|
|
|
QMenu* m_settings_toolbar_menu = nullptr;
|
|
|
|
|
|
2022-05-15 18:20:21 +10:00
|
|
|
bool m_display_created = false;
|
2026-04-13 19:45:19 +07:00
|
|
|
bool m_status_volume_muted = false;
|
|
|
|
|
bool m_status_volume_slider_applied = false;
|
2026-04-16 16:15:46 -07:00
|
|
|
bool m_display_is_exclusive_fullscreen = false;
|
2022-12-05 01:00:06 +10:00
|
|
|
bool m_relative_mouse_mode = false;
|
2023-07-23 15:07:46 +10:00
|
|
|
bool m_hide_mouse_cursor = false;
|
2022-05-06 21:03:16 +10:00
|
|
|
bool m_was_paused_on_surface_loss = false;
|
2022-05-06 23:34:07 +10:00
|
|
|
bool m_was_disc_change_request = false;
|
2022-06-29 12:44:10 +10:00
|
|
|
bool m_is_closing = false;
|
2023-11-20 23:28:00 +10:00
|
|
|
bool m_is_temporarily_windowed = false;
|
2022-04-03 23:46:05 +10:00
|
|
|
|
|
|
|
|
QString m_last_fps_status;
|
2022-10-15 21:20:05 +10:00
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
void* m_device_notification_handle = nullptr;
|
|
|
|
|
#endif
|
2021-12-13 22:12:54 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern MainWindow* g_main_window;
|