[SDL] SDL 2.0 API stabilization
redteam316 at gmail.com
Tue Mar 5 18:34:49 PST 2013
I like Sik's suggestion on returning the failed subsystems. If there is an
issue with doing it that way, why not add a default parameter passed by
reference so that when a subsystem fails or passes, we can check that data?
- Swyped from my droid.
On Mar 5, 2013 6:00 PM, "Sik the hedgehog" <sik.the.hedgehog at gmail.com>
Then you break compatibility with just about every program out there
(*every* SDL 2.0 program would need to be changed) as well as
generating a massive inconsistency against other functions of the API
which return 0 on success and another value on error.
It may make more sense to do the opposite: return a mask of subsystems
that *failed* to initialize. Seems counterintuitive, but it could
work. Moreover, it actually follows the whole idea behind returning 0
for success: you can pass the error motive as the non-zero value.
Except that instead of one motive it'd be a bitfield of motives, but
same logic applies.
It'd still probably be wiser to have SDL_INIT_EVERYTHING only include
the bits for the currently existing subsystems and nothing else. Then
we could make it return an error if any non-used flags are passed. Not
sure how useful would that be, though.
2013/3/5, Chris Eineke <libsdl at chriseineke.com>:
> On 13-03-05 02:20 PM, Sik the hedgehog wrote:
>> There's another problem though, SDL will attempt ...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL