Skip to content

Commit

Permalink
Backport SDL setWindowTitle fix for newer emscripten versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirNate0 committed Oct 28, 2023
1 parent 5a872e6 commit 3d5bbae
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,12 @@ Emscripten_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * di

static void
Emscripten_SetWindowTitle(_THIS, SDL_Window * window) {
// Urho3D: newer emscripten uses a free function and not one in the module. Taken from newer SDL.
EM_ASM_INT({
if (typeof Module['setWindowTitle'] !== 'undefined') {
if (typeof setWindowTitle !== 'undefined') {
setWindowTitle(UTF8ToString($0));
}
else if (typeof Module['setWindowTitle'] !== 'undefined') {
Module['setWindowTitle'](UTF8ToString($0));
}
return 0;
Expand Down

0 comments on commit 3d5bbae

Please sign in to comment.