Qt: Remove unused EmuThread::SystemLock

This commit is contained in:
Stenzek
2025-11-28 20:58:03 +10:00
parent 0c6cbf82d9
commit 97c9daf1b9
2 changed files with 0 additions and 68 deletions

View File

@@ -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()

View File

@@ -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,