Wed, 27 May 2020 09:57:51 -0700Fixed mkdir warning when running iosbuild.sh multiple times
Sam Lantinga <slouken@libsdl.org> [Wed, 27 May 2020 09:57:51 -0700] rev 13861
Fixed mkdir warning when running iosbuild.sh multiple times

Wed, 27 May 2020 09:57:26 -0700Fixed building with --disable-joystick on macOS
Sam Lantinga <slouken@libsdl.org> [Wed, 27 May 2020 09:57:26 -0700] rev 13860
Fixed building with --disable-joystick on macOS

Wed, 27 May 2020 09:28:03 -0700Fixed uninitialized variable warning
Sam Lantinga <slouken@libsdl.org> [Wed, 27 May 2020 09:28:03 -0700] rev 13859
Fixed uninitialized variable warning

Wed, 27 May 2020 09:22:12 -0700Fixed compiler warning building on FreeBSD
Sam Lantinga <slouken@libsdl.org> [Wed, 27 May 2020 09:22:12 -0700] rev 13858
Fixed compiler warning building on FreeBSD

Tue, 26 May 2020 16:34:50 -0700If there isn't a GetGlobalMouseState() implementation, fall back to the normal one.
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 16:34:50 -0700] rev 13857
If there isn't a GetGlobalMouseState() implementation, fall back to the normal one.

Tue, 26 May 2020 16:29:26 -0700Fixed bug 5141 - KMSDRM: manage SDL_GetGlobalMouseState()
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 16:29:26 -0700] rev 13856
Fixed bug 5141 - KMSDRM: manage SDL_GetGlobalMouseState()

Manuel Alfayate Corchete

On the KMSDRM backend, there is no such thing as a desktop, yet some programs could (and DO) use SDL_GetGlobalMouseState().
So I think its good idea that, in KMSDRM, it returns the same mouse coordinates anyway as SDL_GetMouseState() would return. There is nothing else it could return, as far as I can understand, since there is no desktop anyway.
This small patch does precisely that.

Tue, 26 May 2020 16:27:00 -0700Fixed bug 5140 - KMSDRM: Dynamic vsync toggle does not work
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 16:27:00 -0700] rev 13855
Fixed bug 5140 - KMSDRM: Dynamic vsync toggle does not work

Manuel Alfayate Corchete

The KMSDRM backend was doing things wrong because of some small (but important) misconceptions on how KMS/DRM works: to implement a largely broken non-vsync refresh mechanism, the SwapWindow() function was issuing new pageflips before previous ones had completed, thus causing EBUSY returns, buffer mismanagement, etc... resulting in general breakage on vsync disabling from apps, that would not allow vsync to work again without KMSDRM video re-initialization.
To further clarify, on most DRM drivers async pageflips are NOT working nowadays, so all issued pageflips will complete on next VBLANK, NOT ASAP (calling drmModePageFlip() with the DRM_MODE_PAGE_FLIP_ASYNC flag will return error).

The old code was assuming that can just issue a synchronous (=on VBLANK) pageflip and then pass a 0 timeout to the pull() function so we do not wait for the pageflip event, thinking that this will lead to correct non-vsynced screen updates from the program: That is plain wrong.
Each pageflip has to be waite before issuing a new one, ALWAYS. And if we do not support ASYNC pageflips on the DRM driver level, then we are forced to wait for the next VBLANK. There is no way around it.

I have also added many comments on the KMSDRM code. This is needed for future reference for me or others who may need to look at this code: KMS/DRM terminology regarding what SYNC and ASYNC mean in pageflip terms, and where to do certain things and why, is not trivial. It is not desirable or possible to invest time on researching the same concepts every time there is need to dive into this code. So please leave all these comments in the patch.

Tue, 26 May 2020 13:54:47 -0700Fixed iOS build
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 13:54:47 -0700] rev 13854
Fixed iOS build

Tue, 26 May 2020 13:19:48 -0700Getting closer.
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 13:19:48 -0700] rev 13853
Getting closer.

Tue, 26 May 2020 13:19:44 -0700More Linux fixes.
Sam Lantinga <slouken@libsdl.org> [Tue, 26 May 2020 13:19:44 -0700] rev 13852
More Linux fixes.