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.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 092c6206f..87b23df12 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -3,29 +3,46 @@
#pragma once
-#include <atomic>
#include <condition_variable>
+#include <cstddef>
#include <memory>
#include <mutex>
+#include <utility>
+#include <vector>
+#include <QByteArray>
#include <QImage>
+#include <QObject>
+#include <QPoint>
+#include <QString>
#include <QStringList>
#include <QThread>
-#include <QTouchEvent>
#include <QWidget>
+#include <qglobal.h>
+#include <qnamespace.h>
+#include <qobjectdefs.h>
+#include "common/common_types.h"
+#include "common/logging/log.h"
#include "common/polyfill_thread.h"
#include "common/thread.h"
#include "core/frontend/emu_window.h"
-class GRenderWindow;
class GMainWindow;
class QCamera;
class QCameraImageCapture;
+class QCloseEvent;
+class QFocusEvent;
class QKeyEvent;
+class QMouseEvent;
+class QObject;
+class QResizeEvent;
+class QShowEvent;
+class QTimer;
+class QTouchEvent;
+class QWheelEvent;
namespace Core {
-enum class SystemResultStatus : u32;
class System;
} // namespace Core
@@ -40,7 +57,6 @@ enum class TasState;
namespace VideoCore {
enum class LoadCallbackStage;
-class RendererBase;
} // namespace VideoCore
class EmuThread final : public QThread {
@@ -71,7 +87,7 @@ public:
// Wait until paused, if pausing.
if (!should_run) {
- m_is_running.wait(true);
+ m_stopped.Wait();
}
}
@@ -80,7 +96,7 @@ public:
* @return True if the emulation thread is running, otherwise false
*/
bool IsRunning() const {
- return m_is_running.load() || m_should_run;
+ return m_should_run;
}
/**
@@ -101,7 +117,7 @@ private:
std::stop_source m_stop_source;
std::mutex m_should_run_mutex;
std::condition_variable_any m_should_run_cv;
- std::atomic<bool> m_is_running{false};
+ Common::Event m_stopped;
bool m_should_run{true};
signals:
@@ -147,6 +163,8 @@ public:
qreal windowPixelRatio() const;
+ std::pair<u32, u32> ScaleTouch(const QPointF& pos) const;
+
void closeEvent(QCloseEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
@@ -184,8 +202,6 @@ public:
void CaptureScreenshot(const QString& screenshot_path);
- std::pair<u32, u32> ScaleTouch(const QPointF& pos) const;
-
/**
* Instructs the window to re-launch the application using the specified program_index.
* @param program_index Specifies the index within the application of the program to launch.