From 0981dde9d4d6bdbb123ad31474aa1a44f34606cf Mon Sep 17 00:00:00 2001 From: raysan5 Date: Thu, 30 Apr 2020 20:17:16 +0200 Subject: [PATCH] Remove strcmp() requirement --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index d46c085e..98635527 100644 --- a/src/core.c +++ b/src/core.c @@ -4321,7 +4321,7 @@ static EM_BOOL EmscriptenFullscreenChangeCallback(int eventType, const Emscripte // Register keyboard input events static EM_BOOL EmscriptenKeyboardCallback(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData) { - if ((eventType == EMSCRIPTEN_EVENT_KEYPRESS) && (strcmp(keyEvent->code, "Escape") == 0)) + if ((eventType == EMSCRIPTEN_EVENT_KEYPRESS) && (keyEvent->key == 27)) // ESCAPE key { emscripten_exit_pointerlock(); }