[ion/simulator/sdl] Backport an Emscripten fix for setWindowTitle

See https://bugzilla.libsdl.org/show_bug.cgi?id=5133
This commit is contained in:
Romain Goyet
2020-09-14 17:21:35 -04:00
committed by Léa Saviot
parent ba3109e47a
commit e8f1ea6aa5

View File

@@ -348,8 +348,8 @@ Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * di
static void
Emscripten_SetWindowTitle(_THIS, SDL_Window * window) {
EM_ASM_INT({
if (typeof Module['setWindowTitle'] !== 'undefined') {
Module['setWindowTitle'](UTF8ToString($0));
if (typeof setWindowTitle !== 'undefined') {
setWindowTitle(UTF8ToString($0));
}
return 0;
}, window->title);