Fix VT video centering after transition from windowed to full screen

This commit is contained in:
Cameron Gutman 2018-07-20 19:37:54 -07:00
parent 7b235743cb
commit 20288210be
2 changed files with 10 additions and 0 deletions

View file

@ -629,6 +629,12 @@ void Session::exec()
break;
}
case SDL_WINDOWEVENT:
if (event.window.event != SDL_WINDOWEVENT_RESIZED) {
break;
}
// Fall through to recreate decoder on resize (full-screen toggle)
case SDL_RENDER_DEVICE_RESET:
case SDL_RENDER_TARGETS_RESET:
SDL_AtomicLock(&m_DecoderLock);

View file

@ -48,6 +48,10 @@ public:
AVFrame* frame = m_FrameQueue.dequeue();
av_frame_free(&frame);
}
if (m_View != nullptr) {
[m_View removeFromSuperview];
}
}
void drawFrame(uint64_t vsyncTime)