mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-11 06:28:24 +02:00
Added properties to various SDL objects
The following objects now have properties that can be user modified: * SDL_AudioStream * SDL_Gamepad * SDL_Joystick * SDL_RWops * SDL_Renderer * SDL_Sensor * SDL_Surface * SDL_Texture * SDL_Window
This commit is contained in:
@@ -619,6 +619,7 @@ SDL_RWops *SDL_CreateRW(void)
|
||||
|
||||
void SDL_DestroyRW(SDL_RWops *context)
|
||||
{
|
||||
SDL_DestroyProperties(context->props);
|
||||
SDL_free(context);
|
||||
}
|
||||
|
||||
@@ -698,6 +699,19 @@ void *SDL_LoadFile(const char *file, size_t *datasize)
|
||||
return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, SDL_TRUE);
|
||||
}
|
||||
|
||||
SDL_PropertiesID SDL_GetRWProperties(SDL_RWops *context)
|
||||
{
|
||||
if (!context) {
|
||||
SDL_InvalidParamError("context");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (context->props == 0) {
|
||||
context->props = SDL_CreateProperties();
|
||||
}
|
||||
return context->props;
|
||||
}
|
||||
|
||||
Sint64 SDL_RWsize(SDL_RWops *context)
|
||||
{
|
||||
if (!context) {
|
||||
|
||||
Reference in New Issue
Block a user