Ryan C. Gordon
Ryan C. Gordon
What's the reason to have just init/quit in its own header? Is it causing problems to include SDL.h?
Oh, and the idea is that if one only wants video functions they can include SDL_video.h, etc, but the Init calls are in SDL.h which includes everything, right? That's not...
> While we're at it, does it make sense to have a callback based I/O completion port style API? There's an wishlist issue for that in #1374 ... I haven't...
Maybe a callback is provided when creating a non-blocking RWops and it fires in addition to the usual non-blocking semantics? So you can optionally use it to notify your app...
Ok, how about we add something like this to SDL_iostream.h ... ```c typedef Uint32 SDL_AsyncIOTask; typedef void (SDLCALL *SDL_AsyncIOCallback)(void *userdata, SDL_IOStream *context, SDL_AsyncIOTask task, Sint64 offset, void *ptr, size_t size,...
Might go with an int return value (success, failure, this-rwops-is-non-blocking-please-retry-later).
Sam took care of this in b903ccf945a75266ebcba2df68da3b796a71e75d.
The thinking is "real" async, at the kernel layer, can be implemented, but things that can't implement it have a functionally equivalent fallback. But maybe the real async interfaces aren't...
Eh, let's abandon this, not every idea is good. :) Closing, but feel free to reopen if anyone has a good idea that makes an API improvement.
This might be unavoidable (and thus just close this as WONTFIX), but we should check this at some point.