parent
2ac7176787
commit
64789ea8bc
2 changed files with 9 additions and 1 deletions
|
|
@ -1244,11 +1244,15 @@ void Session::toggleFullscreen()
|
||||||
{
|
{
|
||||||
bool fullScreen = !(SDL_GetWindowFlags(m_Window) & m_FullScreenFlag);
|
bool fullScreen = !(SDL_GetWindowFlags(m_Window) & m_FullScreenFlag);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#if defined(Q_OS_WIN32) || defined(Q_OS_DARWIN)
|
||||||
// Destroy the video decoder before toggling full-screen because D3D9 can try
|
// Destroy the video decoder before toggling full-screen because D3D9 can try
|
||||||
// to put the window back into full-screen before we've managed to destroy
|
// to put the window back into full-screen before we've managed to destroy
|
||||||
// the renderer. This leads to excessive flickering and can cause the window
|
// the renderer. This leads to excessive flickering and can cause the window
|
||||||
// decorations to get messed up as SDL and D3D9 fight over the window style.
|
// decorations to get messed up as SDL and D3D9 fight over the window style.
|
||||||
|
//
|
||||||
|
// On Apple Silicon Macs, the AVSampleBufferDisplayLayer may cause WindowServer
|
||||||
|
// to deadlock when transitioning out of fullscreen. Destroy the decoder before
|
||||||
|
// exiting fullscreen as a workaround. See issue #973.
|
||||||
SDL_AtomicLock(&m_DecoderLock);
|
SDL_AtomicLock(&m_DecoderLock);
|
||||||
delete m_VideoDecoder;
|
delete m_VideoDecoder;
|
||||||
m_VideoDecoder = nullptr;
|
m_VideoDecoder = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,10 @@ public:
|
||||||
if (m_DisplayLayer != nullptr) {
|
if (m_DisplayLayer != nullptr) {
|
||||||
[m_DisplayLayer release];
|
[m_DisplayLayer release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// It appears to be necessary to run the event loop after destroying
|
||||||
|
// the AVSampleBufferDisplayLayer to avoid issue #973.
|
||||||
|
SDL_PumpEvents();
|
||||||
}}
|
}}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue