mirror of
https://github.com/thejerf/baijiSteamVR.git
synced 2026-10-23 05:02:05 +02:00
This fixes #14 and fixes #8 to my satisfaction. At least now, since the game starts in the user's visual field, it is obvious that they need to dismiss the Baiji UI to get to the game. This works like everything else in the Steam Frame windowing environment. Now the emulation never freezes, no matter how hard I focus off of Baiji. May still be some problems here. But this is the closest to correct it has been working yet.
63 lines
1.7 KiB
C++
63 lines
1.7 KiB
C++
// Copyright 2015 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
|
|
#include <QObject>
|
|
|
|
// Singleton that talks to the Core via the interface defined in Core/Host.h.
|
|
// Because Host_* calls might come from different threads than the MainWindow,
|
|
// the Host class communicates with it via signals/slots only.
|
|
|
|
// Many of the Host_* functions are ignored, and some shouldn't exist.
|
|
class Host final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
~Host() override;
|
|
|
|
static Host* GetInstance();
|
|
static bool IsRenderToMain();
|
|
|
|
bool GetRenderFocus();
|
|
bool GetRenderFullFocus();
|
|
bool GetRenderFullscreen();
|
|
bool GetGBAFocus();
|
|
bool GetTASInputFocus() const;
|
|
|
|
void SetMainWindowHandle(void* handle);
|
|
void SetRenderHandle(void* handle);
|
|
void SetRenderFocus(bool focus);
|
|
void SetRenderFullFocus(bool focus);
|
|
void SetRenderFullscreen(bool fullscreen);
|
|
void SetTASInputFocus(bool focus);
|
|
void ResizeSurface(int new_width, int new_height);
|
|
|
|
signals:
|
|
void RequestTitle(const QString& title);
|
|
void RequestStop();
|
|
void RequestRenderSize(int w, int h);
|
|
void UpdateDisasmDialog();
|
|
void JitCacheInvalidation();
|
|
void JitProfileDataWiped();
|
|
void PPCSymbolsChanged();
|
|
void PPCBreakpointsChanged();
|
|
|
|
private:
|
|
Host();
|
|
|
|
std::atomic<void*> m_render_handle{nullptr};
|
|
std::atomic<void*> m_main_window_handle{nullptr};
|
|
std::atomic<bool> m_render_to_main{false};
|
|
#ifdef BAIJI_STEAMVR
|
|
std::atomic<bool> m_application_focused{false};
|
|
#endif
|
|
std::atomic<bool> m_render_focus{false};
|
|
std::atomic<bool> m_render_full_focus{false};
|
|
std::atomic<bool> m_render_fullscreen{false};
|
|
std::atomic<bool> m_tas_input_focus{false};
|
|
};
|