Commit Graph

16730 Commits

Author SHA1 Message Date
SDL Wiki Bot
e058aa6d65 Sync SDL3 wiki -> header 2024-08-02 21:50:11 +00:00
Sam Lantinga
50492e1d03 Change the text input defaults to match the natural input experience 2024-08-02 14:49:37 -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
5d51e3b4ab testime: added support for multiple windows 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
SDL Wiki Bot
f01d4278c6 Sync SDL3 wiki -> header 2024-08-01 20:49:00 +00:00
Sam Lantinga
31ed3665ad Added support for high-DPI cursors and icons
Fixes https://github.com/libsdl-org/SDL/issues/9838
2024-08-01 13:48:28 -07:00
Sam Lantinga
94d9229ce2 Added SDL_AddSurfaceAlternateImage(), SDL_SurfaceHasAlternateImages(), SDL_GetSurfaceImages() and SDL_RemoveSurfaceAlternateImages()
These functions allow you to create surfaces with alternate high DPI content, and will be used for high DPI icon and cursor support.
2024-08-01 13:48:28 -07:00
Sam Lantinga
b8dc97c577 Use SDL_PremultiplySurfaceAlpha() when creating NSImages 2024-08-01 13:48:28 -07:00
Sam Lantinga
b8f3cd0a10 Added SDL_CursorData for internal cursor data 2024-08-01 13:48:28 -07:00
Sam Lantinga
22ffb487d0 Added SDL_ScaleSurface() 2024-08-01 13:48:28 -07:00
Sam Lantinga
15f68a86ff Group the blit copy flags to simplify code 2024-08-01 13:48:28 -07:00
Ozkan Sezer
7d27a97402 d3d12.h, d3d12sdklayers.h: fix build against older mingw-w64 versions.
Fixes: https://github.com/libsdl-org/SDL/issues/10452 .
2024-08-01 21:45:02 +03:00
Anonymous Maarten
68fb07787b cmake: Remove HAVE_D3D12_H from sources and introduce SDL_RENDER_D3D(11|12) 2024-08-01 17:49:02 +00:00
Anonymous Maarten
0c5bb532c3 Remove support for building a SDL3 library from gradle 2024-08-01 17:48:49 +00:00
Anonymous Maarten
349540f73f Document the new SDL3 Android archive artifact 2024-08-01 17:48:49 +00:00
Dragon-Baroque
808c312b2a Support SDL_EVENT_DROP_FILE in Windows with IDropTarget instead of WM_DROPFILES
Support SDL_EVENT_DROP_TEXT in Windows

  src/video/windows/SDL_windowsvideo.c + .h
    Connect      to COM WIN_CoInitialize   + OLE OleInitialize   in WIN_VideoInit
    Disconnect from COM WIN_CoUninitialize + OLE OleUninitialize in WIN_VideoQuit
  src/video/windows/SDL_windowswindow.c + .h
    Create / Destroy IDropTarget or use fallback WM_DROPFILES
      depending on OleInitialize success in WIN_VideoInit
    Handle text/uri-list, text/plain;charset=utf-8, CF_UNICODE_TEXT, CF_TEXT, CF_HDROP
    Call terminating WIN_AcceptDragAndDrop from WIN_DestroyWindow ( CleanupVideoData )
2024-08-01 07:17:17 -07:00
Ethan Lee
efefc4a1f3 d3d12: Move platform-specific includes/defines to SDL_d3d12.h 2024-07-31 23:34:31 -07:00
SDL Wiki Bot
2e058ba7a4 Sync SDL3 wiki -> header 2024-08-01 05:37:11 +00:00
Sam Lantinga
a5f18048b2 Extend the 9-grid functions to handle a non-uniform grid layout (thanks @zaun!)
Fixes https://github.com/libsdl-org/SDL/issues/10389
2024-07-31 22:36:39 -07:00
Anonymous Maarten
a1c6f99877 android: add script in Android archive to create a SDK
Also,
- Move mingw's pkg-support into build-scripts
- Add type annotations to python scripts for mypy
- ci: use v4 tag of actions/cache
- cmake: use PYTHON3_EXECUTABLE for running xxd.py
  (Python3::Interpreter is not always recognized.)
2024-08-01 05:07:08 +02:00
Sam Lantinga
091960441b Don't check SDL_RENDER_DRIVER in automated tests
This might be set in the environment for testing purposes
2024-07-31 19:10:13 -07:00
Sam Lantinga
445983fc79 Remove D3D12 call hacks now that we have a good set of D3D12 headers 2024-07-31 19:10:13 -07:00
Sam Lantinga
de30400a7b Fixed uninitialized variable warning 2024-07-31 18:54:45 -07:00
Sam Lantinga
1954ac407f Don't mix keyboard and mouse raw input timestamps
We want to keep mouse timestamps consistently using the same interval, and it's helpful to know when multiple keyboard events come in at the same time.
2024-07-31 18:54:45 -07:00
Ethan Lee
55e9a8ca45 d3d12: Import DirectX-Headers, use local d3d12.h in SDL_render.
This avoids lots of build issues with the various D3D12 headers out there (MinGW, old Windows SDKs, etc) and also opens the door for WSL2 libd3d12.so support.

