Fix iOS
This commit is contained in:
@@ -19,7 +19,11 @@ namespace lime {
|
||||
|
||||
SDLApplication::SDLApplication () {
|
||||
|
||||
SDL_Init (SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_TIMER);
|
||||
if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_TIMER) != 0) {
|
||||
|
||||
printf ("Could not initialize SDL: %s.\n", SDL_GetError ());
|
||||
|
||||
}
|
||||
|
||||
currentApplication = this;
|
||||
|
||||
|
||||
@@ -17,6 +17,12 @@ namespace lime {
|
||||
|
||||
sdlRenderer = SDL_CreateRenderer (sdlWindow, -1, sdlFlags);
|
||||
|
||||
if (!sdlRenderer) {
|
||||
|
||||
printf ("Could not create SDL renderer: %s.\n", SDL_GetError ());
|
||||
|
||||
}
|
||||
|
||||
OpenGLBindings::Init ();
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,12 @@ namespace lime {
|
||||
|
||||
sdlWindow = SDL_CreateWindow (title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, sdlFlags);
|
||||
|
||||
if (!sdlWindow) {
|
||||
|
||||
printf ("Could not create SDL window: %s.\n", SDL_GetError ());
|
||||
|
||||
}
|
||||
|
||||
((SDLApplication*)currentApplication)->RegisterWindow (this);
|
||||
|
||||
#ifdef HX_WINDOWS
|
||||
|
||||
@@ -16,17 +16,15 @@ extern "C" int lime_openal_register_prims ();
|
||||
::end::
|
||||
|
||||
|
||||
extern "C" int main (int argc, char *argv[]) {
|
||||
|
||||
printf("Top of stack\n");
|
||||
extern "C" int SDL_main (int argc, char *argv[]) {
|
||||
|
||||
hxcpp_set_top_of_stack ();
|
||||
printf("Top of stack2\n");
|
||||
|
||||
zlib_register_prims ();
|
||||
lime_openal_register_prims ();
|
||||
::foreach ndlls::::if (registerStatics)::::name::_register_prims ();::end::
|
||||
::end::
|
||||
printf("prims\n");
|
||||
|
||||
const char *err = NULL;
|
||||
err = hxRunLibrary ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user