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 * 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 __MACOSX__ has been renamed __MACOS__
* The preprocessor symbol __IPHONEOS__ has been renamed __IOS__ * 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: * The following functions have been renamed:
* Removed the following functions from the API, see docs/README-migration.md for details: * Removed the following functions from the API, see docs/README-migration.md for details:
* SDL_CalculateGammaRamp() * 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 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). 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_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_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_render.h
SDL_GetRenderDriverInfo() has been removed, since most of the information it reported were SDL_GetRenderDriverInfo() has been removed, since most of the information it reported were
@ -142,8 +142,10 @@ to decide for you.
## SDL_rwops.h ## 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. 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 #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 */ #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_ENABLE_OLD_NAMES */
#endif /* SDL_oldnames_h_ */ #endif /* SDL_oldnames_h_ */