Minor WebAssembly adjustments
This commit is contained in:
@@ -28,6 +28,8 @@ namespace lime {
|
|||||||
|
|
||||||
static void GCEnterBlocking ();
|
static void GCEnterBlocking ();
|
||||||
static void GCExitBlocking ();
|
static void GCExitBlocking ();
|
||||||
|
static void GCTryEnterBlocking ();
|
||||||
|
static void GCTryExitBlocking ();
|
||||||
static bool GetAllowScreenTimeout ();
|
static bool GetAllowScreenTimeout ();
|
||||||
static std::wstring* GetDeviceModel ();
|
static std::wstring* GetDeviceModel ();
|
||||||
static std::wstring* GetDeviceVendor ();
|
static std::wstring* GetDeviceVendor ();
|
||||||
|
|||||||
@@ -928,8 +928,16 @@ namespace lime {
|
|||||||
|
|
||||||
void SDLApplication::UpdateFrame () {
|
void SDLApplication::UpdateFrame () {
|
||||||
|
|
||||||
|
#ifdef EMSCRIPTEN
|
||||||
|
System::GCTryExitBlocking ();
|
||||||
|
#endif
|
||||||
|
|
||||||
currentApplication->Update ();
|
currentApplication->Update ();
|
||||||
|
|
||||||
|
#ifdef EMSCRIPTEN
|
||||||
|
System::GCTryEnterBlocking ();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,9 @@ namespace lime {
|
|||||||
|
|
||||||
// if (window->flags & WINDOW_FLAG_VSYNC) {
|
// if (window->flags & WINDOW_FLAG_VSYNC) {
|
||||||
|
|
||||||
// sdlRendererFlags |= SDL_RENDERER_PRESENTVSYNC;
|
#ifdef EMSCRIPTEN
|
||||||
|
sdlRendererFlags |= SDL_RENDERER_PRESENTVSYNC;
|
||||||
|
#endif
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,28 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void System::GCTryEnterBlocking () {
|
||||||
|
|
||||||
|
if (!_isHL) {
|
||||||
|
|
||||||
|
gc_try_blocking ();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void System::GCTryExitBlocking () {
|
||||||
|
|
||||||
|
if (!_isHL) {
|
||||||
|
|
||||||
|
gc_try_unblocking ();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
|
#if defined (HX_WINDOWS) && !defined (HX_WINRT)
|
||||||
std::wstring* GetWMIValue (BSTR query, BSTR field) {
|
std::wstring* GetWMIValue (BSTR query, BSTR field) {
|
||||||
|
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ class WebAssemblyPlatform extends PlatformTarget
|
|||||||
args.push("ASSERTIONS=1");
|
args.push("ASSERTIONS=1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set initial size
|
||||||
|
args.push("-s");
|
||||||
|
args.push("TOTAL_MEMORY=32MB");
|
||||||
|
|
||||||
if (project.targetFlags.exists("final"))
|
if (project.targetFlags.exists("final"))
|
||||||
{
|
{
|
||||||
args.push("-O3");
|
args.push("-O3");
|
||||||
|
|||||||
Reference in New Issue
Block a user