mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Make iOS/tvOS (uikit) SDL_main header-only
Also adjusted iOS demo's includes to <SDL3/..> and explicit SDL_main.h untested, I don't have Xcode (or a Mac, for that matter) The xcode projects (for both Xcode-iOS/ and Xcode/) will probably have to be adjusted for the SDL_main changes to work, but now at least the iOS demo source should work as is :)
This commit is contained in:

committed by
Sam Lantinga

parent
28ecbbf0b5
commit
8e0693c982
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019
|
||||
|
||||
Nothing to do here, the code moved into SDL_main_impl.h
|
||||
TODO: remove this file
|
||||
*/
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h> /* until this SDL_main impl is converted to header-only.. */
|
||||
|
||||
#if defined(__IOS__) || defined(__TVOS__)
|
||||
|
||||
#ifndef SDL_MAIN_HANDLED
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return SDL_UIKitRunApp(argc, argv, SDL_main);
|
||||
}
|
||||
#endif /* !SDL_MAIN_HANDLED */
|
||||
|
||||
#endif /* __IOS__ || __TVOS__ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user