summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 402dd2ee1..e6a0666e9 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -16,7 +16,6 @@
#include <QWindow>
#include "common/thread.h"
-#include "core/core.h"
#include "core/frontend/emu_window.h"
class GRenderWindow;
@@ -24,6 +23,11 @@ class GMainWindow;
class QKeyEvent;
class QStringList;
+namespace Core {
+enum class SystemResultStatus : u32;
+class System;
+} // namespace Core
+
namespace InputCommon {
class InputSubsystem;
}
@@ -34,13 +38,14 @@ enum class MouseButton;
namespace VideoCore {
enum class LoadCallbackStage;
-}
+class RendererBase;
+} // namespace VideoCore
class EmuThread final : public QThread {
Q_OBJECT
public:
- explicit EmuThread();
+ explicit EmuThread(Core::System& system_);
~EmuThread() override;
/**
@@ -101,6 +106,7 @@ private:
std::condition_variable_any running_cv;
Common::Event running_wait{};
std::atomic_bool running_guard{false};
+ Core::System& system;
signals:
/**
@@ -121,7 +127,7 @@ signals:
*/
void DebugModeLeft();
- void ErrorThrown(Core::System::ResultStatus, std::string);
+ void ErrorThrown(Core::SystemResultStatus, std::string);
void LoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total);
};
@@ -131,7 +137,8 @@ class GRenderWindow : public QWidget, public Core::Frontend::EmuWindow {
public:
explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
- std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_);
+ std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_,
+ Core::System& system_);
~GRenderWindow() override;
// EmuWindow implementation.
@@ -181,6 +188,9 @@ public:
*/
void ExecuteProgram(std::size_t program_index);
+ /// Instructs the window to exit the application.
+ void Exit();
+
public slots:
void OnEmulationStarting(EmuThread* emu_thread);
void OnEmulationStopping();
@@ -191,6 +201,7 @@ signals:
void Closed();
void FirstFrameDisplayed();
void ExecuteProgramSignal(std::size_t program_index);
+ void ExitSignal();
void MouseActivity();
private:
@@ -228,6 +239,8 @@ private:
std::array<std::size_t, 16> touch_ids{};
+ Core::System& system;
+
protected:
void showEvent(QShowEvent* event) override;
bool eventFilter(QObject* object, QEvent* event) override;