mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-20 10:18:14 +00:00
fix emcc warning (-Wparentheses-equality) (#1310)
This commit is contained in:
@@ -4218,15 +4218,15 @@ static EM_BOOL EmscriptenKeyboardCallback(int eventType, const EmscriptenKeyboar
|
|||||||
static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
|
static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
|
||||||
{
|
{
|
||||||
// Lock mouse pointer when click on screen
|
// Lock mouse pointer when click on screen
|
||||||
if ((eventType == EMSCRIPTEN_EVENT_CLICK))
|
if (eventType == EMSCRIPTEN_EVENT_CLICK)
|
||||||
{
|
{
|
||||||
EmscriptenPointerlockChangeEvent plce;
|
EmscriptenPointerlockChangeEvent plce;
|
||||||
emscripten_get_pointerlock_status(&plce);
|
emscripten_get_pointerlock_status(&plce);
|
||||||
|
|
||||||
int result = emscripten_request_pointerlock("#canvas", 1); // TODO: It does not work!
|
int result = emscripten_request_pointerlock("#canvas", 1); // TODO: It does not work!
|
||||||
|
|
||||||
// result -> EMSCRIPTEN_RESULT_DEFERRED
|
// 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!
|
// and has been deferred for completion in the next event handler. --> but it never happens!
|
||||||
|
|
||||||
//if (!plce.isActive) emscripten_request_pointerlock(0, 1);
|
//if (!plce.isActive) emscripten_request_pointerlock(0, 1);
|
||||||
|
Reference in New Issue
Block a user