Commit Graph

329 Commits

Author SHA1 Message Date
Sam Lantinga
7a924b36ae compile_shaders.sh shouldn't be in the SDL framework 2024-09-18 14:31:00 -07:00
Sam Lantinga
398dff7c25 Added support for the HORI licensed Steam Controller 2024-09-18 14:08:32 -07:00
Semphris
9eea8234e6 Add SDL_Process subsystem 2024-09-13 15:19:32 -07:00
Sam Lantinga
4123023d3e Renamed sdlgpu to gpu 2024-09-11 08:34:51 -07:00
Sam Lantinga
387774ab8a Build config flags are either defined or undefined, never 0
This is for consistency with CMake build configuration

Also added SDL_VIDEO_RENDER_GPU to the non-CMake build configurations
2024-09-05 09:52:40 -07:00
kanjitalk755
1bc81c7e30 Add GPU files to xcodeproj 2024-08-31 12:32:38 +02:00
Anonymous Maarten
c298d2024a Include SDL_build_config.h without a 'build_config/' prefix 2024-08-23 00:51:35 +00:00
Ryan C. Gordon
b4ca15b654 pen: Added Cocoa backend. 2024-08-09 22:09:23 -04:00
Ryan C. Gordon
a9d70dbacb pen: Rework public API.
This changes the API in various ways, and updates the backends for this.

Overall, this is a massive simplification of the API, as most future backends
can't support the previously-offered API.

This also removes the testautomation pen code (not only did these interfaces
change completely, it also did something no other test did: mock the internal
API), and replaces testpen.c with a different implementation (the existing
code was fine, it was just easier to start from scratch than update it).
2024-08-09 22:09:23 -04:00
Sam Lantinga
978e5fc4f8 Updated Xcode project for SDL_GetWindowFromEvent() 2024-08-02 20:38:50 -07:00
Sam Lantinga
81f8e6aba6 Added SDL_StartTextInputWithProperties()
This allows you to customize the text input so you can have numeric text entry, hidden passwords, etc.

Fixes https://github.com/libsdl-org/SDL/issues/7101
Fixes https://github.com/libsdl-org/SDL/issues/7965
Fixes https://github.com/libsdl-org/SDL/issues/9439
2024-08-02 14:49:37 -07:00
Sam Lantinga
bffd35995c Added unifont-15.1.05.hex to the Xcode project for testime 2024-08-02 14:49:37 -07:00
Ryan C. Gordon
614a88ca3b SDL_IOFromFile: Apple targets no longer use the app bundle's resources dir.
Fixes #8403.
2024-07-29 15:44:51 -04:00
Ryan C. Gordon
4b5309cd98 main: Move SDL_RunApp bits from src/core to src/main.
Fixes #10170.
2024-07-05 08:52:25 -07:00
Sam Lantinga
a938e2b979 Replaced test framework random code with SDL random functions 2024-06-24 11:49:15 -07:00
Sam Lantinga
89cdadf7c3 Added SDL_isinf(), SDL_isinff(), SDL_isnan(), and SDL_isnanf() 2024-06-24 11:49:15 -07:00
Sam Lantinga
679e4471ed Added the ability to query the keymap for keycodes based on modifier state 2024-06-21 22:06:08 -07:00
Sam Lantinga
d1d484ddbe Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
These are simple random functions that should not be used for serious random number generation.

Fixes https://github.com/libsdl-org/SDL/issues/4968
2024-06-16 07:41:00 -07:00
Ryan C. Gordon
38f0214e8a audio: Refer to audio devices to "playback" and "recording".
Fixes #9619.
2024-06-15 01:08:12 -04:00
Sam Lantinga
7e231fcd90 Added testcamera to Xcode test apps 2024-06-04 10:43:45 -07:00
Sam Lantinga
b1529699cf Fixed Xcode build after adding offscreen Vulkan support 2024-06-04 10:43:20 -07:00
Anonymous Maarten
8954e42bcb xcode: cmake scripts inside frameworks in side xcframework differ from the top cmake script 2024-05-22 20:17:13 +02:00
Sam Lantinga
fbe7e2e6d3 Moved the SDL version back to SDL_version.h
Added a comment at the top of SDL.h with the current version, for informational purposes
2024-05-15 14:38:29 -07:00
Sam Lantinga
661f2fc1fc Removed the SDL_Version structure, moved SDL version to SDL.h
Inspired by https://github.com/libsdl-org/SDL/issues/9788
2024-05-15 10:43:31 -07:00
Anonymous Maarten
8f4cab0f83 ci: fix dmg release artifacts
- build-release.py: use absolute paths instead of resolved paths
- xcode: run the shell script with 'set -ex' for extra verbosity +
  failing when an error happens
- On macOS ci, /tmp resolves to /private/tmp, causing the shell script
  to not find the SDL3.xcframework. So don't  use /tmp.
