Skip to content

Commit

Permalink
Merge pull request #56 from u3d-community/further-web-fixes
Browse files Browse the repository at this point in the history
Use emscripten_set_window_title API
  • Loading branch information
klaussilveira authored Nov 22, 2023
2 parents 3998515 + d5c2f9a commit 011843e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
run: cmake --build build --parallel 2 --config ${{ matrix.build-type }}

- name: Publish
if: 0
run: echo TODO
# TODO: port the ci_publish_web: task from the rakefile
12 changes: 2 additions & 10 deletions Source/ThirdParty/SDL/src/video/emscripten/SDL_emscriptenvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,8 @@ 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 setWindowTitle !== 'undefined') {
setWindowTitle(UTF8ToString($0));
}
else if (typeof Module['setWindowTitle'] !== 'undefined') {
Module['setWindowTitle'](UTF8ToString($0));
}
return 0;
}, window->title);
// Urho3D: use emscripten api that should still work. Taken from newer SDL (55af8dc).
emscripten_set_window_title(window->title);
}

#endif /* SDL_VIDEO_DRIVER_EMSCRIPTEN */
Expand Down

0 comments on commit 011843e

Please sign in to comment.