Minor WebAssembly adjustments
This commit is contained in:
@@ -28,6 +28,8 @@ namespace lime {
|
||||
|
||||
static void GCEnterBlocking ();
|
||||
static void GCExitBlocking ();
|
||||
static void GCTryEnterBlocking ();
|
||||
static void GCTryExitBlocking ();
|
||||
static bool GetAllowScreenTimeout ();
|
||||
static std::wstring* GetDeviceModel ();
|
||||
static std::wstring* GetDeviceVendor ();
|
||||
|
||||
@@ -928,8 +928,16 @@ namespace lime {
|
||||
|
||||
void SDLApplication::UpdateFrame () {
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
System::GCTryExitBlocking ();
|
||||
#endif
|
||||
|
||||
currentApplication->Update ();
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
System::GCTryEnterBlocking ();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -201,7 +201,9 @@ namespace lime {
|
||||
|
||||
// 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)
|
||||
std::wstring* GetWMIValue (BSTR query, BSTR field) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user