iOS update
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
<ndll name="std" haxelib="hxcpp" if="cpp" />
|
||||
<ndll name="regexp" haxelib="hxcpp" if="cpp" />
|
||||
<ndll name="zlib" haxelib="hxcpp" if="cpp" unless="emscripten" />
|
||||
<ndll name="zlib" haxelib="hxcpp" if="cpp" unless="emscripten || ios" />
|
||||
|
||||
<ndll name="lime" if="included" />
|
||||
|
||||
|
||||
@@ -568,6 +568,12 @@ class IOSPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
if (project.targetFlags.exists ("xcode") && PlatformHelper.hostPlatform == Platform.MAC && command == "update") {
|
||||
|
||||
ProcessHelper.runCommand ("", "open", [ targetDirectory + "/" + project.app.file + ".xcodeproj" ] );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
</section>
|
||||
|
||||
<compilerflag value="-DLIME_SDL" />
|
||||
<compilerflag value="-D__IPHONEOS__" if="ios" />
|
||||
|
||||
<file name="src/backend/sdl/SDLApplication.cpp" />
|
||||
<file name="src/backend/sdl/SDLWindow.cpp" />
|
||||
@@ -156,7 +157,7 @@
|
||||
|
||||
<compilerflag value="-DSTATIC_LINK" if="emscripten" />
|
||||
|
||||
<file name="${HXCPP}/project/libs/zlib/ZLib.cpp" if="emscripten" />
|
||||
<file name="${HXCPP}/project/libs/zlib/ZLib.cpp" if="emscripten || ios" />
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ namespace lime {
|
||||
SDL_Event event;
|
||||
event.type = -1;
|
||||
|
||||
#if (!defined (EMSCRIPTEN) && !defined (IPHONE))
|
||||
#if (!defined (IPHONE) && !defined (EMSCRIPTEN))
|
||||
|
||||
if (active && (firstTime || SDL_WaitEvent (&event))) {
|
||||
|
||||
@@ -424,15 +424,37 @@ namespace lime {
|
||||
if (!active)
|
||||
return active;
|
||||
|
||||
if (SDL_PollEvent (&event)) {
|
||||
#endif
|
||||
|
||||
while (SDL_PollEvent (&event)) {
|
||||
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
if (!active)
|
||||
return active;
|
||||
|
||||
}
|
||||
|
||||
currentUpdate = SDL_GetTicks ();
|
||||
|
||||
#if defined (IPHONE)
|
||||
|
||||
if (currentUpdate >= nextUpdate) {
|
||||
|
||||
event.type = SDL_USEREVENT;
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
|
||||
}
|
||||
|
||||
#elif defined (EMSCRIPTEN)
|
||||
|
||||
event.type = SDL_USEREVENT;
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
|
||||
#else
|
||||
|
||||
if (currentUpdate >= nextUpdate) {
|
||||
|
||||
SDL_RemoveTimer (timerID);
|
||||
@@ -447,19 +469,6 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
while (SDL_PollEvent (&event)) {
|
||||
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
|
||||
}
|
||||
|
||||
event.type = SDL_USEREVENT;
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
|
||||
#endif
|
||||
|
||||
return active;
|
||||
@@ -476,7 +485,7 @@ namespace lime {
|
||||
|
||||
void SDLApplication::UpdateFrame (void*) {
|
||||
|
||||
currentApplication->Update ();
|
||||
UpdateFrame ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,33 +12,29 @@ extern "C" void hxcpp_set_top_of_stack ();
|
||||
|
||||
extern "C" int zlib_register_prims ();
|
||||
extern "C" int lime_openal_register_prims ();
|
||||
::foreach ndlls::::if (registerStatics)::extern "C" int ::name::_register_prims();::end::
|
||||
::foreach ndlls::::if (registerStatics)::extern "C" int ::name::_register_prims ();::end::
|
||||
::end::
|
||||
|
||||
|
||||
extern "C" int main(int argc, char *argv[]) {
|
||||
extern "C" int main (int argc, char *argv[]) {
|
||||
|
||||
//printf("Starting ...\n" );
|
||||
hxcpp_set_top_of_stack ();
|
||||
|
||||
zlib_register_prims ();
|
||||
lime_openal_register_prims ();
|
||||
::foreach ndlls::::if (registerStatics)::::name::_register_prims();::end::
|
||||
::foreach ndlls::::if (registerStatics)::::name::_register_prims ();::end::
|
||||
::end::
|
||||
|
||||
//printf("Running\n");
|
||||
|
||||
const char *err = NULL;
|
||||
err = hxRunLibrary ();
|
||||
|
||||
if (err) {
|
||||
|
||||
printf(" Error %s\n", err );
|
||||
printf (" Error %s\n", err);
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
//printf("Done!\n");
|
||||
return 0;
|
||||
|
||||
}
|
||||
@@ -7,35 +7,36 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" const char *hxRunLibrary();
|
||||
extern "C" void hxcpp_set_top_of_stack();
|
||||
|
||||
::foreach ndlls::
|
||||
::if (registerStatics)::
|
||||
extern "C" int ::name::_register_prims();
|
||||
::end::
|
||||
extern "C" const char *hxRunLibrary ();
|
||||
extern "C" void hxcpp_set_top_of_stack ();
|
||||
|
||||
extern "C" int zlib_register_prims ();
|
||||
extern "C" int lime_openal_register_prims ();
|
||||
::foreach ndlls::::if (registerStatics)::extern "C" int ::name::_register_prims ();::end::
|
||||
::end::
|
||||
|
||||
extern "C" int main(int argc, char *argv[])
|
||||
{
|
||||
//printf("Starting ...\n" );
|
||||
hxcpp_set_top_of_stack();
|
||||
|
||||
::foreach ndlls::
|
||||
::if (registerStatics)::
|
||||
::name::_register_prims();
|
||||
::end::
|
||||
::end::
|
||||
|
||||
//printf("Running\n");
|
||||
|
||||
extern "C" int main (int argc, char *argv[]) {
|
||||
|
||||
printf("Top of stack\n");
|
||||
|
||||
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();
|
||||
err = hxRunLibrary ();
|
||||
|
||||
if (err) {
|
||||
printf(" Error %s\n", err );
|
||||
|
||||
printf (" Error %s\n", err);
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
//printf("Done!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user