This commit is contained in:
Joshua Granick
2015-03-25 13:19:58 -07:00
parent f4dcc59c33
commit 3c413958c4
4 changed files with 20 additions and 6 deletions

View File

@@ -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;

View File

@@ -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 ();
}

View File

@@ -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

View File

@@ -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 ();