SDL API renaming: SDL_Alloc*/SDL_Free* -> SDL_Create*/SDL_Destroy*

Fixes https://github.com/libsdl-org/SDL/issues/6945
This commit is contained in:
Sam Lantinga
2022-12-29 15:07:59 -08:00
parent e1bd5bd071
commit 98678b5d8d
14 changed files with 84 additions and 67 deletions

View File

@@ -411,6 +411,9 @@ used by additional platforms that didn't have a SDL_RunApp-like function before)
SDL_ShowCursor() has been split into three functions: SDL_ShowCursor(), SDL_HideCursor(), and SDL_CursorVisible()
The following functions have been renamed:
* SDL_FreeCursor() => SDL_DestroyCursor()
## SDL_pixels.h
SDL_CalculateGammaRamp has been removed, because SDL_SetWindowGammaRamp has been removed as well due to poor support in modern operating systems (see [SDL_video.h](#sdl_videoh)).
@@ -624,7 +627,7 @@ stdio_close(SDL_RWops * context)
status = SDL_Error(SDL_EFWRITE);
}
}
SDL_FreeRW(context);
SDL_DestroyRW(context);
}
return status;
}
@@ -634,7 +637,7 @@ SDL_RWFromFP(void *fp, SDL_bool autoclose)
{
SDL_RWops *rwops = NULL;
rwops = SDL_AllocRW();
rwops = SDL_CreateRW();
if (rwops != NULL) {
rwops->size = stdio_size;
rwops->seek = stdio_seek;
@@ -650,6 +653,10 @@ SDL_RWFromFP(void *fp, SDL_bool autoclose)
```
The following functions have been renamed:
* SDL_AllocRW() => SDL_CreateRW()
* SDL_FreeRW() => SDL_DestroyRW()
## SDL_sensor.h
SDL_SensorID has changed from Sint32 to Uint32, with an invalid ID being 0.