Vanfanel
942aa7bd07
[KMSDRM] No need to use an SDL_VideoDisplay pointer to access display index.
2021-03-31 15:32:17 -04:00
Learath
033c0abb58
Use dispatch_async for -[NSOpenGLContext update]. Fixes #3680
2021-03-31 10:46:31 -04:00
Ethan Lee
eeee730833
wayland: Implement IME support.
...
Note that this is purely to make it possible to enter text that requires
composition - for example, before this commit Kanji input didn't work at all.
The big problem this still has is that we need the window position, and this is
still not implemented. Once we have this information we can do the equivalent
of XTranslateCoordinates to put the rectangle where we want it.
2021-03-29 15:54:36 -07:00
vanfanel
733b3278de
[KMSDRM] Minor Vulkan code adjustments regarding pointers and display index.
2021-03-29 11:07:36 -07:00
Vanfanel
9de7eaf9ac
[KMSDRM] Change error message.
2021-03-28 16:38:06 -07:00
Vanfanel
1ec60a38eb
[KMSDRM] Remove unnecessary space.
2021-03-28 16:38:06 -07:00
Vanfanel
c13c3c37bd
[KMSDRM] For Vulkan, use a mode with the same exact size as the window, if possible, or create a new one.
2021-03-28 16:38:06 -07:00
Ethan Lee
07ba13b7a9
wayland: Pass --no-wrap to Zenity.
...
There seems to be a bug where it can wrap the text based on the minimum possible
window size, which can be worked around with --no-wrap. This technically uncaps
the width entirely, but this isn't wildly different from what other backends do.
2021-03-27 02:57:39 -04:00
Ethan Lee
54719a9d3d
wayland: Assign output_len in ShowMessageBox
2021-03-27 02:57:39 -04:00
Ethan Lee
27b74d3334
Implement Wayland_ShowMessageBox using Zenity
2021-03-25 23:37:14 -04:00
Ozkan Sezer
5262b52ddd
SDL_kmsdrmvideo.c: define EGL_PLATFORM_GBM_MESA if it's missing.
...
Fixes: https://github.com/libsdl-org/SDL/issues/4232
2021-03-25 23:56:56 +03:00
vanfanel
5ac6bd5483
[KMSDRM] Ask for videomode on the correct display when creating a window.
2021-03-23 21:51:36 -07:00
Paul Cercueil
c12f46b100
[KMSDRM] Fix segmentation fault
...
Deference the windata pointer *after* checking that it's non-NULL.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-03-22 22:20:01 +03:00
vanfanel
100166d7d7
[KMSDRM] Improve cursor management.
2021-03-22 10:48:02 -07:00
vanfanel
cf7eef37b0
[KMSDRM] Better error handling: no more segfaults on window creation failure.
2021-03-20 11:03:52 -07:00
Vanfanel
4acd1dcad4
[KMSDRM] Improve the way to test if last window is being destroyed.
2021-03-18 11:04:28 -07:00
Vanfanel
8638674a87
[KMSDRM] Correct comment typo.
2021-03-18 11:04:28 -07:00
vanfanel
82ff6045fa
[KMSDRM] Unload GL/EGL libs and destroy GBM only when we are destroying the last window.
2021-03-18 11:04:28 -07:00
vanfanel
c35e71892e
[KMSDRM] All non-vulkan windows have to be marked as OPENGL, not only the first created one.
2021-03-18 11:04:28 -07:00
vanfanel
281a7bdbb3
[KMSDRM] Make the gbm_init flag a viddata member to avoid GBM re-init when several displays are connected.
2021-03-18 11:04:28 -07:00
Vanfanel
7d1b9c9f15
[KMSDRM] Remove unneeded function calls and improve comments for future reference.
2021-03-17 11:29:13 -07:00
Haelwenn (lanodan) Monnier
9996cecc72
Set ALT_OGL to libOpenGL.so.0 instead of libOpenGL.so.1
2021-03-15 10:10:38 +03:00
Cacodemon345
5f7eb88ae0
Load libOpenGL.so.1 if libGL.so.1 is not found
2021-03-14 17:37:55 -07:00
kenmays
72bcf546f9
SDL: Updated patches for HAIKU
2021-03-13 18:36:01 -08:00
Sylvain Becker
3d22731d94
Merge pull request #4175 from 1bsyl/br_blit_rgb555_to_rb1555
...
Fixed bug 3727 - Blit from RGB555 to ARGB1555
2021-03-11 20:10:07 +01:00
Sylvain
51345623e8
Fixed bug 3727 - Blit from RGB555 to ARGB1555
2021-03-11 20:06:09 +01:00
Ivan Epifanov
33127271e5
Fix typecasting
2021-03-09 12:10:40 +03:00
Ivan Epifanov
a4ddb175f1
Formatting
2021-03-08 09:07:12 -08:00
Ivan Epifanov
4f9fde8766
Fix types
2021-03-08 09:07:12 -08:00
Ivan Epifanov
e1d9cbf65c
Split mouse/kb grab
2021-03-08 09:07:12 -08:00
uyjulian
29153a1c63
SDL_vitamessagebox: rearrange if/else
...
Set messageboxdata and buttonid as unused variables
2021-03-08 09:07:12 -08:00
uyjulian
70a19fd5ab
SDL_vitamessagebox: if/else wrap preprocessor condition instead of two if conditions
2021-03-08 09:07:12 -08:00
uyjulian
c8abc88cd0
Add support for message box
2021-03-08 09:07:12 -08:00
Ivan Epifanov
3c1fe9cea6
WTF
2021-03-08 09:07:12 -08:00
Ivan Epifanov
6fab3323c3
Typo
2021-03-08 09:07:12 -08:00
uyjulian
b52e9459ba
Add support for open URL
2021-03-08 09:07:12 -08:00
Ivan Epifanov
23db5381a3
Fix defines
2021-03-08 09:07:12 -08:00
Ivan Epifanov
e56c44512a
Disable native framebuffer support
2021-03-08 09:07:12 -08:00
Ivan Epifanov
5e30d84b69
Fix display mode
2021-03-08 09:07:12 -08:00
Ivan Epifanov
10038228f9
Properly cleanup framebuffer
2021-03-08 09:07:12 -08:00
Ivan Epifanov
953101defd
Oops. Fix default framebuffer color
2021-03-08 09:07:12 -08:00
Ivan Epifanov
1e2eed1a01
Native framebuffer for software renderer
2021-03-08 09:07:12 -08:00
Ivan Epifanov
a7269a9ad3
Update video api to 2.0.14
2021-03-08 09:07:12 -08:00
Ivan Epifanov
ca5e5d6154
VITASDK compatibility
2021-03-08 09:07:12 -08:00
Ivan Epifanov
7d89f09f74
ISO C90 fixes
2021-03-08 09:07:12 -08:00
Ivan Epifanov
0da35d3daf
IME support with gxm backend
2021-03-08 09:07:12 -08:00
Ivan Epifanov
943053a922
Clean up touch a little more
2021-03-08 09:07:12 -08:00
Ivan Epifanov
f61b9e7653
Cleanup touch. Fix back touchscreen
2021-03-08 09:07:12 -08:00
Ivan Epifanov
bd14aa633f
Autobuild
2021-03-08 09:07:12 -08:00
Ivan Epifanov
ef0bbfd6c6
Include anf fix vita2d renderer
2021-03-08 09:07:12 -08:00
Ivan Epifanov
dbb730d395
Separate vita piglet renderer. Add proper render initialization and window re-creation.
2021-03-08 09:07:12 -08:00
Ivan Epifanov
2d64e37e41
Initial rebase of xerpi's port
2021-03-08 09:07:12 -08:00
Cameron Cawley
391bb80bb9
Replace duplicate functions and lstrlen/lstrcat with SDL string functions
2021-03-05 12:03:58 -08:00
Ozkan Sezer
dd5aff308a
SDL_fillrect.c: updated SSE_BEGIN macro for windows clang-cl
...
from a patchset by Vladislav Dmitrievich Turbanov:
https://github.com/libsdl-org/SDL/pull/4062
2021-03-04 18:27:56 +03:00
Sylvain
e88d78462e
Update SDL_blit_auto.c
2021-03-04 14:36:33 +01:00
Sylvain
ab0cf42a4b
Software nearest scaling: start at the middle of pixel
...
so that it matches opengl GL_NEAREST mode most of the time
2021-03-04 14:33:56 +01:00
Ethan Lee
57a927e8d7
wayland: Explicitly set min/max size for xdg-shell
2021-02-28 19:37:31 -08:00
Cacodemon345
33598563b3
Fix coding style
2021-02-26 09:32:04 -08:00
Cacodemon345
69a600b00e
Implement requested changes
2021-02-26 09:32:04 -08:00
Cacodemon345
0e35f0be1f
Fix KMSDRM-related warnings
2021-02-26 09:32:04 -08:00
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
Cameron Gutman
8c5b7af2d2
Wayland: Fix mouse pointer hiding on Plasma Wayland
...
Unlike Mutter and Sway, KWin actually checks the serial passed in
wl_pointer_set_cursor(). The serial provided is supposed to be the
serial of the pointer enter event, but We were always passing 0.
This caused KWin to drop our requests to hide the cursor.
Thanks to the KDE folks for spotting this in my debug logs.
Fixes #3576
2021-02-25 18:47:12 -08:00
Cacodemon345
d2d834b990
KMSDRM: Add gamma support
2021-02-25 11:39:10 -08:00
Ozkan Sezer
72f7a10cef
disable pixman ARM blitters for __aarch64__ | _M_ARM64
...
Closes: https://github.com/libsdl-org/SDL/issues/4095
2021-02-25 11:38:14 -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
Jay
0052339b66
Move handleURLEvent setEventHandler to init
2021-02-20 22:59:11 -08:00
Vanfanel
e4a81a98a0
[KMSDRM] Correct indentation.
2021-02-17 17:03:42 +03:00
Alex Szpakowski
9b9d0d484d
mac/iOS: allow Metal in windows created without an explicit backend
...
Fixes SDL_CreateWindowAndRenderer (and similar situations) not choosing a Metal backend. See #3991 .
Passing an explicit backend into CreateWindow, eg SDL_WINDOW_OPENGL or SDL_WINDOW_METAL, will still prevent the window from being used with other backend types.
2021-02-15 08:43:53 -08:00
Stephan Vedder
fa367cdd5c
emscripten: Fix alt key being a nav key
2021-02-13 11:56:01 -05:00
Charlie Birks
edaf3f9c9c
emscripten: Extend the "nav key" blacklist
...
Add the F keys and Ctrl/Alt+*. Consistent with other naviagtion
disabling. Also, none of these generate keypress events anyway.
2021-02-13 11:56:01 -05:00
Ethan Lee
a99eec7751
wayland: Minor whitespace fix
2021-02-13 02:41:29 +03:00
Ryan C. Gordon
65fbf36c9e
Cleaned up a few more Bugzilla mentions.
2021-02-12 14:46:49 -05:00
Jay Petacat
f443a6fc7a
Fix format string warnings for width-based integers
...
The DJGPP compiler emits many warnings for conflicts between print
format specifiers and argument types. To fix the warnings, I added
`SDL_PRIx32` macros for use with `Sint32` and `Uint32` types. The macros
alias those found in <inttypes.h> or fallback to a reasonable default.
As an alternative, print arguments could be cast to plain old integers.
I opted slightly for the current solution as it felt more technically correct,
despite making the format strings more verbose.
2021-02-11 19:41:41 -08:00
Ethan Lee
cad67082f3
wayland: Check for both _WAYLAND_CLIENT_H and WAYLAND_CLIENT_H
2021-02-11 14:27:08 -08:00
Sam Lantinga
629334f283
Fixed bug 5543 - Wayland: Fix waylandvideo.h warnings
...
wahil1976
This patch fixes the warnings seen when compiling the Wayland backend. This will also be required in the future to avoid issues with compilation.
2021-02-10 10:22:20 -05:00
Sam Lantinga
d9ba20442e
Backed out changeset 852a7bdbdf4b
...
This causes a use-after-free memory error
2021-02-10 10:22:20 -05:00
Christian Rauch
4183211a54
free the 'display' after it was added to global list
2021-02-10 10:22:20 -05: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
Sam Lantinga
ff297753db
Fixed compiler warning
2021-02-10 10:22:19 -05:00
Sam Lantinga
a60af1e4d0
Backed out changeset 1cde3dd0f44d - this breaks windows which are created and then set to FULLSCREEN_DESKTOP
2021-02-10 10:22:19 -05:00
Sam Lantinga
e404b525f1
KMSDRM doesn't have a window manager, so all windows are fullscreen
2021-02-10 10:22:19 -05:00
Sylvain Becker
549bc13362
SDL_vulkan_utils: minor code clean-up
2021-02-10 10:22:19 -05:00
Sylvain Becker
c0166a29b7
SDL_ConvertColorkeyToAlpha: remove and clarify a FIXME
...
This function doesn't handle bpp 1 or 3 case, because those formats never have an alpha channel
2021-02-10 10:22:19 -05:00
Sebastian Krzyszkowiak
e862856e6f
wayland: Don't crash when the properties of already existing wl_output change
2021-02-10 10:22:18 -05:00
Sam Lantinga
cef198c9cb
Fixed bug 5524 - Pass NSString to NSLog()
...
Hiroyuki Iwatsuki
If you pass the C string directly to NSLog(), it will be garbled with Japanese and probably other language strings, or no log will be output at all.
NSLog("Hello, World!"); // => "Hello, World!"
NSLog("こんにちは、世界!"); // => No output...
Therefore, you need to convert the string to an NSString before passing it to NSLog().
NSString *str = [NSString stringWithUTF8String:"こんにちは、世界!"];
NSLog(@"%@", str); // => "こんにちは、世界!"
Thank you.
2021-02-10 10:22:18 -05:00
Christian Rauch
0ed16ceddb
free 'outputs' in 'Wayland_DestroyWindow'
2021-02-10 10:22:18 -05:00
Christian Rauch
a44678465f
free the 'data_device_manager'
2021-02-10 10:22:18 -05:00
Sebastian Krzyszkowiak
3ae2ec34fa
wayland: Fix transform and scale handling when setting display mode
2021-02-10 10:22:18 -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
Sylvain Becker
9d70711342
Revert checks on destination scaling size (see bug #5510 )
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