Used rename_api.py to add previously renamed symbols to SDL_oldnames.h

This commit is contained in:
Sam Lantinga 2022-12-23 15:08:30 -08:00
parent c309a92034
commit 759f98085a
3 changed files with 30 additions and 6 deletions

View file

@ -11,6 +11,10 @@ General:
* SDL_GetWindowWMInfo() returns a standard int result code instead of SDL_bool, and takes SDL_SYSWM_CURRENT_VERSION as a new third parameter
* The preprocessor symbol __MACOSX__ has been renamed __MACOS__
* The preprocessor symbol __IPHONEOS__ has been renamed __IOS__
* The following macros have been renamed:
* RW_SEEK_CUR -> SDL_RW_SEEK_CUR
* RW_SEEK_END -> SDL_RW_SEEK_END
* RW_SEEK_SET -> SDL_RW_SEEK_SET
* The following functions have been renamed:
* Removed the following functions from the API, see docs/README-migration.md for details:
* SDL_CalculateGammaRamp()

View file

@ -118,14 +118,14 @@ Furthermore, the different `SDL_*RunApp()` functions (SDL_WinRtRunApp, SDL_GDKRu
have been unified into just `int SDL_RunApp(int argc, char* argv[], void * reserved)` (which is also
used by additional platforms that didn't have a SDL_RunApp-like function before).
## SDL_platform.h
The preprocessor symbol __MACOSX__ has been renamed __MACOS__, and __IPHONEOS__ has been renamed __IOS__
## 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)).
## SDL_platform.h
The preprocessor symbol __MACOSX__ has been renamed __MACOS__, and __IPHONEOS__ has been renamed __IOS__
## SDL_render.h
SDL_GetRenderDriverInfo() has been removed, since most of the information it reported were
@ -142,8 +142,10 @@ to decide for you.
## SDL_rwops.h
The RW_SEEK_CUR, RW_SEEK_END and RW_SEEK_SET macros have been renamed SDL_RW_SEEK_CUR, SDL_RW_SEEK_END and SDL_RW_SEEK_SET.
The following macros have been renamed:
* RW_SEEK_CUR => SDL_RW_SEEK_CUR
* RW_SEEK_END => SDL_RW_SEEK_END
* RW_SEEK_SET => SDL_RW_SEEK_SET
SDL_RWread and SDL_RWwrite (and SDL_RWops::read, SDL_RWops::write) have a different function signature in SDL3.

View file

@ -34,8 +34,26 @@
*/
#ifdef SDL_ENABLE_OLD_NAMES
/* ##SDL_platform.h */
#define __IPHONEOS__ __IOS__
#define __MACOSX__ __MACOS__
/* ##SDL_rwops.h */
#define RW_SEEK_CUR SDL_RW_SEEK_CUR
#define RW_SEEK_END SDL_RW_SEEK_END
#define RW_SEEK_SET SDL_RW_SEEK_SET
#else /* !SDL_ENABLE_OLD_NAMES */
/* ##SDL_platform.h */
#define __IPHONEOS__ __IPHONEOS___renamed___IOS__
#define __MACOSX__ __MACOSX___renamed___MACOS__
/* ##SDL_rwops.h */
#define RW_SEEK_CUR RW_SEEK_CUR_renamed_SDL_RW_SEEK_CUR
#define RW_SEEK_END RW_SEEK_END_renamed_SDL_RW_SEEK_END
#define RW_SEEK_SET RW_SEEK_SET_renamed_SDL_RW_SEEK_SET
#endif /* SDL_ENABLE_OLD_NAMES */
#endif /* SDL_oldnames_h_ */