Update to latest emscripten toolchain

Corrected issue on web compilation
This commit is contained in:
Ray 2020-02-22 17:21:10 +01:00
parent 01d8642520
commit 310fd9b147
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
EMSDK_PATH ?= C:/emsdk
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
PYTHON_PATH = $(EMSDK_PATH)/python/2.7.13.1_64bit/python-2.7.13.amd64
PYTHON_PATH = $(EMSDK_PATH)/python/3.7.4_64bit
NODE_PATH = $(EMSDK_PATH)/node/12.9.1_64bit/bin
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
endif
@ -478,7 +478,7 @@ endif
raylib: $(OBJS)
ifeq ($(PLATFORM),PLATFORM_WEB)
# Compile raylib for web.
emcc -O1 $(OBJS) -o $(RAYLIB_RELEASE_PATH)/libraylib.bc
$(CC) -O1 $(OBJS) -o $(RAYLIB_RELEASE_PATH)/libraylib.bc
@echo "raylib library generated (libraylib.bc)!"
else
ifeq ($(RAYLIB_LIBTYPE),SHARED)

View File

@ -703,7 +703,7 @@ void InitWindow(int width, int height, const char *title)
#endif
#if defined(PLATFORM_WEB)
emscripten_set_fullscreenchange_callback(0, 0, 1, EmscriptenFullscreenChangeCallback);
emscripten_set_fullscreenchange_callback("#canvas", NULL, 1, EmscriptenFullscreenChangeCallback);
// Support keyboard events
emscripten_set_keypress_callback("#canvas", NULL, 1, EmscriptenKeyboardCallback);