Commit Graph

189 Commits

Author SHA1 Message Date
Cameron Gutman
dfa64eadd3 KMSDRM: Add hint to enable the backend without DRM master
In some cases, it can be useful to have the KMSDRM backend even if it cannot
be used for rendering. An app may want to use SDL for input processing while
using another rendering API (such as an MMAL overlay on Raspberry Pi) or
using its own code to render to DRM overlays that SDL doesn't support.

This also moves the check for DRM master to an earlier point where we can fail
initialization of the backend, rather than allowing the backend to initialize
then failing the creation of a window later.
2021-02-25 18:48:36 -08:00
Cacodemon345
d2d834b990 KMSDRM: Add gamma support 2021-02-25 11:39:10 -08:00
Mathieu Eyraud
8481229ff7 Fix error handling in KMSDRM_AddDisplay
Add missing `goto cleanup` and check that `dispdata` is not NULL before dereferencing it.
2021-02-22 09:01:36 -08:00
Mathieu Eyraud
2df9c15e96 Fix memory leak in KMSDRM_Vulkan_CreateSurface
Variable `device_props` is never freed.
2021-02-22 09:00:45 -08:00
Vanfanel
11cb53d2a5 [KMSDRM] Add missing break and modify comments. 2021-02-21 15:27:12 -08:00
Vanfanel
9172e413ad [KMSDRM] Fix intermitent bug in Vulkan initialization on Raspberry Pi 4. 2021-02-21 15:27:12 -08:00
Vanfanel
e4a81a98a0 [KMSDRM] Correct indentation. 2021-02-17 17:03:42 +03:00
Manuel Alfayate Corchete
005e2c59a7 [KMS/DRM] Bugfix number #5535: Improve reliability, by wahil1976. 2021-02-10 10:22:20 -05:00
Manuel Alfayate Corchete
19fa85d8af [KMS/DRM] Fix build warning. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete
6ee53258cd [KMS/DRM] Replace indent tabs with spaces, as intended. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete
59cd46c24a [KMS/DRM] Merge patch for bug #5532: No need to correct cursor position now that all windows are fullscreen. Link: https://bugzilla.libsdl.org/show_bug.cgi?id=5519. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete
538f7ad6b7 [KMS/DRM] Remove redundant SDL_SendWindowEvent() call. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete
7beba05013 [KMS/DRM] Restore all-windows-are-fullscreen functionality, since there is no window manager in KMSDRM. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete
2c76433151 [KMS/DRM] Merge patch for bug 5522#: Implement KMSDRM_GetWindowWMInfo(). 2021-02-10 10:22:18 -05:00
Manuel Alfayate Corchete
bfa51c3845 [KMS/DRM] Fix for bug #5518: only do async pageflips when hardware supports them. 2021-02-10 10:22:18 -05:00
Manuel Alfayate Corchete
088fb52579 [KMS/DRM] Correct small omission on bugfix #5513: y-coord correction has to be done on WarpMouseGlobal, too. 2021-02-10 10:22:18 -05:00
Manuel Alfayate Corchete
8d95aba174 [KMS/DRM] Remove unused KMSDRM_SetWindowGrab prototype in header file. 2021-02-10 10:22:18 -05:00
Manuel Alfayate Corchete
b17c49509b [KMS/DRM] Patch for bug #5513. KMSDRM backend can now manage and use several displays. 2021-02-10 10:22:18 -05:00
Sam Lantinga
f23022ef97 Removed non-functional window grab implementations 2021-02-10 10:22:16 -05:00
Cameron Gutman
a0d3c6c63c Rename SetWindowGrab() to SetWindowMouseGrab() 2021-02-10 10:22:16 -05:00
Manuel Alfayate Corchete
8e1005f8b0 [KMS/DRM] Bugfix for #5489: Non-FULLSCREEN windows incorrecty use videomode changing to look fullscreen. 2021-01-24 00:51:26 -05:00
Manuel Alfayate Corchete
ee93f0edee [KMS/DRM] Revert unaproved fix for bug #5465. 2021-01-24 00:51:24 -05:00
Manuel Alfayate Corchete
e1d932f8b6 [KMS/DRM] Fix for bug #5468: corruption on dynamic cursor changing caused by wrong buffer size. 2021-01-24 00:51:24 -05:00
Manuel Alfayate Corchete
99facb1df3 [KMS/DRM] Fix for bug #5470: ratio correction for fullscreen windows with no matching resolution. Correct bracket position in else statements so they follow the coding style. 2021-01-24 00:51:24 -05:00
Manuel Alfayate Corchete
03665004d0 [KMS/DRM] Small fix to KMSDRM_Waitpageflip(). More comments on how it works. 2021-01-24 00:51:23 -05:00
Sam Lantinga
82aafa9aa8 Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD
wahil1976

