Commit Graph

15304 Commits (main)

Author SHA1 Message Date
Ryan C. Gordon dd2780f9fb
wikiheaders: Remove trailing whitespace from "brief" description. 2024-04-09 00:50:01 -04:00
Ryan C. Gordon a26ec343c3
wikiheaders: Bridge macros to the wiki! 2024-04-09 00:50:01 -04:00
Petar Popovic c8a066019b Renaming SDL_eventaction to SDL_EventAction 2024-04-08 14:28:52 -04:00
Petar Popovic 1efadcc5d4 Revert renaming SDL_eventaction. adding it again in next commit with
scripts

This reverts commit f08c31060a.
2024-04-08 14:28:52 -04:00
Anonymous Maarten 9f83647aec cmake: switch iOS and watchOS 2024-04-08 19:25:38 +02:00
Ravbug 2d640d0b59
ci: Add iOS and tvOS CMake GitHub Actions checks (#9465)
- Also add watchos support to CMake (SDL does not support this platform yet)

Co-authored-by: Ravbug <ravbug@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2024-04-08 19:18:28 +02:00
Frank Praznik 224f2e921e
video: Remove unused bootstrap declarations
Pandora and KMSDRM_Legacy are not used anywhere.
2024-04-08 11:07:05 -04:00
Petar Popovic 764fe72449 SDL_time.h: Renaming enums SDL_DATE_FORMAT and SDL_TIME_FORMAT to SDL_DateFormat and SDL_TimeFormat 2024-04-07 23:03:01 -04:00
Petar Popovic f08c31060a Renaming SDL_eventaction to SDL_EventAction 2024-04-07 12:04:32 -04:00
Robert Edmonds e3395a7585 cmake: Fix ALSA "Unable to find..." warning
If cmake is invoked with -DSDL_ALSA=OFF, the misleading warning
message "Unable to find the alsa development library" is printed.
It's misleading because no attempt was actually made to find the ALSA
development library. It's always printed by the CheckALSA macro if
SDL_ALSA is false.

This commit moves this warning message in the CheckALSA macro to being
printed if ALSA_FOUND is false. However, I don't see an explicit warning
message like this for the other macros that search for development
libraries, so I wonder if the message shouldn't just be removed
entirely. It seems redundant with the "Could NOT find ALSA ..." message
generated by cmake.

Before this commit:

    $ cmake -B build -DSDL_ALSA=OFF
    [...]
    CMake Warning at cmake/sdlchecks.cmake:125 (message):
      Unable to find the alsa development library
    Call Stack (most recent call first):
      CMakeLists.txt:1530 (CheckALSA)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: OFF): OFF
    [...]

    $ cmake -B build -DSDL_ALSA=ON
    [...]
    -- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: ON): OFF
    [...]

After this commit:

    $ cmake -B build -DSDL_ALSA=OFF
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: OFF): OFF
    [...]

    $ cmake -B build -DSDL_ALSA=ON
    [...]
    -- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
    CMake Warning at cmake/sdlchecks.cmake:123 (message):
      Unable to find the alsa development library
    Call Stack (most recent call first):
      CMakeLists.txt:1530 (CheckALSA)
    [...]
    -- Options:
    --   SDL_ALSA                    (Wanted: ON): OFF
    [...]

All of the cmake invocations above were without the libasound2-dev
package installed.
2024-04-06 12:19:55 -04:00
Ryan C. Gordon 5c9dbf65a3
SDL_version.h: Fix some whitespace. 2024-04-06 02:09:48 -04:00
Semphris 6ad390fc50 File dialog improvements
- Add a globally-accessible function to handle the parsing of filter extensions
- Remove the ability of putting the wildcard ('*') among other patterns; it's either a list of patterns or a single '*' now
- Add a hint to select between portals and Zenity on Unix
2024-04-04 22:07:14 -07:00
Sam Lantinga 5fa87e29e7 Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE
These flags are unnecessary and have always been a source of confusion.
2024-04-04 13:30:49 -07:00
Petar Popovic 3f8dba3713 Including SD_error.h into headers with error-returning functions 2024-04-04 11:12:58 -07:00
Ryan C. Gordon ff651a7941
filesystem: Turn off case-insensitivity if glob pattern is NULL.
Just a small optimization; it'll avoid some allocations and case-folding we
don't actually need the results of later.
2024-04-04 10:44:19 -04:00
Ryan C. Gordon bc94451bed
testfilesystem: Add a '?' to the glob test, for a little more completeness. 2024-04-04 10:44:19 -04:00
Ryan C. Gordon e12b8e767a
SDL_filesystem.h: Fixed some whitespace. 2024-04-04 10:44:19 -04:00
SDL Wiki Bot 1a97d1f649 Sync SDL3 wiki -> header 2024-04-04 14:42:26 +00:00
Petar Popovic de91aaa452 SDL_locale.h - SDL_GetPreferredLocales() - adding SDL_GetError() comment 2024-04-04 07:41:50 -07:00
Petar Popovic 7ae5474305 SDL_quit.h - removing SDL_error.h inclusion 2024-04-04 07:41:50 -07:00
Sam Lantinga 0abdc1a343 Renamed GLOBDIR to GLOB 2024-04-04 07:40:48 -07:00
SDL Wiki Bot ac372e99fe Sync SDL3 wiki -> header 2024-04-04 13:41:27 +00:00
Ryan C. Gordon 764207d873 filesystem: Added SDL_GlobDirectory() and SDL_GlobStorageDirectory().
Fixes #9287.
2024-04-04 09:40:13 -04:00
Ryan C. Gordon 810656962c stdlib: Export some Unicode functions to other SDL internals. 2024-04-04 09:40:13 -04:00
Ryan C. Gordon 9192485746 filesystem: SDL_EnumerateDirectory should return -1 or 0.
The callback requesting a non-error stop should not return a special value.
2024-04-04 09:40:13 -04:00
Sam Lantinga a8ed32c5f7 Re-enable cursor clipping when clicking into a window when relative mouse mode is enabled 2024-04-03 12:41:19 -07:00
Frank Praznik 2d9aff6433 wayland: Always use the whole buffer surface for the damage region
Using the current window size at the time of the call may not be correct if the window or buffer size was changed after the fact, so always set the damage region to cover the entire buffer.
2024-04-03 11:07:08 -04:00
Sam Lantinga c7787a9191 The hint environment variables don't have the word "HINT" in them
Fixes https://github.com/libsdl-org/SDL/issues/9436
2024-04-02 19:24:07 -07:00
Anonymous Maarten 2f26c58504 cmake: fix typo in cmake/sdlplatform.cmake 2024-04-02 23:44:15 +02:00
Clownacy 65e7c8e265 Fix default Windows window icon not suiting the DPI.
For whatever reason, `ExtractIconEx` returns icons whose sizes are
inappropriate for the current DPI, resulting in terribly-blurry
window icons at higher DPIs.

