main: Indented SDL_main headers for readability, removed SDL2 compat macros.
Specifically, SDL_WinRTRunApp, SDL_UIKitRunApp, and SDL_GDKRunApp macros were removed, as likely unnecessary to SDL3 users. A note was added to the migration doc about how to roll replacements. These are not going into SDL_oldnames.h. Fixes #8245.main
parent
22ea59425d
commit
8814095aa8
|
@ -861,7 +861,15 @@ SDL3 doesn't have a static libSDLmain to link against anymore.
|
|||
Instead SDL_main.h is now a header-only library **and not included by SDL.h anymore**.
|
||||
|
||||
Using it is really simple: Just `#include <SDL3/SDL_main.h>` in the source file with your standard
|
||||
`int main(int argc, char* argv[])` function.
|
||||
`int main(int argc, char* argv[])` function. See docs/README-main-functions.md for details.
|
||||
|
||||
Several platform-specific entry point functions have been removed as unnecessary. If for some reason you explicitly need them, here are easy replacements:
|
||||
|
||||
```c
|
||||
#define SDL_WinRTRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
#define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL)
|
||||
#define SDL_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
```
|
||||
|
||||
## SDL_metal.h
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@
|
|||
*/
|
||||
|
||||
#ifndef SDL_MAIN_HANDLED
|
||||
#ifdef SDL_PLATFORM_WIN32
|
||||
/* On Windows SDL provides WinMain(), which parses the command line and passes
|
||||
#ifdef SDL_PLATFORM_WIN32
|
||||
/* On Windows SDL provides WinMain(), which parses the command line and passes
|
||||
the arguments to your main function.
|
||||
|
||||
If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#elif defined(SDL_PLATFORM_WINRT)
|
||||
/* On WinRT, SDL provides a main function that initializes CoreApplication,
|
||||
#elif defined(SDL_PLATFORM_WINRT)
|
||||
/* On WinRT, SDL provides a main function that initializes CoreApplication,
|
||||
creating an instance of IFrameworkView in the process.
|
||||
|
||||
Ideally, #include'ing SDL_main.h is enough to get a main() function working.
|
||||
|
@ -60,21 +60,21 @@
|
|||
and build that with /ZW (still include SDL_main.h in your other file with main()!).
|
||||
In XAML apps, instead the function SDL_RunApp() must be called with a pointer
|
||||
to the Direct3D-hosted XAML control passed in as the "reserved" argument.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(SDL_PLATFORM_GDK)
|
||||
/* On GDK, SDL provides a main function that initializes the game runtime.
|
||||
#elif defined(SDL_PLATFORM_GDK)
|
||||
/* On GDK, SDL provides a main function that initializes the game runtime.
|
||||
|
||||
If you prefer to write your own WinMain-function instead of having SDL
|
||||
provide one that calls your main() function,
|
||||
#define SDL_MAIN_HANDLED before #include'ing SDL_main.h
|
||||
and call the SDL_RunApp function from your entry point.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(SDL_PLATFORM_IOS)
|
||||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
#elif defined(SDL_PLATFORM_IOS)
|
||||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
and starts the iOS application run loop.
|
||||
|
||||
To use it, just #include SDL_main.h in the source file that contains your
|
||||
|
@ -82,53 +82,52 @@
|
|||
|
||||
See src/video/uikit/SDL_uikitappdelegate.m for more details.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(SDL_PLATFORM_ANDROID)
|
||||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
#elif defined(SDL_PLATFORM_ANDROID)
|
||||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
main activity entry point.
|
||||
|
||||
See docs/README-android.md for more details on extending that class.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
/* We need to export SDL_main so it can be launched from Java */
|
||||
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||
/* We need to export SDL_main so it can be launched from Java */
|
||||
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||
|
||||
#elif defined(SDL_PLATFORM_PSP)
|
||||
/* On PSP SDL provides a main function that sets the module info,
|
||||
#elif defined(SDL_PLATFORM_PSP)
|
||||
/* On PSP SDL provides a main function that sets the module info,
|
||||
activates the GPU and starts the thread required to be able to exit
|
||||
the software.
|
||||
|
||||
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#elif defined(SDL_PLATFORM_PS2)
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
#elif defined(SDL_PLATFORM_PS2)
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#define SDL_PS2_SKIP_IOP_RESET() \
|
||||
#define SDL_PS2_SKIP_IOP_RESET() \
|
||||
void reset_IOP(); \
|
||||
void reset_IOP() {}
|
||||
|
||||
#elif defined(SDL_PLATFORM_3DS)
|
||||
/*
|
||||
#elif defined(SDL_PLATFORM_3DS)
|
||||
/*
|
||||
On N3DS, SDL provides a main function that sets up the screens
|
||||
and storage.
|
||||
|
||||
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#elif defined(SDL_PLATFORM_NGAGE)
|
||||
|
||||
/*
|
||||
#elif defined(SDL_PLATFORM_NGAGE)
|
||||
/*
|
||||
TODO: not sure if it should be SDL_MAIN_NEEDED, in SDL2 ngage had a
|
||||
main implementation, but wasn't mentioned in SDL_main.h
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
#ifndef SDLMAIN_DECLSPEC
|
||||
|
@ -470,26 +469,8 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
|||
|
||||
#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) */
|
||||
|
||||
|
||||
#ifdef SDL_PLATFORM_WINRT
|
||||
|
||||
/* for compatibility with SDL2's function of this name */
|
||||
#define SDL_WinRTRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
|
||||
#endif /* SDL_PLATFORM_WINRT */
|
||||
|
||||
#ifdef SDL_PLATFORM_IOS
|
||||
|
||||
/* for compatibility with SDL2's function of this name */
|
||||
#define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL)
|
||||
|
||||
#endif /* SDL_PLATFORM_IOS */
|
||||
|
||||
#ifdef SDL_PLATFORM_GDK
|
||||
|
||||
/* for compatibility with SDL2's function of this name */
|
||||
#define SDL_GDKRunApp(MAIN_FUNC, RESERVED) SDL_RunApp(0, NULL, MAIN_FUNC, RESERVED)
|
||||
|
||||
/**
|
||||
* Callback from the application to let the suspend continue.
|
||||
*
|
||||
|
@ -506,31 +487,29 @@ extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
|
|||
#include <SDL3/SDL_close_code.h>
|
||||
|
||||
#if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL)
|
||||
/* include header-only SDL_main implementations */
|
||||
#if defined(SDL_MAIN_USE_CALLBACKS) \
|
||||
/* include header-only SDL_main implementations */
|
||||
#if defined(SDL_MAIN_USE_CALLBACKS) \
|
||||
|| defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) \
|
||||
|| defined(SDL_PLATFORM_3DS) || defined(SDL_PLATFORM_NGAGE) || defined(SDL_PLATFORM_PS2) || defined(SDL_PLATFORM_PSP)
|
||||
|
||||
/* platforms which main (-equivalent) can be implemented in plain C */
|
||||
#include <SDL3/SDL_main_impl.h>
|
||||
/* platforms which main (-equivalent) can be implemented in plain C */
|
||||
#include <SDL3/SDL_main_impl.h>
|
||||
|
||||
#elif defined(SDL_PLATFORM_WINRT) /* C++ platforms */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <SDL3/SDL_main_impl.h>
|
||||
#else
|
||||
/* Note: to get rid of the following warning, you can #define SDL_MAIN_NOIMPL before including SDL_main.h
|
||||
#elif defined(SDL_PLATFORM_WINRT) /* C++ platforms */
|
||||
#ifdef __cplusplus
|
||||
#include <SDL3/SDL_main_impl.h>
|
||||
#else
|
||||
/* Note: to get rid of the following warning, you can #define SDL_MAIN_NOIMPL before including SDL_main.h
|
||||
* in your C sourcefile that contains the standard main. Do *not* use SDL_MAIN_HANDLED for that, then SDL_main won't find your main()!
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#pragma message("Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C (then continue including SDL_main.h there!) and create a fresh .cpp file that only contains #include <SDL3/SDL_main.h>")
|
||||
#elif defined(__GNUC__) /* gcc, clang, mingw and compatible are matched by this and have #warning */
|
||||
#warning "Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C and create a fresh .cpp file that only contains #include <SDL3/SDL_main.h>"
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* __cplusplus */
|
||||
#ifdef _MSC_VER
|
||||
#pragma message("Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C (then continue including SDL_main.h there!) and create a fresh .cpp file that only contains #include <SDL3/SDL_main.h>")
|
||||
#elif defined(__GNUC__) /* gcc, clang, mingw and compatible are matched by this and have #warning */
|
||||
#warning "Note: Your platform needs the SDL_main implementation in a C++ source file. You can keep your main() in plain C and create a fresh .cpp file that only contains #include <SDL3/SDL_main.h>"
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* C++ platforms like SDL_PLATFORM_WINRT etc */
|
||||
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
#endif /* C++ platforms like SDL_PLATFORM_WINRT etc */
|
||||
#endif
|
||||
|
||||
#endif /* SDL_main_h_ */
|
||||
|
|
|
@ -35,99 +35,102 @@
|
|||
and main() is implemented in plain C */
|
||||
#if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL)
|
||||
|
||||
/* the implementations below must be able to use the implement real main(), nothing renamed
|
||||
/* the implementations below must be able to use the implement real main(), nothing renamed
|
||||
(the user's main() will be renamed to SDL_main so it can be called from here) */
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif /* main */
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
#ifdef SDL_MAIN_USE_CALLBACKS
|
||||
#ifdef SDL_MAIN_USE_CALLBACKS
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
/* currently there are no platforms that _need_ a magic entry point here
|
||||
for callbacks, but if one shows up, implement it here. */
|
||||
|
||||
#else /* use a standard SDL_main, which the app SHOULD NOT ALSO SUPPLY. */
|
||||
#else /* use a standard SDL_main, which the app SHOULD NOT ALSO SUPPLY. */
|
||||
|
||||
/* this define makes the normal SDL_main entry point stuff work...we just provide SDL_main() instead of the app. */
|
||||
#define SDL_MAIN_CALLBACK_STANDARD 1
|
||||
/* this define makes the normal SDL_main entry point stuff work...we just provide SDL_main() instead of the app. */
|
||||
#define SDL_MAIN_CALLBACK_STANDARD 1
|
||||
|
||||
int SDL_main(int argc, char **argv)
|
||||
{
|
||||
int SDL_main(int argc, char **argv)
|
||||
{
|
||||
return SDL_EnterAppMainCallbacks(argc, argv, SDL_AppInit, SDL_AppIterate, SDL_AppEvent, SDL_AppQuit);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* platform-specific tests */
|
||||
#endif /* platform-specific tests */
|
||||
|
||||
#endif /* SDL_MAIN_USE_CALLBACKS */
|
||||
#endif /* SDL_MAIN_USE_CALLBACKS */
|
||||
|
||||
|
||||
/* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point. */
|
||||
#if !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)
|
||||
/* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point. */
|
||||
#if !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)
|
||||
|
||||
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||
|
||||
/* these defines/typedefs are needed for the WinMain() definition */
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
/* these defines/typedefs are needed for the WinMain() definition */
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
|
||||
typedef struct HINSTANCE__ * HINSTANCE;
|
||||
typedef char* LPSTR;
|
||||
typedef wchar_t* PWSTR;
|
||||
typedef struct HINSTANCE__ * HINSTANCE;
|
||||
typedef char* LPSTR;
|
||||
typedef wchar_t* PWSTR;
|
||||
|
||||
/* The VC++ compiler needs main/wmain defined, but not for GDK */
|
||||
#if defined(_MSC_VER) && !defined(SDL_PLATFORM_GDK)
|
||||
/* The VC++ compiler needs main/wmain defined, but not for GDK */
|
||||
#if defined(_MSC_VER) && !defined(SDL_PLATFORM_GDK)
|
||||
|
||||
/* This is where execution begins [console apps] */
|
||||
#if defined( UNICODE ) && UNICODE
|
||||
int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
|
||||
{
|
||||
/* This is where execution begins [console apps] */
|
||||
#if defined( UNICODE ) && UNICODE
|
||||
int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
|
||||
{
|
||||
(void)argc;
|
||||
(void)wargv;
|
||||
(void)wenvp;
|
||||
return SDL_RunApp(0, NULL, SDL_main, NULL);
|
||||
}
|
||||
#else /* ANSI */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
}
|
||||
#else /* ANSI */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
return SDL_RunApp(0, NULL, SDL_main, NULL);
|
||||
}
|
||||
#endif /* UNICODE */
|
||||
}
|
||||
#endif /* UNICODE */
|
||||
|
||||
#endif /* _MSC_VER && ! SDL_PLATFORM_GDK */
|
||||
#endif /* _MSC_VER && ! SDL_PLATFORM_GDK */
|
||||
|
||||
/* This is where execution begins [windowed apps and GDK] */
|
||||
/* This is where execution begins [windowed apps and GDK] */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#if defined( UNICODE ) && UNICODE
|
||||
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, PWSTR szCmdLine, int sw)
|
||||
#else /* ANSI */
|
||||
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
||||
#endif
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined( UNICODE ) && UNICODE
|
||||
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, PWSTR szCmdLine, int sw)
|
||||
#else /* ANSI */
|
||||
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
||||
#endif
|
||||
{
|
||||
(void)hInst;
|
||||
(void)hPrev;
|
||||
(void)szCmdLine;
|
||||
(void)sw;
|
||||
return SDL_RunApp(0, NULL, SDL_main, NULL);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
}
|
||||
|
||||
/* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */
|
||||
#elif defined(SDL_PLATFORM_WINRT)
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* WinRT main based on SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14 */
|
||||
/* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */
|
||||
|
||||
#include <wrl.h>
|
||||
#elif defined(SDL_PLATFORM_WINRT)
|
||||
|
||||
/* At least one file in any SDL/WinRT app appears to require compilation
|
||||
/* WinRT main based on SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14 */
|
||||
|
||||
#include <wrl.h>
|
||||
|
||||
/* At least one file in any SDL/WinRT app appears to require compilation
|
||||
with C++/CX, otherwise a Windows Metadata file won't get created, and
|
||||
an APPX0702 build error can appear shortly after linking.
|
||||
|
||||
|
@ -146,70 +149,66 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
|||
Please note that /ZW can be specified on a file-by-file basis. To do this,
|
||||
right click on the file in Visual C++, click Properties, then change the
|
||||
setting through the dialog that comes up.
|
||||
*/
|
||||
#ifndef SDL_WINRT_METADATA_FILE_AVAILABLE
|
||||
#if !defined(__cplusplus) || !defined(__cplusplus_winrt)
|
||||
#error The C++ file that includes SDL_main.h must be compiled as C++ code with /ZW, otherwise build errors due to missing .winmd files can occur.
|
||||
#endif
|
||||
#endif
|
||||
*/
|
||||
#ifndef SDL_WINRT_METADATA_FILE_AVAILABLE
|
||||
#if !defined(__cplusplus) || !defined(__cplusplus_winrt)
|
||||
#error The C++ file that includes SDL_main.h must be compiled as C++ code with /ZW, otherwise build errors due to missing .winmd files can occur.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Prevent MSVC++ from warning about threading models when defining our
|
||||
/* Prevent MSVC++ from warning about threading models when defining our
|
||||
custom WinMain. The threading model will instead be set via a direct
|
||||
call to Windows::Foundation::Initialize (rather than via an attributed
|
||||
function).
|
||||
|
||||
To note, this warning (C4447) does not seem to come up unless this file
|
||||
is compiled with C++/CX enabled (via the /ZW compiler flag).
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4447)
|
||||
#endif
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4447)
|
||||
/* Make sure the function to initialize the Windows Runtime gets linked in. */
|
||||
#pragma comment(lib, "runtimeobject.lib")
|
||||
#endif
|
||||
|
||||
/* Make sure the function to initialize the Windows Runtime gets linked in. */
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "runtimeobject.lib")
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
return SDL_RunApp(0, NULL, SDL_main, NULL);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
/* end of WinRT impl */
|
||||
#elif defined(SDL_PLATFORM_NGAGE)
|
||||
/* end of WinRT impl */
|
||||
|
||||
/* same typedef as in ngage SDKs e32def.h */
|
||||
typedef signed int TInt;
|
||||
/* TODO: if it turns out that this only works when built as C++,
|
||||
#elif defined(SDL_PLATFORM_NGAGE)
|
||||
/* same typedef as in ngage SDKs e32def.h */
|
||||
typedef signed int TInt;
|
||||
/* TODO: if it turns out that this only works when built as C++,
|
||||
move SDL_PLATFORM_NGAGE into the C++ section in SDL_main.h */
|
||||
TInt E32Main()
|
||||
{
|
||||
TInt E32Main()
|
||||
{
|
||||
return SDL_RunApp(0, NULL, SDL_main, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* end of SDL_PLATFORM_NGAGE impl */
|
||||
/* end of SDL_PLATFORM_NGAGE impl */
|
||||
|
||||
#else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return SDL_RunApp(argc, argv, SDL_main, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* end of impls for standard-conforming platforms */
|
||||
/* end of impls for standard-conforming platforms */
|
||||
|
||||
#endif /* SDL_PLATFORM_WIN32 etc */
|
||||
#endif /* SDL_PLATFORM_WIN32 etc */
|
||||
|
||||
#endif /* !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD) */
|
||||
#endif /* !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD) */
|
||||
|
||||
/* rename users main() function to SDL_main() so it can be called from the wrappers above */
|
||||
#define main SDL_main
|
||||
/* rename users main() function to SDL_main() so it can be called from the wrappers above */
|
||||
#define main SDL_main
|
||||
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
|
|
Loading…
Reference in New Issue