Commit Graph

224 Commits

Author SHA1 Message Date
Sam Lantinga 2a05b63580 Mark generate.py as executable 2024-10-29 16:47:26 -07:00
Susko3 94d110edd5 Specify C source file in example VC projects 2024-10-29 14:40:32 -07:00
Susko3 415abf2ea2 Rename variables for readability 2024-10-29 14:40:32 -07:00
Sam Lantinga bdf16628fb Added 03-infinite-monkeys example game
This isn't really a game, more of an exercise of that age old question...
2024-10-29 13:08:59 -07:00
Sam Lantinga a93ec0c679 Added Visual Studio project for 02-woodeneye-008 2024-10-29 13:08:59 -07:00
Susko3 152bcce85f
Add examples to `SDL.sln` (#11255) 2024-10-29 07:36:38 -07:00
Anonymous Maarten 45dfdfbb7b Add parametrized build script
[ci skip]
2024-10-14 21:30:48 +02:00
Sam Lantinga a923771978 Added SDL_murmur3_32() 2024-09-28 17:19:01 -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
Daniel Ludwig 0a8bf663b7 Fix VisualC project filter 2024-09-07 11:50:40 +03: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
cosmonaut 2e7d5bb429 Add the SDL_GPU API
Project Lead: Evan Hemsley <evan@moonside.games>

Co-designer, Metal Port, Console Ports:

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>

Production, QA, Debug:

Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>

SDL_Render Driver, Bugfixes:

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

Additional D3D12 Programming, Bugfixes:

Co-authored-by: Bart van der Werf <bluelive@gmail.com>

Bugfixes and Feedback:

Co-authored-by: Zakary Strange <zakarystrange@gmail.com>
Co-authored-by: meyraud705 <meyraud705@gmail.com>
Co-authored-by: Joshua T. Fisher <playmer@gmail.com>
Co-authored-by: Topi Ritala <ritalat@fastmail.com>
Co-authored-by: David Gow <david@ingeniumdigital.com>

Original API Proposal:

Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
2024-08-29 15:57:29 -07:00
Anonymous Maarten c298d2024a Include SDL_build_config.h without a 'build_config/' prefix 2024-08-23 00:51:35 +00:00
Anonymous Maarten 2b8ebf08d1 The SDL3 MSVC SDK does not provide ARM64EC binaries
(X64 is compatible)
2024-08-22 18:10:48 +02: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 001dbc5da8 Added support for raw mouse and keyboard using GameInput on Windows
Fixes https://github.com/libsdl-org/SDL/issues/10442
2024-08-07 12:19:09 -07:00
Anonymous Maarten 7dfb9acb71 VisualC: add testdialog project 2024-08-05 00:07:15 +02:00
Anonymous Maarten 90757fba5d Remove bscmake reference
Although BSCMAKE is still installed with Visual Studio,
it is no longer used by the IDE.
Since Visual Studio 2008, browse and symbol information is stored
automatically in a SQL Server .sdf file in the solution folder.
2024-08-04 22:16:25 +02:00
Anonymous Maarten 4b3a80bb73 msbuild: add TreatWarningAsError property, and enable it on ci 2024-08-04 21:23:25 +02:00
Anonymous Maarten f57c597c60 Added SDL_GetWindowFromEvent 2024-08-03 02:37:11 +00:00
Anonymous Maarten b3b74e8aed Fix SDL3ConfigVersion.cmake of VC development package for ARM64EC 2024-07-20 00:59:58 +02:00
Anonymous Maarten c59771d7fc cmake: detect ARM64EC 2024-07-19 10:21:34 +00:00
Sam Lantinga 2ba76dbe80 Simplified SDL_Surface
SDL_Surface has been simplified and internal details are no longer in the public structure.

The `format` member of SDL_Surface is now an enumerated pixel format value. You can get the full details of the pixel format by calling `SDL_GetPixelFormatDetails(surface->format)`. You can get the palette associated with the surface by calling SDL_GetSurfacePalette(). You can get the clip rectangle by calling SDL_GetSurfaceClipRect().

SDL_PixelFormat has been renamed SDL_PixelFormatDetails and just describes the pixel format, it does not include a palette for indexed pixel types.

SDL_PixelFormatEnum has been renamed SDL_PixelFormat and is used instead of Uint32 for API functions that refer to pixel format by enumerated value.

SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB(), and SDL_GetRGBA() take an optional palette parameter for indexed color lookups.
2024-07-10 00:48:18 -07:00
Brick fde2378ccd Refactor alpha blitters, move the SSE41/AVX2 versions into SDL_blit_A.c 2024-07-08 20:59:42 +01:00
Brick 3c59d3f69c Remove old references to blitter files 2024-07-08 10:53:46 -07:00
Isaac Aronson f0238ef615 Fix build issues 2024-07-08 10:53:46 -07:00
Isaac Aronson 735cf5a6f9 Relocate intrinsic modules to src/video/ 2024-07-08 10:53:46 -07:00
Isaac Aronson 3e0581c625 Merge upstream and sdl3-blitters 2024-07-08 10:53:46 -07: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
Sam Lantinga b1b4638cac Add basic vulkan support to offscreen video driver so it doesn't crash if you happen to get the offscreen driver and try to use vulkan.
Enable offscreen video driver in windows to make it easier to test.
Enable offscreen video driver in macos just to complete the desktop computer trio.
2024-05-28 20:02:55 -07:00
Anonymous Maarten bba76859f5 cmake: detect CPU architecture in 1 compilation 2024-05-26 23:52:48 +02:00
Anonymous Maarten f3695ef34e VC: don't import Microsoft.CPP.UpgradeFromVC[67]0.props projects
Only thing these do is define a _VC80_UPGRADE macro.
2024-05-24 11:13:40 +02:00
Anonymous Maarten 86b2f441c0 release: create arm64 Visual Studio binaries
[skip ci]
2024-05-23 00:13:10 +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
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
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 78c7834f90 Added SDL_HINT_WINDOWS_RAW_KEYBOARD to control whether raw keyboard is enabled on Windows 2024-03-25 20:41:05 -07:00
Anonymous Maarten 58f2e102a9 visualc: filters also contained 2 wrong include headers 2024-03-25 18:02:05 +01:00
Anonymous Maarten c7d32ff64b visualc: rename/remove 2 include paths 2024-03-25 17:10:31 +01:00
Anonymous Maarten 1aa9ef7213 cpuinfo: reset cpu features on SDL_Quit 2024-03-23 16:36:44 -07:00
Anonymous Maarten 2ed0143425 visualc: fix sdl3-config.cmake 2024-03-23 21:41:20 +01: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
Sam Lantinga db0c1d7aeb Added portable file and directory operations (thanks @icculus!) 2024-03-17 08:39:43 -07:00