We don't have CI tests for pointerlock, so it's possible something regressed. It would be great if someone has time to look into puppeteer or another test framework that supports that.
I'd suggest bisecting to find when that happened. If it regressed, we should add a test to `tests/test_interactive.py` which we at least run manually now and then. On Thu, Jul 30, 2020 at 12:54 PM Floh <[email protected]> wrote: > 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 > <https://groups.google.com/d/msgid/emscripten-discuss/fbe7df6d-7cef-4a5f-9b91-da70bcb58b0an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAEX4NpS8K2fXnsFANbuRa9M1_hq1JJp6mzR1qOEbOrzxwr9taA%40mail.gmail.com.
