Handle SDL_PushEvent() errors

Pushing an event to the main thread may fail. If this happens, log an
error, and try to recover when possible.
This commit is contained in:
Romain Vimont
2021-10-30 20:21:00 +02:00
parent 4c4381de4c
commit dae091e3ab
3 changed files with 30 additions and 4 deletions

View File

@@ -44,6 +44,8 @@ struct screen {
bool maximized;
bool mipmaps;
bool event_failed; // in case SDL_PushEvent() returned an error
AVFrame *frame;
};