summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2020-02-22 17:21:10 +0100
committerRay <[email protected]>2020-02-22 17:21:10 +0100
commit310fd9b1471a94d83764caece418cbe451ba2af1 (patch)
tree05b9c11129785945883b3e6a0c050b6d31e64570 /src
parent01d864252072ec30f13e31b9373d4be669aba931 (diff)
downloadraylib-310fd9b1471a94d83764caece418cbe451ba2af1.tar.gz
raylib-310fd9b1471a94d83764caece418cbe451ba2af1.zip
Update to latest emscripten toolchain
Corrected issue on web compilation
Diffstat (limited to 'src')
-rw-r--r--src/Makefile4
-rw-r--r--src/core.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 3a790789..1d5bbb83 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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)
diff --git a/src/core.c b/src/core.c
index 111b2be6..5763e148 100644
--- a/src/core.c
+++ b/src/core.c
@@ -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);