mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-15 02:44:41 +00:00
Qt: Remove unused EmuThread::SystemLock
This commit is contained in:
@@ -3021,47 +3021,6 @@ std::optional<WindowInfo> Host::GetTopLevelWindowInfo()
|
||||
return ret;
|
||||
}
|
||||
|
||||
EmuThread::SystemLock EmuThread::pauseAndLockSystem()
|
||||
{
|
||||
const bool was_fullscreen = QtHost::IsSystemValid() && isFullscreen();
|
||||
const bool was_paused = QtHost::IsSystemPaused();
|
||||
|
||||
// We use surfaceless rather than switching out of fullscreen, because
|
||||
// we're paused, so we're not going to be rendering anyway.
|
||||
if (was_fullscreen)
|
||||
setSurfaceless(true);
|
||||
if (!was_paused)
|
||||
setSystemPaused(true);
|
||||
|
||||
return SystemLock(was_paused, was_fullscreen);
|
||||
}
|
||||
|
||||
EmuThread::SystemLock::SystemLock(bool was_paused, bool was_fullscreen)
|
||||
: m_was_paused(was_paused), m_was_fullscreen(was_fullscreen)
|
||||
{
|
||||
}
|
||||
|
||||
EmuThread::SystemLock::SystemLock(SystemLock&& lock)
|
||||
: m_was_paused(lock.m_was_paused), m_was_fullscreen(lock.m_was_fullscreen)
|
||||
{
|
||||
lock.m_was_paused = true;
|
||||
lock.m_was_fullscreen = false;
|
||||
}
|
||||
|
||||
EmuThread::SystemLock::~SystemLock()
|
||||
{
|
||||
if (m_was_fullscreen)
|
||||
g_emu_thread->setSurfaceless(false);
|
||||
if (!m_was_paused)
|
||||
g_emu_thread->setSystemPaused(false);
|
||||
}
|
||||
|
||||
void EmuThread::SystemLock::cancelResume()
|
||||
{
|
||||
m_was_paused = true;
|
||||
m_was_fullscreen = false;
|
||||
}
|
||||
|
||||
BEGIN_HOTKEY_LIST(g_host_hotkeys)
|
||||
END_HOTKEY_LIST()
|
||||
|
||||
|
||||
@@ -65,29 +65,6 @@ class EmuThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/// This class is a scoped lock on the system, 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 SystemLock
|
||||
{
|
||||
public:
|
||||
SystemLock(SystemLock&& lock);
|
||||
SystemLock(const SystemLock&) = delete;
|
||||
~SystemLock();
|
||||
|
||||
/// Cancels any pending unpause/fullscreen transition.
|
||||
/// Call when you're going to destroy the system anyway.
|
||||
void cancelResume();
|
||||
|
||||
private:
|
||||
SystemLock(bool was_paused, bool was_fullscreen);
|
||||
friend EmuThread;
|
||||
|
||||
bool m_was_paused;
|
||||
bool m_was_fullscreen;
|
||||
};
|
||||
|
||||
public:
|
||||
EmuThread();
|
||||
~EmuThread();
|
||||
@@ -116,10 +93,6 @@ public:
|
||||
void updatePerformanceCounters(const GPUBackend* gpu_backend);
|
||||
void resetPerformanceCounters();
|
||||
|
||||
/// Locks the system by pausing it, while a popup dialog is displayed.
|
||||
/// This version is **only** for the system thread. UI thread should use the MainWindow variant.
|
||||
SystemLock pauseAndLockSystem();
|
||||
|
||||
/// Queues an input event for an additional render window to the emu thread.
|
||||
void queueAuxiliaryRenderWindowInputEvent(Host::AuxiliaryRenderWindowUserData userdata,
|
||||
Host::AuxiliaryRenderWindowEvent event,
|
||||
|
||||
Reference in New Issue
Block a user