Fix emscripten build

This commit is contained in:
Julien Loir 2023-08-29 00:40:44 +02:00
parent a03fdcba6b
commit 61922716a6
2 changed files with 5 additions and 2 deletions

View File

@ -473,7 +473,8 @@ else ifeq ($(platform), emscripten)
WITH_DYNAREC :=
HAVE_PARALLEL = 0
CPUFLAGS += -DNOSSE -DEMSCRIPTEN -DNO_ASM -DNO_LIBCO -s USE_ZLIB=1 -s PRECISE_F32=1
HAVE_THR_AL = 1
CPUFLAGS += -DNOSSE -DEMSCRIPTEN -DNO_ASM -DNO_LIBCO
WITH_DYNAREC =
CC = emcc
@ -900,6 +901,8 @@ ifeq ($(DEBUG), 1)
else
ifneq (,$(findstring msvc,$(platform)))
CPUOPTS += -O2
else ifeq ($(platform), emscripten)
CPUOPTS += -O2
else
CPUOPTS += -Ofast
endif

View File

@ -81,7 +81,7 @@ void init_pif(struct pif *pif,
for (i = 0; i < GAME_CONTROLLERS_COUNT; ++i)
{
static channels[] = { 0, 1, 2, 3 };
static int32_t channels[] = { 0, 1, 2, 3 };
init_game_controller(
&pif->controllers[i],
(void*)&channels[i],