Update emscripten version
This commit is contained in:
1 parent
ea8f64c940
commit
2a7498695a
18 files changed
+76
-66
No files matched your search
+6
-6
@@ -1,4 +1,4 @@
|
||||
#include "Game.h"
|
||||
#include "Game.h"
|
||||
#include "Environment.h"
|
||||
#include "utils/Utils.h"
|
||||
#include <iostream>
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#include <emscripten/html5.h>
|
||||
#endif
|
||||
@@ -50,7 +50,7 @@ void readSettings()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(EMSCRIPTEN)
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
static SDL_GLContext glContext_x;
|
||||
static bool g_isFsLoaded = false; // Флаг готовности
|
||||
|
||||
@@ -109,7 +109,7 @@ static void applyResize(int logicalW, int logicalH) {
|
||||
#endif
|
||||
|
||||
void MainLoop() {
|
||||
#if defined(EMSCRIPTEN)
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
// Крутим цикл вхолостую, пока JS читает IndexedDB
|
||||
if (!g_isFsLoaded) return;
|
||||
|
||||
@@ -128,7 +128,7 @@ void MainLoop() {
|
||||
g_game->update();
|
||||
}
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
|
||||
|
||||
EM_BOOL onWebGLContextLost(int /*eventType*/, const void* /*reserved*/, void* /*userData*/) {
|
||||
@@ -482,7 +482,7 @@ int main(int argc, char* argv[]) {
|
||||
SDL_DestroyWindow(FRG::Environment::window);
|
||||
}
|
||||
//FRG::logger() << "Quitting step 8: " << std::endl;
|
||||
#ifndef EMSCRIPTEN
|
||||
#ifndef __EMSCRIPTEN__
|
||||
// In Emscripten, SDL must stay alive across context loss/restore cycles
|
||||
// so the window remains valid when the game object is re-created.
|
||||
SDL_Quit();
|
||||
|
||||
Reference in new issue
Block a user