From 4ae927ff5b507ef42dd951eb831840bb97a480f9 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Mon, 1 May 2017 14:59:33 +0900 Subject: [PATCH] Notify window size to the shell --- src/sdlmain.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sdlmain.cpp b/src/sdlmain.cpp index b64cba4..2c7091c 100644 --- a/src/sdlmain.cpp +++ b/src/sdlmain.cpp @@ -1,6 +1,9 @@ #include "common.h" #include "fileio.h" #include "sys/nact.h" +#ifdef __EMSCRIPTEN__ +#include +#endif extern "C" { void ags_setAntialiasedStringMode(int on); @@ -24,6 +27,10 @@ int main(int argc, char *argv[]) g_window = SDL_CreateWindow(buf, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 400, 0); +#ifdef __EMSCRIPTEN__ + EM_ASM( xsystem35.shell.windowSizeChanged(); ); +#endif + for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "-antialias") == 0) ags_setAntialiasedStringMode(1);