From 7760575d3f26c1a8283e205ff587c78e5c406632 Mon Sep 17 00:00:00 2001 From: Random <35673979+RandomErrorMessage@users.noreply.github.com> Date: Tue, 14 Jul 2020 12:25:21 -0700 Subject: [PATCH] fix emcc warning (-Wparentheses-equality) (#1310) --- src/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core.c b/src/core.c index 8e1e44cf8..17b4e8f4e 100644 --- a/src/core.c +++ b/src/core.c @@ -4218,15 +4218,15 @@ static EM_BOOL EmscriptenKeyboardCallback(int eventType, const EmscriptenKeyboar static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData) { // Lock mouse pointer when click on screen - if ((eventType == EMSCRIPTEN_EVENT_CLICK)) + if (eventType == EMSCRIPTEN_EVENT_CLICK) { EmscriptenPointerlockChangeEvent plce; emscripten_get_pointerlock_status(&plce); - + int result = emscripten_request_pointerlock("#canvas", 1); // TODO: It does not work! - + // result -> EMSCRIPTEN_RESULT_DEFERRED - // The requested operation cannot be completed now for web security reasons, + // The requested operation cannot be completed now for web security reasons, // and has been deferred for completion in the next event handler. --> but it never happens! //if (!plce.isActive) emscripten_request_pointerlock(0, 1);