Hi, is anybody using the emscripten pointerlock functions and noticed any problems that pointer lock doesn't activate when emscripten_request_pointerlock() is called from within a mouse button event handler? I definitely had this working in old SDK versions (2 years ago or so, for instance see here: https://floooh.github.io/oryol-samples/wasm/BulletPhysicsBasic.html), but with the current SDK version it looks like I always get a EMSCRIPTEN_RESULT_FAILED_NOT_DEFERRED result even though I'm sure I'm calling it from within an event handler type which doesn't require deferred execution (specifically: on left mouse button down).
I'm requesting pointer-lock like this: emscripten_request_pointerlock(canvas_name, false); I'm now working around the problem by not calling emscripten_request_pointerlock() and emscripten_exit_pointerlock() but instead use my own EM_JS() functions, this appears to work fine (called from the same place where I called the emscripten API functions). The pointerlockchange_callback works fine though. Cheers, -Floh. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/fbe7df6d-7cef-4a5f-9b91-da70bcb58b0an%40googlegroups.com.