2024-05-05 01:30:07 +02:00
Sam Lantinga
d95f5bad24 Updated to version 3.1.2 for the preview release 2024-05-01 09:34:25 -07:00
Brick
8f6f9cadc4 Rewrote audio resampler using cubic filter interpolation
This allows using a much smaller (1.5 KB) lookup table, in exchange for a small amount of extra work per frame.

The extra work (a few extra loads/mul/adds) is negligible, and can execute in parallel.
The reduction in cache misses almost certainly outweighs any added cost.

The table is generated at runtime, and takes less than 0.02ms on my computer.
2024-04-15 11:47:18 -10:00
Ryan C. Gordon
9c8c254af2
include: Removed SDL_quit.h
It only had one (sort of scary) macro in it.

Fixes #9534.
2024-04-15 11:35:39 -04:00
Sylvain Becker
6b9a8f0da1 IOS: fix compilation of testautomation.app
only for IOS/TVOS, also disable testautomation_pen suite which requires sdl internals files
2024-04-15 03:28:16 -10: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
17d4f8d699 Updated to version 3.1.1 for the preview release 2024-04-01 17:03:46 -07:00
Sean Ridenour
3448273be1 Weakly link UniformTypeIdentifiers.framework 2024-04-01 07:38:05 -07:00
Ozkan Sezer
5a1c48be5c remove non-existent vulkan.hpp and vulkan_mir.h from Xcode project 2024-03-25 21:23:32 +03:00
Anonymous Maarten
cf3cf0e106 dmg: fix SDL_version.h issue in sdl3-config-version.cmake 2024-03-24 20:15:42 +01:00
Sam Lantinga
36e73bdda4 Updated to version 3.1.0 for the preview release 2024-03-24 06:16:02 -07:00
Anonymous Maarten
4defea47e1 dmg: fix sdl3-config.cmake 2024-03-23 21:41:20 +01:00
Sam Lantinga
2265d22f75 Updated Xcode project for time APIs 2024-03-19 14:53:55 -07:00
Frank Praznik
a6fbf0488c Add time and realtime clock functions
Adds functions to query the system's realtime clock, convert time intervals to/from a calendar date and time in either UTC or the local time, and perform time related calculations.

An SDL_Time type (a time interval represented in nanoseconds), and SDL_DateTime struct (broken down calendar date and time) were added to facilitate this functionality.

Querying the system time results in a value expressed in nanoseconds since the Unix epoch (Jan 1, 1970) in UTC +0000. Conversions to and from the various platform epochs and units are performed when required.

Any direct handling of timezones and DST were intentionally avoided. The offset from UTC is provided when converting from UTC to a local time by calculating the difference between the original UTC and the resulting local time, but no other timezone or DST information is used.

The preferred date formatting and 12/24 hour time for the system locale can be retrieved via global preferences.

Helper functions for obtaining the day of week or day or year for calendar date, and getting the number of days in a month in a given year are provided for convenience. These are simple, but useful for performing various time related calculations.

An automated test for time conversion is included, as is a simple standalone test to display the current system date and time onscreen along with a calendar, the rendering of which demonstrates the use of the utility functions (press up/down to increment or decrement the current month, and keys 1-5 to change the date and time formats).
2024-03-19 10:57:36 -07:00
kanjitalk755
b6c9a72740 Add SDL_storage files to Xcode project 2024-03-18 22:52:58 -07:00
Sam Lantinga
db0c1d7aeb Added portable file and directory operations (thanks @icculus!) 2024-03-17 08:39:43 -07:00
Sam Lantinga
4fc749443f Added dialog files to the Xcode build 2024-03-15 16:27:02 -07:00
Ryan C. Gordon
5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
a dinosaur
41baf23e44 cmake: fix empty framework prefix on MacOS 2024-03-09 08:18:47 -08:00
Sam Lantinga
e223e1d498 Added SDL_camera.h to the public Framework headers 2024-02-25 15:54:34 -08:00
Ryan C. Gordon
7191a97fe3 camera: Windows support, through the Media Foundation API! 2024-02-20 15:56:26 -05:00
Ryan C. Gordon
9ae39d52de camera: Add sources to Xcode and Visual Studio projects.
This still needs updates to actually compile on macOS/iOS, though!
2024-02-20 15:56:26 -05:00
Sam Lantinga
b39246936b Added SDL_cocoashape* to Xcode project 2024-02-12 11:17:54 -08:00
Sam Lantinga
b9ea2dde44 Added VisionOS as a supported target to the Xcode project
Also added SDL_PLATFORM_VISIONOS to the platform definitions and generally switched from TARGET_OS_* macros to SDL_PLATFORM_* macros.
2024-01-27 11:07:21 -08:00
Sam Lantinga
7a069cc4b0 Allow optimizing memcpy and memset where possible
Modern C runtimes have well optimized memset and memcpy, so use those instead of dispatching into SDL's versions. In addition, some compilers can analyze memset and memcpy calls and directly turn them into optimized assembly.
2024-01-21 06:55:29 -08:00
Sam Lantinga
87f559e021 Updated Xcode projects after dbdc65fc95 2024-01-18 11:01:35 -08:00