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