mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-11 06:28:24 +02:00
rwops: Add SDL_GetRWStatus, make the statuses into an enum.
This commit is contained in:
@@ -40,7 +40,7 @@ struct SDL_RWops
|
||||
{
|
||||
SDL_RWopsInterface iface;
|
||||
void *userdata;
|
||||
Uint32 status;
|
||||
SDL_RWopsStatus status;
|
||||
SDL_PropertiesID props;
|
||||
};
|
||||
|
||||
@@ -724,6 +724,16 @@ SDL_RWops *SDL_RWFromConstMem(const void *mem, size_t size)
|
||||
return rwops;
|
||||
}
|
||||
|
||||
SDL_RWopsStatus SDL_GetRWStatus(SDL_RWops *context)
|
||||
{
|
||||
if (!context) {
|
||||
SDL_InvalidParamError("context");
|
||||
return SDL_RWOPS_STATUS_ERROR;
|
||||
}
|
||||
return context->status;
|
||||
}
|
||||
|
||||
|
||||
SDL_RWops *SDL_OpenRW(const SDL_RWopsInterface *iface, void *userdata)
|
||||
{
|
||||
if (!iface) {
|
||||
|
||||
Reference in New Issue
Block a user