Revert WebAssembly improvements (moved to 8.1.0-Dev branch)
This commit is contained in:
@@ -42,6 +42,12 @@ namespace lime {
|
||||
|
||||
framePeriod = 1000.0 / 60.0;
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
emscripten_cancel_main_loop ();
|
||||
emscripten_set_main_loop (UpdateFrame, 0, 0);
|
||||
emscripten_set_main_loop_timing (EM_TIMING_RAF, 1);
|
||||
#endif
|
||||
|
||||
currentUpdate = 0;
|
||||
lastUpdate = 0;
|
||||
nextUpdate = 0;
|
||||
@@ -89,12 +95,6 @@ namespace lime {
|
||||
|
||||
Init ();
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
emscripten_cancel_main_loop ();
|
||||
emscripten_set_main_loop (UpdateFrame, 0, 0);
|
||||
emscripten_set_main_loop_timing (EM_TIMING_RAF, 1);
|
||||
#endif
|
||||
|
||||
#if defined(IPHONE) || defined(EMSCRIPTEN)
|
||||
|
||||
return 0;
|
||||
@@ -891,7 +891,7 @@ namespace lime {
|
||||
|
||||
currentUpdate = SDL_GetTicks ();
|
||||
|
||||
#if defined (IPHONE) || defined (EMSCRIPTEN)
|
||||
#if defined (IPHONE)
|
||||
|
||||
if (currentUpdate >= nextUpdate) {
|
||||
|
||||
@@ -901,6 +901,12 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
#elif defined (EMSCRIPTEN)
|
||||
|
||||
event.type = SDL_USEREVENT;
|
||||
HandleEvent (&event);
|
||||
event.type = -1;
|
||||
|
||||
#else
|
||||
|
||||
if (currentUpdate >= nextUpdate) {
|
||||
@@ -926,16 +932,8 @@ namespace lime {
|
||||
|
||||
void SDLApplication::UpdateFrame () {
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
System::GCTryExitBlocking ();
|
||||
#endif
|
||||
|
||||
currentApplication->Update ();
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
System::GCTryEnterBlocking ();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -201,9 +201,7 @@ namespace lime {
|
||||
|
||||
// if (window->flags & WINDOW_FLAG_VSYNC) {
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
sdlRendererFlags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
#endif
|
||||
// sdlRendererFlags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user