| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <atomic> |
| 7 |
|
| 8 |
#include <QObject> |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
class Host final : public QObject |
| 16 |
{ |
| 17 |
Q_OBJECT |
| 18 |
|
| 19 |
public: |
| 20 |
~Host() override; |
| 21 |
|
| 22 |
static Host* GetInstance(); |
| 23 |
|
| 24 |
bool GetRenderFocus(); |
| 25 |
bool GetRenderFullFocus(); |
| 26 |
bool GetRenderFullscreen(); |
| 27 |
bool GetGBAFocus(); |
| 28 |
bool GetTASInputFocus() const; |
| 29 |
|
| 30 |
void SetMainWindowHandle(void* handle); |
| 31 |
void SetRenderHandle(void* handle); |
| 32 |
void SetRenderFocus(bool focus); |
| 33 |
void SetRenderFullFocus(bool focus); |
| 34 |
void SetRenderFullscreen(bool fullscreen); |
| 35 |
void SetTASInputFocus(bool focus); |
| 36 |
void ResizeSurface(int new_width, int new_height); |
| 37 |
|
| 38 |
signals: |
| 39 |
void RequestTitle(const QString& title); |
| 40 |
void RequestStop(); |
| 41 |
void RequestRenderSize(int w, int h); |
| 42 |
void UpdateDisasmDialog(); |
| 43 |
void JitCacheInvalidation(); |
| 44 |
void JitProfileDataWiped(); |
| 45 |
void PPCSymbolsChanged(); |
| 46 |
void PPCBreakpointsChanged(); |
| 47 |
|
| 48 |
private: |
| 49 |
Host(); |
| 50 |
|
| 51 |
std::atomic<void*> m_render_handle{nullptr}; |
| 52 |
std::atomic<void*> m_main_window_handle{nullptr}; |
| 53 |
std::atomic<bool> m_render_to_main{false}; |
| 54 |
std::atomic<bool> m_render_focus{false}; |
| 55 |
std::atomic<bool> m_render_full_focus{false}; |
| 56 |
std::atomic<bool> m_render_fullscreen{false}; |
| 57 |
std::atomic<bool> m_tas_input_focus{false}; |
| 58 |
}; |