emscripten: Restore compatibility with existing emsdk releases.
This commit is contained in:
parent
953b55dd6d
commit
5008521538
2 changed files with 19 additions and 2 deletions
|
@ -34,7 +34,15 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
|
/* older Emscriptens don't have this, but we need to for wasm64 compatibility. */
|
||||||
|
#ifndef MAIN_THREAD_EM_ASM_PTR
|
||||||
|
#ifdef __wasm64__
|
||||||
|
#error You need to upgrade your Emscripten compiler to support wasm64
|
||||||
|
#else
|
||||||
|
#define MAIN_THREAD_EM_ASM_PTR MAIN_THREAD_EM_ASM_INT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The size of the stack buffer to use for rendering assert messages. */
|
/* The size of the stack buffer to use for rendering assert messages. */
|
||||||
|
@ -243,7 +251,7 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
|
||||||
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_PTR({
|
char *buf = (char *) MAIN_THREAD_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] :';
|
||||||
|
|
|
@ -31,6 +31,15 @@
|
||||||
|
|
||||||
#include "../../events/SDL_mouse_c.h"
|
#include "../../events/SDL_mouse_c.h"
|
||||||
|
|
||||||
|
/* older Emscriptens don't have this, but we need to for wasm64 compatibility. */
|
||||||
|
#ifndef MAIN_THREAD_EM_ASM_PTR
|
||||||
|
#ifdef __wasm64__
|
||||||
|
#error You need to upgrade your Emscripten compiler to support wasm64
|
||||||
|
#else
|
||||||
|
#define MAIN_THREAD_EM_ASM_PTR MAIN_THREAD_EM_ASM_INT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static SDL_Cursor *Emscripten_CreateCursorFromString(const char *cursor_str, SDL_bool is_custom)
|
static SDL_Cursor *Emscripten_CreateCursorFromString(const char *cursor_str, SDL_bool is_custom)
|
||||||
{
|
{
|
||||||
SDL_Cursor *cursor;
|
SDL_Cursor *cursor;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue