Log

Author Commit Date CI Message
Manuel Alfayate Corchete 03665004 2021-01-15T15:00:17 [KMS/DRM] Small fix to KMSDRM_Waitpageflip(). More comments on how it works.
Ozkan Sezer bdb3e6b8 2021-01-15T12:40:00 SDL_hidapi_switch.c: fix build with older compilers
Sam Lantinga 69bd7ebb 2021-01-15T00:02:33 Fixed build
Sam Lantinga e3dbae50 2021-01-14T23:49:41 Get the serial number for the Nintendo Switch Pro controller
Sam Lantinga 5fc743c4 2021-01-14T23:49:37 Phantom Nintendo Switch Pro Controller initialization problem
Sam Lantinga 92742306 2021-01-14T23:49:33 Fixed rumble reset failing for Switch Pro controllers in USB mode
Sam Lantinga d0b87fed 2021-01-14T23:49:27 Added HIDAPI rumble debug info
Sam Lantinga e2f46ed8 2021-01-14T23:49:20 Always lock the HIDAPI device when closing, in case rumble is pending
Sam Lantinga 907b8eeb 2021-01-14T23:49:16 Make sure the HIDAPI device is locked when closing it, in case there is rumble pending that didn't complete
Sam Lantinga b3848c51 2021-01-14T15:15:57 Fixed bug 5445 - Incorrect Switch Pro Controller face buttons when SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS disabled jibb I'm testing with DualShock 4, DualSense, Switch Pro Controller, and PowerA Switch Controller. I'm using the standard mapping file from here: https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt With SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS turned off (set to "0") I expect the button positions to be the same on all devices, based on Xbox controller button naming (eg SDL_GameControllerGetButton(g, SDL_CONTROLLER_BUTTON_Y) gives me whether the North face button is pressed). However, the Switch Pro Controller layout is wrong (matching labels rather than positions, so X and Y are swapped and A and B are swapped). And with the PowerA controller the East and West buttons are correct, but the North and South buttons are swapped instead. Mathias Kaerlev Also seeing this on 2.0.14. This is most likely a regression, since we weren't seeing this on an earlier SDL version. I suspect it might be caused by this commit: https://github.com/spurious/SDL-mirror/commit/a569b211881c6d4c73f3f1019e9f66e754ca546b#diff-da9344d94c66b8c702a45e7649f412039f08bba83bd82de33f5c80ea9c8c39d5 It seems like both the HIDAPI driver and SDL_gamecontroller.c will try to swap the buttons if the hint is set to 0, causing the button remap to cancel out.
Sam Lantinga bdc6e4ff 2021-01-14T15:03:11 Fixed bug 5195 - Replugging in "mixed" controller types crashes on macOS RustyM This is related to Bug 5034, but crashes under a somewhat different condition. In the latest tip (changeset 13914) or with the SDL 2.0.12 source + David?s 5034 patch, unplugging and then replugging in certain controller types on macOS will crash. A mix of new controllers like Switch Pro, PS4 and Xbox One all work without issue. But if a controller without a rumble function, like many SNES retro USB gamepads, is mixed with a PS4 or Switch Pro controller it will crash. File: joystick/darwin/SDL_sysjoystick.c Function: static recDevice *FreeDevice(recDevice *removeDevice) On line 159: while (device->pNext != removeDevice) { Causes: Thread 1: EXC_BAD_ACCESS (code=1, address=0x188) This can be reproduced in testgamecontroller" by starting the test program with both a ?retro? controller plugged in and a ?modern rumble? controller (Switch Pro/PS4). This may crash on launch, but it depends on which controller ends up as device 0. If it doesn?t crash, unplug the ?modern rumble? controller and plug it back in. Some of the "retro" controllers I?ve seen this crash with: - iBuffalo SNES Controller - 8Bitdo SN30 Gamepad (in MacOS mode) - Retrolink NES Controller - HuiJia SNES Controller Adaptor The issue appears macOS specific. Seen on 10.12.6 and 10.14.6. Not seen on Windows 10. The while loop in FreeDevice() assumes that every device is not NULL. recDevice *device = gpDeviceList; while (device->pNext != removeDevice) { device = device->pNext; } device->pNext = pDeviceNext; So maybe we should check for NULL here? Or instead prevent adding NULL devices to the list in the first place? Checking device for NULL before entering the loop appears to work. recDevice *device = gpDeviceList; if (!device) { while (device->pNext != removeDevice) { device = device->pNext; } } device->pNext = pDeviceNext;
Sam Lantinga d54b125a 2021-01-14T14:53:34 Fixed bug 5287 - Support building for UWP with CMake Jan Niklas Hasse Actually the SDL2-static target works, if I set SDL_SENSOR to OFF. Awesome! See this patch: https://github.com/microsoft/vcpkg/blob/master/ports/sdl2/0003-sdl2-fix-uwp-build.patch
Sam Lantinga 351abc58 2021-01-14T14:50:15 Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI Simon McVittie In versions since 1.15, the `code` mode is a deprecated alias for `public-code`, which emits symbols with default visibility, overriding SDL's -fvisibility=hidden option. Use the `private-code` mode instead. This emits symbols with hidden visibility, so they do not affect the ABI of libSDL. See also: https://bugreports.qt.io/browse/QTBUG-73099, https://lists.freedesktop.org/archives/wayland-devel/2018-February/037097.html
Sam Lantinga 6a342954 2021-01-14T14:42:53 Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) sashikknox In some cases, need create EGLWindow with SDLWindow. In X11 i can get pointer to NativeWindow from **struct SDL_SysWMinfo wmInfo** ```C++ struct SDL_SysWMinfo wmInfo; SDL_GetWindowWMInfo(ptSDLWindow, &wmInfo) #if defined(__unix__) && defined(SDL_VIDEO_DRIVER_X11) nativeWindow=(EGLNativeWindowType)wmInfo.info.x11.window; nativeDisplay=(EGLNativeDisplayType)wmInfo.info.x11.display; #endif ``` than i can create EGLSurface ``` eglCreateWindowSurface(nativeDisplay, EGL_CONFIG, nativeWindow, SURFACE_ATTRIBUTES); ``` in Wayland i can do it with same way, just need pointer to **EGLWindow**, we already have pointer to **wl_display** from **SDL_sysWMInfo**, need add to **wl** struct in SDL_SysWMInfo another pointer to **struct wl_egl_window *egl_window;**. And in wayland backend, in function **Wayland_GetWindowWMInfo** return pointer to **egl_window** from **SDL_WindowData** Now i use patched statically built SDL2 in port of Quake 2 GLES2 for SailfishOS (it use QtWayland): link to SDL2 commit and changed string for patch: - https://github.com/savegame/lp-public/commit/6858a618cd179b766fe3cab36055f07cb03ad0ea - https://github.com/savegame/lp-public/blob/b1e29e87b9d15780e47f04918b329ac15554fc69/SDL2/src/video/wayland/SDL_waylandwindow.c#L463 link to use in Quake2 port: 1. here i get pointer to EGLNativeWindowType: https://github.com/savegame/lp-public/blob/6d94fedb1b720da24999ae6286a1809cd3d55ff5/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c#L319 2. then use it for create EGLSurface: https://github.com/savegame/lp-public/blob/6d94fedb1b720da24999ae6286a1809cd3d55ff5/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c#L391
Sam Lantinga b2aaab3d 2021-01-14T14:34:24 Fixed bug 5462 - debug trap update/fix of assembly for Apple devices David Carlier updating preprocessor constant and proposing 32 bits variant.
Sam Lantinga 82aafa9a 2021-01-14T14:32:11 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.
Manuel Alfayate Corchete 1adadc77 2021-01-14T10:18:40 [KMS/DRM] Adjust come return values. Improve comments.
Manuel Alfayate Corchete 57661e42 2021-01-13T20:17:50 [KMS/DRM] Remove unused header.
Manuel Alfayate Corchete ead3c406 2021-01-13T20:11:01 [KMS/DRM] Refactor, improve and re-comment async pageflips code.
Sam Lantinga fbd7c718 2021-01-13T11:02:07 Don't blink the Xbox 360 LED when setting the player slot, it's probably already been set by a driver
Sam Lantinga d757ec7f 2021-01-13T11:02:01 Only select the gamepad interfaces on the Xbox 360 wireless adapter
Sam Lantinga c94283d4 2021-01-13T11:01:54 testgamecontroller: log which controller the event came from
Manuel Alfayate Corchete aac74db6 2021-01-13T15:54:26 [KMS/DRM] Enable async pageflips.
Manuel Alfayate Corchete 9384e595 2021-01-12T20:15:37 [KMS/DRM] Add warning comentary to avoid future experiments with scaling.
Ryan C. Gordon b99543b6 2021-01-11T20:40:11 opengl: More work on making line drawing match software renderer.
Manuel Alfayate Corchete 84427549 2021-01-12T00:22:58 [KMS/DRM] Refactor KMSDR_CreateSurface to group all non-Vulkan stuff in a block.
Manuel Alfayate Corchete 87eb734c 2021-01-11T23:59:40 [KMS/DRM] Don't ask SDL to scale image when in Vulkan mode.
Manuel Alfayate Corchete 85e8adf7 2021-01-11T22:28:27 [KMS/DRM] Unused code cleaning.
Manuel Alfayate Corchete 5105ecf8 2021-01-11T21:02:07 [KMS/DRM] Move surface size info to window driverdata, for coherency.
Manuel Alfayate Corchete 2067a7db 2021-01-11T20:29:09 [KMS/DRM] Fix fullscreen to windowed transition. Fix aspect ratio correction without using planes.
Sylvain Becker 958e5d5b 2021-01-11T10:01:24 SDL_UpdateNVTexture: fixed pitch/bpp for GLES2 (bug #5430)
JibbSmart e9887045 2021-01-11T15:36:40 Gyro and Accel sensor support for Switch Pro Controller. Note that axes are changed to match the axes we're using with PlayStation controllers, since users will appreciate consistent behaviour across devices.
Sylvain Becker 68815b6c 2021-01-10T22:21:12 Fixed bug 5465 - Invalid memcpy inside SDL_GestureDelTouch (Thanks dmikushin and Yuki Okumura)
Sylvain Becker b94718e0 2021-01-09T21:22:21 SDL_UpdateNVTexture: for D3D11, same notation as SDL_UpdateTexture (bug #5430)
Manuel Alfayate Corchete 850d9c8c 2021-01-09T02:25:13 [KMS/DRM] Cleanup remainings from plane/scaling usage.
Ozkan Sezer 8636bc06 2021-01-09T00:11:20 acinclude/libtool.m4: Apply macos11 patch from libtool bug #44605 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605 https://github.com/macports/macports-ports/blob/master/devel/libtool/files/dynamic_lookup-11.patch ( Also see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44684 ) This also implicitly covers the macos10.10+ support patch from libtool mainstream which has been in since libtool-v2.4.3, i.e.: http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commit;h=e145288b059e14ab7e58fc6a304e82d9dad282a6
Manuel Alfayate Corchete 2aeb3177 2021-01-08T22:00:28 [KMS/DRM] Fix vkQuake3 in OpenGL mode.
Sam Lantinga 8746788f 2021-01-08T11:08:23 KMSDRM_LEGACY is no longer legacy
Ozkan Sezer 29888bd6 2021-01-08T21:56:00 fixed permissions of xcode project file
Ozkan Sezer 8d396342 2021-01-08T21:50:02 regenerated configure
Sam Lantinga 50ea3b77 2021-01-08T10:09:37 Fixed bug 5080 - SDL_netbsdaudio: Always use the device's preferred frequency Nia Alarie The NetBSD kernel's audio resampling code is much simpler and lower quality than libsamplerate. Presumably, if SDL always performs I/O on the audio device in its native frequency, we can avoid resampling audio in the kernel and let SDL do it with libsamplerate instead.
Manuel Alfayate Corchete b2449473 2021-01-08T18:57:12 [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC.
Sam Lantinga 2f72535c 2021-01-08T09:54:55 Fixed joysticks generating SDL mouse events
Sam Lantinga a5dba7d3 2021-01-08T09:54:52 Fixed Xbox One Series X share button incorrectly triggering on newer firmware
Manuel Alfayate Corchete 940e1b8d 2021-01-08T16:33:50 [KMS/DRM] Small readability changes.
Manuel Alfayate Corchete e5bf1850 2021-01-08T15:39:05 [KMS/DRM] Fix cpmpilation warnings. Thanks to Ozkan Sezer for pointing this out!
Manuel Alfayate Corchete cef1bd06 2021-01-08T13:14:42 [KMS/DRM] Prevent creating another default cursor everytime a window is created. Other fixes and cleanups.
Jordan Christiansen 70325397 2021-01-07T19:33:12 Disabled Bluetooth if BLE is not supported BluetoothManager is supported for Android API 18+. On older versions, skip Bluetooth instead of crashing.
Sam Lantinga e778881a 2021-01-07T11:49:28 Fixed bug 5449 - SDL_DROPFILE update mouse location of drop in Cocoa Dominik Reichardt Exult (http://exult.info) has an editor app that uses GTK+2. Up to now we were using X's drag'n'drop to allow dropping of assets from the editor onto Exult. There is now an experimental branch that makes use of SDL_DROPFILE. That works under X, dropping in Exult's SDL2 window puts the asset right at the spot you dropped at. On macOS with native Exult and Quartz GTK+2 this doesn't work, the location of the drop is where the mouse was last tracked before you left the window (usually one of the edges, unless you tabbed out). All we tried out pointed to the fact that the location update needs to be done by the dropfile event in SDL2, not by our own (which always only worked after the Exult window getting focus). This patch adds this to SDL_cocoawindow.m and it works perfectly, passing the correct coordinates to our code (SDL_GetMouseState()).
Sam Lantinga c8a64ad9 2021-01-07T10:23:55 Fixed building when SDL_LIBUSB_DYNAMIC is defined
Manuel Alfayate Corchete d079130c 2021-01-07T18:44:34 [KMS/DRM] Don't use primary plane for scaling because that's unsupported on most LEGACY-only HW.
Ozkan Sezer e23666f6 2021-01-07T17:40:00 update config.guess and config.sub from mainstream.
Manuel Alfayate Corchete e168d113 2021-01-07T14:40:24 [KMS/DRM] Correct drmModeSetCursor() dimensions.
Manuel Alfayate Corchete 335d78ff 2021-01-07T11:30:33 [KMS/DRM] Add the missing files for Vulkan support to the KMSDRM_LEGACY backend, had forgotted to do -hg add-.
Manuel Alfayate Corchete 661bacfe 2021-01-07T00:47:21 [KMS/DRM] Add Vulkan suport to the KMSDRM_LEGACY backend.Minor text spacing tweaks for better readability. Comment out unused function.
Ozkan Sezer dfb0afe3 2021-01-07T00:41:32 fix build after commit 5730b2005da1
Manuel Alfayate Corchete 67e0b1dd 2021-01-06T22:15:26 [KMS/DRM] Rewrite KMSDRM_LEGACY backend to accomodate Vulkan compatibility. Fix several bugs on that backend.
Sylvain Becker 57a5c453 2021-01-05T22:06:51 Fix D3D11 UpdateTextureNV in non fullscreen (bug #5430)
Sylvain Becker fc61ecb2 2021-01-05T21:54:03 Fix software UpdateNVTexture non fullscreen (bug #5430)
Sylvain Becker 204ef3b5 2021-01-05T20:38:31 Fix D3D11 UpdateNVTexture (bug #5430)
Sylvain Becker c0df40e0 2021-01-05T17:39:48 Add more SDL_HAVE_YUV defines
Ozkan Sezer dc0e5de9 2021-01-05T17:10:02 Update config.guess and config.sub from mainstream. Recognizes riscv32be and riscv64be.
Ozkan Sezer 76295cec 2021-01-05T15:50:10 video/windows: ANSI/UNICODE updates (cf. bug 5435): - explicitly use UNICODE versions of DrawText, EnumDisplaySettings, EnumDisplayDevices, and CreateDC: the underlying structures have WCHAR strings. - change WIN_UpdateDisplayMode and WIN_GetDisplayMode() to accept LPCWSTR instead of LPCTSTR for the same reason. - change WIN_StringToUTF8 and WIN_UTF8ToString to the explicit 'W' versions where appropriate.
Ozkan Sezer 265a1cc9 2021-01-05T15:50:02 use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) cf. bug #5435. - SDL_wasapi_win32.c (GetWasapiDeviceName): pwszVal is WCHAR* - windows/SDL_sysfilesystem.c (SDL_GetBasePath, SDL_GetPrefPath) - windows/SDL_sysurl.c (SDL_SYS_OpenURL): wurl is WCHAR* - SDL_windowssensor.c (ConnectSensor): bstr_name is WCHAR* - windows/SDL_systhread.c (SDL_SYS_SetupThread): strw is WCHAR*
Ozkan Sezer 516042b4 2021-01-05T15:15:50 ran gendynapi.pl after SDL_UpdateNVTexture addition
Ozkan Sezer 31751bdc 2021-01-05T15:15:37 wmmsg.h: constified wmtab
Sylvain Becker b0325041 2021-01-05T12:36:34 Fix unused variable warning on METAL (see bug #5430)
Sylvain Becker c1eb9ecf 2021-01-05T12:29:43 Add SDL_UpdateNVTexture for META (bug #5430) (not tested)
Sylvain Becker 73d93dbc 2021-01-05T12:20:02 Fix compilation on Window10 (see bug #5430)
Sylvain Becker df6b8131 2021-01-05T12:16:32 Fix compilation (implicit declaration of function) (see bug #5430)
Sylvain Becker d1f031c8 2021-01-05T12:08:16 Add SDL_UpdateNVTexture for d3d11 (bug #5430) (not tested)
Sylvain Becker f5eba2cc 2021-01-05T12:00:54 Fixed invalid read in yuv_rgb_sse() (see bug #5430)
Sylvain Becker be4cfd51 2021-01-05T11:56:22 Add SDL_UpdateNVTexture() to update NV12/21 Texture (bug #5430) for renderer software, opengl, and opengles2
Cameron Gutman 0f094670 2021-01-04T19:51:56 Use Clang/GCC builtins for SDL byteswapping functions __builtin_bswap32/64 were introduced in GCC 4.3. __builtin_bswap16 was not available on x86 until GCC 4.8 due to a bug. __builtin_bswap32/64 were introduced in Clang 2.6. __builtin_bswap16 was introduced in Clang 3.2.
Sam Lantinga d72dbd98 2021-01-04T17:30:28 Fixed detection of the Wooting Two keyboard, which shows up as an Xbox 360 controller
Sam Lantinga b2a0c712 2021-01-04T12:24:44 Allow setting the player index to -1, which turns off the player LED for PS5 controllers
Sam Lantinga bf754b52 2021-01-04T12:17:24 Valve contributed code is under the Zlib license
Ozkan Sezer 8cb421b2 2021-01-04T10:20:10 SDL_windows_main.c: use new WIN_StringToUTF8W macro
Ozkan Sezer a594b850 2021-01-04T10:00:30 use WIN_StringToUTF8W macro instead of WIN_StringToUTF8, where needed: i.e. where the string is known guaranteed to be WCHAR*, in: - SDL_dinputjoystick.c (WIN_IsXInputDevice): VARIANT->var is BSTR (WCHAR*) - SDL_rawinputjoystick.c (RAWINPUT_AddDevice): string is WCHAR* - SDL_windows_gaming_input.c (IEventHandler_CRawGameControllerVtbl_InvokeAdded): string is WCHAR* There should be more of these..
Ozkan Sezer 5b14bbff 2021-01-04T10:00:10 make ANSI/UNICODE versions of WIN??UTF8 macros individually available.
Ozkan Sezer f2bd861c 2021-01-04T08:50:00 move SDL_tcsstr definition to core/windows/SDL_windows.h
Ozkan Sezer f414a436 2021-01-04T03:00:10 simplify Watcom implementation of SDL_MostSignificantBitIndex32()
Ozkan Sezer ae18109a 2021-01-04T01:23:50 SDL_windowsjoystick.c (SDL_CreateDeviceNotification): use L, not TEXT() cf. bug #5435.
Ozkan Sezer 390fd14f 2021-01-04T01:23:50 SDL_windowswindow.c (SDL_HelperWindowCreate): adjust for ANSI/UNICODE: change SDL_HelperWindowClassName and SDL_HelperWindowName from WCHAR * to be const TCHAR* cf. bug #5435.
Ozkan Sezer 398d2764 2021-01-04T01:23:50 RAWINPUT_InitWindowsGamingInput: change pNamespace from LPTSTR to PCWSTR because WindowsCreateStringReference specifically accepts const WCHAR * - WGI_JoystickInit(): ditto. cf. bug #5435.
Ozkan Sezer f09e0af7 2021-01-04T01:23:50 SDL_dinputjoystick.c (IsXInputDevice): adjust to be ANSI/UNICODE-agnostic cf. bug #5435.
Ozkan Sezer ed39f2f3 2021-01-04T01:23:50 SDL_wasapi_win32.c (WASAPI_PlatformThreadInit): use L instead of TEXT() because AvSetMmThreadCharacteristicsW specifically accepts WCHAR* input cf. bug #5435.
Ozkan Sezer 01a2f276 2021-01-04T01:23:50 consistently use TEXT() macro with LoadLibrary() and GetModuleHandle() cf. bug #5435.
Cameron Gutman 91a831e2 2021-01-03T14:02:55 Implement SDL_MostSignificantBitIndex32 using MSVC intrinsics
Sam Lantinga 393c8c1f 2021-01-03T10:32:55 Fixed bug 5440 - MacCatalyst build failures C.W. Betts I tested building commit http://hg.libsdl.org/SDL/rev/7adf3fdc19f3 on Mac Catalyst and found some issues: * MTLFeatureSet_iOS_* enums aren't available under Mac Catalyst. * OpenGL ES is unavailable under Mac Catalyst. * Some Metal features are available under Catalyst but not iOS, such as displaySyncEnabled. * Set Metal as the default renderer on Mac Catalyst Attaching a patch that will make SDL2 build for Mac Catalyst.
Sam Lantinga 6f9e18da 2021-01-03T10:18:39 Fixed bug 5441 - Add support for endianness check on FreeBSD: Fixes endianness checking on at least powerpc64le, maybe also other architectures VVD Patch based on patch from FreeBSD port devel/sdl20: https://svnweb.freebsd.org/ports/head/devel/sdl20/files/patch-include_SDL__endian.h?view=log
Cameron Gutman 014f507c 2021-01-03T12:13:40 Use specific acquire and release variants of InterlockedExchange on ARM _InterlockedExchange_rel() is required for correctness on ARM because the _ReadWriteBarrier() macro is only a compiler memory barrier, not a hardware memory barrier. Due to ARM's relaxed memory model, this means the '*lock = 0' write may be observed before the operations inside the lock, causing possible corruption of data protected by the lock. _InterlockedExchange_acq() is more efficient on ARM because it avoids an expensive full memory barrier that _InterlockedExchange() does.
Sylvain Becker fea49a3e 2021-01-03T15:24:47 SDL_stretch.c: compilation NEON on Windows 10
Sylvain Becker acccc71f 2021-01-02T22:31:44 Fixed bug 5436 - MSVC 2019 ARM64 build fails to compile SDL_stretch.c
Cameron Gutman 6cbd4417 2021-01-02T14:45:15 Add a hint for D3D9Ex to avoid having to choose at compile-time
Cameron Gutman 59594a78 2021-01-02T13:43:04 Implement PAUSE_INSTRUCTION() for Windows ARM platforms
Cameron Gutman 115d66e7 2021-01-02T12:50:01 Use MSVC _byteswap intrinsics for SDL byteswapping functions This generates bswap on x86/x64 and rev on ARM
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 963c9495 2021-01-02T10:11:08 Fixed bug 5431 - SDL_Metal_GetDrawableSize is inaccurate for high dpi displays if a Metal view has not already been created Caleb Cornett For a window created with SDL_WINDOW_ALLOW_HIGHDPI, SDL_GL_GetDrawableSize will return the high-dpi drawable size even before any GL context creation happens. But SDL_Metal_GetDrawableSize will return the size of the window if the Metal view has not been created. This is confusing and inconsistent behavior. An easy way to test this is to build testgl2 and testvulkan on macOS with the SDL_WINDOW_ALLOW_HIGHDPI flag enabled during window creation. The GL2 program will report a drawable size of 2x window width and 2x window height, while the Vulkan program will report the window size. This patch addresses the issue by falling back to using the content view dimensions if no Metal view exists in the window. (The code for this was taken directly from Cocoa_GL_GetDrawableSize.) With this change, the testvulkan behavior matches that of testgl2. Note that I haven't tested for this issue on UIKit. It's possible a similar change will need to be made there too.
Sam Lantinga d25eff65 2021-01-02T10:06:22 Fixed bug 5429 - spinlock implements PAUSE_INSTRUCTION for PPC platforms David Carlier This form of 'or' provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors