Use EM_ASM_PTR when the return value is a pointer

- closes https://github.com/libsdl-org/SDL/issues/8241

(cherry picked from commit 953b55dd6da1dd9fb937f3c67a18c5cab2988599)
This commit is contained in:
Jaswant Panchumarti 2023-09-19 10:45:50 -04:00 committed by Ryan C. Gordon
parent 2fcbf321fa
commit 330d420afc
No known key found for this signature in database
GPG key ID: FA148B892AB48044
2 changed files with 2 additions and 2 deletions

View file

@ -251,7 +251,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
for (;;) { for (;;) {
SDL_bool okay = SDL_TRUE; SDL_bool okay = SDL_TRUE;
/* *INDENT-OFF* */ /* clang-format off */ /* *INDENT-OFF* */ /* clang-format off */
char *buf = (char *) EM_ASM_INT({ char *buf = (char *) EM_ASM_PTR({
var str = var str =
UTF8ToString($0) + '\n\n' + UTF8ToString($0) + '\n\n' +
'Abort/Retry/Ignore/AlwaysIgnore? [ariA] :'; 'Abort/Retry/Ignore/AlwaysIgnore? [ariA] :';

View file

@ -74,7 +74,7 @@ static SDL_Cursor *Emscripten_CreateCursor(SDL_Surface *surface, int hot_x, int
} }
/* *INDENT-OFF* */ /* clang-format off */ /* *INDENT-OFF* */ /* clang-format off */
cursor_url = (const char *)MAIN_THREAD_EM_ASM_INT({ cursor_url = (const char *)MAIN_THREAD_EM_ASM_PTR({
var w = $0; var w = $0;
var h = $1; var h = $1;
var hot_x = $2; var hot_x = $2;