Commit Graph

15593 Commits

Author SHA1 Message Date
Anonymous Maarten 2123b84fbe SDL_test: add --hide-cursor to help 2024-05-21 22:56:29 +02:00
Dragon-Baroque 05fb91c7b4 TESTWM : Option and Keyboard action to ShowCursor and HideCursor
In include/SDL3/SDL_test_common.h
   Add flag hide_cursor
In src/test/SDL_test_common.c
   Handle option --hide-cursor to SDL_HideCursor
   Handle Ctrl-h toggle to SDL_HideCursor and SDL_ShowCursor
2024-05-21 13:49:35 -07:00
Frank Praznik 888a45977d
tests: Check the usable bounds for centered window positioning
SDL now centers windows according to the usable display bounds, so the window centering test requires an update for the new behavior.
2024-05-21 12:26:40 -04:00
Sam Lantinga f9260a8470 Added an entry for the 8Bitdo Ultimate Wired Controller 2024-05-20 16:44:45 -07:00
Sam Lantinga 5aecd40683 Try to center windows in the usable bounds if they fit
Fixes https://github.com/libsdl-org/SDL/issues/3480
2024-05-20 15:00:26 -07:00
Ryan C. Gordon 78a36830f8 video: Remove MMX codepath from SDL_BlitCopy.
It was only used if SSE wasn't supported (available since the Pentium III in
1999), or the data was aligned to 8 bytes but not aligned to 16 bytes.

The likelihood of ever hitting this codepath seems extremely low.
2024-05-20 16:37:41 -04:00
Susko3 9d03ff6c18 Decrement before as the code makes more sense 2024-05-20 11:08:19 -07:00
Susko3 9458dc07dc Fix double-free on cleanup and general nonsense when deleting fingers 2024-05-20 11:08:19 -07:00
SDL Wiki Bot 71050341d4 Sync SDL3 wiki -> header 2024-05-20 16:46:41 +00:00
Ryan C. Gordon dd09d4b4ee
hidapi: Replace BSD license with "original" hidapi license.
HIDAPI's source code licensing says this:

```
HIDAPI can be used under one of three licenses.

1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt
2. A BSD-Style License, in LICENSE-bsd.txt.
3. The more liberal original HIDAPI license. LICENSE-orig.txt

The license chosen is at the discretion of the user of HIDAPI. For example:
1. An author of GPL software would likely use HIDAPI under the terms of the
GPL.

2. An author of commercial closed-source software would likely use HIDAPI
under the terms of the BSD-style license or the original HIDAPI license.
```

Since the original license in LICENSE-orig.txt is basically only clause 3 of
the zlib license (do not remove this notice from the source code), it makes
sense to switch to it, since it adds no new requirements to the user.

(Plus, it's extremely short and direct, which is always nice.)

The entire license:

```
 HIDAPI - Multi-Platform library for
 communication with HID devices.

 Copyright 2009, Alan Ott, Signal 11 Software.
 All Rights Reserved.

 This software may be used by anyone for any reason so
 long as the copyright notice in the source files
 remains intact.
```

Fixes #9786.
2024-05-20 12:45:11 -04:00
SDL Wiki Bot c6cc719067 Sync SDL3 wiki -> header 2024-05-20 01:46:10 +00:00
Frank Praznik 4d32f66fe7
wayland: Don't destroy and recreate the confinement region with window size changes
The spec says that an undefined confinement region should match the input region, so it is resized automatically.

This was a hack for a very old, buggy compositor and is no longer needed.
2024-05-19 10:23:31 -04:00
Sam Lantinga 9d70f1b483 coccinelle doesn't support floating point constants 2024-05-18 16:36:29 -07:00
Frank Praznik 18513d1ce8
wayland: Scale mouse warp coordinates
Fixes warp positioning with scaled windows.
2024-05-18 10:00:53 -04:00
Frank Praznik b1e01b971b
video: Disable mouse warp on fullscreen transitions for Wayland and XWayland
At best, it simply doesn't work, and if it does, it frequently warps the pointer to the wrong position as the window animates in/out of fullscreen mode.

It can also inadvertently trigger the relative warp mode emulation mode on Wayland if a fullscreen transition occurs while the client has the pointer hidden.
2024-05-18 10:00:53 -04:00
Sam Lantinga 6f2621438a Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:09:09 -07:00
Sam Lantinga 2cf32b0e0a Fixed warning: 'fA' may be used uninitialized in this function 2024-05-17 09:42:38 -07:00
APGR22 961488b0dc Added NULL pointer check 2024-05-17 08:54:28 -07:00
Brick 09fbb2a07d WASAPI_WaitDevice: Check current padding before waiting on event
During playback, don't queue another buffer unless there are none in the queue.

During capture, there may be multiple buffers of audio available.
WASAPI_CaptureFromDevice only processes one buffer, and if we always wait on the next event, we will never catch up if it falls behind.
2024-05-17 14:46:20 +01:00
Anonymous Maarten d3d7c04bf8 testcamera: libSDL3_test destroys the window and renderer
This fixes a "DEBUG: Parameter 'renderer' is invalid" message when exiting testcamera.
2024-05-17 14:39:29 +02:00
Anonymous Maarten 18225f7bb5 libSDL3_test: don't remove windows and renders when quiting
This fixes a "DEBUG: Parameter 'texture' is invalid" message when exiting testcamera.
2024-05-17 14:39:29 +02:00
Anonymous Maarten a7d4ee05f6 video: hide window before destroying properties
This fixes a few "DEBUG: Parameter 'props' is invalid" messages, when exiting testcamera.
2024-05-17 14:39:29 +02:00
Anonymous Maarten 690875d555 testiconv: free all memory to fix --trackmem 2024-05-17 14:39:29 +02:00
Anonymous Maarten 831c79d32f testatomic: destroy threads + free all memory at quit to fix --trackmem 2024-05-17 14:39:29 +02:00
SDL Wiki Bot eda9247f01 Sync SDL3 wiki -> header 2024-05-17 12:37:31 +00:00
Brick b6b9d5508e Renamed SDL_MixAudioFormat to SDL_MixAudio, and use float volume 2024-05-17 13:36:51 +01:00
Sam Lantinga 5c4b558c1c Dynamic API symbol cleanup 2024-05-16 23:18:41 -07:00
Ozkan Sezer f295f6814c fix type redefinition errors after #9817 2024-05-17 07:28:50 +03:00
Ali Emre Gülcü f17b556c76
Add SDL_Vulkan_DestroySurface functionality (#9817)
Added SDL_Vulkan_DestroySurface, its documentation and corresponding platform specific implementations. Fixed some header inclusion orders to improve consistency between platforms. Added TODOs regarding MetalView creation and destruction which will benefit from the new functionality.
2024-05-16 17:41:15 -07:00
vittorioromeo a69eaae32e Add `SDL_NODISCARD` macro to `SDL_begin_code.h` 2024-05-16 17:08:52 -07:00
Anonymous Maarten a50e0319d5 ci: retry package creation multiple times
DMG creation on macOS occasionally fails, so try multiple times
https://gitlab.kitware.com/cmake/cmake/-/issues/25671
2024-05-16 22:55:57 +02:00
Sam Lantinga 7cddde32ac Removed SDL_SWSURFACE, added unsigned suffix for surface flags 2024-05-16 11:40:38 -07:00
Sam Lantinga c24f860c4d Fixed warning C4244: '=': conversion from 'int' to 'Uint8', possible loss of data 2024-05-16 11:28:02 -07:00
SDL Wiki Bot 919c012d29 Sync SDL3 wiki -> header 2024-05-16 18:24:34 +00:00
Sam Lantinga abfd0dc683 Added SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL 2024-05-16 11:23:29 -07:00
Sam Lantinga 730fa2c379 Re-sorted API functions 2024-05-16 10:22:15 -07:00
Sam Lantinga 02ff85f2f3 Renamed SDL_SIMDGetAlignment() to SDL_GetSIMDAlignment() 2024-05-16 10:22:15 -07:00
Sam Lantinga 4609af618a Updated logging functions for SDL3 naming convention 2024-05-16 10:22:15 -07:00
Ryan C. Gordon 241603b607
README-documentation-rules: Reorganized sections into a more-clear order.
(I hope.)
2024-05-16 12:58:14 -04:00
Frank Praznik 67f3a3ee54
wayland: Disable warp emulation when restoring cursor visibility with the shape protocol 2024-05-16 12:53:54 -04:00
Ryan C. Gordon 241cfaf38f
surface: Make a typedef for SDL_Surface bitflags, as is SDL3 policy.
Reference Issue #9812.
2024-05-16 12:29:58 -04:00
Ryan C. Gordon 253c917296
SDL_render.h: Remove unnecessary `struct x;` before `typedef struct x x;`. 2024-05-16 12:21:14 -04:00
Ryan C. Gordon 45df084287
SDL_keyboard.h: Added a `\sa` to SDL_Keysym's docs. 2024-05-16 12:19:50 -04:00
Ryan C. Gordon 665ff8c5f6
include: Removed `::` from symbol names in comments.
This isn't C++ code, so there's no need to append global symbols with two
colons. It looks ugly.

I _did_ leave them for actual C++ things in WinRT-specific comments and other
places, like a reference to a Perl class thing.

Also, even though it's not valid C, it's a useful expression to say
`StructType::SpecificField`, so I left those alone, too.
2024-05-16 12:16:57 -04:00
SDL Wiki Bot 10ab623d43 Sync SDL3 wiki -> header 2024-05-16 16:02:15 +00:00
Frank Praznik 9ac523f940 wayland: Set the cursor visibility flag when using the cursor shape protocol 2024-05-16 11:59:10 -04:00
Ryan C. Gordon 5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
Sam Lantinga 558630d59c Use ALooper_pollOnce() instead of ALooper_pollAll()
The structure of the existing loop makes the inner loop of the previous commit unnecessary.
2024-05-16 07:53:18 -07:00
Sam Lantinga 7843579358 Revert "Fixed bug #9792 - Android: build failure with ndk 27-beta1 due to use of deprecated ALooper_pollAll"
This reverts commit ee16d2f705.

@madebr's change was simpler and correct.
2024-05-16 07:52:32 -07:00
Sylvain ee16d2f705 Fixed bug #9792 - Android: build failure with ndk 27-beta1 due to use of deprecated ALooper_pollAll
replace ALooper_pollAll by ALooper_pollOnce
2024-05-16 07:49:54 -07:00