mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 01:16:26 +00:00
Unify all the SDL_*RunApp() functions into just SDL_RunApp()
makes the SDL_main code shorter Also added a generic SDL_RunApp() implementation for platforms that don't really need it. Some platforms (that use SDL_main but haven't been ported yet) are still missing, but are added in the following commits.
This commit is contained in:

committed by
Sam Lantinga

parent
1de559248e
commit
7bfc41db3c
@@ -521,9 +521,6 @@ SDL3_0.0.0 {
|
||||
SDL_SetMainReady;
|
||||
SDL_RegisterApp;
|
||||
SDL_UnregisterApp;
|
||||
SDL_WinRTRunApp;
|
||||
SDL_UIKitRunApp;
|
||||
SDL_GDKRunApp;
|
||||
SDL_GDKSuspendComplete;
|
||||
SDL_GetBasePath;
|
||||
SDL_GetPrefPath;
|
||||
@@ -861,7 +858,7 @@ SDL3_0.0.0 {
|
||||
SDL_DelayNS;
|
||||
SDL_GetEventState;
|
||||
SDL_GetRenderDriver;
|
||||
SDL_Win32RunApp;
|
||||
SDL_RunApp;
|
||||
# extra symbols go here (don't modify this line)
|
||||
local: *;
|
||||
};
|
||||
|
@@ -554,7 +554,6 @@
|
||||
#define SDL_GetAssertionHandler SDL_GetAssertionHandler_REAL
|
||||
#define SDL_DXGIGetOutputInfo SDL_DXGIGetOutputInfo_REAL
|
||||
#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_REAL
|
||||
#define SDL_WinRTRunApp SDL_WinRTRunApp_REAL
|
||||
#define SDL_WarpMouseGlobal SDL_WarpMouseGlobal_REAL
|
||||
#define SDL_WinRTGetFSPathUNICODE SDL_WinRTGetFSPathUNICODE_REAL
|
||||
#define SDL_WinRTGetFSPathUTF8 SDL_WinRTGetFSPathUTF8_REAL
|
||||
@@ -693,7 +692,6 @@
|
||||
#define SDL_RenderCopyF SDL_RenderCopyF_REAL
|
||||
#define SDL_RenderCopyExF SDL_RenderCopyExF_REAL
|
||||
#define SDL_GetTouchDeviceType SDL_GetTouchDeviceType_REAL
|
||||
#define SDL_UIKitRunApp SDL_UIKitRunApp_REAL
|
||||
#define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL
|
||||
#define SDL_SIMDAlloc SDL_SIMDAlloc_REAL
|
||||
#define SDL_SIMDFree SDL_SIMDFree_REAL
|
||||
@@ -858,7 +856,6 @@
|
||||
#define SDL_RenderGetD3D12Device SDL_RenderGetD3D12Device_REAL
|
||||
#define SDL_utf8strnlen SDL_utf8strnlen_REAL
|
||||
#define SDL_GDKGetTaskQueue SDL_GDKGetTaskQueue_REAL
|
||||
#define SDL_GDKRunApp SDL_GDKRunApp_REAL
|
||||
#define SDL_GetOriginalMemoryFunctions SDL_GetOriginalMemoryFunctions_REAL
|
||||
#define SDL_ResetKeyboard SDL_ResetKeyboard_REAL
|
||||
#define SDL_GetDefaultAudioInfo SDL_GetDefaultAudioInfo_REAL
|
||||
@@ -885,5 +882,4 @@
|
||||
#define SDL_DelayNS SDL_DelayNS_REAL
|
||||
#define SDL_GetEventState SDL_GetEventState_REAL
|
||||
#define SDL_GetRenderDriver SDL_GetRenderDriver_REAL
|
||||
#define SDL_Win32RunApp SDL_Win32RunApp_REAL
|
||||
#define SDL_N3DSRunApp SDL_N3DSRunApp_REAL
|
||||
#define SDL_RunApp SDL_RunApp_REAL
|
||||
|
@@ -583,7 +583,6 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_DXGIGetOutputInfo,(int a, int *b, int *c),(a,b,c),r
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_RenderIsClipEnabled,(SDL_Renderer *a),(a),return)
|
||||
#ifdef __WINRT__
|
||||
SDL_DYNAPI_PROC(int,SDL_WinRTRunApp,(SDL_main_func a, void *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const wchar_t*,SDL_WinRTGetFSPathUNICODE,(SDL_WinRT_Path a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_WinRTGetFSPathUTF8,(SDL_WinRT_Path a),(a),return)
|
||||
#endif
|
||||
@@ -744,9 +743,6 @@ SDL_DYNAPI_PROC(int,SDL_RenderFillRectsF,(SDL_Renderer *a, const SDL_FRect *b, i
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderCopyF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderCopyExF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
|
||||
SDL_DYNAPI_PROC(SDL_TouchDeviceType,SDL_GetTouchDeviceType,(SDL_TouchID a),(a),return)
|
||||
#ifdef __IOS__
|
||||
SDL_DYNAPI_PROC(int,SDL_UIKitRunApp,(int a, char *b[], SDL_main_func c),(a,b,c),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SIMDFree,(void *a),(a),)
|
||||
@@ -931,7 +927,6 @@ SDL_DYNAPI_PROC(size_t,SDL_utf8strnlen,(const char *a, size_t b),(a,b),return)
|
||||
|
||||
#if defined(__GDK__)
|
||||
SDL_DYNAPI_PROC(int,SDL_GDKGetTaskQueue,(XTaskQueueHandle *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GDKRunApp,(SDL_main_func a, void *b),(a,b),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(void,SDL_GetOriginalMemoryFunctions,(SDL_malloc_func *a, SDL_calloc_func *b, SDL_realloc_func *c, SDL_free_func *d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ResetKeyboard,(void),(),)
|
||||
@@ -961,9 +956,4 @@ SDL_DYNAPI_PROC(Uint64,SDL_GetTicksNS,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DelayNS,(Uint64 a),(a),)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_GetEventState,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetRenderDriver,(int a),(a),return)
|
||||
#if defined(__WIN32__)
|
||||
SDL_DYNAPI_PROC(int,SDL_Win32RunApp,(SDL_main_func a, void *b),(a,b),return)
|
||||
#endif
|
||||
#if defined(__3DS__)
|
||||
SDL_DYNAPI_PROC(int,SDL_N3DSRunApp,(int a, char *b[], SDL_main_func c),(a,b,c),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(int,SDL_RunApp,(int a, char* b[], SDL_main_func c, void *d),(a,b,c,d),return)
|
||||
|
Reference in New Issue
Block a user