瀏覽代碼

fix emcc warning (-Wparentheses-equality) (#1310)

pull/1311/head
Random 4 年之前
committed by GitHub
父節點
當前提交
7760575d3f
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      src/core.c

+ 4
- 4
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 (p">(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);

Loading…
取消
儲存