src/video


Log

Author Commit Date CI Message
Paul Cercueil 95d40e8a 2019-12-19T21:47:43 kmsdrm: Fix busy-loop within libc's dlopen() For some obscure reason, the order in which the libdrm/libgbm libraries are loaded matters. Without this fix, the first call to check_modesetting() will work and load then unload all symbols properly, but the second call to this function will lock up as soon as dlopen() is called on libdrm. Swapping the order in which the libdrm and libgbm libraries are loaded is enough to fix (or work around?) this issue. Fixes #4891: https://bugzilla.libsdl.org/show_bug.cgi?id=4891 Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Sam Lantinga 20daf54f 2019-12-19T15:18:50 Added new HIDAPI driver files to the Xcode projects
Sam Lantinga bc430d40 2019-12-16T10:26:36 Update for bug 4883 - Add approximation for display DPI on iOS Aaron Barany I realized I made a minor mistake in my patch: I changed the constructor prototype for SDL_DisplayData, but didn't update the declaration in the .h file. The compiler and linker don't complain, but it would probably be best to fix in case a later change runs into a problem from the mismatch. I have attached a patch to fix this.
Sam Lantinga 140918bb 2019-12-08T11:36:40 Fixed bug 4883 - Add approximation for display DPI on iOS Aaron Barany There appears to be no way to directly access the display DPI on iOS, so as an approximation the DPI for the iPhone 1 is used as a base value and is multiplied by the screen's scale. This should at least give a ballpark number for the various screen scales. (based on https://stackoverflow.com/questions/25756087/detecting-iphone-6-6-screen-sizes-in-point-values it appears that both 2x and 3x are used) I have updated the patch to use a table of current devices and use a computation as a fallback. I have also updated the fallback computation to be more accurate.
Sam Lantinga 54748a39 2019-12-08T11:33:06 Fixed bug 4890 - Add hint for SDL that the graphics context is externally managed Aaron Barany Add SDL_HINT_VIDEO_EXTERNAL_CONTEXT hint to notify SDL that the graphics context is external. This disables the automatic context save/restore behavior on Android and avoids using OpenGL by default when SDL_WINDOW_VUKLAN isn't set. When the application wishes to manage the OpenGL contexts on Android, this avoids cases where SDL unbinds the context and creates new contexts, which can interfere with the application's operation. When using Vulkan and Metal renderer implementations, this avoids SDL forcing OpenGL to be enabled on certain platforms. While using the SDL_WINDOW_VULKAN flag can be used to achieve the same thing, it also causes Vulkan to be loaded. If the application uses Vulkan directly, this is not necessary, and fails window creation when using Metal due to Vulkan not being present. (assuming MoltenVK isn't installed)
Ryan C. Gordon 597f11e5 2019-12-05T17:27:06 cocoa: Patched to compile on older compilers.
Ryan C. Gordon ca2c8609 2019-12-04T12:20:24 cocoa: SDL_GetDisplayDPI() should account for Retina displays. Fixes Bugzilla #4856.
Sam Lantinga b7576025 2019-12-03T22:07:58 Fixed bug 4882 - Fix build for iOS when disabling OpenGL Aaron Barany Since OpenGL is deprecated on iOS, it is advantageous to be able to remove all OpenGL related code when building SDL for iOS. This patch adds the necessary #if checks to compile in this case.
Sam Lantinga 7a3ae590 2019-12-03T07:12:55 Fixed bug 4877 - Add support for loading menus from a nib/xib instead of building a hardcoded minimum set Eric Shepherd Currently, SDL on Cocoa macOS creates a rudimentary menu bar programmatically if none is already present when the app is registered during setup. SDL could be much more easily and flexibly used on macOS if upon finding that no menus are currently in place, it first looked for the application's main menu nib or xib file and, if found, loaded that instead of programmatically building the menus. This would then let developers simply drop in a nib file with a menu bar defined in it and it would be installed and used automatically. Attached is a patch that does just this. It changes the SDL_cocoaevents.m file to: * In Cocoa_RegisterApp(), before calling CreateApplicationMenus(), it calls a new function, LoadMainMenuNibIfAvailable(), which attempts to load and install the main menu nib file, using the nib name fetched from the Info.plist file. If that succeeds, LoadMainMenuNibIfAvailable() returns true; otherwise false. * If LMMNIA() returns false, CreateApplicationMenus() is called to programmatically build the menus as before. * Otherwise, we're done, and using the menus from the nib/xib file! I made these changes to support a project I'm working on, and felt they were useful enough to be worth offering them for uplift. They should have zero impact on existing projects' behavior, but make Cocoa SDL development miles easier.
Gerasim Troeglazov c8a2ef86 2019-12-03T02:49:01 haiku: Disable pointer history (note from PulkoMandy on Bugzilla #4442 about why this is a desirable patch: "The event mask: note that the window and GL view run in their own thread which I don't expect to be too much CPU bound, and will quickly pop these messages and forward them to the main thread in our SDL code. Therefore the B_NO_POINTER_HISTORY should be no problem, and is the default on Haiku anyway (it was not in BeOS, but we changed that and added a B_FULL_POINTER_HISTORY flag to request the old behavior explicitly). So, this seems fine.") Partially fixes Bugzilla #4442.
Alex Smith e5af951e 2019-12-02T15:41:25 Fix sending SDL_WINDOWEVENT_RESTORED after unminimizing windows on X11 SDL_SendWindowEvent will only send a RESTORED event if the window has the minimized or maximized flag set. However, for a SHOWN event, it will clear the minimized flag. Since the SHOWN event was being sent first for a MapNotify event, the RESTORED event would never be sent. Swapping the SendWindowEvent calls around fixes this. https://bugzilla.libsdl.org/show_bug.cgi?id=4821
Sam Lantinga b1539c4c 2019-11-16T22:35:48 Fixed bug 4819 - Attempting to create an OpenGL ES context with unachievable MSAA parameters under X11 dooms the program Solra Bizna I have written a program that, in the event that the user requests more MSAA samples than their hardware supports, attempts to gracefully fall back to the best MSAA available. This code works with my conventional OpenGL renderer, but if I change nothing about the code except to make it request an OpenGL ES profile instead, Xlib kills the program with an error that looks like: X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 4 (X_DestroyWindow) Resource id in failed request: 0x5c00008 Serial number of failed request: 188 Current serial number in output stream: 193 To trigger the bug, attempt to create a window with the SDL_WINDOW_OPENGL flag, with SDL_GL_CONTEXT_PROFILE_MASK set to SDL_GL_CONTEXT_PROFILE_ES, and with SDL_GL_MULTISAMPLESAMPLES set to any unsupported value. SDL_CreateWindow properly returns NULL, but at this point the program is already doomed. Xlib will shortly terminate the program with an error. Calling SDL_CreateWindow again will immediately trigger this termination. I have attached a skeletal program that reproduces this bug for me. Replacing SDL_GL_CONTEXT_PROFILE_ES with SDL_GL_CONTEXT_PROFILE_COMPATIBILITY avoids the bug (but, obviously, doesn't create an OpenGL ES context). As I suspected, the problem was with XDestroyWindow being called twice on the same window. The X11_CreateWindow function in src/video/x11/SDL_x11window.c calls SetupWindowData. If initialization fails after that point, XDestroyWindow gets called on the window by a subsequent call to X11_DestroyWindow. But, later in the same function, iff a GLES context is requested and initializing it fails, X11_XDestroyWindow (which wraps XDestroyWindow) is manually called. Shortly after, the intended call to X11_DestroyWindow occurs, which attempts to destroy the same window again. Boom. (The above confusing summary involves three separate, similarly-named functions: XDestroyWindow, X11_DestroyWindow, X11_XDestroyWindow) I have attached a simple patch that removes the redundant X11_XDestroyWindow calls. I've tested that XDestroyWindow still gets called for the windows in question, and that it only gets called once.
EXL b44fe0f8 2019-11-12T17:24:37 haiku: Rename BE_* entities to HAIKU_* In favor Bugzilla #2349. Update copyright years to 2019. Partially fixes Bugzilla #4442.
Peter Kosyh 79510b75 2019-11-11T22:22:40 haiku: mouse->ShowMouse method added Partially fixes Bugzilla #4442.
Gerasim Troeglazov 95a402d7 2019-11-11T22:21:17 haiku: Add support for relative mouse mode. Partially fixes Bugzilla #4442.
Adrien Destugues 3b516e63 2019-11-11T22:14:00 haiku: Fix crash when opening window. - _num_clips was not set in constructor, so a NULL _clips could be mistakenly dereferenced. - As _clips is accessible outside the class, it is not a good idea to free/reallocate it. Try to limit this by reallocating only when it needs to grow. Partially fixes Bugzilla #4442.
Jerome Duval 50806eee 2019-11-11T22:04:10 haiku: use addr_t instead of size_t for OpenGL dynamic loading. Partially fixes Bugzilla #4442.
EXL b22fb9e2 2019-11-11T16:44:40 haiku: Implement message box for Haiku Add implementation for functions: SDL_ShowSimpleMessageBox() SDL_ShowMessageBox() Add simple customization support also. Fix build for x86_gcc2. Partially fixes Bugzilla #4442.
Cameron Cawley 20ddf45e 2019-11-02T22:58:52 Added SDL_PIXELFORMAT_BGR444
Sylvain Becker 303646a6 2019-10-31T15:53:10 Android: some readability: redundant casts, deads stores, redundant control flow
Sylvain Becker 88ba6798 2019-10-30T21:12:36 Wayland: touch events, use of memory after it is freed
Sylvain Becker 86ae245b 2019-10-30T17:59:20 Use correct enum: typo in org_kde_kwin_server_decoration_mode instead of org_kde_kwin_server_decoration_manager_mode
Sylvain Becker ce308a78 2019-10-30T16:33:32 revert this const parameter for X11 function
Sylvain Becker f16e5106 2019-10-30T16:17:59 Fix const warning in RLE getpix functions
Sylvain Becker d4a67e25 2019-10-30T16:06:51 Readability: change some pointer parameter to be pointer to const
Sylvain Becker 60d3965e 2019-10-30T15:36:17 Readability: remove redundant return, continue, enum declaration
Sylvain Becker b458d7a2 2019-10-30T15:13:55 Readability: remove redundant cast to the same type
Sylvain Becker 56cbe120 2019-10-30T14:37:06 BlitAuto: remove redundant cast to the same type
Sylvain Becker 735691ec 2019-10-30T14:29:41 Remove nested redundant #ifndef
Sylvain Becker 42153342 2019-10-29T16:13:41 Use fill_function for FillRect SIMD/NEON (bug 4365)
Alex Szpakowski bda618a2 2019-10-27T11:41:48 iOS: remove some unused code, minor code style cleanup.
Alex Szpakowski df49e2a5 2019-10-27T11:41:11 iOS: replace a deprecated function call with a non-deprecated equivalent.
Sylvain Becker 7289e5e2 2019-10-27T15:22:28 Android: remove warning in blit_features "integer constant not in range of enumerated type 'enum blit_features'"
Ryan C. Gordon c0255be4 2019-10-26T23:58:55 x11: check if the X server honored our XMoveWindow() call (thanks, R.E. Rust!). This can happen if a window is still grabbed when we try to move it, or if the X11 ecosystem is just in a bad mood, I guess. This makes sure that SDL will report the correct position for a window; otherwise, SDL_GetWindowPosition will just report whatever the last SDL_SetWindowPosition call requested, even if the window didn't actually move. Fixes Bugzilla #4646.
Alex Szpakowski a963e36e 2019-10-26T15:27:51 macOS: more robust detection and switching of exclusive-fullscreen display modes (bug #4822).
Ben Avison 72f8044a 2019-10-24T21:17:52 ARM: NEON assembly optimization for SDL_FillRect
Ben Avison 1187b013 2019-10-24T21:17:38 ARM: NEON assembly optimization for function BlitARGBto565PixelAlpha
Ben Avison 2dfe0605 2019-10-24T21:17:19 ARM: NEON assembly optimization for function BlitRGBtoRGBPixelAlpha
Ben Avison 74846657 2019-10-24T21:15:50 ARM: SIMD optimization for 4:4:4:4 to 8:8:8:8 normal blits
Ben Avison becc649a 2019-10-24T21:15:35 ARM: assembly optimization for SDL_FillRect
Ben Avison 7ac733f0 2019-10-24T21:15:21 ARM: SIMD assembly optimization for BGR-to-RGB 32bpp normal blits
Ben Avison 8425d9d5 2019-10-24T21:15:09 SDL_blit: use a named enum for required hardware bits in dispatch tables
Ben Avison 0eaa52ce 2019-10-24T21:13:56 ARM: SIMD assembly optimization for function BlitARGBto565PixelAlpha
Ben Avison 57723b83 2019-10-24T21:13:05 ARM: SIMD assembly optimization for function BlitRGBtoRGBPixelAlpha Much of the heavy lifting of this optimization is lifted from the Pixman project, which is distributed under an MIT-style license. As far as possible, these elements have been relicensed to the zlib license.
Alex Szpakowski 59beaccd 2019-10-24T20:15:54 macOS: Expose high dpi-capable display modes on macOS 10.13+. Fixes an issue in macOS 10.15 where the displayed content would move up after entering, exiting and re-entering exclusive fullscreen when certain display modes were used (bug #4822). Bug #3949 is also related to this change.
Sylvain Becker 8081f117 2019-10-24T18:07:30 Fixed bug 2014 - Hardcoded srcA value in SDL_Blit_auto.c functions
Sylvain Becker 3a8b8994 2019-10-23T11:07:11 Android: remove eglGetProcAdded busted comment (bug #4040)
Sylvain Becker c9d0e2ae 2019-10-23T09:26:27 Fixed bug 4840 - Read of uninitialized memory in DXGI_LoadDLL (Thanks!)
Sylvain Becker d5d34de4 2019-10-23T09:17:53 Fixed bug 4839 - Read of uninitialized memory in Win32_ResizeWindowShape (Thanks!)
Sylvain Becker 758badff 2019-10-23T08:58:52 Fixed bug 4841 - Misplaced parenthesis WIN_WindowProc / WM_ACTIVATE / ClipCursor (Thanks!)
Sylvain Becker 24bee6e5 2019-10-18T21:47:30 Add internal function SDL_EGL_GetVersion()
Sam Lantinga b060b2ea 2019-10-18T08:56:54 Fixed whitespace
Sylvain Becker e5bd2003 2019-10-18T14:08:07 Android: enable eglGetProcAddress (bug #4040, bug #4794)
Sylvain Becker 03f27a3a 2019-10-18T13:27:58 Add robustness getting the EGL version (see bug #4040)
Ryan C. Gordon 3ecce847 2019-10-18T00:07:32 egl: adjust how we load symbols in SDL_EGL_GetProcAddress. Use eglGetProcAddress for everything on EGL >= 1.5. Try SDL_LoadFunction first for EGL <= 1.4 in case it's a core symbol, and as a fallback if eglGetProcAddress fails. Finally, for EGL <= 1.4, fallback to eglGetProcAddress to catch extensions not exported from the shared library. (Maybe) Fixes Bugzilla #4794.
Sam Lantinga bf9092cf 2019-10-17T17:47:11 Removed unused variable
Sam Lantinga 1b4de45d 2019-10-16T08:45:54 Fixed bug 4785 - SDL_CreateRGBSurface creates 1-bit surfaces with zero pitch Sylvain Seems to be a regression in this commit: https://hg.libsdl.org/SDL/rev/7fdbffd47c0e SDL_CalculatePitch() was using format->BytesPerPixel, now it uses SDL_BYTESPERPIXEL(). The underlying issue is that "surface->format->BytesPerPixel" is *not* always the same as SDL_BYTESPERPIXEL(format); BytesPerPixel defined as format->BytesPerPixel = (bpp + 7) / 8; vs #define SDL_BYTESPERPIXEL(format) ... (format & 0xff) Because of SDL_pixels.h format definitions, one is giving a BytesPP 1, the other 0.
Ryan C. Gordon ed7483f8 2019-10-15T22:36:08 x11: On macOS, look for X11 install in /opt/X11 instead of /usr/X11R6. This is where Apple installs XQuartz now (and apparently, the compatibility symlink at /usr/X11R6 can be missing). Fixes Bugzilla #4706.
Ryan C. Gordon 02a2ec98 2019-10-15T14:55:09 video: Make sure SDL_FillRects()'s fill_function isn't used unitialized.
Ryan C. Gordon 9f636be8 2019-10-15T14:04:43 video: Removed unused variables.
Ryan C. Gordon e23067ea 2019-10-15T14:03:01 video: speed up SDL_FillRect[s] slightly (thanks, Jakub!). "This patch does the following: * Instead of SDL_FillRects calling SDL_FillRect in a loop the opposite happens -- SDL_FillRect (a specific case) calls SDL_FillRects (a general case) with a count of 1 * The switch/case block is moved out of the loop -- it modifies the color once and stores the fill routine in a pointer which is then used throughout the loop" Fixes Bugzilla #4674.
Ryan C. Gordon d5e378d1 2019-10-15T00:59:10 cocoa: Implement SDL_WINDOW_ALWAYS_ON_TOP support (thanks, Gabriel!). Fixes Bugzilla #4809.
Alex Szpakowski 074f6a51 2019-10-14T00:51:53 macOS: Fix the initial window background not being black since macOS 10.14.2 or so, when OpenGL is used (bug #4810). Also fixes "CGContext: invalid context 0x0" errors when an OpenGL window is created (bug #4470).
Alex Szpakowski 009226c6 2019-10-13T21:39:20 macOS: Fix non-highdpi OpenGL contexts not scaling properly in macOS 10.15 (bug 4810 and 4822).
Alex Szpakowski f8bdefe1 2019-10-13T15:18:28 macOS: Fix asserts in SDL_Render's metal scissor code when the window is resized.
Alex Szpakowski 1773da89 2019-10-13T12:16:40 macOS: Fix a new issue in 10.15 where the window decorations don't always get restored after SDL_SetWindowFullscreen(window, 0).
Sylvain Becker 3b0dcaf4 2019-10-12T18:47:56 Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael Olbrich!) fix building with Mesa 19.2 With Mesa 19.2 building fails with: /include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr' The same type is defined in include/SDL_opengl.h for OpenGL and the two headers should not be included at the same time. This was just never noticed because the same header guard '__gl_h_' was used. This was changed in Mesa. The result is this error. Fix this the same way GLES2 already handles this: Don't include the GLES header when the OpenGL header was already included. (https://hg.libsdl.org/SDL/rev/6a3670d6108d)
David Ludwig c61ca915 2019-10-02T14:55:02 WinRT: fix a link-time error when building UWP + x64
Brandon Schaefer ee6d504a 2019-09-24T17:49:53 offscreen: Define missing define on a older EGL for an EXT function which it wont have
Brandon Schaefer 8a41948e 2019-09-24T17:27:51 offscreen: Avoid using EGLDeviceEXT as it causes issues with older platforms, which is just a void*
Brandon Schaefer 68985371 2019-09-24T16:36:48 offscreen: Add new video driver backend Offscreen The Offscreen video driver is intended to be used for headless rendering as well as allows for multiple GPUs to be used for headless rendering Currently only supports EGL (OpenGL / ES) or Framebuffers Adds a hint to specifiy which EGL device to use: SDL_HINT_EGL_DEVICE Adds testoffscreen.c which can be used to test the backend out Disabled by default for now
Sylvain Becker 79e388bf 2019-09-10T17:12:34 Fixed bug 4798 - PNG w/transparency breaks in SDL 2.0.10 but works in SDL 2.0.9
Sam Lantinga 715e070d 2019-09-06T08:50:19 SDL_blit_N.c: Correct vec_perm() application on little-endian 64-bit PowerPC The LE transformation for vec_perm has an implicit assumption that the permutation is being used to reorder vector elements (in this case 4-byte integer word elements), not to reorder bytes within those elements. Although this is legal behavior, it is not anticipated by the transformation performed by the compilers. This causes pygame-1.9.1 test failure on PPC64LE because blitted pixmaps are corrupted there due to how SDL uses vec_perm(). From RedHat / Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1392465 Original patch was provided by: Menanteau Guy <menantea@linux.vnet.ibm.com>
Conn O'Griofa 2d37d291 2019-09-06T08:44:46 KMSDRM_GLES_SwapWindow: fix non-vsync case If KMSDRM_drmModeSetCrtc is called when the swap interval is set to 0, the driver behaves as though vertical sync is engaged by limiting framerate to the refresh rate, but performance is much worse than with vertical sync enabled. Resolve this issue by ensuring that the Crtc is only set up once, and KMSDRM_drmModePageFlip is called, albeit without any followup queueing or waiting for flips.
Ozkan Sezer 8a394209 2019-09-05T20:47:20 SDL_windowsevents.c: remove isVistaOrNewer (not used since 8cb1dc50bb28)
Sylvain Becker bf2f4703 2019-09-05T10:49:53 SDL_windowsmessagebox.c: remove unused variable
Sylvain Becker 1b5e3c19 2019-09-05T10:08:47 SDL_bmp.c: remove unused variable warnings
Sam Lantinga e5580e18 2019-09-04T09:27:58 x11: add a hint to force the VisualID used when creating a window.
Sam Lantinga 892c8d50 2019-09-03T11:55:20 Fixed bug 4536 - Heap-Buffer Overflow in SDL_GetRGB pertaining to SDL_pixels.c Ozkan Sezer As for the issue: This bmp reports bpp=0, therefore SDL_CalculatePitch() returns pitch==0, which is then fed to SDL_malloc() (which is malloc()) and malloc(0) returns _something_ which is not NULL but not someting that we expect.. Then testsprite.c:LoadSprite() accesses the pixels as *(Uint8*)pixels which valrind reports as: ==15533== Invalid read of size 1 ==15533== at 0x8048C08: LoadSprite (testsprite.c:45) ==15533== by 0x80492FC: main (testsprite.c:224) ==15533== Address 0x449e588 is 0 bytes after a block of size 0 alloc'd ==15533== at 0x40072B2: malloc (vg_replace_malloc.c:270) ==15533== by 0x4045719: SDL_CreateRGBSurface (SDL_surface.c:126) ==15533== by 0x40403C1: SDL_LoadBMP_RW (SDL_bmp.c:237) ==15533== by 0x8048BB2: LoadSprite (testsprite.c:36) ==15533== by 0x80492FC: main (testsprite.c:224) Besides, valrind also reports this: ==15533== Conditional jump or move depends on uninitialised value(s) ==15533== at 0x40403F3: SDL_LoadBMP_RW (SDL_bmp.c:247) ==15533== by 0x8048BB2: LoadSprite (testsprite.c:36) ==15533== by 0x80492FC: main (testsprite.c:224) Easy/quick solution would be early-rejecting a bmp with 0 bpp from SDL_bmp.c:SDL_LoadBMP_RW()
Ozkan Sezer b21338eb 2019-09-02T12:35:00 SDL_bmp.c: restore most of the original formatting.
Sylvain Becker 6c295129 2019-08-31T22:58:11 LoadBMP: fix some warnings
Sylvain Becker 830979c5 2019-08-31T22:52:15 LoadBMP: use code from SDL_image which allows loading compressed BMP files
Sam Lantinga cc64b369 2019-08-30T15:32:15 Allow mouse messages from Wacom pens, e.g. right click pen buttons, etc.
Sam Lantinga afb9ff95 2019-08-30T08:03:19 Fixed bug where the Steam overlay would generate an event and stop input processing for the frame.
Ozkan Sezer 9c8e403f 2019-08-30T11:35:20 use 'U' suffix on constants instead of (unsigned int) cast.
Sylvain Becker d52080c0 2019-08-30T09:00:06 Android: minor warning
Sylvain Becker 70dc8d16 2019-08-30T08:55:20 Android: fix corresponding warnings
Sam Lantinga 13c4d5e7 2019-08-26T17:43:01 Fixed Windows relative mouse coordinates when capturing the mouse over RDP
Ozkan Sezer 1e47790c 2019-08-26T18:41:40 RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug 4769)
Alex Szpakowski dd29abb4 2019-08-22T19:23:52 macOS: Use the proper type (NSSize instead of CGSize) for the bounds of metal views.
Alex Szpakowski 79cd6cfc 2019-08-15T19:38:12 iOS: Fix issues with Split VIew on iPad (bugs #4586, #4705).
Sam Lantinga 2a1adf71 2019-08-05T23:52:16 Fixed bug 4747 - [Patch] SDL_ShowMessageBox ignores BUTTON_RETURNKEY_DEFAULT flag Caleb Cornett SDL_ShowMessageBox on UIKit doesn't do anything special with buttons that are marked with the flag SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT. According to Apple's documentation on UIAlertController, a button can respond to a return key if it's marked as the preferredAction of the controller. SDL doesn't set a preferredAction currently, so I've attached a patch to fix that.
Sam Lantinga afdb40af 2019-08-05T23:38:48 Fixed bug 4689 - SDL fails to detect compositor shutdown on Wayland -- program keeps running M Stoeckl To reproduce: 1. Run any SDL-based program with a Wayland compositor, orphaning it so that it doesn't have an immediate parent process. (For example, from a terminal, running `supertux2 & disown`.) The program should use the wayland backend, i.e. by setting environment variable SDL_VIDEODRIVER=wayland. 2. Kill the compositor process. Results: - The SDL program will keep running. Expected results: - The SDL program should close. (What close should mean here, I'm not sure - is injecting an SDL_Quit the appropriate action when a video driver disconnects?) Build data: 2019-06-22, hg tip (12901:bf8d9d29cbf1), Linux, can reproduce with sway, weston, and other Wayland oompositors.
Alex Szpakowski aebaa316 2019-08-05T12:35:32 Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
Alex Szpakowski f3683d3a 2019-08-04T23:30:55 macOS: fix a typo in touch handling code.
Alex Szpakowski 109cbd6e 2019-08-04T16:56:40 Fix touch-related compile errors on Linux.
Alex Szpakowski 2fb71ac5 2019-08-04T00:34:23 Implement touch window IDs on x11/xinput2.
Sam Lantinga 63197c43 2019-08-02T17:19:50 Fix bug where the wrong button was the default in the old message box because buttons were added backwards, breaking the indexing used by GetButtonIndex. Add messagebox flags to explicilty request left-to-right button order or right-to-left. If neither is specified it'll be some platform default.
Alex Szpakowski d5ec735a 2019-08-01T18:22:12 Add a windowID field to SDL_TouchFingerEvent (bug #4331). This is unimplemented on some platforms and will cause compile errors when building those platform backends for now.
Ozkan Sezer c37c6cbb 2019-07-31T23:37:02 use WIN_IsWindowsVistaOrGreater() from core/windows for isVistaOrNewer