-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testoverlay.c doesn't work #193
Comments
Yeah, it calls SDL_DisplayYUVOverlay() in a tight loop. sdl12-compat/test/testoverlay.c Lines 272 to 297 in 7df0315
Sticking an SDL_PumpEvents() in the loop gets a single frame to draw but the image doesn't animate a slide across the window. Needs more research. |
This is because sdl12-compat only draws the overlay at the display's refresh rate, and its version of SDL_DisplayYUVOverlay basically just queues up a draw and returns immediately, so the loop runs through super-fast and never gets a chance to do a second present. Adding an SDL_Delay and an SDL_PumpEvents fixes it. testoverlay is sort of a pathological case, since nothing would ever really do this in real life (draw overlays as fast as possible without any event loop or animation timing), so we're probably okay to not fix this...but I'm going to try something real fast before I close this. |
Okay, found a reasonable workaround. |
It just makes a black window, and then quits:
Does this in classic SDL 1.2, on x11:
Might just fail to present in the short time frame, or need a pumpevents, I don't know yet.
The text was updated successfully, but these errors were encountered: