Browse Source

Platform: add a note about why emscripten_set_window_title() isn't used.

pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
8a92a64a4d
  1. 9
      src/Magnum/Platform/Platform.js.in

9
src/Magnum/Platform/Platform.js.in

@ -93,6 +93,15 @@ mergeInto(LibraryManager.library, {
stringToUTF8(id, memory, bytes);
return memory;
},
/* There's also emscripten_set_window_title(), but this takes an explicit
length, allowing the caller to not need to make a null-terminated copy.
Sized UTF8ToString() is also used everywhere else in our code, which is
better than mixing it with unsized according to Emscripten UTF8ToString()
docs:
N.B. mixing frequent uses of UTF8ToString() with and without
maxBytesToRead may throw JS JIT optimizations off, so it is worth to
consider consistently using one */
magnumPlatformSetWindowTitle__deps: [
${MagnumPlatform_EMSCRIPTEN_3135_ONLY} '$UTF8ToString'
],

Loading…
Cancel
Save