Ryan C. Gordon
3c6004feb7
kmsdrm: Choose how to swap buffers based on EGL extension availability.
2020-09-10 15:07:23 -04:00
Ryan C. Gordon
c7e761f872
kmsdrm: Patched to compile if EGL headers lack EGL_ANDROID_native_fence_sync.
2020-09-10 15:05:55 -04:00
Ryan C. Gordon
224aa45b59
kmsdrm: Implement GL_DefaultProfileConfig for Raspberry Pi compatibility.
...
If we think this might be a Raspberry Pi device, default to ES2. Otherwise,
accept SDL's higher-level defaults.
2020-09-10 15:04:35 -04:00
Ryan C. Gordon
092162ede7
video: Set up default before calling GL_DefaultProfileConfig().
...
This way, the implementation can opt to do nothing to accept SDL's defaults.
2020-09-10 15:02:51 -04:00
Ryan C. Gordon
e758dd53dc
egl: Make SDL_EGL_HasExtension() available outside of SDL_egl.c.
2020-09-10 15:02:00 -04:00
Manuel Alfayate Corchete
055cad49b6
kmsdrm: no need to re-connect/reactivate things in SwapWindow() anymore because we use a dumb buffer on KMS buffers destruction now.
2020-09-10 02:15:53 +02:00
Manuel Alfayate Corchete
351219bfd8
kmsdrm: On VideoQuit(), only destroy dumb buffer if it exists.
2020-09-09 03:18:26 +02:00
Sam Lantinga
8709f67ebc
Fixed bug 5215 - Fixing filenames passed to dlopen for OpenBSD
...
Brad Smith
Attached is a patch to use the proper filenames when trying to dlopen the respective shared libraries on OpenBSD.
2020-09-08 08:42:30 -07:00
Cameron Gutman
1b6de9a987
Fix SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH=1 on Metal windows
...
SDL_cocoametalview was consuming the first click rather than passing it
through to the SDLView underneath which overrides [NSView acceptsFirstMouse]
based on the user's SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH preference.
2020-09-05 15:01:45 -07:00
Manuel Alfayate Corchete
244d0ad854
kmsdrm: Tell SDL that mouse has entered the window via artificial event. Fixes sticky mouse in Scummvm.
2020-09-08 15:30:45 +02:00
Manuel Alfayate Corchete
550e153365
kmsdrm: No need to test for display driverdata when freeing a plane.
2020-09-08 02:42:32 +02:00
Manuel Alfayate Corchete
6e03fab982
kmsdrm: add temporary RPI4_COMPAT define to try RPI4+current Rasbian compatibility.
2020-09-07 23:15:33 +02:00
Manuel Alfayate Corchete
0f807fd607
kmsdrm: use a black dumb buffer for keeping the PRIMARY PLANE occupied when we destroy the KMS buffers, instead of using the TTY buffer, to avoid flickering.
2020-09-07 22:54:15 +02:00
Sylvain Becker
4d1c2a1857
Fix false compiler warning: initialize the variable 'memdiff'
2020-09-07 19:00:21 +02:00
Sylvain Becker
ebc12a2fd2
SDL_Surface refcount: destination surface keep track of surfaces
...
that are mapped to it and automatically invalidate them when it is freed
- refcount is kept so that an external application can still create a reference
to SDL_Surface.
- lock_data was un-used and is now renamed and used as a list keep track of the blitmap
2020-09-07 18:50:30 +02:00
Manuel Alfayate Corchete
cce6c60518
kmsdrm: fix errors when trying to free up videomode driverdata pointers on quit.
2020-09-07 01:33:04 +02:00
Manuel Alfayate Corchete
9501b1c698
kmsdrm: fix scaling for SDL_WINDOW_FULLSCREEN windows.
2020-09-07 00:18:13 +02:00
Manuel Alfayate Corchete
daa752b10e
kmsdrm: fix first frame display: no need to wait for SwapWindow() for EGL surface creation.
2020-09-06 23:19:54 +02:00
Manuel Alfayate Corchete
68ac9349aa
kmsdrm: more coherent returns for SwapWindow.
2020-09-06 12:48:39 +02:00
Manuel Alfayate Corchete
d3d9d432ac
kmsdrm: Remove debug printfs in SwapWindow.
2020-09-06 12:17:27 +02:00
Manuel Alfayate Corchete
d7aebbd58f
kmsdrm: Don't create surfaces until EGL context is available.
2020-09-06 12:08:22 +02:00
Sylvain Becker
97fad04551
Fixed bug 5278 - export SDL_AndroidRequestPermission() (Thanks Huki!)
2020-09-02 19:38:03 +02:00
Manuel Alfayate Corchete
f4e02a5c1b
kmsdrm: Do NOT modify window size manually from the backend: doing so caused renderer scaling params miscalculation.
2020-08-31 19:17:17 +02:00
Manuel Alfayate Corchete
c09d1cee95
kmsdrm: Apply window reconfiguration in SetWindowSize(), too.
2020-08-28 23:04:00 +02:00
Manuel Alfayate Corchete
31b1794534
kmsdrm: use PLANE and CRTC to do hardware-driven window scaling and AR-correction.
2020-08-28 22:38:26 +02:00
Manuel Alfayate Corchete
fe3f97961b
kmsdrm: unload EGL and GL lib only if using them.
2020-08-26 01:37:30 +02:00
Manuel Alfayate Corchete
9b43464d81
kmsdrm: Add programmer credits to the Atomic KMSDRM driver.
2020-08-25 16:30:23 +02:00
Manuel Alfayate Corchete
9316a8d979
kmsdrm: move FENCE FD props setting to SwapWindow(), where it belongs.
2020-08-25 16:18:49 +02:00
Manuel Alfayate Corchete
3f38009b2f
kmsdrm: comment out atomic commit fast-debugging printf.
2020-08-25 15:40:36 +02:00
Manuel Alfayate Corchete
0d16761cbe
kmsdrm: fix segfault on quit beacuse of freed _this->egl_data.
2020-08-25 05:53:13 +02:00
Manuel Alfayate Corchete
d43e666eed
kmsdrm: Buffer management refactoring. Fixes for compatibility with more video drivers.
2020-08-25 04:05:36 +02:00
Manuel Alfayate Corchete
eade05ca03
kmsdrm: Finetune integer type usage. Add some comments.
2020-08-24 12:51:20 +02:00
Manuel Alfayate Corchete
a76f176361
kmsdrm: Move cursor plane setup and freeing to MouseInit() and MouseQuit(), for better consistency.
2020-08-24 01:10:11 +02:00
Manuel Alfayate Corchete
0d593d7ead
kmsdrm: Add error control to plane prop setting function. Do most plane prop setting with a single function.
2020-08-23 23:44:07 +02:00
Manuel Alfayate Corchete
e06e9c35c8
kmsdrm: move cursor-related atomic helper functions and related struct typedefs to the SDL_kmsdrmmouse unit.
2020-08-23 11:26:55 +02:00
Manuel Alfayate Corchete
0b7b7721b9
kmsdrm: remove redundant function, use drm_atomic_setbuffers() for disconnecting planes instead.
2020-08-23 03:13:50 +02:00
Manuel Alfayate Corchete
16c04f266a
kmsdrm: Init cursor surface on SetCursor() ONLY. Removal of dynamic modeset because it causes A LOT of problems with some kernel video drivers. Some refactoring and cleanups.
2020-08-23 02:58:57 +02:00
Manuel Alfayate Corchete
0d0ba111ae
kmsdrm: correct parameter name.
2020-08-19 01:34:56 +02:00
Manuel Alfayate Corchete
5d32eda956
kmsdrm: implement smarter surface recreation function to be used in videomode changes. Other minor arrangements.
2020-08-19 01:31:22 +02:00
Manuel Alfayate Corchete
f79da81721
kmsdrm: free all connector, crtc and plane memory on KMSDRM_VideoQuit().
2020-08-18 01:52:15 +02:00
Sylvain Becker
96d555e25a
Android: remove un-needed java import (bug 4297)
2020-08-17 20:09:01 +02:00
Sylvain Becker
965b466ee8
Fixed bug 4297 - Android StrictMode policy. Remove APK expansion support
...
"In the second half of 2021, new apps will be required to publish with the Android App Bundle on Google Play"
(see https://developer.android.com/guide/app-bundle )
And "Android App Bundles don't support APK expansion (*.obb) files".
2020-08-17 19:50:20 +02:00
Manuel Alfayate Corchete
92cb9192e3
kmsdrm: move hardware cursor functionality to the ATOMIC interface. Disconnect the display plane from the GBM surface buffers before destroying the GBM surface.
2020-08-17 18:35:04 +02:00
Kai Krakow
c3ecf18cc4
Linux: Add hint for disabling deadzones
2020-07-21 23:38:42 +02:00
Sam Lantinga
86517d3eda
Fixed bug 5242 - KMOD_* flags unnecessarily macros; breaks OGRE
...
Rainer Deyke
While most of the KMOD_* flags are enums, the combination flags KMOD_CTRL, KMOD_ALT, KMOD_SHIFT and KMOD_GUI are defined as macros. This breaks third-party code that uses these KMOD_* names for local identifiers, such as OGRE. The correct thing to do is to make them all enums.
2020-08-10 08:42:35 -07:00
Tudor Brindus
c094332825
wayland: defer pointer confine creation until pointer unlock
...
It is a protocol error to attempt to create a pointer confine (i.e.
`SDL_SetWindowGrab`) while a locked pointer is active, and vice-versa.
Instead of aborting due to a protocol error, this commit makes SDL
gracefully downgrade locked pointers to confines when appropriate.
2020-07-21 13:14:24 -04:00
Ryan C. Gordon
a720d1a294
render: fixes to how we convert touch events for logical scaling.
...
We now handle HiDPI correctly, and touches are clamped to the viewport. So
if you are rendering to a logical 640x480 in a 720p window, and touch the
letterboxing at point (640,700), it will report the touch at (0.5,1.0) instead
of outside the documented range.
2020-08-09 00:55:39 -04:00
Manuel Alfayate Corchete
c437729b21
kmsdrm: separate requests in different functions so we only need one atomic commit for everything, as expected by atomic design.
2020-08-08 14:27:55 +02:00
Manuel Alfayate Corchete
3b9f1073c6
kmsdrm: wait for possible pending atomic commits before destroying surfaces, and before restoring video on quit. Move messages to the SDL_Log* functions.
2020-08-07 11:53:04 +02:00
Manuel Alfayate Corchete
96c99693a2
kmsdrm: wait for pending atomic commits before restoring videomode and crtc->buffer on VideoQuit, and simplify double-buffer SwapWindow() implementation.
2020-08-06 01:36:56 +02:00