To solve this, the window icon is now set to the first icon group
that is present in the executable. This behaviour should match what
Explorer does. By selecting an icon group instead of a specific icon,
Windows is free to select the icon within the group that best suits
the current DPI.

(cherry picked from commit 1fa6142903b88007c7b77d324ee78fad9966871a)
2024-04-02 12:04:52 -07:00
Anonymous Maarten 143b070074 cpuinfo: fix -Wmissing-prototypes warning 2024-04-02 18:57:36 +02:00
Ryan C. Gordon 58529c1827
stdlib: SDL_utf8strlen and SDL_utf8strnlen now use SDL_StepUTF8 internally.
Otherwise, they might find out strings with malformed UTF-8 sequences produce
a different amount of codepoints than the count returned here, overflowing
buffers that might be allocated based on the results.
2024-04-01 22:43:19 -04:00
Sam Lantinga 17d4f8d699 Updated to version 3.1.1 for the preview release 2024-04-01 17:03:46 -07:00
Brian Collins 560daa07f2 Workaround a macOS cursor-related bug.
This fixes an macOS bug that is only known to occur in fullscreen windows on the built-in displays of newer MacBooks with camera notches. When the mouse is moved near the top of such a window (within about 44 units) and then moved back down, the cursor rects aren't respected. This can cause the default cursor to be visible when it should not be.

(cherry picked from commit f1690e265e306818882c7c876a9e85492eeefa42)
2024-04-01 16:21:24 -07:00
Sam Lantinga a82ed82bc7 SDL_QueryTexture() fills in a pointer to SDL_PixelFormatEnum 2024-04-01 15:45:22 -07:00
Sam Lantinga aea44cff6b Fixed warning C4702: unreachable code 2024-04-01 14:30:11 -07:00
Sam Lantinga 85b7f131b0 Fixed warning C4701: potentially uninitialized local variable 'percent' used 2024-04-01 14:27:19 -07:00
Sam Lantinga c10a3df552 Only add the UniformTypeIdentifiers framework if we're building the dialog subsystem
This framework isn't available on older SDKs
2024-04-01 14:13:31 -07:00
SDL Wiki Bot 18c8af6e48 Sync SDL3 wiki -> header 2024-04-01 21:00:26 +00:00
Sam Lantinga 8847b35244 Separate joystick power state into battery status and percentage
This allows you to see battery percentage while the controller is charging
2024-04-01 13:59:00 -07:00
Sam Lantinga 5e624c2083 Moved display and window event renaming to the correct header section
Closes https://github.com/libsdl-org/SDL/pull/9396
2024-04-01 13:57:05 -07:00
Anonymous Maarten 63cb541797 cmake: set SYSTEM property in SDL3Config.cmake for compatibility with older CMake versions 2024-04-01 20:09:51 +02:00
Susko3 5f763083fc Use SDL_EventType and fix event name in comment 2024-04-01 11:04:02 -07:00
Susko3 c40e9cc634 Sort includes 2024-04-01 11:04:02 -07:00
Anonymous Maarten 4eb0f10dda cmake: install SDL headers with SYSTEM property disabled
This causes the SDL include path to be added using -I instead of -isystem
2024-04-01 18:38:47 +02:00
Anonymous Maarten fb8ac1ab7d ci: verify SDL build system does not include installed SDL headers 2024-04-01 18:38:47 +02:00
Anonymous Maarten 19b01c39b0 ci: don't fix pspsdk toolchain anymore 2024-04-01 18:38:47 +02:00
Frank Praznik a00ac61514 time: Fix UWP build 2024-04-01 10:53:35 -04:00
danginsburg 650ba8f3ec Vulkan Renderer - closes #9385. When the vertex buffer size is exceeded, make sure to wait for outstanding work before resizing it. This fixes validation errors/crash found with using Imgui SDL3 renderer on Vulkan. 2024-04-01 07:38:31 -07:00
Sean Ridenour 3448273be1 Weakly link UniformTypeIdentifiers.framework 2024-04-01 07:38:05 -07:00