Note that the build system has not been changed; technically _all_ platforms now have d3d12.h but we should only enable the backend when it's actually expected to work.
2024-07-31 18:41:17 -07:00
Sam Lantinga
c5a99f1515 Fixed detecting wrapping Windows message time
It's possible to get message times out of order when processing the Windows message queue, so this passes those times through unchanged, while still detecting when the message tick wraps.
2024-07-31 16:36:47 -07:00
Ryan C. Gordon
364bbd545d audio: SDL_ClosestAudioFormats now favors float32 and native byte order.
Fixes #9581.
2024-07-31 07:19:15 -07:00
Sami Kyöstilä
80f5f0b1fb android: Fix activity pause/resume with external graphics context
This patch fixes two issues with pausing and resuming the Android
activity when an external graphics context[1] is used:

1. When pausing, don't wait for the EGL context to be backed up if a
   context wasn't created in the first place.

2. When resuming, don't recreate the EGL surface unless one was
   requested by the user when originally creating the window.

[1] SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN
2024-07-30 20:15:42 -07:00
Sam Lantinga
89de8e2110 Fixed infinite loop searching for matching video modes (thanks @Synt4xErr0r4!) 2024-07-30 17:29:21 -07:00
Anonymous Maarten
b68ac011e0 ctest: fail if there are outstanding allocations 2024-07-30 20:56:19 +00:00
Anonymous Maarten
c7a1876536 SDL_test: use mutex based on SDL_AtomicInt in memory tracking
SDL_Mutex or SDL_SpinLock cannot be used as these use SDL_malloc internally.

ff
2024-07-30 20:56:19 +00:00
Anonymous Maarten
4c00433b69 SDL_test: format tracked allocation names during report generation 2024-07-30 20:56:19 +00:00
Anonymous Maarten
bc8f4a1d0b ci: fix artifacts on libsdl-org repo 2024-07-30 22:55:36 +02:00
Anonymous Maarten
1ef3263ad4 ci: only upload artifacts in libsdl-org GitHub organization 2024-07-30 22:53:14 +02:00
Ryan C. Gordon
afabccd4d0
examples: Split up description text by line breaks. 2024-07-30 15:37:46 -04:00
Ozkan Sezer
b24bfc2c98 fix RandFunc typedef 2024-07-30 21:15:04 +03:00
Semphris
6aca728056 Fix examples description CSS 2024-07-30 13:46:34 -04:00
Ryan C. Gordon
3b5c3d6cc8
examples/snake: Actually fixed build this time. 2024-07-30 13:43:03 -04:00
Ryan C. Gordon
883576beb8
examples: Improve source code output when there are multiple files. 2024-07-30 13:40:09 -04:00
Ryan C. Gordon
bc8b768b9a
examples/snake: Fix up build. 2024-07-30 13:40:01 -04:00
Dylam De La Torre
dbb4e05c28 Add "Snake" game example 2024-07-30 13:26:01 -04:00
Ryan C. Gordon
69a2d7960c
examples: first shot at description text at top of page. Not working yet. 2024-07-30 13:18:58 -04:00
Sami Kyöstilä
b881e19896 android: Update window/surface pointers on change
When the native window or surface backing the SDL window changes, e.g.,
when the activity is resumed, we should also update the corresponding
window pointer properties (SDL_PROP_WINDOW_ANDROID_{WINDOW,SURFACE}
_POINTER) so that they remain in sync.
2024-07-30 09:27:53 -07:00
Ryan C. Gordon
6a25e94472
examples: Print a description of the program to the console on startup. 2024-07-30 12:23:07 -04:00
Sam Lantinga
a6407e88da Document the events that need to be handled in a callback 2024-07-30 07:52:13 -07:00
Sam Lantinga
f039b2290a Added logging for life cycle events 2024-07-30 07:52:13 -07:00
Ryan C. Gordon
900213e16e
examples: Pop up the console on new output for three seconds if hidden. 2024-07-30 09:45:06 -04:00
Ryan C. Gordon
6559cfb143
examples: make SDL_Log work with the Emscripten console.
Fixes #10410.
2024-07-30 08:59:52 -04:00
Ryan C. Gordon
fbed34a645
cmake: Don't warn about lack of X11/Wayland backend on Emscripten. 2024-07-30 00:33:08 -04:00