mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Fix web client not compiling on really old emscripten versions such as 1.38.21
This commit is contained in:
parent
8fd37cd31e
commit
b8794585e4
@ -3256,6 +3256,12 @@ static EM_BOOL OnKeyPress(int type, const EmscriptenKeyboardEvent* ev, void* dat
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Really old emscripten versions (e.g. 1.38.21) don't have this defined */
|
||||||
|
/* Can't just use "#window", newer versions switched to const int instead */
|
||||||
|
#ifndef EMSCRIPTEN_EVENT_TARGET_WINDOW
|
||||||
|
#define EMSCRIPTEN_EVENT_TARGET_WINDOW "#window"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void HookEvents(void) {
|
static void HookEvents(void) {
|
||||||
emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 0, OnMouseWheel);
|
emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 0, OnMouseWheel);
|
||||||
emscripten_set_mousedown_callback("#canvas", NULL, 0, OnMouseButton);
|
emscripten_set_mousedown_callback("#canvas", NULL, 0, OnMouseButton);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user