Closed paccerdk closed 3 months ago
Reverted the order of SDL_SetRelativeMouseMode and SDL_WarpMouseInWindow since it was causing the cursor to warp to center of screen on older SDL versions (tested with SDL 2.0.22)
I like the PR, thanks @paccerdk for spending the time with all the investigations across backends!
Reverted the order of SDL_SetRelativeMouseMode and SDL_WarpMouseInWindow since it was causing the cursor to warp to center of screen on older SDL versions (tested with SDL 2.0.22)
Could you please add a comment to the code about this finding? I find it important to have it documented. Thanks!
I tested sdl_opengl3
and mouse drag is still looking good :+1:
Moved grab handling out of
nk_sdl_handle_event
tonk_sdl_handle_grab
, which is now called outside of the event loop.This change makes the logic similar to the GLFW demos and fixes issues with missed grab state changes and mouse cursor disappearing.
Discussed in https://github.com/Immediate-Mode-UI/Nuklear/issues/608