MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / stopFullscreenUI

Method stopFullscreenUI

pcsx2-qt/QtHost.cpp:178–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void EmuThread::stopFullscreenUI()
179{
180 if (!isOnEmuThread())
181 {
182 QMetaObject::invokeMethod(this, &EmuThread::stopFullscreenUI, Qt::QueuedConnection);
183
184 // wait until the host display is gone
185 // have to test the bool, because MTGS::IsOpen() goes false as soon as the close request happens.
186 while (m_run_fullscreen_ui.load(std::memory_order_acquire) || (!QtHost::IsVMValid() && MTGS::IsOpen()))
187 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 1);
188
189 return;
190 }
191
192 setFullscreen(false, true);
193
194 if (MTGS::IsOpen() && !VMManager::HasValidVM())
195 MTGS::WaitForClose();
196
197 if (m_run_fullscreen_ui.load(std::memory_order_acquire))
198 {
199 m_run_fullscreen_ui.store(false, std::memory_order_release);
200 emit onFullscreenUIStateChange(false);
201
202 // Resume and refresh background when FullscreenUI exits
203 QMetaObject::invokeMethod(g_main_window, "updateGameListBackground", Qt::QueuedConnection);
204 }
205}
206
207void EmuThread::startVM(std::shared_ptr<VMBootParameters> boot_params)
208{

Callers 4

quitMethod · 0.80
closeEventMethod · 0.80
RequestExitBigPictureMethod · 0.80

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected