瀏覽代碼

Remove strcmp() requirement

pull/1233/head
raysan5 4 年之前
父節點
當前提交
0981dde9d4
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/core.c

+ 1
- 1
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();
}

Loading…
取消
儲存