This patch adds a written-from-scratch WSCONS driver for OpenBSD. It does not have hardcoded keymaps, and it features mouse support when wsmux is available.

For this to work, it needs access to the /dev/wskbd* devices which are not available to non-root users by default. Access to those can be granted by changing /etc/fbtab to give the logging user the ownership of those devices.
2021-01-14 14:32:11 -08:00
Manuel Alfayate Corchete
1adadc7702 [KMS/DRM] Adjust come return values. Improve comments. 2021-01-14 10:18:40 +01:00
Manuel Alfayate Corchete
57661e42c3 [KMS/DRM] Remove unused header. 2021-01-13 20:17:50 +01:00
Manuel Alfayate Corchete
ead3c406a2 [KMS/DRM] Refactor, improve and re-comment async pageflips code. 2021-01-13 20:11:01 +01:00
Manuel Alfayate Corchete
aac74db685 [KMS/DRM] Enable async pageflips. 2021-01-13 15:54:26 +01:00
Manuel Alfayate Corchete
9384e59561 [KMS/DRM] Add warning comentary to avoid future experiments with scaling. 2021-01-12 20:15:37 +01:00
Manuel Alfayate Corchete
8442754912 [KMS/DRM] Refactor KMSDR_CreateSurface to group all non-Vulkan stuff in a block. 2021-01-12 00:22:58 +01:00
Manuel Alfayate Corchete
87eb734c4e [KMS/DRM] Don't ask SDL to scale image when in Vulkan mode. 2021-01-11 23:59:40 +01:00
Manuel Alfayate Corchete
85e8adf78d [KMS/DRM] Unused code cleaning. 2021-01-11 22:28:27 +01:00
Manuel Alfayate Corchete
5105ecf8b1 [KMS/DRM] Move surface size info to window driverdata, for coherency. 2021-01-11 21:02:07 +01:00
Manuel Alfayate Corchete
2067a7db8e [KMS/DRM] Fix fullscreen to windowed transition. Fix aspect ratio correction without using planes. 2021-01-11 20:29:09 +01:00
Manuel Alfayate Corchete
850d9c8c0d [KMS/DRM] Cleanup remainings from plane/scaling usage. 2021-01-09 02:25:13 +01:00
Manuel Alfayate Corchete
2aeb317743 [KMS/DRM] Fix vkQuake3 in OpenGL mode. 2021-01-08 22:00:28 +01:00
Manuel Alfayate Corchete
b24494734b [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC. 2021-01-08 18:57:12 +01:00
Manuel Alfayate Corchete
940e1b8dd9 [KMS/DRM] Small readability changes. 2021-01-08 16:33:50 +01:00
Manuel Alfayate Corchete
e5bf1850f5 [KMS/DRM] Fix cpmpilation warnings. Thanks to Ozkan Sezer for pointing this out! 2021-01-08 15:39:05 +01:00
Manuel Alfayate Corchete
cef1bd0639 [KMS/DRM] Prevent creating another default cursor everytime a window is created. Other fixes and cleanups. 2021-01-08 13:14:42 +01:00
Sam Lantinga
9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Manuel Alfayate Corchete
21003b7db2 [KMS/DRM] Small refactoring on the SwapWindow function. 2020-12-31 14:31:29 +01:00
Manuel Alfayate Corchete
e1fb969b76 [KMS/DRM] Correct comments about last bugfix. 2020-12-31 01:40:15 +01:00
Manuel Alfayate Corchete
e34caa9779 [KMS/DRM] Correct EGL/GL library loading on window creation, thus saving window re-creation. 2020-12-31 01:31:57 +01:00
Manuel Alfayate Corchete
427c96ec11 [KMS/DRM] Rework some functions. 2020-12-29 14:24:38 +01:00
Manuel Alfayate Corchete
7539ac8087 [KMS/DRM] Restore hacky code to point to TTY buffer on surface destruction b/c I lack alternatives. 2020-12-28 18:22:07 +01:00
Manuel Alfayate Corchete
0feaf7d196 [KMS/DRM][Vulkan] Correct non-existing property. Remove hacky surface destruction code (TTY buffer isn't there after a Vulkan window is created). 2020-12-28 14:37:58 +01:00
Manuel Alfayate Corchete
46d31d570d [KMS/DRM][Vulkan] Fix segfault when changing fullscren mode and permanent cursor when changing between Vulkan and GL renderers in vkQuake3. Tidy up window destruction code. 2020-12-27 00:43:06 +01:00