Fix crashes when restarting streaming with DXVA2 renderer due to leaked surface references

This commit is contained in:
Cameron Gutman
2018-07-20 13:10:54 -07:00
parent 9c2befc386
commit faaf9dfa07
3 changed files with 31 additions and 4 deletions

View File

@@ -65,11 +65,11 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Detected quit key combo");
SDL_Event event;
// Uncapture the mouse to avoid processing any
// further keyboard input
SDL_SetRelativeMouseMode(SDL_FALSE);
// Drain the event queue of any additional input
// that might be processed before our quit message.
while (SDL_PollEvent(&event));
SDL_Event event;
// Push a quit event to the main loop
event.type = SDL_QUIT;