Skip to content

Conversation

@foxtacles
Copy link
Contributor

@foxtacles foxtacles commented Dec 7, 2025

The Emscripten support for setting window icons introduced in #14490 does not work when using pthreads. Using SDL_SetWindowIcon will cause the program to crash. The reason for that is that the Blob constructor does not accept shared memory (SharedArrayBuffer).

image

We need to create a local copy of the icon data if necessary.

The Emscripten support for setting window icons introduced in libsdl-org#14490 does not work when using pthreads. Using `SetWindowIcon` will cause the program to crash. The reason for that is that the `Blob` constructor does not accept shared memory (`SharedArrayBuffer`).

We need to create a local copy of the icon data if necessary.
@foxtacles foxtacles changed the title (Bug fix) Handle SharedArrayBuffer for PNG data (Emscripten / bug fix) Handle SharedArrayBuffer for PNG data Dec 7, 2025
@sezero sezero requested a review from slouken December 7, 2025 05:58
@foxtacles foxtacles changed the title (Emscripten / bug fix) Handle SharedArrayBuffer for PNG data (Emscripten / bug fix) Handle SharedArrayBuffer for PNG data in SDL_SetWindowIcon Dec 7, 2025
@slouken slouken merged commit 7e78636 into libsdl-org:main Dec 7, 2025
43 checks passed
@foxtacles foxtacles deleted the patch-1 branch December 7, 2025 06:12
@slouken
Copy link
Collaborator

slouken commented Dec 7, 2025

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants