Compare commits

...

344 Commits

Author SHA1 Message Date
Sam Lantinga
78cc5c1734 Updated to version 3.1.6 for the preview release 2024-11-01 14:27:01 -07:00
SDL Wiki Bot
19af3a2b34 Sync SDL3 wiki -> header
[ci skip]
2024-11-01 19:42:29 +00:00
Wouter Wijsman
e31e3caece PSP: Fix building examples in parallel 2024-11-01 09:55:20 -07:00
Sam Lantinga
c5f12b135d Fixed the D-pad on wireless Xbox 360 controllers 2024-11-01 09:02:55 -07:00
Wouter Wijsman
780578cd36 PSP: Allow building tests in parallel 2024-11-01 08:57:09 -04:00
Sam Lantinga
8b48b70c6e Fixed return value setting state on combined Joy-Con controllers 2024-10-31 20:37:23 -07:00
Sam Lantinga
77a0411dde Minor cleanup 2024-10-31 15:44:41 -07:00
SDL Wiki Bot
68cc173d92 Sync SDL3 wiki -> header
[ci skip]
2024-10-30 20:47:55 +00:00
expikr
7c968f1510 Update SDL_hints.h 2024-10-30 12:01:51 -07:00
expikr
e2857fc5a2 Update SDL_mouse.c 2024-10-30 12:01:51 -07:00
Maia
5699ba799e Add return to CHECK_VULKAN_ERROR_AND_RETURN macro 2024-10-30 11:52:42 -07:00
M. P. Halpin
6c10446a6c Add version info when building CI/CD for apple platforms 2024-10-30 09:07:30 -07:00
expikr
d6b60bcc53 typo in player spawnpos, mov drawcall out of loop 2024-10-30 11:22:29 -04:00
Sam Lantinga
09495059df Fixed the PS5 controller face buttons on Amazon Fire TV, Android 11 2024-10-30 05:23:00 -07:00
Sam Lantinga
c099d0525e sort_controllers.py: fixed parsing SDL_PRIVATE_GAMEPAD_DEFINITIONS 2024-10-30 05:21:59 -07:00
M. P. Halpin
24bdbb8bf4 Supress Metal warning when compiling against macOS 10.11-10.13 2024-10-29 20:03:18 -07:00
Sam Lantinga
2a05b63580 Mark generate.py as executable 2024-10-29 16:47:26 -07:00
Sam Lantinga
51628034d9 Don't offset the view if there's no text input rect
Otherwise this will shift the entire view upwards, which probably isn't what you want.
2024-10-29 16:42:16 -07:00
Sam Lantinga
c8a04eec06 Autorelease keys should go down when pressed. 2024-10-29 16:24:40 -07:00
Anonymous Maarten
f543faf837 Allow in-tree build 2024-10-30 00:04:17 +01:00
SDL Wiki Bot
6647345be0 Sync SDL3 wiki -> header
[ci skip]
2024-10-29 21:43:56 +00:00
Evan Hemsley
b4dff42dcd GPU: Add SDL_CancelGPUCommandBuffer (#11316)
---------

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2024-10-29 14:43:22 -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
2b92dc9baa Minor updates to woodeneye-008.c from template.c 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
Sam Lantinga
9a77ee2008 Added instructions for creating Visual Studio projects for examples 2024-10-29 13:08:59 -07:00
cosmonaut
014b473bcc GPU D3D12: Fix depth texture sampling 2024-10-29 12:05:35 -07:00
cosmonaut
ff14a1781f GPU D3D12: Fix indirect buffers not being refcounted 2024-10-29 10:34:54 -07:00
dv-senna
149ecffd6f SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHABLE_HANDLE
Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes:  https://github.com/libsdl-org/SDL/issues/11328 .
2024-10-29 20:30:10 +03:00
d-musique
35e53f76a9 metal: check success of device creation (#11367)
When macOS runs under a virtual environment, it is possible that
MTLCreateSystemDefaultDevice() does not succeed.
Not checking this failure results in a crash down the road.
This change allows to skip GPU renderer and use an adequate fallback.

Co-authored-by: D.musique <d-musique@users.noreply.github.com>
2024-10-29 12:35:13 -04:00
Caleb Cornett
feb10434a1 Order by subsystem 2024-10-29 08:50:50 -07:00
Caleb Cornett
b2f216f9e2 Add GPU to iOS build config 2024-10-29 08:50:50 -07:00
Caleb Cornett
54836050c9 metal: Add availability checks 2024-10-29 08:13:51 -07:00
Frank Praznik
8f9a562969 wayland: Remove vestigial struct member 2024-10-29 10:51:18 -04:00
Susko3
152bcce85f Add examples to SDL.sln (#11255) 2024-10-29 07:36:38 -07:00
expikr
1e7c186461 Splitcreen FPS example with multiple mouse and keyboard (#11317) 2024-10-29 07:30:10 -07:00
Ethan Lee
5c5235fb51 ci: Add Steam Linux Runtime (Sniper) task 2024-10-28 17:07:31 -04:00
Frank Praznik
36c209080c wayland: Refactor some shell surface related names 2024-10-28 14:30:08 -04:00
Frank Praznik
2b7dc55364 wayland: Check the WM capabilities before sending a minimize event
Wayland gives no feedback to windows regarding whether a minimize request was successful, so we would universally send the minimize event and assume that the request succeeded.

Check the window manager capabilities, if available, for whether window minimization is supported, and don't send the minimized event in the case that it is unsupported.
2024-10-28 14:30:08 -04:00
Frank Praznik
1abbd13414 wayland: Throttle interactive user resize events
Excessive resize events generated during interactive window resizing can cause applications to lag, severely in some cases. Throttle interactive resize events to once per frame callback interval.
2024-10-28 14:30:08 -04:00
SDL Wiki Bot
e0d019c941 Sync SDL3 wiki -> header
[ci skip]
2024-10-28 07:00:30 +00:00
Petar Popovic
cb0c7c9680 SDL_CreateDirectory(): directory tree creation for absolute paths for non-Windows platforms 2024-10-28 01:56:48 -04:00
Petar Popovic
a10578acbd SDL_SYS_RenamePath(): Fix error message. 2024-10-27 16:54:13 -07:00
SDL Wiki Bot
3922bcec95 Sync SDL3 wiki -> header
[ci skip]
2024-10-27 21:42:48 +00:00
Petar Popovic
04a478b6a9 SDL_Enumerate[Storage]Directory() comments: Use enum constant names instead of integers. 2024-10-27 14:41:33 -07:00
Glenn Watson
5c3d42aade Update README-linux.md for openSUSE Tumbleweed dependencies 2024-10-27 08:01:13 -07:00
Petar Popovic
8468c372b2 SDL_EnumerateDirectory(): (posix) Fix return value when directory is invalid 2024-10-25 22:52:56 -07:00
Roman Frołow
97b924f985 typo: maxOS -> macOS 2024-10-26 01:59:44 +02:00
Sam Lantinga
a851c5b648 create-release.py uses python3 2024-10-25 15:08:57 -07:00
Sam Lantinga
47411d8007 build-release.py uses python3 2024-10-25 14:31:49 -07:00
Dan Ginsburg
4f160d69a6 Closes #10318 - implement Android prerotation in the Vulkan renderer 2024-10-25 14:21:29 -07:00
Ozkan Sezer
93471cf78d video/openvr: minor clean-up:
- make all of function pointers static
- make EGLint context_attribs[] static
- comment out unused function pointer ov_wglGetCurrentContext
- remove unused SDL_DisplayMode openvr_dm_default
- move SDL_VideoDisplay openvr_vd_default to OPENVR_VideoInit()
  context and eliminate its C99 initializers
- replace atoi() calls with SDL_atoi()
- replace atof() calls with SDL_atof()
2024-10-25 23:20:24 +03:00
Anonymous Maarten
8bf1a84200 ci: add include headers of build directory to ci artifacts
[sdl-ci-artifacts]
2024-10-25 17:47:26 +02:00
Anonymous Maarten
590e1196d0 snake: check allocated memory before use 2024-10-25 17:47:26 +02:00
Anonymous Maarten
20e01c6fbe android: add (disabled) android.permission.INTERNET to AndroidManifest.xml
It's required for SDL3_net
2024-10-25 17:47:26 +02:00
Sam Lantinga
850158f83f testcontroller: fixed incorrect usage of memcpy() 2024-10-24 18:12:01 -07:00
Ryan C. Gordon
344546b4ea cocoa: Make sure GL context destruction happens on the main thread.
Fixes #10900.
2024-10-24 16:27:58 -04:00
SDL Wiki Bot
dcd4ddb043 Sync SDL3 wiki -> header
[ci skip]
2024-10-24 18:38:45 +00:00
Ryan C. Gordon
8d3bec99a7 audio: Make SDL_GetAudioStreamProperties() thread safe. 2024-10-24 14:37:23 -04:00
Ryan C. Gordon
10e52e1899 docs: Added more '\threadsafety` tags.
Reference Issue #7140.
2024-10-24 14:37:23 -04:00
Frank Praznik
731853077a Send drop complete events when the drop leaves the window on Cocoa, Wayland, and X11
This is already done on win32, however, other platforms were left in a state of limbo if a drop operation began, then never completed due to the drop leaving the window.
2024-10-24 13:36:24 -04:00
Petar Popovic
db4e2ccbac Allow redefinition of only one macro SDL_SINT64_C SDL_UINT64_C 2024-10-24 07:37:44 -07:00
Son Phan Trung
c0bad724a7 README-ios.md: Add info about UIApplicationSupportsIndirectInputEvents on iOS 17 2024-10-24 07:36:45 -07:00
Ryan C. Gordon
4ea26a7771 emscripten: scale mousewheel X coordinates correctly, not just Y coordinates.
Fixes #10454.
2024-10-23 23:35:02 -04:00
Susko3
d0cf2c19d1 Allow defining custom SDL_SINT64_C and SDL_UINT64_C macros (#11315) 2024-10-23 17:03:13 -07:00
Ryan C. Gordon
7108291d0b video: Change SDL_GLattr to SDL_GLAttr. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon
c0e9205a92 video: Change capitalization on various OpenGL attribute typedefs. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon
3c506630c3 video: Turn several OpenGL attribute enums into integer typedefs.
Fixes #11308.
2024-10-23 18:50:52 -04:00
SDL Wiki Bot
a04fda211c Sync SDL3 wiki -> header
[ci skip]
2024-10-23 21:01:26 +00:00
SDL Wiki Bot
4e33440c04 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 20:59:19 +00:00
Anonymous Maarten
e8b69b03fe cmake: fail configuring when no X11 or wayland could be found (#11310)
It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
2024-10-23 20:19:40 +00:00
Petar Popovic
540db0d164 Bumped version of macro 'main' to 3.1.3 2024-10-23 16:16:07 -04:00
SDL Wiki Bot
370521363a Sync SDL3 wiki -> header
[ci skip]
2024-10-23 19:57:33 +00:00
Frank Praznik
924f719b97 wayland: Get the window content scale from the backend
The window content scale may change independently of the display it is on if scaling or accessibility features are involved, so query it directly from the backend instead of inferring it.
2024-10-23 15:49:26 -04:00
SDL Wiki Bot
299587fa64 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 19:31:40 +00:00
Petar Popovic
5e855d82e3 Manually bump versions of non-function identifiers introduced after 3.1.3 to 3.2.0 2024-10-23 11:17:46 -07:00
kyle-sylvestre
22bc430bbb Set error using function hresult 2024-10-23 10:53:46 -07:00
Sam Lantinga
6eca02a0e7 evdev: correctly handle composite devices
These can be both mouse and keyboard and should be initialized and exposed to the application as both.
2024-10-23 10:52:50 -07:00
Sam Lantinga
ba1412cb9f evdev: fixed devices not being removed on disconnect 2024-10-23 10:52:00 -07:00
Sam Lantinga
370c0426ce testspriteminimal: only quit when escape is pressed 2024-10-23 10:51:14 -07:00
SDL Wiki Bot
acfc223e15 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:37:46 +00:00
Evan Hemsley
423337796c GPU Vulkan: Use dedicated allocation for download buffers (#11298) 2024-10-23 09:37:06 -07:00
SDL Wiki Bot
24b376ef18 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:30:58 +00:00
Ryan C. Gordon
1c1706a00b fnsince: update \since policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
Michael Palomas
21c91d5535 examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value 2024-10-23 07:28:33 -07:00
SDL Wiki Bot
63ef5a2369 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:42:03 +00:00
Petar Popovic
fd530d029f Fixed typo in SDL_clipboard.h 2024-10-22 22:41:30 -07:00
SDL Wiki Bot
7b6416add0 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:41:03 +00:00
Petar Popovic
af1c165352 Set version of new identifiers after 3.1.3 release to 3.1.6 2024-10-22 22:40:07 -07:00
Sam Lantinga
45584ad73e Simplify get_channel_name() so it's easier for people to read and understand 2024-10-22 18:19:30 -07:00
Sam Lantinga
c134dd6e5e Fixed typo in the channel layout documentation 2024-10-22 17:46:57 -07:00
Ryan C. Gordon
4a8eadf167 include: Fixed typo in SDL_CopyFile's documentation.
Fixes https://github.com/libsdl-org/sdlwiki/issues/623
2024-10-22 20:12:04 -04:00
SDL Wiki Bot
d9e6fe0b7a Sync SDL3 wiki -> header
[ci skip]
2024-10-22 20:03:14 +00:00
Ryan C. Gordon
f5c27a3a2c render: Corrected docs for SDL_SetRenderVSync(). 2024-10-22 16:01:58 -04:00
Ivan Epifanov
1f8b9a320c VITA: fix SDL_ShowMessageBox by using different memory type 2024-10-22 12:19:33 -07:00
SDL Wiki Bot
a42c9ec5f7 Sync SDL3 wiki -> header
[ci skip]
2024-10-22 17:49:11 +00:00
Ryan C. Gordon
2318961b6f docs: Add \threadsafety to some low-hanging fruit across a few headers.
Reference Issue #7140.
2024-10-22 13:48:35 -04:00
Ryan C. Gordon
eed11ad6d6 docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r(). 2024-10-22 13:48:35 -04:00
Anonymous Maarten
0bec18245d android: fix android.content.Context:getCacheDir JNI prototype 2024-10-22 18:03:34 +02:00
Ryan C. Gordon
e9b5f6749e wikiheaders: add (disabled) code to check for missing \threadsafety tags.
Reference Issue #7140.
2024-10-22 10:48:19 -04:00
Ryan C. Gordon
19a1175c02 include: Updated docs on SDL_TouchFingerEvent.
Fixes #4159.
2024-10-22 10:41:31 -04:00
Ryan C. Gordon
e61f0678ee x11: Remove the "safety net" error handler.
This is an X11 error catcher that lived for the entire life of the program,
which causes problems in itself, but it also tries to make calls into Xlib,
which would cause further panics.

It's goal was to reset video modes if the app was going down, but it often
failed to do so, and caused potentially avoidable crashes instead.

Fixes #7975.
2024-10-22 10:41:30 -04:00
anton-kl
f9bffa31b6 docs: fix window flags in README-migration.md
Use correct SDL macro instead of invalid "flags" string.
Also add a comment about preferred approach.
2024-10-22 00:17:06 -07:00
Ryan C. Gordon
b0982e8982 docs: Updated README-emscripten.md.
This now mentions the main callbacks as a possible option, and removes the
part about prebuilt libraries. The latter can return when Emscripten packages
SDL3.

Fixes #11080.
2024-10-21 23:38:40 -04:00
Sam Lantinga
c56af0d975 Removed unused code 2024-10-21 17:26:14 -07:00
Sam Lantinga
35be8bb7f9 Fixed warning C4456: declaration of 'e' hides previous local declaration
This also fixes incorrect interpretation of OPENVR_SetupJoystckBasedOnLoadedActionManifest() return value.
2024-10-21 15:53:47 -07:00
Emmanuele Bassi
8119568805 x11: Remove text-scaling-factor setting checks
The text-scaling-factor setting is not useful, now that we watch the
Xft/DPI and Gdk/WindowScalingFactor XSETTINGS keys; on the contrary, it
is problematic in mixed environments with both the KDE and GNOME
portals, as they end up stepping on each other's toes, and we end up
with the wrong scaling factor value.

Fixes: https://github.com/libsdl-org/SDL/issues/11142
2024-10-21 15:26:22 -07:00
Sam Lantinga
1c51b8dc33 Only set the OpenGL flag if the OpenVR driver is active 2024-10-21 15:22:56 -07:00
Sam Lantinga
82b3325978 Fixed memory leaks if Windows initialization fails 2024-10-21 15:22:56 -07:00
Sam Lantinga
d199586683 Fixed memory leaks if OpenVR initialization fails 2024-10-21 15:22:56 -07:00
Sam Lantinga
7b492553c4 Allow the OpenVR driver to be enabled on Windows 2024-10-21 15:22:56 -07:00
Sam Lantinga
0aea14cf45 Added logging for additional events 2024-10-21 14:23:29 -07:00
Sam Lantinga
3d47877bb4 Added SDL_EVENT_RENDER_DEVICE_LOST
This is sent when the device is lost and can't be recovered.

Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
2024-10-21 13:28:40 -07:00
SDL Wiki Bot
54e52d055f Sync SDL3 wiki -> header
[ci skip]
2024-10-21 18:06:39 +00:00
Jordan Christiansen
9c848e08e4 docs: Explain events for already plugged in controllers (#11286) 2024-10-21 11:06:05 -07:00
Sam Lantinga
26567df878 Don't treat mouse buttons as focus clicks if the window has mouse capture
This fixes the following sequence:
* Press mouse button down
* Alt-tab away from the window
* Alt-tab back to the window
* Release mouse button

Fixes https://github.com/libsdl-org/SDL/issues/7747
2024-10-21 09:46:07 -07:00
Ryan C. Gordon
ef758d05c1 render: GetRenderViewportSize shouldn't use scale, just logical presentation.
Fixes #11076.
2024-10-21 11:17:16 -04:00
Sam Lantinga
92520c1d9b Improved D3D12 handling of unrecoverable device loss 2024-10-21 00:38:42 -07:00
Sam Lantinga
315842cf71 Fixed crashes handling D3D11/12 device lost in testsprite
You can test this using "dxcap -forcetdr"
2024-10-21 00:29:18 -07:00
Sam Lantinga
e2254b1045 Added color scale info for the GPU renderer TODO item 2024-10-20 18:38:02 -07:00
Petar Popovic
4b54e32231 Tweak android path functions comment tag \sa 2024-10-20 16:38:07 -07:00
mausimus
a6536a9298 RI_KEY_BREAK indicates key is up 2024-10-20 10:26:07 -07:00
Petar Popovic
679dd4b181 SDL_RequestAndroidPermission() comment: Add link to android permissions website 2024-10-20 10:13:03 -04:00
SDL Wiki Bot
eb1451536e Sync SDL3 wiki -> header
[ci skip]
2024-10-20 14:12:45 +00:00
Petar Popovic
5819d4b360 SDL_CreateRenderer() comment: Remove mention of flags 2024-10-20 10:12:14 -04:00
rhett-lee
e0321ca5b6 SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11 (Bug #11273) (#11274)
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11:

Create SDL window with SDL_WINDOW_TRANSPARENT flag;
Create "opengl" renderer for the window;
The window can't shown with errors:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 130 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Bug reason:
SDL_x11window.c:490 : bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)
SDL_x11window.c:566 : vinfo = X11_GL_GetVisual(_this, display, screen, transparent);[XVisualInfo *vinfo]
the X11_GL_GetVisual function returns a vinfo dose not support transparent.

Fix:
SDL_x11opengl.c:637 : XVisualInfo *X11_GL_GetVisual(SDL_VideoDevice *_this, Display *display, int screen, bool transparent)
X11_GL_GetVisual should returns a vinfo support transparent when transparent is true.
2024-10-19 20:21:50 -07:00
Sam Lantinga
dcbb2f11a8 Clamp the texture alpha and color modulation values to 0-255 2024-10-19 20:18:57 -07:00
Frank Praznik
541ba33714 Fix SDL_GetClosestFullscreenDisplayMode documentation
It returns false on failure, not NULL.
2024-10-19 16:01:08 -04:00
Cameron Cawley
40070d899d Refactor Blit_RGB555_ARGB1555 to be more generic 2024-10-19 11:11:22 -07:00
Ozkan Sezer
3d2c8c510d add GLES3 headers from Khronos for OpenVR video driver. 2024-10-19 10:23:55 -07:00
SDL Wiki Bot
2668558c5c Sync SDL3 wiki -> header
[ci skip]
2024-10-19 17:21:09 +00:00
Sam Lantinga
153f90a725 Revert "Use the correct return type for SDL_GetAndroidJNIEnv()"
This reverts commit 2d3fa03d53.

Different JDK implementations define JNIEnv differently for C++, so we can't provide the definition here.

Fixes:
/usr/lib/jvm/temurin-11-jdk-amd64/include/jni.h:195:17: error: conflicting declaration ‘typedef struct JNIEnv_ JNIEnv’
/home/runner/work/sdlwiki/sdlwiki/.github/../external/SDL3/include/SDL3/SDL_system.h:266:24: note: previous declaration as ‘typedef struct _JNIEnv JNIEnv’
2024-10-19 10:20:50 -07:00
Sam Lantinga
ffb1d9e4b4 Removed Blit2101010toN and BlitNto2101010
10-bit RGB formats are typically used with the PQ colorspace, which is handled by SDL_Blit_Slow.

Fixes https://github.com/libsdl-org/SDL/issues/11271
2024-10-19 10:07:53 -07:00
华仔
5c1ccaefae Fixed VULKAN_UpdateViewport judgment. 2024-10-19 09:51:12 -07:00
Frank Praznik
4c2d0c422b wayland: Remove kde_output_order_v1 support
This protocol is unstable and not intended for clients, and SDL now sorts the display list into a stable order and selects a primary display suitable for games on its own, so it isn't necessary.

Reverts e71e16950a
2024-10-19 11:16:30 -04:00
SDL Wiki Bot
5f874b60a8 Sync SDL3 wiki -> header
[ci skip]
2024-10-19 14:49:21 +00:00
Anonymous Maarten
1647d36aec docs: document copying shared SDL3 a bit more + document sanitizer/libc incompatibility 2024-10-19 14:48:51 +00:00
Ryan C. Gordon
b6a6a4a7f8 audio: fix incorrect dynCall in Emscripten audio.
This only seemed to cause problems with `-s ASYNCIFY` on the build command
line, but it was incorrect in general.

Fixes #11258.
2024-10-18 23:53:40 -04:00
Sam Lantinga
07bb8f1c4c openvr: added APIENTRY for OpenGL functions (thanks @cnlohr!) 2024-10-18 16:40:36 -07:00
Sam Lantinga
b40ad5428b Fixed assertion at quit when the debug text was the last texture used. 2024-10-18 14:51:40 -07:00
Maia
a48fa675be Fix formatting 2024-10-18 13:45:04 -07:00
Sam Lantinga
1d23d2c3c2 Renamed SDL_SANDBOX_UNKNOWN to SDL_SANDBOX_UNKNOWN_CONTAINER 2024-10-18 12:45:07 -07:00
Frank Praznik
a7da3ad59b x11: Support sorting displays via the priority hint
Store the connector name for displays and use it for sorting them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Frank Praznik
0faf9dc4a4 kmsdrm: Support sorting displays via the priority hint
Use the connector name for displays and sort them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Ozkan Sezer
a6e5ab437f video/openvr: Avoid type redefinition errors.
Also, let SDL handle stdint.h and stdbool.h.
2024-10-18 19:21:32 +03:00
SDL Wiki Bot
2654d5d48b Sync SDL3 wiki -> header
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga
e81e917c5e Added an OpenVR video driver (thanks @cnlohr!) 2024-10-17 19:38:04 -07:00
Ozkan Sezer
569691797d windows/SDL_systhread.c: fix permissions 2024-10-18 05:00:04 +03:00
Sasha Szpakowski
186c6e5c9d windows: fix race condition with exception-based thread naming. 2024-10-17 18:42:01 -07:00
Sam Lantinga
faa404a652 If we get a newline character, treat it as SDLK_RETURN
Fixes https://github.com/libsdl-org/SDL/issues/10679
2024-10-17 18:18:38 -07:00
Sam Lantinga
a432abf4cc Make sure that we quit if we get a terminating event
This covers the case where the application didn't handle the quit or terminating event, we still need the main loop to finish.
2024-10-17 17:19:49 -07:00
Sam Lantinga
c5e1ae4580 Only free debug_char_texture_atlas if it has been allocated
Fixes https://github.com/libsdl-org/SDL/issues/11254
2024-10-17 17:19:49 -07:00
Sam Lantinga
00f4cb308b Fixed crash if the Vulkan renderer changes swapchain image count 2024-10-17 17:19:49 -07:00
Sam Lantinga
41366f73b2 Don't block in Android USB device open
We might be waiting a long time for a permissions dialog, so let that complete asynchronously. While that's happening, we'll remove the device from the device list so that when we get permission the application sees the device as newly available and can open it again.

Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
60c3eaf5ee Use SDL_GetAndroidJNIEnv() in hid.cpp 2024-10-17 12:02:24 -07:00
Sam Lantinga
2d3fa03d53 Use the correct return type for SDL_GetAndroidJNIEnv()
This prevents application code from having to cast to JNIEnv everywhere.
2024-10-17 12:02:24 -07:00
Sam Lantinga
3d852da806 Requesting Bluetooth permission on Android is now asynchronous
This fixes an ANR at startup if gamepad input comes in while prompting for Bluetooth permissions.

Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
be3d961b47 Treat clicking the right pad as a thumbstick click on a Steam Controller 2024-10-17 12:02:24 -07:00
Ivan Epifanov
6da4d94abf VITA: implement camera subsystem 2024-10-17 10:24:17 -07:00
Ivan Epifanov
f79f21217b VITA: fix yuv texture update 2024-10-17 07:53:26 -07:00
Ozkan Sezer
4612db21a3 SDL_utils.c: restrict gethostname() usage to non-windows
Reference issue: https://github.com/libsdl-org/SDL/issues/11228.
2024-10-17 12:47:02 +03:00
Daniel Ludwig
9a5420118a Define SDL_DIALOG_DUMMY in SDL_build_config_xbox.h 2024-10-17 12:45:37 +03:00
Sam Lantinga
dd955332a2 Removed SDL_build_config_emscripten.h
The Emscripten build uses cmake, so we don't need the standalone config header.

Fixes https://github.com/libsdl-org/SDL/issues/11236
2024-10-16 18:16:46 -07:00
Anonymous Maarten
5492be23a1 ci: test Apple x64 on macos-13 runner
GitHub will remove macos-12 by December 3rd, 2024.
2024-10-17 02:28:20 +02:00
SDL Wiki Bot
c48fbbb067 Sync SDL3 wiki -> header
[ci skip]
2024-10-16 23:48:38 +00:00
Sam Lantinga
c41b2bb855 SDL_ShouldIgnoreGamepad() should take product IDs rather than a guid.
This lets us early out when scanning for new hardware more quickly.
2024-10-16 16:47:29 -07:00
Sam Lantinga
8a30def5f2 Only use Steam Virtual Gamepads if we're running under Steam
Fixes https://github.com/libsdl-org/SDL/issues/11214
Fixes https://github.com/libsdl-org/SDL/issues/11215
2024-10-16 16:47:29 -07:00
Sam Lantinga
28504f5791 Steam virtual gamepad info isn't available in the macOS sandbox 2024-10-16 16:47:29 -07:00
Sam Lantinga
d6981da5a4 Added SDL_GetSandbox()
This adds support for detecting whether you're running in a sandbox on macOS
2024-10-16 16:47:29 -07:00
Sam Lantinga
d7b1ba1bfc Added support for the Steam Virtual Gamepad on macOS Sequoia 2024-10-16 16:47:29 -07:00
Ozkan Sezer
3ebfdb04be SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
Because strdup is not ANSI but POSIX, and its prototype might be hidden..

... and re-enable clang-tidy in CI for LoongArch64.

Fixes:  https://github.com/libsdl-org/SDL/issues/11219.
2024-10-16 21:50:40 +03:00
Maia
d9df87f19f Fix syntax of trailing doc comments 2024-10-16 11:28:00 -07:00
Sam Lantinga
9cf388f260 Re-added HAVE_FDATASYNC and HAVE_GETHOSTNAME for platforms that have them. 2024-10-16 11:25:57 -07:00
Petar Popovic
6897385623 Add void to run_colorspace_test() function prototype 2024-10-16 11:16:42 -07:00
Anonymous Maarten
69433ee075 doc: explain build-scripts/create-release.py in the release checklist 2024-10-16 18:43:15 +02:00
Ozkan Sezer
18410c03ea cmake: fix checks for fdatasync() and gethostname() 2024-10-16 19:40:51 +03:00
Sam Lantinga
a027ec59ca Make the name of the Steam Deck Controller consistent.
It will be named "Steam Deck Controller" regardless of whether you're running under Steam.
2024-10-16 08:23:29 -07:00
Sylvain
09e3af58b5 Fixed bug #10954: software renderer: examples/renderer/10-geometry missing a triangle
typo when changing return code from int to bool
2024-10-16 16:48:05 +02:00
Ivan Epifanov
860e38a3a2 VITA: fix shader color format 2024-10-16 07:43:14 -07:00
Sam Lantinga
ed1ec236c1 Removed fdatasync and gethostname definitions from platforms that don't have them
As verified by CMake builds in CI
2024-10-16 07:39:30 -07:00
Sam Lantinga
cbbad4051b Treat a button press location as an implicit mouse move
This fixes having the incorrect location for mouse button presses on Steam Deck under gamescope. This works around a bug where the mouse motion appears to come at the next button press, and comes from the xwayland-pointer device instead of the xwayland-relative-pointer device which is delivering mouse button events.
2024-10-15 22:30:38 -07:00
Kyle Sylvestre
e5fa929245 Report win32 last error string windows_file_open (#11224) 2024-10-15 19:47:06 -07:00
SDL Wiki Bot
b4554a8a75 Sync SDL3 wiki -> header
[ci skip]
2024-10-15 22:37:00 +00:00
Sam Lantinga
97f1da73da Rename GPU properties for consistency 2024-10-15 15:36:26 -07:00
Caleb Cornett
9af5ffcfbe Improve support for private platforms (#11220) 2024-10-15 18:02:07 -04:00
Frank Praznik
66d09a1cda wayland: Adjust primary display selection priority
Portrait displays are typically used as secondaries and almost certainly not what a user wants a game or movie initially becoming full screen on if a landscape display is available. Increase the priority of selecting a landscape display over a portrait display.
2024-10-15 15:59:31 -04:00
Ozkan Sezer
638b50b69b CI, LoongArch64: disable clang-tidy
Reference issue: https://github.com/libsdl-org/SDL/issues/11219 .
2024-10-15 21:05:20 +03:00
SDL Wiki Bot
dede2ab86f Sync SDL3 wiki -> header
[ci skip]
2024-10-15 17:53:13 +00:00
Frank Praznik
553fc5fe0e wayland: Expose displays in a deterministic order, and attempt to better handle selecting a primary display.
Wayland can expose displays in any arbitrary order, and doesn't have the native concept of a primary display. However, there are games that presume that the first listed display is the primary, which can lead to problems if that output isn't necessarily the ideal one, as they may use that display to build a resolution list or as the default fullscreen output. This sorts displays by position, then attempts to find the primary display, first by querying the explicit ordering hint, then the GNOME DBus property, then tries to determine the 'best' display according to the criteria that is generally ideal for games and media playback.

The makes the list of displays deterministic, as long as the desktop configuration remains static, with a reasonably appropriate one prioritized as primary, even if there is no explicit way to retrieve the primary display. In the case where a user has a particularly esoteric physical display configuration, the new hint enables explicitly overriding the sorting and selection logic, allowing the entire display order to be customized, if necessary.
2024-10-15 13:52:35 -04:00
Anonymous Maarten
075ae7db7d ci: update LoongArch toolchain to 2023.08.08 2024-10-15 19:10:39 +02:00
Anonymous Maarten
4162bddca7 cmake: fix configuration with -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON 2024-10-15 19:09:54 +02:00
Caleb Cornett
cdaaabb978 GPU: Fix Metal sampler address mode order 2024-10-15 10:46:04 -04:00
Ivan Epifanov
104dabb9de PSVITA: enable posix fsops 2024-10-15 09:04:07 -04:00
Sam Lantinga
afee27a530 Make sure stdio handles are in blocking mode
Standard I/O doesn't work well with non-blocking handles, so make sure any pipes are in blocking mode before launching child processes.

Fixes https://github.com/libsdl-org/SDL/issues/10998
2024-10-14 22:10:49 -07:00
Sam Lantinga
bb764e3106 Added support for full range BT.709 YUV conversion
Also added simple colorspace testing to testyuv.
2024-10-14 20:36:46 -07:00
SDL Wiki Bot
ce49465b13 Sync SDL3 wiki -> header
[ci skip]
2024-10-15 03:30:54 +00:00
Sam Lantinga
72bae5167e Updated documentation
Fixes https://github.com/libsdl-org/sdlwiki/issues/616
2024-10-14 20:30:22 -07:00
Ryan C. Gordon
e254c99b38 examples/game/01-snake: Update game logic in AppIterate, don't use a timer.
Reference Issue #11210.
2024-10-14 23:17:23 -04:00
Zack Middleton
edb28e79b5 Make SDL_LoadBMP() use true instead of 1 2024-10-14 20:07:03 -07:00
Zack Middleton
f212cb5f92 Don't overwrite the SDL_IOFromConstMem() error in testshape 2024-10-14 20:07:03 -07:00
Zack Middleton
51dc978785 Don't overwrite the SDL_IOFromFile() error in SDL_LoadFile() 2024-10-14 20:07:03 -07:00
Zack Middleton
fb43dc3097 Set error for NULL SDL_IOStream in SDL_LoadWAV_IO() 2024-10-14 20:07:03 -07:00
cosmonaut
00bb81de76 GPU: Allow size queries on depth formats 2024-10-14 14:28:21 -07:00
Anonymous Maarten
817fa9a975 releases: don't add static library to MinGW binary release 2024-10-14 21:30:48 +02:00
Anonymous Maarten
45dfdfbb7b Add parametrized build script
[ci skip]
2024-10-14 21:30:48 +02:00
cosmonaut
57f2577c65 GPU Vulkan: Fix depth-only framebuffer leak 2024-10-14 10:19:07 -07:00
Sam Lantinga
46835650db Added config.xcconfig to the Xcode build 2024-10-14 09:25:23 -07:00
Ozkan Sezer
9fac4b9f5f SDL_windowsmodes.c: Fix MSVC builds against SDKs older than 10.0.17134.0
workaround the missing DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL enum value
and DISPLAYCONFIG_SDR_WHITE_LEVEL struct.

Fixes: https://github.com/libsdl-org/SDL/issues/11193
Closes:  https://github.com/libsdl-org/SDL/pull/11205
2024-10-14 09:04:25 -07:00
SDL Wiki Bot
b865708039 Sync SDL3 wiki -> header
[ci skip]
2024-10-14 16:02:54 +00:00
Sam Lantinga
0b6ad8bf62 Improved the documentation for SDL_SetWindowShape()
Fixes https://github.com/libsdl-org/SDL/issues/11199
2024-10-14 09:02:04 -07:00
Sam Lantinga
f9d490045b Fixed uikit crash when GLES is disabled
Fixes https://github.com/libsdl-org/SDL/issues/11208
2024-10-14 08:58:02 -07:00
SDL Wiki Bot
3733b1d5d8 Sync SDL3 wiki -> header
[ci skip]
2024-10-14 06:46:10 +00:00
Ryan C. Gordon
c20918b0fb render: Add SDL_RenderDebugText().
Fixes #11201.
2024-10-14 02:45:33 -04:00
Ryan C. Gordon
44bc19b592 test: remove testaudio-art.txt (this info is in test/LICENSE.txt now). 2024-10-14 01:52:18 -04:00
Sam Lantinga
1cc85c912b Check return value of SDL_small_alloc()
Fixes https://github.com/libsdl-org/SDL/issues/8959
2024-10-13 14:07:26 -07:00
Sam Lantinga
d7be7fc168 Fixed Cohen-Sutherland out code computation for float line intersection
Fixes https://github.com/libsdl-org/SDL/issues/10866
2024-10-13 13:04:59 -07:00
SDL Wiki Bot
db78c0f563 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 19:15:18 +00:00
Sam Lantinga
a8ca024495 Added SDL_GetDefaultLogOutputFunction()
Fixes https://github.com/libsdl-org/SDL/issues/10603
Closes https://github.com/libsdl-org/SDL/pull/11106
2024-10-13 12:14:46 -07:00
Sam Lantinga
b766c824bd Don't overwrite the SDL_IOFromFile() error in SDL_LoadBMP()
Fixes https://github.com/libsdl-org/SDL/issues/11188
2024-10-13 09:37:44 -07:00
SDL Wiki Bot
aed1f76248 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 16:27:10 +00:00
Sam Lantinga
a567786762 Added SDL_SetErrorV() 2024-10-13 09:26:25 -07:00
Sam Lantinga
d5e02474ac Fixed SDL_oldnames.h to use the correct new names 2024-10-13 09:06:46 -07:00
capehill
1a1e2e9892 Set size parameter in SDL_GetClipboardData()
Update size value in case where platform uses GetClipboardText().
This should fix clipboard_testClipboardDataFunctions on those platforms.
2024-10-13 08:59:50 -07:00
Evan Hemsley
82598e5ca9 GPU Vulkan: Fix frame counter timing (#11189) 2024-10-12 22:02:22 -07:00
Anonymous Maarten
b641c2a0db Refactor gendynapi.py with the final goal to make it re-usable 2024-10-13 02:52:56 +02:00
Anonymous Maarten
173c168ff4 Default functions are already declared by the first SDL_dynapi_procs.h include 2024-10-13 02:52:56 +02:00
SDL Wiki Bot
fd9f2ae5b5 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 00:14:05 +00:00
Maia
01c9c1d0eb Document main callbacks API thread safety 2024-10-12 20:13:30 -04:00
Cameron Cawley
fd9e57b71e 3DS: Support simple message boxes 2024-10-12 16:07:52 -07:00
Cameron Cawley
2bef8852fb testdrawchessboard: Allow using the standard render API 2024-10-12 16:07:16 -07:00
Rusty Moyher
7556c44796 SDL3: Fixed Cocoa_GL_CreateContext() not returning a context on success (#11181) 2024-10-12 14:01:21 -07:00
Cameron Cawley
94c8c170eb 3DS: Only bundle resources with tests that need them 2024-10-12 13:59:00 -07:00
Cameron Cawley
fec006a4f9 Allow for more fine tuning of Duff's device routines 2024-10-12 11:16:46 -07:00
Cameron Cawley
aebb64efa1 Remove leftover ARM SIMD code 2024-10-12 11:13:37 -07:00
Daniel Gibson
9a81892447 Old env vars as fallback for SDL_VIDEO_DRIVER + SDL_AUDIO_DRIVER #11115
especially SDL_VIDEODRIVER is commonly used to use the native Wayland
backend, so I think it's a good idea to keep supporting the old name
instead of forcing users to find out that they now have to add an
underscore..
Not sure how popular SDL_AUDIODRIVER is, but with all the audio backends
that exist on Linux alone I'm sure some people use it to work around
sound issues.

Note: Doing this in the SDL_hints implementation instead of the
call-sites of SDL_GetHint(SDL_HINT_VIDEO_DRIVER) etc ensures that
1. Hint priorities work (env var overriding hint set by application with normal
   priority, but not when application used SDL_HINT_OVERRIDE)
2. SDL_ResetHint() (called by user code) respects the fallback
   environment variable
2024-10-12 08:47:02 -07:00
Cameron Cawley
3e57d996fe Reduce the size of the SDL_blit_0 alpha code 2024-10-12 08:29:11 -07:00
Semphris
05c53b5ab0 Add macro guards for OpenGL <=1.3 function prototypes
- `#define SDL_OPENGL_1_NO_PROTOTYPES` to hide function prototypes
- `#define SDL_OPENGL_1_FUNCTION_TYPEDEFS` to add PFNGL*PROC function types
2024-10-12 11:21:07 -04:00
SDL Wiki Bot
365dba6de8 Sync SDL3 wiki -> header
[ci skip]
2024-10-12 15:08:54 +00:00
Zack Middleton
4898cbb6cf SDL_migration.cocci: Fix renaming SDL_bool 2024-10-12 00:47:04 -07:00
rhett-lee
22566506d0 SDL3: opengles2 render not support window with transparent flag on Linux/X11 (#11167) 2024-10-11 21:59:56 -07:00
Sam Lantinga
c6c195ff88 Always use WaitForSingleObjectEx() as a fallback in SDL_SYS_DelayNS()
That logic isn't specific to the Visual Studio build environment. Also switched it to use CreateEvent(), which works back to Windows XP.
2024-10-11 21:18:31 -07:00
Sam Lantinga
c5904d8710 Improved implementation of SDL_DelayPrecise() (thanks @nightmareci!)
Fixes https://github.com/libsdl-org/SDL/issues/10592
2024-10-11 21:18:31 -07:00
Sam Lantinga
25251a9405 Fixed warning C4723: potential divide by 0 2024-10-11 19:31:22 -07:00
Daniel Gibson
33366b0a4e Fix SDL_MAIN_USE_CALLBACKS with Android, introduce SDL_MAIN_EXPORTED
My simplification of the conditions for including SDL_main_impl.h
had one problem: I forgot that SDL_main_impl.h must be included
even on Android when SDL_MAIN_USE_CALLBACKS is used, because then a
SDL_main() function that makes sure the callbacks get called is needed,
and that function is implemented in SDL_main_impl.h

But OTOH, even when SDL_MAIN_USE_CALLBACKS is used, SDL_main_impl.h
should not implement a standard `int main(...)` function on Android
(because there the SDL-using native code is compiled as a library and
 the entry point is in SDLActivity.java, which calls SDL_main()
 in said library).

So the check for platforms that don't have *any* native main function
but just SDL_main() called from the outside should be handled in
SDL_main_impl.h, so both the normal and the callback case can avoid
generating a standard main() in the same way.
To do this, SDL_MAIN_EXPORTED is defined for platforms like Android,
where the real entry point (main() function) is outside of the code
that uses SDL, so
- SDL_main() must be visibly exported with SDL_DECLSPEC, so the outside
  code can call it
- SDL_main_impl.h must not implement a "real" main() function

Another small change based on this is defining SDLMAIN_DECLSPEC
at a more general place.

If another platform like Android (where the entry point is somewhere
else entirely, possibly implemented in a different programming language)
turns up, defining SDL_MAIN_NEEDED (so the users main() is renamed
to SDL_main()) and SDL_MAIN_EXPORTED should be all that's needed on the
SDL_main.h side - and if not then at least the implementation is
cleaner and clearer now, IMHO.

fixes #11162
2024-10-11 18:54:29 -07:00
Andrei Rafael Brongel
86ef790a23 explicit cast to int in SDL_bits 2024-10-11 18:52:06 -07:00
Sam Lantinga
3cd7e22e8b Fixed converting full range YUV to RGB
Updated from https://kdashg.github.io/misc/colors/from-coeffs.html

I'm not sure where the other formulas came from, but they weren't mathematically correct and resulted in slightly incorrect colors.
2024-10-11 18:12:05 -07:00
Petar Popovic
3086b25c4e Set hint SDL_HINT_MAC_SCROLL_MOMENTUM version to SDL 3.1.4. 2024-10-11 17:33:52 -07:00
SDL Wiki Bot
b676413657 Sync SDL3 wiki -> header
[ci skip]
2024-10-11 20:51:42 +00:00
expikr
48ff3efdb9 Clarify README-highdpi.md (#10083) 2024-10-11 13:50:37 -07:00
SDL Wiki Bot
e31c68427a Sync SDL3 wiki -> header
[ci skip]
2024-10-10 23:35:37 +00:00
Evan Hemsley
6ea4a66451 GPU: Add SDL_CalculateGPUTextureFormatSize (#11146)
---------

Co-authored-by: Sam Lantinga <slouken@libsdl.org>
2024-10-10 16:34:38 -07:00
Petar Popovic
6d85127560 Rename hint string literal SDL_HINT_MAC_SCROLL_MOMENTUM 2024-10-10 16:16:36 -07:00
Caleb Cornett
3db10a6b2c GPU: ASTC block size fixes (#11157) 2024-10-10 15:40:21 -07:00
Ryan C. Gordon
90a3a2359b thread: Rewrote generic Condition Variables.
This replaces the internal mutex with a semaphore, so we're only using a
single synchronization primitive to implement this, and cleans up some logic
around wait timeouts.

This now matches the logic of the originally cited work, from BeOS.

Fixes #3639.

(I think.)
2024-10-10 15:03:53 -04:00
Ozkan Sezer
41dfe2c246 test/testautomation_stdlib.c: fix gcc warning on 32 bit
test/testautomation_stdlib.c:361: warning: integer constant is too large for 'long' type
2024-10-10 21:10:24 +03:00
Sam Lantinga
73b995fbad Don't assume OpenGL on Android
This prevents Vulkan from initializing by default.

Fixes https://github.com/libsdl-org/SDL/issues/10279
2024-10-10 10:53:31 -07:00
SDL Wiki Bot
8aaaeb7560 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 17:02:43 +00:00
SDL Wiki Bot
2a9cb68b91 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 16:43:29 +00:00
Ryan C. Gordon
0babb284dd fnsince.pl: Make fixes now that we've reached ABI lock.
Turns out history is messy, thank god for Perl.  :)

Fixes #11156.
2024-10-10 12:41:46 -04:00
Frank Praznik
40ff6a2785 test: Fix mouse focus test on X11
X11 seems to need a slight delay before warping the pointer to ensure that the window is actually fully visible on the desktop, or the pointer enter event may not be sent.

This also disables the warp focus test on XWayland, as warping the mouse cursor when outside the window on any Wayland desktop usually just doesn't work.
2024-10-10 11:37:45 -04:00
SDL Wiki Bot
e4b1a9f382 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:24:38 +00:00
Ozkan Sezer
7ff819141d libm/e_exp.c: fix gcc warning on 32 bit:
src/libm/e_exp.c:105: warning: integer constant is too large for 'long' type
2024-10-10 18:23:20 +03:00
SDL Wiki Bot
ac6b9e2d19 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:06:56 +00:00
Sam Lantinga
8262072d91 Fixed possible memset(NULL) call in testautomation's SDL_aligned_alloc() check
Fixes https://github.com/libsdl-org/SDL/issues/11144
2024-10-10 08:06:18 -07:00
Sam Lantinga
4b7c5f561b Fixed warning: ‘new_item.probe_len’ may be used uninitialized in this function 2024-10-10 08:06:18 -07:00
Sam Lantinga
c8f5f6d47a Added SDL_DelayPrecise()
SDL_DelayNS() now passes through to the high precision OS delay function, and SDL_DelayPrecise() tries to busy wait to get as close as possible to the desired wait time.

Fixes https://github.com/libsdl-org/SDL/issues/11141
2024-10-10 08:06:18 -07:00
Sam Lantinga
28a70a5b71 Use the correct version for the \since field 2024-10-10 08:06:18 -07:00
Anthony
bf351b0b0e Add more configChanges to Android Manifest (#11145)
The addition of layoutDirection is required to prevent the forced restart due to a locale change. Also adding grammaticalGender, fontWeightAdjustment & fontScale for good measure.
2024-10-10 07:53:34 -07:00
David Gow
9c322386bf gpu: vulkan: Fix an uninitialised structure in SDL_BlitGPUTexture()
The SDL_GPUColorTargetInfo structure needs to be zeroed, as otherwise we
can end up trying to create a resolve_texture which doesn't exist,
causing a rather difficult-to-debug segfault when calling
SDL_BlitGPUTexture() with a load op of SDL_GPU_LOADOP_CLEAR.
2024-10-10 07:16:02 -07:00
Evan Hemsley
da5a1585cd GPU: Avoid calling SDL_GetWindowSizeInPixels when possible (#11139) 2024-10-09 18:59:07 -07:00
SDL Wiki Bot
4707bb730e Sync SDL3 wiki -> header
[ci skip]
2024-10-10 00:32:39 +00:00
Sam Lantinga
9023a199dd Fixed crash in RLE colorkey blitting
Fixes Maelstrom running over sdl2-compat with SDL3
2024-10-09 12:11:21 -07:00
Sam Lantinga
f946f87f30 Don't rely on event.buttonMask being set in touchesEnded
Fixes https://github.com/libsdl-org/SDL/issues/11131
2024-10-09 11:35:39 -07:00
Sam Lantinga
ee9b6204cf Updated to version 3.1.5 for development
We should bump the version immediately before and after release so the release version corresponds to a fixed snapshot of code.
2024-10-09 11:02:01 -07:00
SDL Wiki Bot
02f3a96476 Sync SDL3 wiki -> header
[ci skip]
2024-10-09 16:49:57 +00:00
Sam Lantinga
f8eac30276 Added SDL_StepBackUTF8() 2024-10-09 09:49:10 -07:00
Sam Lantinga
1f08a03794 Switched drag-n-drop logging to trace level
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-09 07:35:21 -07:00
Daniel Ludwig
5b6342a00d Default SDL_HINT_JOYSTICK_GAMEINPUT to "1" on GDK platforms 2024-10-09 07:30:13 -07:00
Daniel Ludwig
ed87e7e434 test: enable GameInput driver on GDK platforms
By default, it's the only driver available on Xbox, but disabled.
2024-10-09 07:30:13 -07:00
Daniel Ludwig
acb18e05b5 GPU: fix swapchain buffer size not set on Xbox 2024-10-09 07:30:13 -07:00
Sam Lantinga
ff834f7733 Removed the restrict keyword
It doesn't compile with older Visual Studio and I verified on godbolt.org that the way it was used here doesn't impact code generation at all.
2024-10-08 20:48:13 -07:00
Delta
8e6ead2f7b [GPU] Added ASTC texture format support (#11116) 2024-10-08 18:45:04 -04:00
Ryan C. Gordon
02434cd293 emscripten: Fixes for data addresses above 2gb
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.

Fixes: #9052

(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Sam Lantinga
c34790f9f1 Fixed spacing 2024-10-08 11:49:08 -07:00
Daniel Gibson
312ecc4a52 SDL_main.h: Remove dead code for hypothetical C++ platforms
If WinRT returns after all, or a similarly bad platforms turns up,
the code can still be found in the git history.
But keep in mind that it then will have to be added *before* the
 #if ( defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) ...
case for platforms that support plain C to work correctly
2024-10-08 11:47:33 -07:00
Daniel Gibson
823b218051 Simplify code to include SDL_main_impl.h in SDL_main.h
Basically all platforms where SDL_main.h renames main() to SDL_main()
use the platform-specific main() (or WinMain() or whatever)
implementations in SDL_main_impl.h - and that renaming is enabled with:
  #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) \
      || defined(SDL_MAIN_USE_CALLBACKS)
    #define main SDL_main
  #endif

The only exception is Android, where main() *is* renamed, but
SDL_main_impl.h isn't used, because SDL_main() is called from Java.

So I think it's cleaner and less error-prone (for adding additional
platforms that need SDL_main() in the future), to use the same check
for including SDL_main_impl.h as is used for `#define main SDL_main`
and only list the exceptions (currently Android) there explicitly.

If new platforms like Android turn up, they can easily be added there
by inserting "|| defined(SDL_PLATFORM_WEIRDPLATFORM)" right next
to the Android check.

See also https://github.com/libsdl-org/SDL/issues/11068#issuecomment-2399907535
2024-10-08 11:47:33 -07:00
Ryan C. Gordon
cba77834f2 init: Log '<unspecified>' not '(null)' if the app name isn't set.
Reference PR #11103.
2024-10-08 14:30:55 -04:00
Simon McVittie
fb8244d6d9 init: Also log the SDL revision here
This includes the version number, unless the developer is doing
something strange with git tags.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-08 14:29:02 -04:00
Simon McVittie
c24f7d2453 Log app ID as SYSTEM/INFO during initialization
This is not shown by default, but will be shown when using
SDL_LOGGING=system=info or higher, where it will hopefully nudge app
authors towards initializing this information.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-08 14:29:02 -04:00
Sam Lantinga
e7ee92e822 Switched drag-n-drop logging to trace level
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-08 10:56:27 -07:00
SDL Wiki Bot
d9f8474dd7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 17:38:17 +00:00
SDL Wiki Bot
95aaaa3232 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 17:06:41 +00:00
Frank Praznik
158ba93d61 Update some window function documentation
Updates some documentation to correspond with changes made since it was originally written, clarifies some function behavior, and includes some assorted typo fixes.
2024-10-08 13:05:20 -04:00
Sam Lantinga
300daf308a Replace SDL_TRUE/FALSE with true/false in the coccinelle script 2024-10-08 09:55:50 -07:00
Anonymous Maarten
95ab38ba15 ci: actions/cache might return a boolean as string
https://github.com/actions/cache/issues/1466
2024-10-08 18:53:29 +02:00
SDL Wiki Bot
7acfdfd3e7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 16:50:41 +00:00
SDL Wiki Bot
326ab439d7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 15:09:24 +00:00
Sam Lantinga
fb07ab91c6 Improved SDL_main documentation and remove extern "C" comment.
It turns out that this is incorrect and any C linkage is already taken care of by SDL when redefining SDL_main.

Fixes https://github.com/libsdl-org/SDL/issues/11068
2024-10-08 08:07:54 -07:00
SDL Wiki Bot
03fa9ff0b0 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 13:59:10 +00:00
Sam Lantinga
2000ccb541 Allow linear interpolation of the font textures
With the recent changes to logical presentation, this is necessary for the font to look good when scaled.

Fixes https://github.com/libsdl-org/SDL/issues/11123
2024-10-07 21:43:57 -07:00
Sam Lantinga
f6fa617139 Define SDL_DIALOG_DUMMY in SDL_build_config.h as needed 2024-10-07 19:52:50 -07:00
Sam Lantinga
4627283eca Allow building both Cocoa and dummy dialog implementations
This allows us to remove platformFilters from the Xcode project, which is not supported in Xcode 12.
2024-10-07 18:01:39 -07:00
Sam Lantinga
c8526532de Changed objectVersion to 54 so Xcode 12 can load the projects (thanks @Wohlstand!) 2024-10-07 18:01:39 -07:00
Frank Praznik
2fd12b2e8a keyboard: Note that enabling text input can also enable an IME
An active IME can potentially eat key events, particularly dead keys and parts of a compose sequence, so note this behavior in the documentation.
2024-10-07 19:21:34 -04:00
Sam Lantinga
81b48de3f5 Fixed VID/PID list parsing of SDL_HINT_GAMECONTROLLER_SENSOR_FUSION
Fixes https://github.com/libsdl-org/SDL/issues/11118
2024-10-07 16:14:57 -07:00
Sam Lantinga
5db64300b8 Fixed SDL_GetStringInteger() for values starting with '0' and '1' (thanks @DanielGibson!) 2024-10-07 15:53:38 -07:00
Sam Lantinga
7da728a642 Added support for wired XBox controllers on macOS 15.0 Sequoia
Fixes https://github.com/libsdl-org/SDL/issues/11002
2024-10-07 15:44:42 -07:00
Ryan C. Gordon
659f2f4b04 examples: add basic app metadata to all existing examples. 2024-10-07 17:41:15 -04:00
Ryan C. Gordon
aa534c3ac3 core: Fixed incorrect comment in core/windows/SDL_windows.h. 2024-10-07 16:55:30 -04:00
Simon McVittie
ee7f61fd9a snake: Add extended app metadata
All of these are optional, but nice-to-have, and we have reasonable
values available for all of them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-07 16:47:36 -04:00
Simon McVittie
ca82405d5a snake: Add basic app metadata
All SDL3 applications and games should ideally have this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-07 16:47:36 -04:00
rabbit-ecl
6ae5666acf Check for VK_SUBOPTIMAL_KHR also in vkQueuePresentKHR (#11113)
This is already handled for vkAcquireNextImageKHR.
2024-10-07 13:01:10 -07:00
Sam Lantinga
06bd214af6 Fixed warnings building on Android 2024-10-07 11:11:27 -07:00
Green Sky
596fcfa6c4 fix microphone permission and feature flags being spread out 2024-10-07 10:10:18 -07:00
Naman Dixit
54e622c2e6 Use the printf vararg verification macros when compiling with clang 2024-10-06 22:19:52 -07:00
Ryan C. Gordon
fca05fa754 examples: Use SDL_Log() instead of message boxes for errors.
Fixes #11094.
2024-10-06 22:38:04 -04:00
Ryan C. Gordon
9f170286ba test: Replace README with LICENSE.txt
Fixes #11097.
2024-10-06 19:05:18 -04:00
SDL Wiki Bot
d0ef58b442 Sync SDL3 wiki -> header
[ci skip]
2024-10-06 23:03:29 +00:00
SDL Wiki Bot
cbb9a16367 Sync SDL3 wiki -> header
'[ci skip]'
2024-10-06 22:58:06 +00:00
Sam Lantinga
65539bc4f7 Make sure trackpad state is updated when button presses are delivered
Fixes https://github.com/libsdl-org/SDL/issues/11085
2024-10-06 14:28:06 -07:00
Sam Lantinga
03b259893a Fixed return value of SDL_AddGamepadMapping()
Fixes https://github.com/libsdl-org/SDL/issues/11095
2024-10-06 14:20:30 -07:00
Jan Sedivy
bf54eddba9 macOS: Clarify when macOS hints need to be set 2024-10-06 12:36:42 -07:00
Jan Sedivy
c2b98e21ba macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values 2024-10-06 12:36:42 -07:00
Frank Praznik
2fa8acb084 x11: Refresh the global cursor coordinates when confining the pointer
XGrabPointer can warp the cursor into the window when confining, so set the flag to refresh the global coordinates when queried.
2024-10-06 14:48:24 -04:00
SDL Wiki Bot
e59078ac6f Sync SDL3 wiki -> header 2024-10-06 18:31:17 +00:00
Ryan C. Gordon
9e74ada7b8 gpu: fixed formatting in docs. 2024-10-06 14:30:07 -04:00
Sam Lantinga
c358bf3f9b Removed test program list, it's better to just look at the code.
Fixes https://github.com/libsdl-org/SDL/issues/9399
2024-10-06 11:28:29 -07:00
Sam Lantinga
f8dd73fdb9 Fixed build 2024-10-06 08:42:00 -07:00
Sam Lantinga
0f47d3a77b Fixed use after free (thanks @meyraud705!)
Fixes https://github.com/libsdl-org/SDL/issues/11090
2024-10-06 08:34:35 -07:00
capehill
e159bcf5de test: Make blit_testExampleApplicationRender work on big endian
Changed image data pixel format to BGRA32.
2024-10-06 08:27:58 -07:00
Frank Praznik
c9ffa3f9e1 Remove vestiges of the TAKE_FOCUS window event
The event was removed, so remove the rename define and update the coccinelle script.
2024-10-06 10:02:53 -04:00
Sam Lantinga
596ef1ba2e Moved the SDL_ttf IME demo to showfont in the SDL_ttf project 2024-10-06 00:24:01 -07:00
David Fort
e00b1fdd67 clipboard: include mime types in SDL_ClipboarUpdate
This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
2024-10-05 18:19:10 -07:00
bubbleguuum
2880b40e33 fix pipewire prototype 2024-10-05 18:16:12 -07:00
Petar Popovic
b6ab7d28f6 Replaced \r\n with \n in SDL root files 2024-10-05 18:15:02 -07:00
Sam Lantinga
b8e72b0969 Note that creating a renderer will fail if the preferred renderer isn't available.
Fixes https://github.com/libsdl-org/SDL/issues/11077
2024-10-05 09:55:26 -07:00
zshoals
1ca45c5891 Fix typo: DiretMedia->DirectMedia 2024-10-05 00:08:01 -04:00
Sam Lantinga
8db3b47482 Just use normal stdio for the child process
Make sure we flush all output so it's seen by the parent as it happens.
2024-10-04 14:13:52 -07:00
Ryan C. Gordon
8c3f88b495 docs: Wrote CategoryVulkan. 2024-10-04 16:55:50 -04:00
SDL Wiki Bot
369b93771b Sync SDL3 wiki -> header 2024-10-04 20:38:03 +00:00
SDL Wiki Bot
deeffaa8d6 Sync SDL3 wiki -> header 2024-10-04 20:36:26 +00:00
Ryan C. Gordon
84ecf7fd3e docs: Add CategorySurface text. 2024-10-04 16:35:49 -04:00
397 changed files with 25446 additions and 10312 deletions

View File

@@ -3,7 +3,7 @@ description: 'Download Linux LoongArch64 toolchain and set output variables'
inputs: inputs:
version: version:
description: 'LoongArch64 version' description: 'LoongArch64 version'
default: '2022.09.06' default: '2023.08.08'
outputs: outputs:
prefix: prefix:
description: "LoongArch toolchain prefix" description: "LoongArch toolchain prefix"
@@ -27,7 +27,7 @@ runs:
if: ${{ !steps.restore-cache.outputs.cache-hit }} if: ${{ !steps.restore-cache.outputs.cache-hit }}
shell: bash shell: bash
run: | run: |
url="https://github.com/loongson/build-tools/releases/download/${{ inputs.version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz" url="https://github.com/loongson/build-tools/releases/download/${{ inputs.version }}/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz"
wget "$url" -O /tmp/toolchain.tar.xz wget "$url" -O /tmp/toolchain.tar.xz

View File

@@ -41,17 +41,17 @@ runs:
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
key: ${{ steps.calc.outputs.cache-key }} key: ${{ steps.calc.outputs.cache-key }}
- name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})' - name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})'
if: ${{ !steps.cache-restore.outputs.cache-hit }} if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
shell: pwsh shell: pwsh
run: | run: |
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
- name: 'Cache ${{ steps.calc.outputs.archive }}' - name: 'Cache ${{ steps.calc.outputs.archive }}'
if: ${{ !steps.cache-restore.outputs.cache-hit }} if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
uses: actions/cache/save@v4 uses: actions/cache/save@v4
with: with:
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
key: ${{ steps.calc.outputs.cache-key }} key: ${{ steps.calc.outputs.cache-key }}
- name: 'Extract libusb' - name: 'Extract ninja'
shell: pwsh shell: pwsh
run: | run: |
7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" 7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"

View File

@@ -31,7 +31,7 @@ class JobOs(Enum):
Ubuntu20_04 = "ubuntu-20.04" Ubuntu20_04 = "ubuntu-20.04"
Ubuntu22_04 = "ubuntu-22.04" Ubuntu22_04 = "ubuntu-22.04"
Ubuntu24_04 = "ubuntu-24.04" Ubuntu24_04 = "ubuntu-24.04"
Macos12 = "macos-12" Macos13 = "macos-13"
class SdlPlatform(Enum): class SdlPlatform(Enum):
@@ -114,9 +114,10 @@ JOB_SPECS = {
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ), "msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
"ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", ), "ubuntu-20.04": JobSpec(name="Ubuntu 20.04", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04", ),
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ), "ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
"ubuntu-intel-icx": JobSpec(name="Ubuntu 20.04 (Intel oneAPI)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-oneapi", intel=IntelCompiler.Icx, ), "ubuntu-intel-icx": JobSpec(name="Ubuntu 20.04 (Intel oneAPI)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-oneapi", intel=IntelCompiler.Icx, ),
"ubuntu-intel-icc": JobSpec(name="Ubuntu 20.04 (Intel Compiler)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-icc", intel=IntelCompiler.Icc, ), "ubuntu-intel-icc": JobSpec(name="Ubuntu 20.04 (Intel Compiler)", os=JobOs.Ubuntu20_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu20.04-icc", intel=IntelCompiler.Icc, ),
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos12, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ), "macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos13, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
"macos-framework-arm64": JobSpec(name="MacOS (Framework) (arm64)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact=None, apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, ), "macos-framework-arm64": JobSpec(name="MacOS (Framework) (arm64)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact=None, apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, ),
"macos-gnu-arm64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-gnu", apple_framework=False, apple_archs={AppleArch.Aarch64, }, ), "macos-gnu-arm64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-gnu", apple_framework=False, apple_archs={AppleArch.Aarch64, }, ),
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ), "ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
@@ -406,6 +407,8 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
case MsvcArch.X64: case MsvcArch.X64:
job.setup_libusb_arch = "x64" job.setup_libusb_arch = "x64"
case SdlPlatform.Linux: case SdlPlatform.Linux:
if spec.name.startswith("Ubuntu"):
assert spec.os.value.startswith("ubuntu-")
job.apt_packages.extend(( job.apt_packages.extend((
"gnome-desktop-testing", "gnome-desktop-testing",
"libasound2-dev", "libasound2-dev",
@@ -433,19 +436,18 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
"libudev-dev", "libudev-dev",
"fcitx-libs-dev", "fcitx-libs-dev",
)) ))
if trackmem_symbol_names:
# older libunwind is slow
job.cmake_arguments.append("-DSDLTEST_TIMEOUT_MULTIPLIER=2")
job.apt_packages.extend((
"libunwind-dev", # For SDL_test memory tracking
))
job.shared_lib = SharedLibType.SO_0
job.static_lib = StaticLibType.A
fpic = True
assert spec.os.value.startswith("ubuntu-")
ubuntu_year, ubuntu_month = [int(v) for v in spec.os.value.removeprefix("ubuntu-").split(".", 1)] ubuntu_year, ubuntu_month = [int(v) for v in spec.os.value.removeprefix("ubuntu-").split(".", 1)]
if ubuntu_year >= 22: if ubuntu_year >= 22:
job.apt_packages.extend(("libpipewire-0.3-dev", "libdecor-0-dev")) job.apt_packages.extend(("libpipewire-0.3-dev", "libdecor-0-dev"))
job.apt_packages.extend((
"libunwind-dev", # For SDL_test memory tracking
))
if trackmem_symbol_names:
# older libunwind is slow
job.cmake_arguments.append("-DSDLTEST_TIMEOUT_MULTIPLIER=2")
job.shared_lib = SharedLibType.SO_0
job.static_lib = StaticLibType.A
fpic = True
case SdlPlatform.Ios | SdlPlatform.Tvos: case SdlPlatform.Ios | SdlPlatform.Tvos:
job.brew_packages.extend([ job.brew_packages.extend([
"ninja", "ninja",
@@ -463,6 +465,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.cmake_arguments.extend([ job.cmake_arguments.extend([
"-DCMAKE_SYSTEM_NAME=iOS", "-DCMAKE_SYSTEM_NAME=iOS",
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"", "-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
]) ])
case SdlPlatform.Tvos: case SdlPlatform.Tvos:
if spec.xcode: if spec.xcode:
@@ -470,6 +473,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.cmake_arguments.extend([ job.cmake_arguments.extend([
"-DCMAKE_SYSTEM_NAME=tvOS", "-DCMAKE_SYSTEM_NAME=tvOS",
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"", "-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
]) ])
case SdlPlatform.MacOS: case SdlPlatform.MacOS:
if spec.apple_framework: if spec.apple_framework:
@@ -478,6 +482,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.test_pkg_config = False job.test_pkg_config = False
job.cmake_arguments.extend(( job.cmake_arguments.extend((
"'-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'", "'-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11",
"-DSDL_FRAMEWORK=ON", "-DSDL_FRAMEWORK=ON",
)) ))
job.shared_lib = SharedLibType.FRAMEWORK job.shared_lib = SharedLibType.FRAMEWORK
@@ -485,6 +490,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.clang_tidy = True job.clang_tidy = True
job.cmake_arguments.extend(( job.cmake_arguments.extend((
"-DCMAKE_OSX_ARCHITECTURES=arm64", "-DCMAKE_OSX_ARCHITECTURES=arm64",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11",
"-DCLANG_TIDY_BINARY=$(brew --prefix llvm)/bin/clang-tidy", "-DCLANG_TIDY_BINARY=$(brew --prefix llvm)/bin/clang-tidy",
)) ))
job.shared_lib = SharedLibType.DYLIB job.shared_lib = SharedLibType.DYLIB
@@ -608,7 +614,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.cmake_arguments.extend(( job.cmake_arguments.extend((
f"-DCMAKE_C_COMPILER={job.cc}", f"-DCMAKE_C_COMPILER={job.cc}",
f"-DCMAKE_CXX_COMPILER={job.cxx}", f"-DCMAKE_CXX_COMPILER={job.cxx}",
"-DCMAKE_SYSTEM_NAME=Haiku", "-DSDL_UNIX_CONSOLE_BUILD=ON",
)) ))
job.shared_lib = SharedLibType.SO_0 job.shared_lib = SharedLibType.SO_0
job.static_lib = StaticLibType.A job.static_lib = StaticLibType.A
@@ -621,6 +627,9 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.apt_packages = [] job.apt_packages = []
job.shared_lib = SharedLibType.SO_0 job.shared_lib = SharedLibType.SO_0
job.static_lib = StaticLibType.A job.static_lib = StaticLibType.A
job.cmake_arguments.extend((
"-DSDL_UNIX_CONSOLE_BUILD=ON",
))
case SdlPlatform.LoongArch64: case SdlPlatform.LoongArch64:
job.run_tests = False job.run_tests = False
job.cc = "${LOONGARCH64_CC}" job.cc = "${LOONGARCH64_CC}"
@@ -628,6 +637,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.cmake_arguments.extend(( job.cmake_arguments.extend((
f"-DCMAKE_C_COMPILER={job.cc}", f"-DCMAKE_C_COMPILER={job.cc}",
f"-DCMAKE_CXX_COMPILER={job.cxx}", f"-DCMAKE_CXX_COMPILER={job.cxx}",
"-DSDL_UNIX_CONSOLE_BUILD=ON",
"-DCMAKE_SYSTEM_NAME=Linux", "-DCMAKE_SYSTEM_NAME=Linux",
)) ))
job.shared_lib = SharedLibType.SO_0 job.shared_lib = SharedLibType.SO_0

View File

@@ -191,9 +191,9 @@ jobs:
run: | run: |
echo "This should show us the SDL_REVISION" echo "This should show us the SDL_REVISION"
echo "Shared library:" echo "Shared library:"
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep SDL-', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }} ${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
echo "Static library:" echo "Static library:"
${{ (matrix.platform.static-lib && format('strings build/{0} | grep SDL-', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }} ${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
- name: 'Run build-time tests (CMake)' - name: 'Run build-time tests (CMake)'
id: tests id: tests
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }} if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
@@ -365,7 +365,9 @@ jobs:
with: with:
if-no-files-found: error if-no-files-found: error
name: '${{ matrix.platform.artifact }}' name: '${{ matrix.platform.artifact }}'
path: build/dist/SDL3* path: |
build/dist/SDL3*
build/include*
- name: 'Upload minidumps' - name: 'Upload minidumps'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }} if: ${{ always() && steps.tests.outcome == 'failure' && (matrix.platform.platform == 'msvc' || matrix.platform.platform == 'msys2') }}

View File

@@ -37,9 +37,8 @@ jobs:
shell: bash shell: bash
run: | run: |
python build-scripts/build-release.py \ python build-scripts/build-release.py \
--create source \ --actions source \
--commit ${{ inputs.commit }} \ --commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ github.workspace }}/SDL" \ --root "${{ github.workspace }}/SDL" \
--github \ --github \
--debug --debug
@@ -93,7 +92,7 @@ jobs:
- name: 'Set up Python' - name: 'Set up Python'
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.11'
- name: 'Fetch build-release.py' - name: 'Fetch build-release.py'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -114,9 +113,8 @@ jobs:
shell: bash shell: bash
run: | run: |
python build-scripts/build-release.py \ python build-scripts/build-release.py \
--create xcframework \ --actions dmg \
--commit ${{ inputs.commit }} \ --commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \ --root "${{ steps.tar.outputs.path }}" \
--github \ --github \
--debug --debug
@@ -165,6 +163,7 @@ jobs:
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \ -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=Darwin \ -DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
-Werror=dev \ -Werror=dev \
-B build_darwin -B build_darwin
cmake --build build_darwin --config Release --verbose cmake --build build_darwin --config Release --verbose
@@ -176,6 +175,7 @@ jobs:
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}/SDL3.xcframework/macos-arm64_x86_64" \ -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}/SDL3.xcframework/macos-arm64_x86_64" \
-DCMAKE_SYSTEM_NAME=Darwin \ -DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
-Werror=dev \ -Werror=dev \
-B build_darwin_2 -B build_darwin_2
cmake --build build_darwin --config Release --verbose cmake --build build_darwin --config Release --verbose
@@ -188,6 +188,7 @@ jobs:
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \ -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \ -DCMAKE_OSX_ARCHITECTURES="arm64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
-Werror=dev \ -Werror=dev \
-B build_ios -B build_ios
cmake --build build_ios --config Release --verbose cmake --build build_ios --config Release --verbose
@@ -200,6 +201,7 @@ jobs:
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \ -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=tvOS \ -DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \ -DCMAKE_OSX_ARCHITECTURES="arm64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
-Werror=dev \ -Werror=dev \
-B build_tvos -B build_tvos
cmake --build build_tvos --config Release --verbose cmake --build build_tvos --config Release --verbose
@@ -215,6 +217,7 @@ jobs:
-DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \ -DCMAKE_OSX_SYSROOT="${sysroot}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
-Werror=dev \ -Werror=dev \
-B build_ios_simulator -B build_ios_simulator
cmake --build build_ios_simulator --config Release --verbose cmake --build build_ios_simulator --config Release --verbose
@@ -230,6 +233,7 @@ jobs:
-DCMAKE_SYSTEM_NAME=tvOS \ -DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \ -DCMAKE_OSX_SYSROOT="${sysroot}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 \
-Werror=dev \ -Werror=dev \
-B build_tvos_simulator -B build_tvos_simulator
cmake --build build_tvos_simulator --config Release --verbose cmake --build build_tvos_simulator --config Release --verbose
@@ -240,12 +244,13 @@ jobs:
outputs: outputs:
VC-x86: ${{ steps.releaser.outputs.VC-x86 }} VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
VC-x64: ${{ steps.releaser.outputs.VC-x64 }} VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
VC-arm64: ${{ steps.releaser.outputs.VC-arm64 }}
VC-devel: ${{ steps.releaser.outputs.VC-devel }} VC-devel: ${{ steps.releaser.outputs.VC-devel }}
steps: steps:
- name: 'Set up Python' - name: 'Set up Python'
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.11'
- name: 'Fetch build-release.py' - name: 'Fetch build-release.py'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -266,9 +271,8 @@ jobs:
id: releaser id: releaser
run: | run: |
python build-scripts/build-release.py ` python build-scripts/build-release.py `
--create win32 ` --actions msvc `
--commit ${{ inputs.commit }} ` --commit ${{ inputs.commit }} `
--project SDL3 `
--root "${{ steps.zip.outputs.path }}" ` --root "${{ steps.zip.outputs.path }}" `
--github ` --github `
--debug --debug
@@ -405,7 +409,7 @@ jobs:
- name: 'Set up Python' - name: 'Set up Python'
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.11'
- name: 'Fetch build-release.py' - name: 'Fetch build-release.py'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -429,9 +433,8 @@ jobs:
id: releaser id: releaser
run: | run: |
python build-scripts/build-release.py \ python build-scripts/build-release.py \
--create mingw \ --actions mingw \
--commit ${{ inputs.commit }} \ --commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \ --root "${{ steps.tar.outputs.path }}" \
--github \ --github \
--debug --debug
@@ -476,7 +479,7 @@ jobs:
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \ cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \ -DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \ -DTEST_STATIC=FALSE \
-DTEST_TEST=TRUE \ -DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \ -DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \ -DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
@@ -489,7 +492,7 @@ jobs:
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \ cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \ -DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \ -DTEST_STATIC=false \
-DTEST_TEST=TRUE \ -DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \ -DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \ -DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
@@ -507,7 +510,7 @@ jobs:
- name: 'Set up Python' - name: 'Set up Python'
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.11'
- name: 'Fetch build-release.py' - name: 'Fetch build-release.py'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -541,9 +544,8 @@ jobs:
id: releaser id: releaser
run: | run: |
python build-scripts/build-release.py \ python build-scripts/build-release.py \
--create android \ --actions android \
--commit ${{ inputs.commit }} \ --commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \ --root "${{ steps.tar.outputs.path }}" \
--github \ --github \
--debug --debug
@@ -560,7 +562,7 @@ jobs:
- name: 'Set up Python' - name: 'Set up Python'
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.11'
- uses: actions/setup-java@v4 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
@@ -581,37 +583,6 @@ jobs:
mkdir -p /tmp/tardir mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}" tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Create gradle project'
id: create-gradle-project
run: |
python ${{ steps.src.outputs.path }}/build-scripts/create-android-project.py \
org.libsdl.testspriteminimal \
${{ steps.src.outputs.path }}/test/testspriteminimal.c \
${{ steps.src.outputs.path }}/test/icon.h \
--variant aar \
--output "/tmp/projects"
echo "path=/tmp/projects/org.libsdl.testspriteminimal" >>$GITHUB_OUTPUT
echo ""
echo "Project contents:"
echo ""
find "/tmp/projects/org.libsdl.testspriteminimal"
- name: 'Copy SDL3 aar into Gradle project'
run: |
cp "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}" "${{ steps.create-gradle-project.outputs.path }}/app/libs"
echo ""
echo "Project contents:"
echo ""
find "${{ steps.create-gradle-project.outputs.path }}"
- name: 'Build app (Gradle & ndk-build)'
run: |
cd "${{ steps.create-gradle-project.outputs.path }}"
./gradlew -i assembleRelease -PBUILD_WITH_CMAKE=1
- name: 'Build app (Gradle & CMake)'
run: |
cd "${{ steps.create-gradle-project.outputs.path }}"
./gradlew -i assembleRelease
- name: 'Extract Android SDK from AAR' - name: 'Extract Android SDK from AAR'
id: sdk id: sdk
run: | run: |
@@ -635,3 +606,29 @@ jobs:
echo "Building ${android_abi}..." echo "Building ${android_abi}..."
cmake --build "${android_abi}" --config Release --verbose cmake --build "${android_abi}" --config Release --verbose
done done
- name: 'Create gradle project'
id: create-gradle-project
run: |
python ${{ steps.src.outputs.path }}/build-scripts/create-android-project.py \
org.libsdl.testspriteminimal \
${{ steps.src.outputs.path }}/test/testspriteminimal.c \
${{ steps.src.outputs.path }}/test/icon.h \
--variant aar \
--output "/tmp/projects"
echo "path=/tmp/projects/org.libsdl.testspriteminimal" >>$GITHUB_OUTPUT
- name: 'Copy SDL3 aar into Gradle project'
run: |
cp "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}" "${{ steps.create-gradle-project.outputs.path }}/app/libs"
echo ""
echo "Project contents:"
echo ""
find "${{ steps.create-gradle-project.outputs.path }}"
- name: 'Build app (Gradle & CMake)'
run: |
cd "${{ steps.create-gradle-project.outputs.path }}"
./gradlew -i assembleRelease -Pandroid.native.buildOutput=verbose -PBUILD_WITH_CMAKE=1
- name: 'Build app (Gradle & ndk-build)'
run: |
cd "${{ steps.create-gradle-project.outputs.path }}"
./gradlew -i assembleRelease -Pandroid.native.buildOutput=verbose

20
.gitignore vendored
View File

@@ -29,15 +29,27 @@ __pycache__
*.rej *.rej
# for CMake # for CMake
.cmake
CMakeFiles/ CMakeFiles/
CMakeCache.txt CMakeCache.txt
cmake_install.cmake cmake_install.cmake
cmake_uninstall.cmake cmake_uninstall.cmake
SDL3ConfigVersion.cmake install_manifest.txt
.ninja_* *Targets.cmake
*.ninja *Config.cmake
*ConfigVersion.cmake
CTestTestfile.cmake
Testing
compile_commands.json compile_commands.json
.cache/ .cache/
/include-config-*
/include-revision
/Makefile
.ninja_*
*.ninja
*.pc
test/*.test
wayland-generated-protocols
# for CLion # for CLion
.idea .idea
@@ -51,6 +63,7 @@ cmake-build-*
.DS_Store .DS_Store
xcuserdata xcuserdata
*.xcworkspace *.xcworkspace
Xcode/build.xcconfig
# for Visual Studio Code # for Visual Studio Code
.vscode/ .vscode/
@@ -85,7 +98,6 @@ src/render/direct3d12/D3D12_*_One.h
src/render/direct3d12/D3D12_*_Series.h src/render/direct3d12/D3D12_*_Series.h
src/gpu/d3d12/D3D12_*_One.h src/gpu/d3d12/D3D12_*_One.h
src/gpu/d3d12/D3D12_*_Series.h src/gpu/d3d12/D3D12_*_Series.h
Directory.Build.props
# for Android # for Android
android-project/local.properties android-project/local.properties

View File

@@ -1,11 +1,7 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there")
endif()
# See docs/release_checklist.md # See docs/release_checklist.md
project(SDL3 LANGUAGES C VERSION "3.1.3") project(SDL3 LANGUAGES C VERSION "3.1.6")
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SDL3_SUBPROJECT OFF) set(SDL3_SUBPROJECT OFF)
@@ -337,6 +333,7 @@ dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR WINDOWS" OFF) dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR FREEBSD OR WINDOWS" OFF)
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN" OFF) dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN" OFF)
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF) dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
set_option(SDL_OPENVR "Use OpenVR video driver" OFF)
dep_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS} "SDL_VIDEO" OFF) dep_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS} "SDL_VIDEO" OFF)
dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF) dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF)
set_option(SDL_OFFSCREEN "Use offscreen video driver" ON) set_option(SDL_OFFSCREEN "Use offscreen video driver" ON)
@@ -455,7 +452,7 @@ sdl_compile_definitions(PRIVATE "USING_GENERATED_CONFIG_H")
sdl_include_directories( sdl_include_directories(
PRIVATE PRIVATE
"${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config" "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config"
"${SDL3_BINARY_DIR}/include" "${SDL3_BINARY_DIR}/include-revision"
"${SDL3_SOURCE_DIR}/include" "${SDL3_SOURCE_DIR}/include"
) )
# Note: The clang toolset for Visual Studio does not support the '-idirafter' option. # Note: The clang toolset for Visual Studio does not support the '-idirafter' option.
@@ -1042,6 +1039,8 @@ if(SDL_LIBC)
cmake_pop_check_state() cmake_pop_check_state()
if(NOT WINDOWS) if(NOT WINDOWS)
check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
check_symbol_exists(gethostname "unistd.h" HAVE_GETHOSTNAME)
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE) check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION) check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP) check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
@@ -1415,13 +1414,20 @@ if(ANDROID)
set(javadoc_index_html "${javadocdir}/index.html") set(javadoc_index_html "${javadocdir}/index.html")
add_custom_command( add_custom_command(
OUTPUT "${javadoc_index_html}" OUTPUT "${javadoc_index_html}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${javadocdir}" COMMAND ${CMAKE_COMMAND} -E rm -rf "${javadocdir}" "${javadocjar}"
COMMAND ${Java_JAVADOC_EXECUTABLE} -encoding utf8 -d "${javadocdir}" COMMAND ${Java_JAVADOC_EXECUTABLE} -encoding utf8 -d "${javadocdir}"
-classpath "${path_android_jar}" -classpath "${path_android_jar}"
-author -use -version ${SDL_JAVA_SOURCES} -author -use -version ${SDL_JAVA_SOURCES}
DEPENDS ${SDL_JAVA_SOURCES} "${path_android_jar}" DEPENDS ${SDL_JAVA_SOURCES} "${path_android_jar}"
) )
add_custom_target(SDL3-javadoc ALL DEPENDS "${javadoc_index_html}") add_custom_command(
OUTPUT "${javadocjar}"
COMMAND ${Java_JAR_EXECUTABLE} -c -f "${javadocjar}"
-C "${javadocdir}" *
WORKING_DIRECTORY "${javadocdir}"
DEPENDS ${javadoc_index_html}
)
add_custom_target(SDL3-javadoc ALL DEPENDS "${javadoc_index_html}" "${javadocjar}")
set_property(TARGET SDL3-javadoc PROPERTY OUTPUT_DIR "${javadocdir}") set_property(TARGET SDL3-javadoc PROPERTY OUTPUT_DIR "${javadocdir}")
endif() endif()
endif() endif()
@@ -1535,6 +1541,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
CheckOpenGL() CheckOpenGL()
CheckOpenGLES() CheckOpenGLES()
CheckWayland() CheckWayland()
CheckOpenVR()
CheckVivante() CheckVivante()
CheckVulkan() CheckVulkan()
CheckQNXScreen() CheckQNXScreen()
@@ -1717,7 +1724,6 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
sdl_sources( sdl_sources(
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c" "${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c"
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_threadprio.c" "${SDL3_SOURCE_DIR}/src/core/linux/SDL_threadprio.c"
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_sandbox.c"
) )
# src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere. # src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.
@@ -1933,6 +1939,8 @@ elseif(WINDOWS)
set(SDL_VIDEO_DRIVER_WINDOWS 1) set(SDL_VIDEO_DRIVER_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/windows/*.c")
CheckOpenVR()
if(SDL_RENDER_D3D AND HAVE_D3D9_H) if(SDL_RENDER_D3D AND HAVE_D3D9_H)
set(SDL_VIDEO_RENDER_D3D 1) set(SDL_VIDEO_RENDER_D3D 1)
set(HAVE_RENDER_D3D TRUE) set(HAVE_RENDER_D3D TRUE)
@@ -2518,7 +2526,9 @@ elseif(VITA)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
# !!! FIXME: do we need a FSops implementation for this? set(SDL_FSOPS_POSIX 1)
sdl_sources("${SDL3_SOURCE_DIR}/src/filesystem/posix/SDL_sysfsops.c")
set(HAVE_SDL_FSOPS TRUE)
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_VITA 1) set(SDL_JOYSTICK_VITA 1)
@@ -2560,6 +2570,12 @@ elseif(VITA)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/vita/*.c")
endif() endif()
if(SDL_CAMERA)
set(SDL_CAMERA_DRIVER_VITA 1)
set(HAVE_CAMERA TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/camera/vita/*.c")
endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_VITA 1) set(SDL_VIDEO_DRIVER_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/vita/*.c")
@@ -2640,6 +2656,7 @@ elseif(VITA)
SceMotion_stub SceMotion_stub
ScePower_stub ScePower_stub
SceProcessmgr_stub SceProcessmgr_stub
SceCamera_stub
) )
endif() endif()
@@ -3029,11 +3046,11 @@ endif()
# config variables may contain generator expression, so we need to generate SDL_build_config.h in 2 steps: # config variables may contain generator expression, so we need to generate SDL_build_config.h in 2 steps:
# 1. replace all `#cmakedefine`'s and `@abc@` # 1. replace all `#cmakedefine`'s and `@abc@`
configure_file("${SDL3_SOURCE_DIR}/include/build_config/SDL_build_config.h.cmake" configure_file("${SDL3_SOURCE_DIR}/include/build_config/SDL_build_config.h.cmake"
"${SDL3_BINARY_DIR}/SDL_build_config.h.intermediate") "${SDL3_BINARY_DIR}/CMakeFiles/SDL_build_config.h.intermediate")
# 2. generate SDL_build_config.h in an build_type-dependent folder (which should be first in the include search path) # 2. generate SDL_build_config.h in an build_type-dependent folder (which should be first in the include search path)
file(GENERATE file(GENERATE
OUTPUT "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config/SDL_build_config.h" OUTPUT "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config/SDL_build_config.h"
INPUT "${SDL3_BINARY_DIR}/SDL_build_config.h.intermediate" INPUT "${SDL3_BINARY_DIR}/CMakeFiles/SDL_build_config.h.intermediate"
) )
file(GLOB SDL3_INCLUDE_FILES "${SDL3_SOURCE_DIR}/include/SDL3/*.h") file(GLOB SDL3_INCLUDE_FILES "${SDL3_SOURCE_DIR}/include/SDL3/*.h")
@@ -3044,26 +3061,22 @@ foreach(_hdr IN LISTS SDL3_INCLUDE_FILES)
endif() endif()
endforeach() endforeach()
set(SDL_REVISION "" CACHE STRING "Custom SDL revision (overrides SDL_REVISION_SUFFIX)") # If REVISION.txt exists, then we are building from a SDL release.
if(NOT SDL_REVISION) # SDL_revision.h(.cmake) in source releases have SDL_REVISION baked into them.
set(SDL_REVISION_SUFFIX "" CACHE STRING "Suffix for the SDL revision") if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt") set(SDL_REVISION "" CACHE STRING "Custom SDL revision")
# If VERSION.txt exists, it contains the SDL version if(SDL_REVISION)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" SDL_REVISION_CENTER) set(SDL_REVISION_CENTER "${SDL_VERSION_MAJOR}.${SDL_VERSION_MINOR}.${SDL_VERSION_MICRO}-${SDL_REVISION}")
string(STRIP "${SDL_REVISION_CENTER}" SDL_REVISION_CENTER)
else() else()
# If VERSION does not exist, use git to calculate a version # If SDL_REVISION is not overrided, use git to describe
git_describe(SDL_REVISION_CENTER) git_describe(SDL_REVISION_CENTER)
if(NOT SDL_REVISION_CENTER)
set(SDL_REVISION_CENTER "${SDL3_VERSION}-no-vcs")
endif() endif()
endif() set(SDL_REVISION "SDL3-${SDL_REVISION_CENTER}")
set(SDL_REVISION "SDL-${SDL_REVISION_CENTER}${SDL_REVISION_SUFFIX}")
endif() endif()
execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${SDL3_BINARY_DIR}/include/SDL3") execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${SDL3_BINARY_DIR}/include-revision/SDL3")
configure_file(include/build_config/SDL_revision.h.cmake include/SDL3/SDL_revision.h @ONLY) configure_file(include/build_config/SDL_revision.h.cmake include-revision/SDL3/SDL_revision.h @ONLY)
list(APPEND SDL3_INCLUDE_FILES "${SDL3_BINARY_DIR}/include/SDL3/SDL_revision.h") list(APPEND SDL3_INCLUDE_FILES "${SDL3_BINARY_DIR}/include-revision/SDL3/SDL_revision.h")
if(SDL_FRAMEWORK) if(SDL_FRAMEWORK)
# With Apple frameworks, headers in the PUBLIC_HEADER property also need to be added as sources # With Apple frameworks, headers in the PUBLIC_HEADER property also need to be added as sources
@@ -3260,7 +3273,7 @@ add_library(SDL3::Headers ALIAS SDL3_Headers)
set_property(TARGET SDL3_Headers PROPERTY EXPORT_NAME "Headers") set_property(TARGET SDL3_Headers PROPERTY EXPORT_NAME "Headers")
target_include_directories(SDL3_Headers target_include_directories(SDL3_Headers
INTERFACE INTERFACE
"$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>" "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include-revision>"
"$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/include>"
) )
if(SDL_FRAMEWORK) if(SDL_FRAMEWORK)
@@ -3659,7 +3672,7 @@ if(NOT SDL_DISABLE_INSTALL)
) )
if(TARGET SDL3-javadoc) if(TARGET SDL3-javadoc)
set(SDL_INSTALL_JAVADOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/javadoc" CACHE PATH "Path where to install SDL3 javadoc") set(SDL_INSTALL_JAVADOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/javadoc" CACHE PATH "Path where to install SDL3 javadoc")
install(DIRECTORY "${SDL3_BINARY_DIR}/docs/javadoc/" install(FILES "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-javadoc.jar"
DESTINATION "${SDL_INSTALL_JAVADOCDIR}/SDL3") DESTINATION "${SDL_INSTALL_JAVADOCDIR}/SDL3")
endif() endif()
endif() endif()

View File

@@ -12,7 +12,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testato
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation.vcxproj", "{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation.vcxproj", "{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdialog", "tests\testdialog\testdialog.vcxproj", "{97A3A89b-E023-48CD-905F-CDBDE8D951DE}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdialog", "tests\testdialog\testdialog.vcxproj", "{97A3A89B-E023-48CD-905F-CDBDE8D951DE}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw", "tests\testdraw\testdraw.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw", "tests\testdraw\testdraw.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}"
EndProject EndProject
@@ -54,6 +54,67 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsurround", "tests\tests
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpen", "tests\testpen\testpen.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpen", "tests\testpen\testpen.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{1498F0CD-F4DA-4847-9CB2-FB18D48061D5}"
ProjectSection(SolutionItems) = preProject
examples\Directory.Build.props = examples\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "audio", "audio", "{1B61A1B7-92DE-4C37-9151-D2928D6449AB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01-simple-playback", "examples\audio\01-simple-playback\01-simple-playback.vcxproj", "{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02-simple-playback-callback", "examples\audio\02-simple-playback-callback\02-simple-playback-callback.vcxproj", "{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "camera", "camera", "{AAEC8338-4D33-4AF5-9A1F-B9FF027D4607}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01-read-and-draw", "examples\camera\01-read-and-draw\01-read-and-draw.vcxproj", "{510ACF0C-4012-4216-98EF-E4F155DE33CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "game", "game", "{D1BF59F6-22DC-493B-BDEB-451A50DA793D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01-snake", "examples\game\01-snake\01-snake.vcxproj", "{7820969A-5B7B-4046-BB0A-82905D457FC5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pen", "pen", "{F2247885-8EE8-42F4-A702-4155587620E0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01-drawing-lines", "examples\pen\01-drawing-lines\01-drawing-lines.vcxproj", "{5EDA1ED3-8213-4C12-B0DF-B631EB611804}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "renderer", "renderer", "{F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01-clear", "examples\renderer\01-clear\01-clear.vcxproj", "{896557AC-7575-480C-8FFD-AB08B5DA305D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02-primitives", "examples\renderer\02-primitives\02-primitives.vcxproj", "{504DC7EC-D82E-448E-9C7D-3BE7981592B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03-lines", "examples\renderer\03-lines\03-lines.vcxproj", "{BDE7DBC0-DCE7-432E-8750-C4AE55463699}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04-points", "examples\renderer\04-points\04-points.vcxproj", "{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05-rectangles", "examples\renderer\05-rectangles\05-rectangles.vcxproj", "{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06-textures", "examples\renderer\06-textures\06-textures.vcxproj", "{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07-streaming-textures", "examples\renderer\07-streaming-textures\07-streaming-textures.vcxproj", "{540AE143-A58F-4D3B-B843-94EA8576522D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08-rotating-textures", "examples\renderer\08-rotating-textures\08-rotating-textures.vcxproj", "{7091C001-3D71-47D4-B27B-E99271E5B987}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09-scaling-textures", "examples\renderer\09-scaling-textures\09-scaling-textures.vcxproj", "{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10-geometry", "examples\renderer\10-geometry\10-geometry.vcxproj", "{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11-color-mods", "examples\renderer\11-color-mods\11-color-mods.vcxproj", "{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14-viewport", "examples\renderer\14-viewport\14-viewport.vcxproj", "{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15-cliprect", "examples\renderer\15-cliprect\15-cliprect.vcxproj", "{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17-read-pixels", "examples\renderer\17-read-pixels\17-read-pixels.vcxproj", "{EEF00329-4598-4E34-B969-9DD4B0815E6C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18-debug-text", "examples\renderer\18-debug-text\18-debug-text.vcxproj", "{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03-load-wav", "examples\audio\03-load-wav\03-load-wav.vcxproj", "{608C6C67-7766-471F-BBFF-8B00086039AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02-woodeneye-008", "examples\game\02-woodeneye-008\02-woodeneye-008.vcxproj", "{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03-infinite-monkeys", "examples\game\03-infinite-monkeys\03-infinite-monkeys.vcxproj", "{75AEE75A-C016-4497-960B-D767B822237D}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
@@ -102,14 +163,14 @@ Global
{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.Build.0 = Release|Win32 {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.Build.0 = Release|Win32
{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.ActiveCfg = Release|x64 {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.ActiveCfg = Release|x64
{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.Build.0 = Release|x64 {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.Build.0 = Release|x64
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Debug|Win32.ActiveCfg = Debug|Win32 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Debug|Win32.ActiveCfg = Debug|Win32
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Debug|Win32.Build.0 = Debug|Win32 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Debug|Win32.Build.0 = Debug|Win32
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Debug|x64.ActiveCfg = Debug|x64 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Debug|x64.ActiveCfg = Debug|x64
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Debug|x64.Build.0 = Debug|x64 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Debug|x64.Build.0 = Debug|x64
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Release|Win32.ActiveCfg = Release|Win32 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Release|Win32.ActiveCfg = Release|Win32
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Release|Win32.Build.0 = Release|Win32 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Release|Win32.Build.0 = Release|Win32
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Release|x64.ActiveCfg = Release|x64 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Release|x64.ActiveCfg = Release|x64
{97A3A89b-E023-48CD-905F-CDBDE8D951DE}.Release|x64.Build.0 = Release|x64 {97A3A89B-E023-48CD-905F-CDBDE8D951DE}.Release|x64.Build.0 = Release|x64
{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32
{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32
{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64
@@ -270,6 +331,190 @@ Global
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|Win32.Build.0 = Release|Win32 {C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|Win32.Build.0 = Release|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.ActiveCfg = Release|x64 {C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.ActiveCfg = Release|x64
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.Build.0 = Release|x64 {C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3}.Release|x64.Build.0 = Release|x64
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Debug|Win32.ActiveCfg = Debug|Win32
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Debug|Win32.Build.0 = Debug|Win32
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Debug|x64.ActiveCfg = Debug|x64
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Debug|x64.Build.0 = Debug|x64
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Release|Win32.ActiveCfg = Release|Win32
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Release|Win32.Build.0 = Release|Win32
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Release|x64.ActiveCfg = Release|x64
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}.Release|x64.Build.0 = Release|x64
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Debug|Win32.ActiveCfg = Debug|Win32
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Debug|Win32.Build.0 = Debug|Win32
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Debug|x64.ActiveCfg = Debug|x64
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Debug|x64.Build.0 = Debug|x64
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Release|Win32.ActiveCfg = Release|Win32
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Release|Win32.Build.0 = Release|Win32
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Release|x64.ActiveCfg = Release|x64
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}.Release|x64.Build.0 = Release|x64
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Debug|Win32.ActiveCfg = Debug|Win32
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Debug|Win32.Build.0 = Debug|Win32
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Debug|x64.ActiveCfg = Debug|x64
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Debug|x64.Build.0 = Debug|x64
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Release|Win32.ActiveCfg = Release|Win32
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Release|Win32.Build.0 = Release|Win32
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Release|x64.ActiveCfg = Release|x64
{510ACF0C-4012-4216-98EF-E4F155DE33CE}.Release|x64.Build.0 = Release|x64
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Debug|Win32.ActiveCfg = Debug|Win32
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Debug|Win32.Build.0 = Debug|Win32
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Debug|x64.ActiveCfg = Debug|x64
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Debug|x64.Build.0 = Debug|x64
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Release|Win32.ActiveCfg = Release|Win32
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Release|Win32.Build.0 = Release|Win32
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Release|x64.ActiveCfg = Release|x64
{7820969A-5B7B-4046-BB0A-82905D457FC5}.Release|x64.Build.0 = Release|x64
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Debug|Win32.ActiveCfg = Debug|Win32
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Debug|Win32.Build.0 = Debug|Win32
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Debug|x64.ActiveCfg = Debug|x64
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Debug|x64.Build.0 = Debug|x64
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Release|Win32.ActiveCfg = Release|Win32
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Release|Win32.Build.0 = Release|Win32
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Release|x64.ActiveCfg = Release|x64
{5EDA1ED3-8213-4C12-B0DF-B631EB611804}.Release|x64.Build.0 = Release|x64
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Debug|Win32.ActiveCfg = Debug|Win32
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Debug|Win32.Build.0 = Debug|Win32
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Debug|x64.ActiveCfg = Debug|x64
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Debug|x64.Build.0 = Debug|x64
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Release|Win32.ActiveCfg = Release|Win32
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Release|Win32.Build.0 = Release|Win32
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Release|x64.ActiveCfg = Release|x64
{896557AC-7575-480C-8FFD-AB08B5DA305D}.Release|x64.Build.0 = Release|x64
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Debug|Win32.ActiveCfg = Debug|Win32
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Debug|Win32.Build.0 = Debug|Win32
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Debug|x64.ActiveCfg = Debug|x64
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Debug|x64.Build.0 = Debug|x64
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Release|Win32.ActiveCfg = Release|Win32
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Release|Win32.Build.0 = Release|Win32
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Release|x64.ActiveCfg = Release|x64
{504DC7EC-D82E-448E-9C7D-3BE7981592B3}.Release|x64.Build.0 = Release|x64
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Debug|Win32.ActiveCfg = Debug|Win32
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Debug|Win32.Build.0 = Debug|Win32
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Debug|x64.ActiveCfg = Debug|x64
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Debug|x64.Build.0 = Debug|x64
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Release|Win32.ActiveCfg = Release|Win32
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Release|Win32.Build.0 = Release|Win32
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Release|x64.ActiveCfg = Release|x64
{BDE7DBC0-DCE7-432E-8750-C4AE55463699}.Release|x64.Build.0 = Release|x64
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Debug|Win32.ActiveCfg = Debug|Win32
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Debug|Win32.Build.0 = Debug|Win32
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Debug|x64.ActiveCfg = Debug|x64
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Debug|x64.Build.0 = Debug|x64
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Release|Win32.ActiveCfg = Release|Win32
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Release|Win32.Build.0 = Release|Win32
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Release|x64.ActiveCfg = Release|x64
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}.Release|x64.Build.0 = Release|x64
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Debug|Win32.ActiveCfg = Debug|Win32
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Debug|Win32.Build.0 = Debug|Win32
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Debug|x64.ActiveCfg = Debug|x64
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Debug|x64.Build.0 = Debug|x64
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Release|Win32.ActiveCfg = Release|Win32
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Release|Win32.Build.0 = Release|Win32
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Release|x64.ActiveCfg = Release|x64
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}.Release|x64.Build.0 = Release|x64
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Debug|Win32.ActiveCfg = Debug|Win32
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Debug|Win32.Build.0 = Debug|Win32
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Debug|x64.ActiveCfg = Debug|x64
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Debug|x64.Build.0 = Debug|x64
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Release|Win32.ActiveCfg = Release|Win32
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Release|Win32.Build.0 = Release|Win32
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Release|x64.ActiveCfg = Release|x64
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}.Release|x64.Build.0 = Release|x64
{540AE143-A58F-4D3B-B843-94EA8576522D}.Debug|Win32.ActiveCfg = Debug|Win32
{540AE143-A58F-4D3B-B843-94EA8576522D}.Debug|Win32.Build.0 = Debug|Win32
{540AE143-A58F-4D3B-B843-94EA8576522D}.Debug|x64.ActiveCfg = Debug|x64
{540AE143-A58F-4D3B-B843-94EA8576522D}.Debug|x64.Build.0 = Debug|x64
{540AE143-A58F-4D3B-B843-94EA8576522D}.Release|Win32.ActiveCfg = Release|Win32
{540AE143-A58F-4D3B-B843-94EA8576522D}.Release|Win32.Build.0 = Release|Win32
{540AE143-A58F-4D3B-B843-94EA8576522D}.Release|x64.ActiveCfg = Release|x64
{540AE143-A58F-4D3B-B843-94EA8576522D}.Release|x64.Build.0 = Release|x64
{7091C001-3D71-47D4-B27B-E99271E5B987}.Debug|Win32.ActiveCfg = Debug|Win32
{7091C001-3D71-47D4-B27B-E99271E5B987}.Debug|Win32.Build.0 = Debug|Win32
{7091C001-3D71-47D4-B27B-E99271E5B987}.Debug|x64.ActiveCfg = Debug|x64
{7091C001-3D71-47D4-B27B-E99271E5B987}.Debug|x64.Build.0 = Debug|x64
{7091C001-3D71-47D4-B27B-E99271E5B987}.Release|Win32.ActiveCfg = Release|Win32
{7091C001-3D71-47D4-B27B-E99271E5B987}.Release|Win32.Build.0 = Release|Win32
{7091C001-3D71-47D4-B27B-E99271E5B987}.Release|x64.ActiveCfg = Release|x64
{7091C001-3D71-47D4-B27B-E99271E5B987}.Release|x64.Build.0 = Release|x64
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Debug|Win32.ActiveCfg = Debug|Win32
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Debug|Win32.Build.0 = Debug|Win32
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Debug|x64.ActiveCfg = Debug|x64
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Debug|x64.Build.0 = Debug|x64
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Release|Win32.ActiveCfg = Release|Win32
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Release|Win32.Build.0 = Release|Win32
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Release|x64.ActiveCfg = Release|x64
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}.Release|x64.Build.0 = Release|x64
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Debug|Win32.ActiveCfg = Debug|Win32
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Debug|Win32.Build.0 = Debug|Win32
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Debug|x64.ActiveCfg = Debug|x64
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Debug|x64.Build.0 = Debug|x64
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Release|Win32.ActiveCfg = Release|Win32
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Release|Win32.Build.0 = Release|Win32
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Release|x64.ActiveCfg = Release|x64
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}.Release|x64.Build.0 = Release|x64
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Debug|Win32.ActiveCfg = Debug|Win32
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Debug|Win32.Build.0 = Debug|Win32
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Debug|x64.ActiveCfg = Debug|x64
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Debug|x64.Build.0 = Debug|x64
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Release|Win32.ActiveCfg = Release|Win32
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Release|Win32.Build.0 = Release|Win32
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Release|x64.ActiveCfg = Release|x64
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}.Release|x64.Build.0 = Release|x64
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Debug|Win32.ActiveCfg = Debug|Win32
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Debug|Win32.Build.0 = Debug|Win32
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Debug|x64.ActiveCfg = Debug|x64
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Debug|x64.Build.0 = Debug|x64
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Release|Win32.ActiveCfg = Release|Win32
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Release|Win32.Build.0 = Release|Win32
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Release|x64.ActiveCfg = Release|x64
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}.Release|x64.Build.0 = Release|x64
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Debug|Win32.ActiveCfg = Debug|Win32
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Debug|Win32.Build.0 = Debug|Win32
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Debug|x64.ActiveCfg = Debug|x64
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Debug|x64.Build.0 = Debug|x64
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Release|Win32.ActiveCfg = Release|Win32
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Release|Win32.Build.0 = Release|Win32
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Release|x64.ActiveCfg = Release|x64
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}.Release|x64.Build.0 = Release|x64
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Debug|Win32.ActiveCfg = Debug|Win32
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Debug|Win32.Build.0 = Debug|Win32
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Debug|x64.ActiveCfg = Debug|x64
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Debug|x64.Build.0 = Debug|x64
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Release|Win32.ActiveCfg = Release|Win32
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Release|Win32.Build.0 = Release|Win32
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Release|x64.ActiveCfg = Release|x64
{EEF00329-4598-4E34-B969-9DD4B0815E6C}.Release|x64.Build.0 = Release|x64
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Debug|Win32.ActiveCfg = Debug|Win32
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Debug|Win32.Build.0 = Debug|Win32
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Debug|x64.ActiveCfg = Debug|x64
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Debug|x64.Build.0 = Debug|x64
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Release|Win32.ActiveCfg = Release|Win32
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Release|Win32.Build.0 = Release|Win32
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Release|x64.ActiveCfg = Release|x64
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}.Release|x64.Build.0 = Release|x64
{608C6C67-7766-471F-BBFF-8B00086039AF}.Debug|Win32.ActiveCfg = Debug|Win32
{608C6C67-7766-471F-BBFF-8B00086039AF}.Debug|Win32.Build.0 = Debug|Win32
{608C6C67-7766-471F-BBFF-8B00086039AF}.Debug|x64.ActiveCfg = Debug|x64
{608C6C67-7766-471F-BBFF-8B00086039AF}.Debug|x64.Build.0 = Debug|x64
{608C6C67-7766-471F-BBFF-8B00086039AF}.Release|Win32.ActiveCfg = Release|Win32
{608C6C67-7766-471F-BBFF-8B00086039AF}.Release|Win32.Build.0 = Release|Win32
{608C6C67-7766-471F-BBFF-8B00086039AF}.Release|x64.ActiveCfg = Release|x64
{608C6C67-7766-471F-BBFF-8B00086039AF}.Release|x64.Build.0 = Release|x64
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Debug|Win32.ActiveCfg = Debug|Win32
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Debug|Win32.Build.0 = Debug|Win32
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Debug|x64.ActiveCfg = Debug|x64
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Debug|x64.Build.0 = Debug|x64
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|Win32.ActiveCfg = Release|Win32
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|Win32.Build.0 = Release|Win32
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|x64.ActiveCfg = Release|x64
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|x64.Build.0 = Release|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|Win32.ActiveCfg = Debug|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|Win32.Build.0 = Debug|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|x64.ActiveCfg = Debug|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|x64.Build.0 = Debug|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Release|Win32.ActiveCfg = Release|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Release|Win32.Build.0 = Release|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Release|x64.ActiveCfg = Release|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -279,7 +524,7 @@ Global
{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{66B32F7E-5716-48D0-B5B9-D832FD052DD5} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {66B32F7E-5716-48D0-B5B9-D832FD052DD5} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{97A3A89b-E023-48CD-905F-CDBDE8D951DE} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {97A3A89B-E023-48CD-905F-CDBDE8D951DE} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
@@ -299,6 +544,34 @@ Global
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{70B894A9-E306-49E8-ABC2-932A952A5E5F} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {70B894A9-E306-49E8-ABC2-932A952A5E5F} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3} = {D69D5741-611F-4E14-8541-1FEE94F50B5A} {C4E04D18-EF76-4B42-B4C2-16A1BACDC1A3} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{1B61A1B7-92DE-4C37-9151-D2928D6449AB} = {1498F0CD-F4DA-4847-9CB2-FB18D48061D5}
{EB448819-74BC-40C9-A61A-4D4ECD55F9D5} = {1B61A1B7-92DE-4C37-9151-D2928D6449AB}
{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0} = {1B61A1B7-92DE-4C37-9151-D2928D6449AB}
{AAEC8338-4D33-4AF5-9A1F-B9FF027D4607} = {1498F0CD-F4DA-4847-9CB2-FB18D48061D5}
{510ACF0C-4012-4216-98EF-E4F155DE33CE} = {AAEC8338-4D33-4AF5-9A1F-B9FF027D4607}
{D1BF59F6-22DC-493B-BDEB-451A50DA793D} = {1498F0CD-F4DA-4847-9CB2-FB18D48061D5}
{7820969A-5B7B-4046-BB0A-82905D457FC5} = {D1BF59F6-22DC-493B-BDEB-451A50DA793D}
{F2247885-8EE8-42F4-A702-4155587620E0} = {1498F0CD-F4DA-4847-9CB2-FB18D48061D5}
{5EDA1ED3-8213-4C12-B0DF-B631EB611804} = {F2247885-8EE8-42F4-A702-4155587620E0}
{F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A} = {1498F0CD-F4DA-4847-9CB2-FB18D48061D5}
{896557AC-7575-480C-8FFD-AB08B5DA305D} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{504DC7EC-D82E-448E-9C7D-3BE7981592B3} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{BDE7DBC0-DCE7-432E-8750-C4AE55463699} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{540AE143-A58F-4D3B-B843-94EA8576522D} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{7091C001-3D71-47D4-B27B-E99271E5B987} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{AF8BC84E-0268-4D1F-9503-84D9EE84C65F} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{E9C6A7A6-22C0-42E6-AC9C-8580A396D077} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{EEF00329-4598-4E34-B969-9DD4B0815E6C} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{608C6C67-7766-471F-BBFF-8B00086039AF} = {1B61A1B7-92DE-4C37-9151-D2928D6449AB}
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60} = {D1BF59F6-22DC-493B-BDEB-451A50DA793D}
{75AEE75A-C016-4497-960B-D767B822237D} = {D1BF59F6-22DC-493B-BDEB-451A50DA793D}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD} SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{D68EA64A-14ED-4DBF-B86C-9EC2DDC476FB}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\01-simple-playback\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\01-simple-playback\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{8C80733B-1F90-4682-A999-91699127F182}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\02-simple-playback-callback\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\02-simple-playback-callback\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{E941FE4D-964C-43C6-A486-B0966633BED6}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\03-load-wav\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\03-load-wav\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{20B1B6AE-B282-4E65-863A-28301B6C5E9F}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\camera\01-read-and-draw\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\camera\01-read-and-draw\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{7239E6E4-3C4E-45DE-81B4-3BC7635BE63F}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\game\01-snake\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\game\01-snake\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{25BB7BA9-DCAB-4944-9F2A-E316D63AF356}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\pen\01-drawing-lines\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\pen\01-drawing-lines\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{541DB2BF-7BE8-402C-8D7C-4BCC5A16DCDF}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\01-clear\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\01-clear\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{1C512964-A1E4-4569-8EA4-1165D89A9FD9}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\02-primitives\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\02-primitives\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{156986DD-710A-4627-8159-19FD1CE0C243}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\03-lines\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\03-lines\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{3D355C93-8429-4226-82D5-F8A63BC02801}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\04-points\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\04-points\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{03CFCE68-B607-4781-8348-4F5F93A09A63}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\05-rectangles\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\05-rectangles\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{90118B89-7011-4BDA-AF6E-FAEF74BAD73C}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\06-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\06-textures\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{2FE0342B-DB71-42D9-918D-C48099167DB9}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\07-streaming-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\07-streaming-textures\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{E0D48833-9BD2-46EC-A1DA-BC06C521E3CB}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\08-rotating-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\08-rotating-textures\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{76D6D01E-79C3-4599-8920-DADDD5D8F8D0}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\09-scaling-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\09-scaling-textures\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{FA567681-211A-43AB-A9B2-6C1EC39CEBFF}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\10-geometry\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\10-geometry\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{6539C356-F420-4EBF-937A-E03C1EDEF8D5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\11-color-mods\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\11-color-mods\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{42C0ABC6-6E99-4FE2-B4DB-8B1DFA9D2AEC}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\14-viewport\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\14-viewport\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{2ED69519-A202-4B6E-870E-71FD43A5B883}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\15-cliprect\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\15-cliprect\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{94DB4D43-D07D-4CD3-94FF-B6E96CC97C60}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\17-read-pixels\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\17-read-pixels\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{72F39D57-7D82-4040-AE2B-CA7C922506E3}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\18-debug-text\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\18-debug-text\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\SDL\SDL.vcxproj">
<Project>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{EB448819-74BC-40C9-A61A-4D4ECD55F9D5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\01-simple-playback\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\01-simple-playback\simple-playback.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{6B710DFF-8A4A-40A2-BF2D-88D266F3D4F0}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\02-simple-playback-callback\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\02-simple-playback-callback\simple-playback-callback.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{608C6C67-7766-471F-BBFF-8B00086039AF}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\audio\03-load-wav\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\audio\03-load-wav\load-wav.c" />
<Content Include="$(SolutionDir)\..\test\sample.wav" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{510ACF0C-4012-4216-98EF-E4F155DE33CE}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\camera\01-read-and-draw\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\camera\01-read-and-draw\read-and-draw.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{7820969A-5B7B-4046-BB0A-82905D457FC5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\game\01-snake\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\game\01-snake\snake.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\game\02-woodeneye-008\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\game\02-woodeneye-008\woodeneye-008.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{75AEE75A-C016-4497-960B-D767B822237D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\game\03-infinite-monkeys\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\game\03-infinite-monkeys\infinite-monkeys.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

54
VisualC/examples/generate.py Executable file
View File

@@ -0,0 +1,54 @@
import os
import pathlib
import uuid
REPOSITORY_ROOT = pathlib.Path(__file__).parent.parent.parent
def generate(category, example_name, c_source_file):
guid = str(uuid.uuid4()).upper()
text = f"""
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{{{guid}}}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\\..\\examples\\{category}\\{example_name}\\README.txt" />
<ClCompile Include="$(SolutionDir)\\..\\examples\\{category}\\{example_name}\\{c_source_file}" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />
</Project>
""".strip()
project_file = REPOSITORY_ROOT / "VisualC" / "examples" / category / example_name / f"{example_name}.vcxproj"
if project_file.exists():
print("Skipping:", project_file)
return
print("Generating file:", project_file)
os.makedirs(project_file.parent, exist_ok=True)
with open(project_file, "w", encoding="utf-8") as f:
f.write(text)
def get_c_source_filename(example_dir: pathlib.Path):
"""Gets the one and only C source file name in the directory of the example."""
c_files = [f.name for f in example_dir.iterdir() if f.name.endswith(".c")]
assert len(c_files) == 1
return c_files[0]
def main():
path = REPOSITORY_ROOT / "examples"
for category in path.iterdir():
if category.is_dir():
for example in category.iterdir():
generate(category.name, example.name, get_c_source_filename(example))
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{5EDA1ED3-8213-4C12-B0DF-B631EB611804}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\pen\01-drawing-lines\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\pen\01-drawing-lines\drawing-lines.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{896557AC-7575-480C-8FFD-AB08B5DA305D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\01-clear\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\01-clear\clear.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{504DC7EC-D82E-448E-9C7D-3BE7981592B3}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\02-primitives\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\02-primitives\primitives.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{BDE7DBC0-DCE7-432E-8750-C4AE55463699}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\03-lines\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\03-lines\lines.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{7B250AB1-92D3-4F1A-BEB4-19605A69CEDB}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\04-points\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\04-points\points.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{4C0E3A60-24F8-4D4C-81C0-C1777F5E7B17}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\05-rectangles\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\05-rectangles\rectangles.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{B3D61611-BFA3-4B66-ADC7-A3CE578A6D36}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\06-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\06-textures\textures.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{540AE143-A58F-4D3B-B843-94EA8576522D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\07-streaming-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\07-streaming-textures\streaming-textures.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{7091C001-3D71-47D4-B27B-E99271E5B987}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\08-rotating-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\08-rotating-textures\rotating-textures.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{AF8BC84E-0268-4D1F-9503-84D9EE84C65F}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\09-scaling-textures\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\09-scaling-textures\scaling-textures.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{8B9AB23E-3F40-4145-BA1C-B2CEACFBBD72}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\10-geometry\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\10-geometry\geometry.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{E9C6A7A6-22C0-42E6-AC9C-8580A396D077}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\11-color-mods\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\11-color-mods\color-mods.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{B85BC466-C7F0-4C6D-8ECF-ED57E775FC73}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\14-viewport\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\14-viewport\viewport.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{9DBD962F-EA4D-44E3-8E8E-31D7F060A2DC}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\15-cliprect\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\15-cliprect\cliprect.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{EEF00329-4598-4E34-B969-9DD4B0815E6C}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\17-read-pixels\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\17-read-pixels\read-pixels.c" />
<Content Include="$(SolutionDir)\..\test\sample.bmp" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\renderer\18-debug-text\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\renderer\18-debug-text\debug-text.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -19,10 +19,10 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.1.3</string> <string>3.1.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>SDLX</string> <string>SDLX</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>3.1.3</string> <string>3.1.6</string>
</dict> </dict>
</plist> </plist>

View File

@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 55; objectVersion = 54;
objects = { objects = {
/* Begin PBXAggregateTarget section */ /* Begin PBXAggregateTarget section */
@@ -43,7 +43,7 @@
000080903BC03006F24E0000 /* SDL_filesystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 00002B010DB1A70931C20000 /* SDL_filesystem.c */; }; 000080903BC03006F24E0000 /* SDL_filesystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 00002B010DB1A70931C20000 /* SDL_filesystem.c */; };
000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000641A9BAC11AB3FBE0000 /* SDL_time.c */; }; 000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000641A9BAC11AB3FBE0000 /* SDL_time.c */; };
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; }; 000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; };
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); }; 0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; };
0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; }; 0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; };
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); }; 007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); };
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); }; 007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); };
@@ -421,8 +421,8 @@
F37A8E1A28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; }; F37A8E1A28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
F37E184E2B8C097D0098C111 /* SDL_camera.h in Headers */ = {isa = PBXBuildFile; fileRef = 000084ED0A56E3ED52F90000 /* SDL_camera.h */; settings = {ATTRIBUTES = (Public, ); }; }; F37E184E2B8C097D0098C111 /* SDL_camera.h in Headers */ = {isa = PBXBuildFile; fileRef = 000084ED0A56E3ED52F90000 /* SDL_camera.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18512BA50E750098C111 /* SDL_dialog.h */; settings = {ATTRIBUTES = (Public, ); }; }; F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18512BA50E750098C111 /* SDL_dialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */; platformFilters = (macos, ); }; F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */; };
F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F37E18592BA50F450098C111 /* SDL_dummydialog.c */; platformFilters = (ios, maccatalyst, tvos, xros, ); }; F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F37E18592BA50F450098C111 /* SDL_dummydialog.c */; };
F37E185C2BAA3EF90098C111 /* SDL_time.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E185B2BAA3EF90098C111 /* SDL_time.h */; settings = {ATTRIBUTES = (Public, ); }; }; F37E185C2BAA3EF90098C111 /* SDL_time.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E185B2BAA3EF90098C111 /* SDL_time.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */; }; F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */; };
F37E18642BAA40670098C111 /* SDL_time_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18632BAA40670098C111 /* SDL_time_c.h */; }; F37E18642BAA40670098C111 /* SDL_time_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18632BAA40670098C111 /* SDL_time_c.h */; };
@@ -1049,6 +1049,7 @@
F3F528C82C29E1C300E6CC26 /* s_isnan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isnan.c; sourceTree = "<group>"; }; F3F528C82C29E1C300E6CC26 /* s_isnan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isnan.c; sourceTree = "<group>"; };
F3F528C92C29E1C300E6CC26 /* s_modf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_modf.c; sourceTree = "<group>"; }; F3F528C92C29E1C300E6CC26 /* s_modf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_modf.c; sourceTree = "<group>"; };
F3F528CA2C29E1C300E6CC26 /* s_isinff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isinff.c; sourceTree = "<group>"; }; F3F528CA2C29E1C300E6CC26 /* s_isinff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isinff.c; sourceTree = "<group>"; };
F3F7BE3B2CBD79D200C984AF /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
F3F7D8AA2933074900816151 /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_audio.h; path = SDL3/SDL_audio.h; sourceTree = "<group>"; }; F3F7D8AA2933074900816151 /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_audio.h; path = SDL3/SDL_audio.h; sourceTree = "<group>"; };
F3F7D8AB2933074900816151 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = SDL3/SDL_platform.h; sourceTree = "<group>"; }; F3F7D8AB2933074900816151 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = SDL3/SDL_platform.h; sourceTree = "<group>"; };
F3F7D8AC2933074900816151 /* SDL_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_stdinc.h; path = SDL3/SDL_stdinc.h; sourceTree = "<group>"; }; F3F7D8AC2933074900816151 /* SDL_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_stdinc.h; path = SDL3/SDL_stdinc.h; sourceTree = "<group>"; };
@@ -1314,6 +1315,7 @@
0867D691FE84028FC02AAC07 /* SDLFramework */ = { 0867D691FE84028FC02AAC07 /* SDLFramework */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F3F7BE3B2CBD79D200C984AF /* config.xcconfig */,
F5A2EF3900C6A39A01000001 /* BUGS.txt */, F5A2EF3900C6A39A01000001 /* BUGS.txt */,
F59C70FC00D5CB5801000001 /* pkg-support */, F59C70FC00D5CB5801000001 /* pkg-support */,
0153844A006D81B07F000001 /* Public Headers */, 0153844A006D81B07F000001 /* Public Headers */,
@@ -2793,7 +2795,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/share/cmake/SDL3/sdl3-config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/resources/share/cmake/SDL3/sdl3-config-version.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n"; shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/share/cmake/SDL3/SDL3Config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/share/cmake/SDL3/SDL3ConfigVersion.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
}; };
F3B38CF0296F63D1005DA6D3 /* ShellScript */ = { F3B38CF0296F63D1005DA6D3 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
@@ -3079,8 +3081,8 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
DEPLOYMENT_POSTPROCESSING = YES; DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 104.0.0; DYLIB_COMPATIBILITY_VERSION = 107.0.0;
DYLIB_CURRENT_VERSION = 104.0.0; DYLIB_CURRENT_VERSION = 107.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES; GCC_ALTIVEC_EXTENSIONS = YES;
@@ -3089,6 +3091,7 @@
GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3; GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = "$(CONFIG_PREPROCESSOR_DEFINITIONS)";
GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
../../include, ../../include,
@@ -3111,7 +3114,8 @@
"@loader_path/Frameworks", "@loader_path/Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.1.3; MARKETING_VERSION = 3.1.6;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3; PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3; PRODUCT_NAME = SDL3;
STRIP_STYLE = "non-global"; STRIP_STYLE = "non-global";
@@ -3124,6 +3128,7 @@
}; };
00CFA622106A567900758660 /* Release */ = { 00CFA622106A567900758660 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = F3F7BE3B2CBD79D200C984AF /* config.xcconfig */;
buildSettings = { buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO; CLANG_LINK_OBJC_RUNTIME = NO;
OTHER_LDFLAGS = "-liconv"; OTHER_LDFLAGS = "-liconv";
@@ -3137,8 +3142,8 @@
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
DYLIB_COMPATIBILITY_VERSION = 104.0.0; DYLIB_COMPATIBILITY_VERSION = 107.0.0;
DYLIB_CURRENT_VERSION = 104.0.0; DYLIB_CURRENT_VERSION = 107.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath"; DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@@ -3147,6 +3152,7 @@
GCC_ENABLE_SSE3_EXTENSIONS = YES; GCC_ENABLE_SSE3_EXTENSIONS = YES;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = "$(CONFIG_PREPROCESSOR_DEFINITIONS)";
GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
../../include, ../../include,
@@ -3169,8 +3175,9 @@
"@loader_path/Frameworks", "@loader_path/Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.1.3; MARKETING_VERSION = 3.1.6;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3; PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3; PRODUCT_NAME = SDL3;
STRIP_INSTALLED_PRODUCT = NO; STRIP_INSTALLED_PRODUCT = NO;
@@ -3183,6 +3190,7 @@
}; };
00CFA628106A568900758660 /* Debug */ = { 00CFA628106A568900758660 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = F3F7BE3B2CBD79D200C984AF /* config.xcconfig */;
buildSettings = { buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO; CLANG_LINK_OBJC_RUNTIME = NO;
OTHER_LDFLAGS = "-liconv"; OTHER_LDFLAGS = "-liconv";

12
Xcode/SDL/config.xcconfig Normal file
View File

@@ -0,0 +1,12 @@
//
// config.xcconfig
//
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
// Include any optional config for this build
#include? "build.xcconfig"
CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) $(SDL_PREPROCESSOR_DEFINITIONS)
CONFIG_FRAMEWORK_LDFLAGS = $(inherited)

View File

@@ -1,4 +1,4 @@
Title SDL 3.1.3 Title SDL 3.1.6
Version 1 Version 1
Description SDL Library for macOS (http://www.libsdl.org) Description SDL Library for macOS (http://www.libsdl.org)
DefaultLocation /Library/Frameworks DefaultLocation /Library/Frameworks

View File

@@ -0,0 +1,8 @@
//
// build.xcconfig
//
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
SDL_PREPROCESSOR_DEFINITIONS = SDL_VENDOR_INFO=\"libsdl.org\"

View File

@@ -32,14 +32,24 @@ endmacro()
set(SDL3_FOUND TRUE) set(SDL3_FOUND TRUE)
macro(_check_target_is_simulator) macro(_check_target_is_simulator)
include(CheckCSourceCompiles) set(src [===[
check_c_source_compiles([===[
#include <TargetConditionals.h> #include <TargetConditionals.h>
#if defined(TARGET_OS_SIMULATOR) #if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR
int target_is_simulator; int target_is_simulator;
#endif #endif
int main(int argc, char *argv[]) { return target_is_simulator; } int main(int argc, char *argv[]) { return target_is_simulator; }
]===] SDL_TARGET_IS_SIMULATOR) ]===])
if(CMAKE_C_COMPILER)
include(CheckCSourceCompiles)
check_c_source_compiles("${src}" SDL_TARGET_IS_SIMULATOR)
elseif(CMAKE_CXX_COMPILER)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("${src}" SDL_TARGET_IS_SIMULATOR)
else()
enable_language(C)
include(CheckCSourceCompiles)
check_c_source_compiles("${src}" SDL_TARGET_IS_SIMULATOR)
endif()
endmacro() endmacro()
if(CMAKE_SYSTEM_NAME STREQUAL "iOS") if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
@@ -59,7 +69,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "tvOS")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(_xcfw_target_subdir "macos-arm64_x86_64") set(_xcfw_target_subdir "macos-arm64_x86_64")
else() else()
message(WARNING "Unsupported Apple platform (${CMAKE_SYSTEM_NAME}) and broken sdl3-config-version.cmake") message(WARNING "Unsupported Apple platform (${CMAKE_SYSTEM_NAME}) and broken SDL3ConfigVersion.cmake")
set(SDL3_FOUND FALSE) set(SDL3_FOUND FALSE)
return() return()
endif() endif()
@@ -89,7 +99,9 @@ set(SDL3_Headers_FOUND TRUE)
if(NOT TARGET SDL3::SDL3-shared) if(NOT TARGET SDL3::SDL3-shared)
add_library(SDL3::SDL3-shared SHARED IMPORTED) add_library(SDL3::SDL3-shared SHARED IMPORTED)
if(CMAKE_VERSION GREATER_EQUAL "3.28") # CMake does not automatically add RPATHS when using xcframeworks
# https://gitlab.kitware.com/cmake/cmake/-/issues/25998
if(0) # if(CMAKE_VERSION GREATER_EQUAL "3.28")
set_target_properties(SDL3::SDL3-shared set_target_properties(SDL3::SDL3-shared
PROPERTIES PROPERTIES
FRAMEWORK "TRUE" FRAMEWORK "TRUE"

View File

@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 55; objectVersion = 54;
objects = { objects = {
/* Begin PBXAggregateTarget section */ /* Begin PBXAggregateTarget section */

View File

@@ -33,6 +33,7 @@
<!-- Audio recording support --> <!-- Audio recording support -->
<!-- if you want to record audio, uncomment this. --> <!-- if you want to record audio, uncomment this. -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
<!-- <uses-feature <!-- <uses-feature
android:name="android.hardware.microphone" android:name="android.hardware.microphone"
android:required="false" /> --> android:required="false" /> -->
@@ -55,8 +56,11 @@
<!-- Allow access to the vibrator --> <!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<!-- if you want to record audio, uncomment this. --> <!-- Allow access to Internet -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> --> <!-- if you want to connect to the network or internet, uncomment this. -->
<!--
<uses-permission android:name="android.permission.INTERNET" />
-->
<!-- Create a Java class extending SDLActivity and place it in a <!-- Create a Java class extending SDLActivity and place it in a
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
@@ -80,7 +84,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:alwaysRetainTaskState="true" android:alwaysRetainTaskState="true"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation" android:configChanges="layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:preferMinimalPostProcessing="true" android:preferMinimalPostProcessing="true"
android:exported="true" android:exported="true"
> >

View File

@@ -60,7 +60,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL"; private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 3; private static final int SDL_MAJOR_VERSION = 3;
private static final int SDL_MINOR_VERSION = 1; private static final int SDL_MINOR_VERSION = 1;
private static final int SDL_MICRO_VERSION = 3; private static final int SDL_MICRO_VERSION = 6;
/* /*
// Display InputType.SOURCE/CLASS of events and devices // Display InputType.SOURCE/CLASS of events and devices
// //

View File

@@ -65,7 +65,7 @@ SDL_OpenAudioDevice(...)
expression e; expression e;
@@ @@
- SDL_PauseAudio(e) - SDL_PauseAudio(e)
+ e == SDL_TRUE ? SDL_PauseAudioDevice(g_audio_id) : SDL_PlayAudioDevice(g_audio_id) + e ? SDL_PauseAudioDevice(g_audio_id) : SDL_PlayAudioDevice(g_audio_id)
@@ @@
@@ @@
@@ -92,13 +92,13 @@ expression e1;
@@ @@
( (
- SDL_EventState(e1, SDL_IGNORE) - SDL_EventState(e1, SDL_IGNORE)
+ SDL_SetEventEnabled(e1, SDL_FALSE) + SDL_SetEventEnabled(e1, false)
| |
- SDL_EventState(e1, SDL_DISABLE) - SDL_EventState(e1, SDL_DISABLE)
+ SDL_SetEventEnabled(e1, SDL_FALSE) + SDL_SetEventEnabled(e1, false)
| |
- SDL_EventState(e1, SDL_ENABLE) - SDL_EventState(e1, SDL_ENABLE)
+ SDL_SetEventEnabled(e1, SDL_TRUE) + SDL_SetEventEnabled(e1, true)
| |
- SDL_EventState(e1, SDL_QUERY) - SDL_EventState(e1, SDL_QUERY)
+ SDL_EventEnabled(e1) + SDL_EventEnabled(e1)
@@ -2062,7 +2062,7 @@ expression e;
@@ @@
@@ @@
- SDL_WINDOWEVENT_TAKE_FOCUS - SDL_WINDOWEVENT_TAKE_FOCUS
+ SDL_EVENT_WINDOW_TAKE_FOCUS + /* FIXME MIGRATION: SDL_WINDOWEVENT_TAKE_FOCUS has been removed; there is no replacement. */ 0
@@ @@
@@ @@
- SDL_WINDOWEVENT_HIT_TEST - SDL_WINDOWEVENT_HIT_TEST
@@ -3633,11 +3633,11 @@ typedef SDL_JoystickGUID, SDL_GUID;
@@ @@
@@ @@
- SDL_PRESSED - SDL_PRESSED
+ SDL_TRUE + true
@@ @@
@@ @@
- SDL_RELEASED - SDL_RELEASED
+ SDL_FALSE + false
// This should be the last rule in the file, since it works on SDL3 functions and previous rules may have renamed old functions. // This should be the last rule in the file, since it works on SDL3 functions and previous rules may have renamed old functions.
@ bool_return_type @ @ bool_return_type @
@@ -3689,6 +3689,7 @@ identifier func =~ "^(SDL_AddEventWatch|SDL_AddHintCallback|SDL_AddSurfaceAltern
+ SDL_GetNumLogicalCPUCores + SDL_GetNumLogicalCPUCores
(...) (...)
@@ @@
typedef SDL_bool, bool;
@@ @@
- SDL_bool - SDL_bool
+ bool + bool
@@ -3714,3 +3715,19 @@ identifier func =~ "^(SDL_AddEventWatch|SDL_AddHintCallback|SDL_AddSurfaceAltern
@@ @@
- SDL_BUTTON - SDL_BUTTON
+ SDL_BUTTON_MASK + SDL_BUTTON_MASK
@@
@@
- SDL_GLprofile
+ SDL_GLProfile
@@
@@
- SDL_GLcontextFlag
+ SDL_GLContextFlag
@@
@@
- SDL_GLcontextReleaseFlag
+ SDL_GLContextReleaseFlag
@@
@@
- SDL_GLattr
+ SDL_GLAttr

View File

@@ -25,7 +25,7 @@ cd $srcdir
build=build build=build
buildandroid=$build/android buildandroid=$build/android
platform=android-16 platform=android-21
abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64" abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
obj= obj=
lib= lib=

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,9 @@ def android_mk_use_prefab(path: Path) -> None:
data, _ = re.subn("[\n]{3,}", "\n\n", data) data, _ = re.subn("[\n]{3,}", "\n\n", data)
data, count = re.subn(r"(LOCAL_SHARED_LIBRARIES\s*:=\s*SDL3)", "LOCAL_SHARED_LIBRARIES := SDL3 SDL3-Headers", data)
assert count == 1, f"Must have injected SDL3-Headers in {path} exactly once"
newdata = data + textwrap.dedent(""" newdata = data + textwrap.dedent("""
# https://google.github.io/prefab/build-systems.html # https://google.github.io/prefab/build-systems.html

43
build-scripts/create-release.py Executable file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env python3
import argparse
from pathlib import Path
import json
import logging
import re
import subprocess
ROOT = Path(__file__).resolve().parents[1]
def determine_remote() -> str:
text = (ROOT / "build-scripts/release-info.json").read_text()
release_info = json.loads(text)
if "remote" in release_info:
return release_info["remote"]
project_with_version = release_info["name"]
project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
return f"libsdl-org/{project}"
def main():
default_remote = determine_remote()
current_commit = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=ROOT, text=True).strip()
parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml")
parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})")
parser.add_argument("--commit", default=current_commit, help=f"Commit (default={current_commit})")
args = parser.parse_args()
print(f"Running release.yml workflow:")
print(f" commit = {args.commit}")
print(f" remote = {args.remote}")
subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT)
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -1,6 +0,0 @@
#!/bin/sh
commit=$(git rev-parse HEAD)
echo "Creating release workflow for commit $commit"
gh workflow run release.yml --ref main -f commit=$commit

View File

@@ -13,23 +13,28 @@ foreach (@ARGV) {
chdir(dirname(__FILE__)); chdir(dirname(__FILE__));
chdir('..'); chdir('..');
my %fulltags = ();
my @unsorted_releases = (); my @unsorted_releases = ();
open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n"; open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
while (<PIPEFH>) { while (<PIPEFH>) {
chomp; chomp;
if (/\Arelease\-(.*?)\Z/) { my $fulltag = $_;
if ($fulltag =~ /\A(prerelease|preview|release)\-(\d+)\.(\d+)\.(\d+)\Z/) {
# Ignore anything that isn't a x.y.0 release. # Ignore anything that isn't a x.y.0 release.
# Make sure new APIs are assigned to the next minor version and ignore the patch versions. # Make sure new APIs are assigned to the next minor version and ignore the patch versions, but we'll make an except for the prereleases.
my $ver = $1; my $release_type = $1;
my @versplit = split /\./, $ver; my $major = int($2);
next if (scalar(@versplit) < 1) || ($versplit[0] != 3); # Ignore anything that isn't an SDL3 release. my $minor = int($3);
next if (scalar(@versplit) < 3) || ($versplit[2] != 0); my $patch = int($4);
next if ($major != 3); # Ignore anything that isn't an SDL3 release.
next if ($patch != 0) && ($minor >= 2); # Ignore anything that is a patch release (unless it was between the preview release and the official release).
# Consider this release version. # Consider this release version.
my $ver = "${major}.${minor}.${patch}";
push @unsorted_releases, $ver; push @unsorted_releases, $ver;
$fulltags{$ver} = $fulltag;
} }
} }
close(PIPEFH); close(PIPEFH);
@@ -52,16 +57,22 @@ my @releases = sort {
return 0; # still here? They matched completely?! return 0; # still here? They matched completely?!
} @unsorted_releases; } @unsorted_releases;
my $current_release = 'in-development'; my $current_release = $releases[-1];
my $next_release = '3.0.0'; # valid until we actually ship something. :) my $next_release;
if (scalar(@releases) > 0) { if (scalar(@releases) > 0) {
# this happens to work for how SDL versions things at the moment. # this happens to work for how SDL versions things at the moment.
$current_release = $releases[-1]; $current_release = $releases[-1];
my @current_release_segments = split /\./, $current_release; my @current_release_segments = split /\./, $current_release;
@current_release_segments[1] = '' . ($current_release_segments[1] + 2); # if we're still in the 3.1.x prereleases, call the "next release" 3.2.0 even if we do more prereleases.
if (($current_release_segments[0] == '3') && ($current_release_segments[1] == '1')) {
$next_release = '3.2.0';
} else {
@current_release_segments[1] = '' . (int($current_release_segments[1]) + 2);
$next_release = join('.', @current_release_segments); $next_release = join('.', @current_release_segments);
} }
}
#print("\n\nSORTED\n"); #print("\n\nSORTED\n");
#foreach (@releases) { #foreach (@releases) {
@@ -71,12 +82,20 @@ if (scalar(@releases) > 0) {
#print("NEXT RELEASE: $next_release\n\n"); #print("NEXT RELEASE: $next_release\n\n");
push @releases, 'HEAD'; push @releases, 'HEAD';
$fulltags{'HEAD'} = 'HEAD';
my %funcs = (); my %funcs = ();
foreach my $release (@releases) { foreach my $release (@releases) {
#print("Checking $release...\n"); #print("Checking $release...\n");
my $tag = ($release eq 'HEAD') ? $release : "release-$release"; my $tag = $fulltags{$release};
my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h"; my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h";
if ($release =~ /\A3\.[01]\.\d+/) { # make everything up to the first SDL3 prerelease look like 3.1.3 (ABI lock version).
$release = '3.1.3';
}
else { $release = '3.2.0'; } # !!! FIXME: REMOVE ME WHEN 3.2.0 SHIPS!
open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n"; open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n";
while (<PIPEFH>) { while (<PIPEFH>) {
chomp; chomp;
@@ -98,6 +117,7 @@ if (not defined $wikipath) {
if (defined $wikipath) { if (defined $wikipath) {
chdir($wikipath); chdir($wikipath);
foreach my $fn (keys %funcs) { foreach my $fn (keys %funcs) {
next if $fn eq 'SDL_ThreadID'; # this was a function early on (it's now called SDL_GetThreadID), but now it's a datatype (which originally had a different capitalization).
my $revision = $funcs{$fn}; my $revision = $funcs{$fn};
$revision = $next_release if $revision eq 'HEAD'; $revision = $next_release if $revision eq 'HEAD';
my $fname = "$fn.md"; my $fname = "$fn.md";

View File

@@ -1,8 +1,7 @@
This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source.
This Android archive allows use of @PROJECT_NAME@ in your Android project, without needing to copy any SDL source.
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/). For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
Copy this archive (@PROJECT_NAME@-@PROJECT_VERSION@.aar) to a `app/libs` directory of your project. Copy this archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
In `app/build.gradle` of your Android project, add: In `app/build.gradle` of your Android project, add:
``` ```
@@ -13,26 +12,30 @@ android {
} }
} }
dependencies { dependencies {
implementation files('libs/@PROJECT_NAME@-@PROJECT_VERSION@.aar') implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
/* ... */ /* ... */
} }
``` ```
If you're using CMake, add the following to your CMakeLists.txt: If you're using CMake, add the following to your CMakeLists.txt:
``` ```
find_package(@PROJECT_NAME@ REQUIRED CONFIG) find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
target_link_libraries(yourgame PRIVATE @PROJECT_NAME@::@PROJECT_NAME@) target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
``` ```
If you're using ndk-build, add the following somewhere after `LOCAL_MODULE := yourgame` to your `Android.mk` or `Application.mk`: If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
```
LOCAL_SHARED_LIBARARIES := SDL3 SDL3-Headers
```
And add the following at the bottom:
``` ```
# https://google.github.io/prefab/build-systems.html # https://google.github.io/prefab/build-systems.html
# Add the prefab modules to the import path. # Add the prefab modules to the import path.
$(call import-add-path,/out) $(call import-add-path,/out)
# Import @PROJECT_NAME@ so we can depend on it. # Import @<@PROJECT_NAME@>@ so we can depend on it.
$(call import-module,prefab/@PROJECT_NAME@) $(call import-module,prefab/@<@PROJECT_NAME@>@)
``` ```
--- ---
@@ -42,7 +45,7 @@ For advanced users:
If you want to build a 3rd party library outside Gradle, If you want to build a 3rd party library outside Gradle,
running the following command will extract the Android archive into a more common directory structure. running the following command will extract the Android archive into a more common directory structure.
``` ```
python @PROJECT_NAME@-@PROJECT_VERSION@.aar -o android_prefix python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
``` ```
Add `--help` for a list of all available options. Add `--help` for a list of all available options.

View File

@@ -1,12 +1,12 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
Create a @PROJECT_NAME@ SDK prefix from an Android archive Create a @<@PROJECT_NAME@>@ SDK prefix from an Android archive
This file is meant to be placed in a the root of an android .aar archive This file is meant to be placed in a the root of an android .aar archive
Example usage: Example usage:
```sh ```sh
python @PROJECT_NAME@-@PROJECT_VERSION@.aar -o /usr/opt/android-sdks python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o /usr/opt/android-sdks
cmake -S my-project \ cmake -S my-project \
-DCMAKE_PREFIX_PATH=/usr/opt/android-sdks \ -DCMAKE_PREFIX_PATH=/usr/opt/android-sdks \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
@@ -31,13 +31,14 @@ ANDROID_ARCHS = { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" }
def main(): def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Convert a @PROJECT_NAME@ Android .aar archive into a SDK", description="Convert a @<@PROJECT_NAME@>@ Android .aar archive into a SDK",
allow_abbrev=False, allow_abbrev=False,
) )
parser.add_argument("--version", action="version", version="@<@PROJECT_NAME@>@ @<@PROJECT_VERSION@>@")
parser.add_argument("-o", dest="output", type=pathlib.Path, required=True, help="Folder where to store the SDK") parser.add_argument("-o", dest="output", type=pathlib.Path, required=True, help="Folder where to store the SDK")
args = parser.parse_args() args = parser.parse_args()
print(f"Creating a @PROJECT_NAME@ SDK at {args.output}...") print(f"Creating a @<@PROJECT_NAME@>@ SDK at {args.output}...")
prefix = args.output prefix = args.output
incdir = prefix / "include" incdir = prefix / "include"
@@ -92,9 +93,8 @@ def main():
jarpath = javadir / f"{project_name}-{project_version}-sources.jar" jarpath = javadir / f"{project_name}-{project_version}-sources.jar"
read_zipfile_and_write(jarpath, zippath) read_zipfile_and_write(jarpath, zippath)
elif zippath == "classes-doc.jar": elif zippath == "classes-doc.jar":
data = zf.read(zippath) jarpath = javadocdir / f"{project_name}-{project_version}-javadoc.jar"
with zipfile.ZipFile(io.BytesIO(data)) as doc_zf: read_zipfile_and_write(jarpath, zippath)
doc_zf.extractall(javadocdir)
print("... done") print("... done")
return 0 return 0

View File

@@ -1,26 +1,7 @@
# based on the files generated by CMake's write_basic_package_version_file # @<@PROJECT_NAME@>@ CMake version configuration file:
# This file is meant to be placed in a lib/cmake/@<@PROJECT_NAME@>@ subfolder of a reconstructed Android SDL3 SDK
# SDL CMake version configuration file: set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
# This file is meant to be placed in a lib/cmake/SDL3 subfolder of a reconstructed Android SDL3 SDK
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../../include/SDL3/SDL_version.h")
message(AUTHOR_WARNING "Could not find SDL3/SDL_version.h. This script is meant to be placed in the root of SDL3-devel-3.x.y-VC")
return()
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../../include/SDL3/SDL_version.h" _sdl_version_h)
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
set(_sdl_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
set(_sdl_minor "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_MICRO_VERSION[ \t]+([0-9]+)" _sdl_micro_re "${_sdl_version_h}")
set(_sdl_micro "${CMAKE_MATCH_1}")
if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
else()
message(AUTHOR_WARNING "Could not extract version from SDL3/SDL_version.h.")
return()
endif()
if(PACKAGE_FIND_VERSION_RANGE) if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range # Package version must be in the requested version range

View File

@@ -0,0 +1,5 @@
{
"name": "@<@PROJECT_NAME@>@",
"version": "@<@PROJECT_VERSION@>@",
"git-hash": "@<@PROJECT_COMMIT@>@"
}

View File

@@ -26,6 +26,8 @@ install-x86_64:
install-all: install-all:
@if test -d $(DESTDIR); then \ @if test -d $(DESTDIR); then \
mkdir -p $(DESTDIR)/cmake; \
cp -rv cmake/* $(DESTDIR)/cmake; \
for arch in $(ARCHITECTURES); do \ for arch in $(ARCHITECTURES); do \
$(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \ $(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \
done \ done \

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>SDL_VENDOR_INFO="libsdl.org";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>

View File

@@ -1,5 +1,5 @@
# SDL CMake configuration file: # @<@PROJECT_NAME@>@ CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC # This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
cmake_minimum_required(VERSION 3.0...3.5) cmake_minimum_required(VERSION 3.0...3.5)
@@ -105,7 +105,7 @@ else()
endif() endif()
unset(_sdl3test_lib) unset(_sdl3test_lib)
if(SDL3_SDL3-shared_FOUND) if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND)
set(SDL3_SDL3_FOUND TRUE) set(SDL3_SDL3_FOUND TRUE)
endif() endif()

View File

@@ -1,26 +1,7 @@
# based on the files generated by CMake's write_basic_package_version_file # @<@PROJECT_NAME@>@ CMake version configuration file:
# This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
# SDL CMake version configuration file: set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3/SDL_version.h")
message(AUTHOR_WARNING "Could not find SDL3/SDL_version.h. This script is meant to be placed in the root of SDL3-devel-3.x.y-VC")
return()
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3/SDL_version.h" _sdl_version_h)
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
set(_sdl_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
set(_sdl_minor "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_MICRO_VERSION[ \t]+([0-9]+)" _sdl_micro_re "${_sdl_version_h}")
set(_sdl_micro "${CMAKE_MATCH_1}")
if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
else()
message(AUTHOR_WARNING "Could not extract version from SDL3/SDL_version.h.")
return()
endif()
if(PACKAGE_FIND_VERSION_RANGE) if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range # Package version must be in the requested version range

View File

@@ -0,0 +1,41 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* WIKI CATEGORY: Version */
/*
* SDL_revision.h contains the SDL revision, which might be defined on the
* compiler command line, or generated right into the header itself by the
* build system.
*/
#ifndef SDL_revision_h_
#define SDL_revision_h_
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
#if defined(SDL_VENDOR_INFO)
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
#endif
#endif /* SDL_revision_h_ */

View File

@@ -0,0 +1,56 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* WIKI CATEGORY: Version */
/*
* SDL_revision.h contains the SDL revision, which might be defined on the
* compiler command line, or generated right into the header itself by the
* build system.
*/
#ifndef SDL_revision_h_
#define SDL_revision_h_
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
/**
* This macro is a string describing the source at a particular point in
* development.
*
* This string is often generated from revision control's state at build time.
*
* This string can be quite complex and does not follow any standard. For
* example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732".
* It might also be user-defined at build time, so it's best to treat it as a
* clue in debugging forensics and not something the app will parse in any
* way.
*
* \since This macro is available since SDL 3.0.0.
*/
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
#elif defined(SDL_VENDOR_INFO)
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
#endif
#endif /* SDL_revision_h_ */

View File

@@ -0,0 +1,215 @@
{
"name": "SDL3",
"remote": "libsdl-org/SDL",
"version": {
"file": "include/SDL3/SDL_version.h",
"re_major": "^#define SDL_MAJOR_VERSION\\s+([0-9]+)$",
"re_minor": "^#define SDL_MINOR_VERSION\\s+([0-9]+)$",
"re_micro": "^#define SDL_MICRO_VERSION\\s+([0-9]+)$"
},
"source": {
"checks": [
"src/SDL.c",
"include/SDL3/SDL.h",
"test/testsprite.c",
"android-project/app/src/main/java/org/libsdl/app/SDLActivity.java"
],
"files": {
"include/SDL3": [
"build-scripts/pkg-support/source/SDL_revision.h.in:SDL_revision.h"
],
"include/build_config": [
"build-scripts/pkg-support/source/SDL_revision.h.cmake.in:SDL_revision.h.cmake"
]
}
},
"dmg": {
"project": "Xcode/SDL/SDL.xcodeproj",
"path": "Xcode/SDL/build/SDL3.dmg",
"target": "SDL3.dmg",
"build-xcconfig": "Xcode/SDL/pkg-support/build.xcconfig"
},
"mingw": {
"cmake": {
"archs": ["x86", "x64"],
"args": [
"-DSDL_SHARED=ON",
"-DSDL_STATIC=OFF",
"-DSDL_DISABLE_INSTALL_DOCS=ON",
"-DSDL_TEST_LIBRARY=ON",
"-DSDL_VENDOR_INFO=libsdl.org",
"-DSDL_TESTS=OFF"
],
"shared-static": "args"
},
"files": {
"": [
"build-scripts/pkg-support/mingw/INSTALL.txt",
"build-scripts/pkg-support/mingw/Makefile",
"BUGS.txt",
"CREDITS.md",
"README-SDL.txt",
"WhatsNew.txt",
"LICENSE.txt",
"README.md"
],
"cmake": [
"build-scripts/pkg-support/mingw/cmake/SDL3Config.cmake",
"build-scripts/pkg-support/mingw/cmake/SDL3ConfigVersion.cmake"
],
"docs": [
"docs/*"
],
"test": [
"test/*"
]
}
},
"msvc": {
"msbuild": {
"archs": [
"x86",
"x64"
],
"directory-build-props": "build-scripts/pkg-support/msvc/Directory.Build.props",
"projects": [
"VisualC/SDL/SDL.vcxproj",
"VisualC/SDL_test/SDL_test.vcxproj"
],
"files-lib": {
"": [
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.dll"
]
},
"files-devel": {
"lib/@<@ARCH@>@": [
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.dll",
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.lib",
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3.pdb",
"VisualC/SDL_test/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_test.lib"
]
}
},
"cmake": {
"archs": [
"arm64"
],
"args": [
"-DSDL_SHARED=ON",
"-DSDL_STATIC=OFF",
"-DSDL_TEST_LIBRARY=ON",
"-DSDL_TESTS=OFF",
"-DSDL_DISABLE_INSTALL_DOCS=ON",
"-DSDL_VENDOR_INFO=libsdl.org"
],
"files-lib": {
"": [
"bin/SDL3.dll"
]
},
"files-devel": {
"lib/@<@ARCH@>@": [
"bin/SDL3.dll",
"bin/SDL3.pdb",
"lib/SDL3.lib",
"lib/SDL3_test.lib"
]
}
},
"files-lib": {
"": [
"README-SDL.txt"
]
},
"files-devel": {
"": [
"README-SDL.txt",
"BUGS.txt",
"LICENSE.txt",
"README.md",
"WhatsNew.txt"
],
"cmake": [
"build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in:SDL3Config.cmake",
"build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake",
"cmake/sdlcpu.cmake"
],
"docs": [
"docs/*"
],
"include/SDL3": [
"include/SDL3/*.h"
]
}
},
"android": {
"cmake": {
"args": [
"-DSDL_SHARED=ON",
"-DSDL_STATIC=OFF",
"-DSDL_TEST_LIBRARY=ON",
"-DSDL_TESTS=OFF",
"-DSDL_DISABLE_ANDROID_JAR=OFF",
"-DSDL_DISABLE_INSTALL=OFF",
"-DSDL_DISABLE_INSTALL_DOCS=OFF",
"-DSDL_VENDOR_INFO=libsdl.org"
]
},
"modules": {
"SDL3-Headers": {
"type": "interface",
"includes": {
"SDL3": ["include/SDL3/*.h"]
}
},
"Headers": {
"type": "interface",
"export-libraries": [":SDL3-Headers"]
},
"SDL3_test": {
"type": "library",
"library": "lib/libSDL3_test.a",
"export-libraries": [":Headers"]
},
"SDL3-shared": {
"type": "library",
"library": "lib/libSDL3.so",
"export-libraries": [":Headers"]
},
"SDL3": {
"type": "interface",
"export-libraries": [":SDL3-shared"]
}
},
"jars": {
"classes": "share/java/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.jar",
"sources": "share/java/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@-sources.jar",
"doc": "share/javadoc/@<@PROJECT_NAME@>@/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@-javadoc.jar"
},
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86",
"x86_64"
],
"api-minimum": 19,
"api-target": 29,
"ndk-minimum": 21,
"files": {
"": [
"android-project/app/proguard-rules.pro:proguard.txt",
"build-scripts/pkg-support/android/INSTALL.md.in:INSTALL.md",
"build-scripts/pkg-support/android/__main__.py.in:__main__.py",
"build-scripts/pkg-support/android/description.json.in:description.json"
],
"META-INF": [
"LICENSE.txt"
],
"cmake": [
"cmake/sdlcpu.cmake",
"build-scripts/pkg-support/android/cmake/SDL3Config.cmake",
"build-scripts/pkg-support/android/cmake/SDL3ConfigVersion.cmake.in:SDL3ConfigVersion.cmake"
]
}
}
}

View File

@@ -40,7 +40,6 @@ if [ "$rev" != "" ]; then
echo "#else" >>"$header.new" echo "#else" >>"$header.new"
echo "#define SDL_REVISION \"SDL-$rev\"" >>"$header.new" echo "#define SDL_REVISION \"SDL-$rev\"" >>"$header.new"
echo "#endif" >>"$header.new" echo "#endif" >>"$header.new"
echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
if diff $header $header.new >/dev/null 2>&1; then if diff $header $header.new >/dev/null 2>&1; then
rm "$header.new" rm "$header.new"
else else

View File

@@ -1860,6 +1860,7 @@ if ($copy_direction == 1) { # --copy-to-headers
my @paramsorder = (); my @paramsorder = ();
my $fnsigparams = $headersymsparaminfo{$sym}; my $fnsigparams = $headersymsparaminfo{$sym};
my $has_returns = 0; my $has_returns = 0;
my $has_threadsafety = 0;
while (@doxygenlines) { while (@doxygenlines) {
my $l = shift @doxygenlines; my $l = shift @doxygenlines;
@@ -1998,6 +1999,7 @@ if ($copy_direction == 1) { # --copy-to-headers
} }
$desc =~ s/[\s\n]+\Z//ms; $desc =~ s/[\s\n]+\Z//ms;
$sections{'Thread Safety'} = wordwrap(wikify($wikitype, $desc)) . "\n"; $sections{'Thread Safety'} = wordwrap(wikify($wikitype, $desc)) . "\n";
$has_threadsafety = 1;
} elsif ($l =~ /\A\\sa\s+(.*)\Z/) { } elsif ($l =~ /\A\\sa\s+(.*)\Z/) {
my $sa = $1; my $sa = $1;
$sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func" $sa =~ s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
@@ -2014,6 +2016,11 @@ if ($copy_direction == 1) { # --copy-to-headers
print STDERR "WARNING: Function '$sym' has a non-void return type but no '\\returns' declaration\n"; print STDERR "WARNING: Function '$sym' has a non-void return type but no '\\returns' declaration\n";
} }
# !!! FIXME: uncomment this when we're trying to clean this up in the headers.
#if (($symtype == 1) && !$has_threadsafety) {
# print STDERR "WARNING: Function '$sym' doesn't have a '\\threadsafety' declaration\n";
#}
# Make sure %params is in the same order as the actual function signature and add C datatypes... # Make sure %params is in the same order as the actual function signature and add C datatypes...
my $params_has_c_datatype = 0; my $params_has_c_datatype = 0;
my @final_params = (); my @final_params = ();

View File

@@ -104,8 +104,9 @@ endfunction()
set(SDL_ANDROID_PLATFORM_ANDROID_JAR "SDL_ANDROID_PLATFORM_ANDROID_JAR-NOTFOUND") set(SDL_ANDROID_PLATFORM_ANDROID_JAR "SDL_ANDROID_PLATFORM_ANDROID_JAR-NOTFOUND")
if(NOT DEFINED SDL_ANDROID_PLATFORM_ROOT) if(NOT DEFINED SDL_ANDROID_PLATFORM_ROOT)
_sdl_find_android_platform_root(SDL_ANDROID_PLATFORM_ROOT) _sdl_find_android_platform_root(_new_sdl_android_platform_root)
set(SDL_ANDROID_PLATFORM_ROOT "${SDL_ANDROID_PLATFORM_ROOT}" CACHE PATH "Path of Android platform") set(SDL_ANDROID_PLATFORM_ROOT "${_new_sdl_android_platform_root}" CACHE PATH "Path of Android platform")
unset(_new_sdl_android_platform_root)
endif() endif()
if(SDL_ANDROID_PLATFORM_ROOT) if(SDL_ANDROID_PLATFORM_ROOT)
_sdl_is_valid_android_platform_root(_valid SDL_ANDROID_PLATFORM_VERSION "${SDL_ANDROID_PLATFORM_ROOT}") _sdl_is_valid_android_platform_root(_valid SDL_ANDROID_PLATFORM_VERSION "${SDL_ANDROID_PLATFORM_ROOT}")

View File

@@ -299,8 +299,8 @@ function(check_linker_supports_version_file VAR)
set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE) set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
else() else()
cmake_push_check_state(RESET) cmake_push_check_state(RESET)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/dummy.sym") list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym")
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)") check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
cmake_pop_check_state() cmake_pop_check_state()
endif() endif()
@@ -394,11 +394,21 @@ function(SDL_PrintSummary)
message(STATUS "") message(STATUS "")
endif() endif()
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN)) if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS))
if(NOT (HAVE_X11 OR HAVE_WAYLAND)) if(NOT (HAVE_X11 OR HAVE_WAYLAND))
message(STATUS "SDL is being built without a X11 or wayland video driver.") if(NOT SDL_UNIX_CONSOLE_BUILD)
message(STATUS "The library will not be able to create windows on most unix environments.") message(FATAL_ERROR
message(STATUS "") "SDL could not find X11 or Wayland development libraries on your system. "
"This means SDL will not be able to create windows on a typical unix operating system. "
"Most likely, this is not wanted."
"\n"
"On Linux, install the packages listed at "
"https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies "
"\n"
"If you really don't need desktop windows, the documentation tells you how to skip this check. "
"https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support\n"
)
endif()
endif() endif()
endif() endif()
endfunction() endfunction()

View File

@@ -135,7 +135,10 @@ endmacro()
macro(CheckPipewire) macro(CheckPipewire)
if(SDL_PIPEWIRE) if(SDL_PIPEWIRE)
set(PipeWire_PKG_CONFIG_SPEC libpipewire-0.3>=0.3.44) set(PipeWire_PKG_CONFIG_SPEC libpipewire-0.3>=0.3.44)
set(PC_PIPEWIRE_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PIPEWIRE IMPORTED_TARGET ${PipeWire_PKG_CONFIG_SPEC}) pkg_check_modules(PC_PIPEWIRE IMPORTED_TARGET ${PipeWire_PKG_CONFIG_SPEC})
endif()
if(PC_PIPEWIRE_FOUND) if(PC_PIPEWIRE_FOUND)
set(HAVE_PIPEWIRE TRUE) set(HAVE_PIPEWIRE TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/pipewire/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/pipewire/*.c")
@@ -167,7 +170,10 @@ endmacro()
macro(CheckPulseAudio) macro(CheckPulseAudio)
if(SDL_PULSEAUDIO) if(SDL_PULSEAUDIO)
set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=0.9.15") set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=0.9.15")
set(PC_PULSEAUDIO_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PULSEAUDIO IMPORTED_TARGET ${PulseAudio_PKG_CONFIG_SPEC}) pkg_check_modules(PC_PULSEAUDIO IMPORTED_TARGET ${PulseAudio_PKG_CONFIG_SPEC})
endif()
if(PC_PULSEAUDIO_FOUND) if(PC_PULSEAUDIO_FOUND)
set(HAVE_PULSEAUDIO TRUE) set(HAVE_PULSEAUDIO TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/pulseaudio/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/pulseaudio/*.c")
@@ -196,7 +202,10 @@ endmacro()
macro(CheckJACK) macro(CheckJACK)
if(SDL_JACK) if(SDL_JACK)
set(Jack_PKG_CONFIG_SPEC jack) set(Jack_PKG_CONFIG_SPEC jack)
set(PC_JACK_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_JACK IMPORTED_TARGET ${Jack_PKG_CONFIG_SPEC}) pkg_check_modules(PC_JACK IMPORTED_TARGET ${Jack_PKG_CONFIG_SPEC})
endif()
if(PC_JACK_FOUND) if(PC_JACK_FOUND)
set(HAVE_JACK TRUE) set(HAVE_JACK TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/jack/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/jack/*.c")
@@ -225,7 +234,10 @@ endmacro()
macro(CheckSNDIO) macro(CheckSNDIO)
if(SDL_SNDIO) if(SDL_SNDIO)
set(SndIO_PKG_CONFIG_SPEC sndio) set(SndIO_PKG_CONFIG_SPEC sndio)
set(PC_SNDIO_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_SNDIO IMPORTED_TARGET ${SndIO_PKG_CONFIG_SPEC}) pkg_check_modules(PC_SNDIO IMPORTED_TARGET ${SndIO_PKG_CONFIG_SPEC})
endif()
if(PC_SNDIO_FOUND) if(PC_SNDIO_FOUND)
set(HAVE_SNDIO TRUE) set(HAVE_SNDIO TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/sndio/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/sndio/*.c")
@@ -496,7 +508,10 @@ endmacro()
macro(CheckWayland) macro(CheckWayland)
if(SDL_WAYLAND) if(SDL_WAYLAND)
set(WAYLAND_PKG_CONFIG_SPEC "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0") set(WAYLAND_PKG_CONFIG_SPEC "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
set(PC_WAYLAND_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_WAYLAND IMPORTED_TARGET ${WAYLAND_PKG_CONFIG_SPEC}) pkg_check_modules(PC_WAYLAND IMPORTED_TARGET ${WAYLAND_PKG_CONFIG_SPEC})
endif()
find_program(WAYLAND_SCANNER NAMES wayland-scanner) find_program(WAYLAND_SCANNER NAMES wayland-scanner)
set(WAYLAND_FOUND FALSE) set(WAYLAND_FOUND FALSE)
@@ -647,6 +662,21 @@ macro(CheckVivante)
endif() endif()
endmacro() endmacro()
# Requires:
# - n/a
macro(CheckOpenVR)
if(SDL_OPENVR)
set(HAVE_OPENVR TRUE)
set(HAVE_OPENVR_VIDEO TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/openvr/*.c")
set(SDL_VIDEO_DRIVER_OPENVR 1)
if(NOT WINDOWS)
sdl_link_dependency(egl LIBS EGL)
endif()
endif()
endmacro()
# Requires: # Requires:
# - nada # - nada
macro(CheckGLX) macro(CheckGLX)
@@ -1104,8 +1134,12 @@ macro(CheckRPI)
set(original_PKG_CONFIG_PATH $ENV{PKG_CONFIG_PATH}) set(original_PKG_CONFIG_PATH $ENV{PKG_CONFIG_PATH})
set(ENV{PKG_CONFIG_PATH} "${original_PKG_CONFIG_PATH}:/opt/vc/lib/pkgconfig") set(ENV{PKG_CONFIG_PATH} "${original_PKG_CONFIG_PATH}:/opt/vc/lib/pkgconfig")
set(PC_BCM_HOST_FOUND FALSE)
set(PC_BRCMEGL_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_BCM_HOST IMPORTED_TARGET QUIET ${BCM_HOST_PKG_CONFIG_SPEC}) pkg_check_modules(PC_BCM_HOST IMPORTED_TARGET QUIET ${BCM_HOST_PKG_CONFIG_SPEC})
pkg_check_modules(PC_BRCMEGL IMPORTED_TARGET QUIET ${BRCMEGL_PKG_CONFIG_SPEC}) pkg_check_modules(PC_BRCMEGL IMPORTED_TARGET QUIET ${BRCMEGL_PKG_CONFIG_SPEC})
endif()
set(ENV{PKG_CONFIG_PATH} "${original_PKG_CONFIG_PATH}") set(ENV{PKG_CONFIG_PATH} "${original_PKG_CONFIG_PATH}")
if(TARGET PkgConfig::PC_BCM_HOST AND TARGET PkgConfig::PC_BRCMEGL) if(TARGET PkgConfig::PC_BCM_HOST AND TARGET PkgConfig::PC_BRCMEGL)
@@ -1125,7 +1159,10 @@ endmacro()
macro(CheckROCKCHIP) macro(CheckROCKCHIP)
if(SDL_ROCKCHIP) if(SDL_ROCKCHIP)
set(MALI_PKG_CONFIG_SPEC mali) set(MALI_PKG_CONFIG_SPEC mali)
set(PC_MALI_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_MALI QUIET ${MALI_PKG_CONFIG_SPEC}) pkg_check_modules(PC_MALI QUIET ${MALI_PKG_CONFIG_SPEC})
endif()
if(PC_MALI_FOUND) if(PC_MALI_FOUND)
set(HAVE_ROCKCHIP TRUE) set(HAVE_ROCKCHIP TRUE)
endif() endif()
@@ -1146,8 +1183,12 @@ macro(CheckKMSDRM)
if(SDL_KMSDRM) if(SDL_KMSDRM)
set(PKG_CONFIG_LIBDRM_SPEC libdrm) set(PKG_CONFIG_LIBDRM_SPEC libdrm)
set(PKG_CONFIG_GBM_SPEC gbm) set(PKG_CONFIG_GBM_SPEC gbm)
set(PC_LIBDRM_FOUND FALSE)
set(PC_GBM_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBDRM IMPORTED_TARGET ${PKG_CONFIG_LIBDRM_SPEC}) pkg_check_modules(PC_LIBDRM IMPORTED_TARGET ${PKG_CONFIG_LIBDRM_SPEC})
pkg_check_modules(PC_GBM IMPORTED_TARGET ${PKG_CONFIG_GBM_SPEC}) pkg_check_modules(PC_GBM IMPORTED_TARGET ${PKG_CONFIG_GBM_SPEC})
endif()
if(PC_LIBDRM_FOUND AND PC_GBM_FOUND AND HAVE_OPENGL_EGL) if(PC_LIBDRM_FOUND AND PC_GBM_FOUND AND HAVE_OPENGL_EGL)
set(HAVE_KMSDRM TRUE) set(HAVE_KMSDRM TRUE)
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
@@ -1221,7 +1262,10 @@ macro(CheckLibUnwind)
if(NOT found_libunwind) if(NOT found_libunwind)
set(LibUnwind_PKG_CONFIG_SPEC libunwind libunwind-generic) set(LibUnwind_PKG_CONFIG_SPEC libunwind libunwind-generic)
set(PC_LIBUNWIND_FOUND FALSE)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUNWIND IMPORTED_TARGET ${LibUnwind_PKG_CONFIG_SPEC}) pkg_check_modules(PC_LIBUNWIND IMPORTED_TARGET ${LibUnwind_PKG_CONFIG_SPEC})
endif()
if(PC_LIBUNWIND_FOUND) if(PC_LIBUNWIND_FOUND)
cmake_push_check_state() cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_LIBRARIES ${PC_LIBUNWIND_LIBRARIES}) list(APPEND CMAKE_REQUIRED_LIBRARIES ${PC_LIBUNWIND_LIBRARIES})

View File

@@ -46,7 +46,7 @@ function(SDL_AddCommonCompilerFlags TARGET)
cmake_push_check_state() cmake_push_check_state()
check_c_compiler_flag("-gdwarf-4" HAVE_GDWARF_4) check_c_compiler_flag("-gdwarf-4" HAVE_GDWARF_4)
if(HAVE_GDWARF_4) if(HAVE_GDWARF_4)
target_compile_options(${TARGET} PRIVATE "-gdwarf-4") target_compile_options(${TARGET} PRIVATE "$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-gdwarf-4>")
endif() endif()
cmake_pop_check_state() cmake_pop_check_state()
endif() endif()

View File

@@ -67,7 +67,15 @@ ${src_main}
return result; return result;
}") }")
set(path_src_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch.c") if(CMAKE_C_COMPILER)
set(ext ".c")
elseif(CMAKE_CXX_COMPILER)
set(ext ".cpp")
else()
enable_language(C)
set(ext ".c")
endif()
set(path_src_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch${ext}")
file(WRITE "${path_src_arch_detect}" "${src_arch_detect}") file(WRITE "${path_src_arch_detect}" "${src_arch_detect}")
set(path_dir_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch") set(path_dir_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch")
set(path_bin_arch_detect "${path_dir_arch_detect}/bin") set(path_bin_arch_detect "${path_dir_arch_detect}/bin")

View File

@@ -126,13 +126,10 @@ Here's an explanation of the files in the Android project, so you can customize
Using the SDL3 Android Archive (.aar) Using the SDL3 Android Archive (.aar)
================================================================================ ================================================================================
The `create-android-project.py` script can The Android archive allows use of SDL3 in your Android project, without needing to copy any SDL C or JAVA source into your project.
./create-android-project.py com.yourcompany.yourapp < sources.list
The Android archive allows use of SDL3 in your Android project, without needing to copy any SDL c or java source.
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/). For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
Copy the archive to a `app/libs` directory of your project and add the following to `app/gradle.build`: Copy the archive to a `app/libs` directory in your project and add the following to `app/gradle.build`:
``` ```
android { android {
/* ... */ /* ... */
@@ -141,29 +138,34 @@ android {
} }
} }
dependencies { dependencies {
implementation files('libs/@PROJECT_NAME@-@PROJECT_VERSION@.aar') implementation files('libs/SDL3-X.Y.Z.aar') /* Replace with the filename of the actual SDL3-x.y.z.aar file you downloaded */
/* ... */ /* ... */
} }
``` ```
If you're using CMake, add the following to your CMakeLists.txt: If you use CMake, add the following to your CMakeLists.txt:
``` ```
find_package(@PROJECT_NAME@ REQUIRED CONFIG) find_package(SDL3 REQUIRED CONFIG)
target_link_libraries(yourgame PRIVATE @PROJECT_NAME@::@PROJECT_NAME@) target_link_libraries(yourgame PRIVATE SDL3::SDL3)
``` ```
If you're using ndk-build, add the following somewhere after `LOCAL_MODULE := yourgame` to your `Android.mk` or `Application.mk`: If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
```
LOCAL_SHARED_LIBARARIES := SDL3 SDL3-Headers
```
And add the following at the bottom:
``` ```
# https://google.github.io/prefab/build-systems.html # https://google.github.io/prefab/build-systems.html
# Add the prefab modules to the import path. # Add the prefab modules to the import path.
$(call import-add-path,/out) $(call import-add-path,/out)
# Import @PROJECT_NAME@ so we can depend on it. # Import @PROJECT_NAME@ so we can depend on it.
$(call import-module,prefab/@PROJECT_NAME@) $(call import-module,prefab/@PROJECT_NAME@)
``` ```
If you want to avoid adding the complete SDL source base as a subproject, or adding the Java sources of the bindings to your Android project The `build-scripts/create-android-project.py` script can create a project using Android aar-chives from scratch:
```
build-scripts/create-android-project.py --variant aar com.yourcompany.yourapp < sources.list
```
Customizing your application name Customizing your application name
================================================================================ ================================================================================

View File

@@ -201,7 +201,7 @@ SDL supports following Apple architectures:
CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html) CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html)
#### Simulators and/or non-default maxOS platform SDK #### Simulators and/or non-default macOS platform SDK
Use `-DCMAKE_OSX_SYSROOT=<value>` to configure a different platform SDK. Use `-DCMAKE_OSX_SYSROOT=<value>` to configure a different platform SDK.
The value can be either the name of the SDK, or a full path to the sdk (e.g. `/full/path/to/iPhoneOS.sdk`). The value can be either the name of the SDK, or a full path to the sdk (e.g. `/full/path/to/iPhoneOS.sdk`).
@@ -226,29 +226,29 @@ CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_O
- for macOS, building a dylib and/or static library for x86_64 and arm64: - for macOS, building a dylib and/or static library for x86_64 and arm64:
```bash ```bash
cmake ~/sdl -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" cmake ~/sdl -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
- for macOS, building an universal framework for x86_64 and arm64: - for macOS, building an universal framework for x86_64 and arm64:
```bash ```bash
cmake ~/sdl -DSDL_FRAMEWORK=ON -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" cmake ~/sdl -DSDL_FRAMEWORK=ON -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
- for iOS-Simulator, using the latest, installed SDK: - for iOS-Simulator, using the latest, installed SDK:
```bash ```bash
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for iOS-Device, using the latest, installed SDK, 64-bit only - for iOS-Device, using the latest, installed SDK, 64-bit only
```bash ```bash
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit - for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
```cmake ```cmake
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s" cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example): - for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
@@ -260,19 +260,19 @@ CMake documentation: [link](https://cmake.org/cmake/help/latest/variable/CMAKE_O
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles): - for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
```cmake ```cmake
cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for tvOS-Simulator, using the latest, installed SDK: - for tvOS-Simulator, using the latest, installed SDK:
```cmake ```cmake
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for tvOS-Device, using the latest, installed SDK: - for tvOS-Device, using the latest, installed SDK:
```cmake ```cmake
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64` cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64` -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0
``` ```
- for QNX/aarch64, using the latest, installed SDK: - for QNX/aarch64, using the latest, installed SDK:
@@ -297,15 +297,29 @@ At the end of SDL CMake configuration, a table shows all CMake options along wit
| `-DSDL_DISABLE_INSTALL_DOCS=` | `ON`/`OFF` | Don't install the SDL documentation | | `-DSDL_DISABLE_INSTALL_DOCS=` | `ON`/`OFF` | Don't install the SDL documentation |
| `-DSDL_INSTALL_TESTS=` | `ON`/`OFF` | Install the SDL test programs | | `-DSDL_INSTALL_TESTS=` | `ON`/`OFF` | Install the SDL test programs |
### Incompatibilities
#### `SDL_LIBC=OFF` and sanitizers
Building with `-DSDL_LIBC=OFF` will make it impossible to use the sanitizer, such as the address sanitizer.
Configure your project with `-DSDL_LIBC=ON` to make use of sanitizers.
## CMake FAQ ## CMake FAQ
### CMake fails to build without X11 or Wayland support
Install the required system packages prior to running CMake.
See [README-linux](linux#build-dependencies) for the list of dependencies on Linux.
Other unix operationg systems should provide similar packages.
If you **really** don't need to show windows, add `-DSDL_UNIX_CONSOLE_BUILD=ON` to the CMake configure command.
### How do I copy a SDL3 dynamic library to another location? ### How do I copy a SDL3 dynamic library to another location?
Use [CMake generator expressions](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#target-dependent-expressions). Use [CMake generator expressions](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#target-dependent-expressions).
Generator expressions support multiple configurations, and are evaluated during build system generation time. Generator expressions support multiple configurations, and are evaluated during build system generation time.
On Windows, the following example this copies `SDL3.dll` to the directory where `mygame.exe` is built. On Windows, the following example copies `SDL3.dll` to the directory where `mygame.exe` is built.
On Unix systems, `$<TARGET_FILE:...>` will refer to the dynamic library (or framework).
```cmake ```cmake
if(WIN32) if(WIN32)
add_custom_command( add_custom_command(
@@ -315,6 +329,12 @@ if(WIN32)
) )
endif() endif()
``` ```
On Unix systems, `$<TARGET_FILE:...>` will refer to the dynamic library (or framework),
and you might need to use `$<TARGET_SONAME_FILE:tgt>` instead.
Most often, you can avoid copying libraries by configuring your project with absolute [`CMAKE_LIBRARY_OUTPUT_DIRECTORY`](https://cmake.org/cmake/help/latest/variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY.html)
and [`CMAKE_RUNTIME_OUTPUT_DIRECTORY`](https://cmake.org/cmake/help/latest/variable/CMAKE_RUNTIME_OUTPUT_DIRECTORY.html) paths.
When using a multi-config generator (such as Visual Studio or Ninja Multi-Config), eventually add `/$<CONFIG>` to both paths.
### Linking against a static SDL library fails due to relocation errors ### Linking against a static SDL library fails due to relocation errors

View File

@@ -2,7 +2,7 @@
## The state of things ## The state of things
(As of September 2023, but things move quickly and we don't update this (As of October 2024, but things move quickly and we don't update this
document often.) document often.)
In modern times, all the browsers you probably care about (Chrome, Firefox, In modern times, all the browsers you probably care about (Chrome, Firefox,
@@ -33,23 +33,15 @@ Many many things just need some simple adjustments and they'll compile
like any other C/C++ code, as long as SDL was handling the platform-specific like any other C/C++ code, as long as SDL was handling the platform-specific
work for your program. work for your program.
First, you probably need this in at least one of your source files: First: assembly language code has to go. Replace it with C. You can even use
```c
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
```
Second: assembly language code has to go. Replace it with C. You can even use
[x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)! [x86 SIMD intrinsic functions in Emscripten](https://emscripten.org/docs/porting/simd.html)!
Third: Middleware has to go. If you have a third-party library you link Second: Middleware has to go. If you have a third-party library you link
against, you either need an Emscripten port of it, or the source code to it against, you either need an Emscripten port of it, or the source code to it
to compile yourself, or you need to remove it. to compile yourself, or you need to remove it.
Fourth: You still start in a function called main(), but you need to get out of Third: If your program starts in a function called main(), you need to get
it and into a function that gets called repeatedly, and returns quickly, out of it and into a function that gets called repeatedly, and returns quickly,
called a mainloop. called a mainloop.
Somewhere in your program, you probably have something that looks like a more Somewhere in your program, you probably have something that looks like a more
@@ -109,6 +101,13 @@ don't want any shutdown code that might be sitting below this code
to actually run if main() were to continue on, since we're just to actually run if main() were to continue on, since we're just
getting started. getting started.
Another option is to use SDL' main callbacks, which handle this for you
without platform-specific code in your app. Please refer to
[the wiki](https://wiki.libsdl.org/SDL3/README/main-functions#main-callbacks-in-sdl3)
or `docs/README-main-functions.md` in the SDL source code.
There's a lot of little details that are beyond the scope of this There's a lot of little details that are beyond the scope of this
document, but that's the biggest initial set of hurdles to porting document, but that's the biggest initial set of hurdles to porting
your app to the web. your app to the web.
@@ -127,8 +126,8 @@ must be there, but you have to be careful (and read more detailed
documentation than this for the finer points). documentation than this for the finer points).
Even when using threads, your main thread needs to set an Emscripten Even when using threads, your main thread needs to set an Emscripten
mainloop that runs quickly and returns, or things will fail to work mainloop (or use SDL's main callbacks) that runs quickly and returns, or
correctly. things will fail to work correctly.
You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html) You should definitely read [Emscripten's pthreads docs](https://emscripten.org/docs/porting/pthreads.html)
for all the finer points. Mostly SDL's thread API will work as expected, for all the finer points. Mostly SDL's thread API will work as expected,
@@ -202,6 +201,9 @@ If you use SDL's 2D render API, it will use GLES2 internally, which
Emscripten will turn into WebGL calls. You can also use OpenGL ES 2 Emscripten will turn into WebGL calls. You can also use OpenGL ES 2
directly by creating a GL context and drawing into it. directly by creating a GL context and drawing into it.
If the browser (and hardware) support WebGL 2, you can create an OpenGL ES 3
context.
Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually Calling SDL_RenderPresent (or SDL_GL_SwapWindow) will not actually
present anything on the screen until your return from your mainloop present anything on the screen until your return from your mainloop
function. function.
@@ -209,25 +211,8 @@ function.
## Building SDL/emscripten ## Building SDL/emscripten
First: do you _really_ need to build SDL from source?
If you aren't developing SDL itself, have a desire to mess with its source SDL currently requires at least Emscripten 3.16.0 to build. Newer versions
code, or need something on the bleeding edge, don't build SDL. Just use
Emscripten's packaged version!
Compile and link your app with `-sUSE_SDL=2` and it'll use a build of
SDL packaged with Emscripten. This comes from the same source code and
fixes the Emscripten project makes to SDL are generally merged into SDL's
revision control, so often this is much easier for app developers.
`-sUSE_SDL=1` will select Emscripten's JavaScript reimplementation of SDL
1.2 instead; if you need SDL 1.2, this might be fine, but we generally
recommend you don't use SDL 1.2 in modern times.
If you want to build SDL, though...
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
are likely to work, as well. are likely to work, as well.
@@ -260,6 +245,7 @@ emmake make -j4
``` ```
To build the tests, add `-DSDL_TESTS=On` to the `emcmake cmake` command line. To build the tests, add `-DSDL_TESTS=On` to the `emcmake cmake` command line.
To build the examples, add `-DSDL_EXAMPLES=On` to the `emcmake cmake` command line.
## Building your app ## Building your app
@@ -267,8 +253,7 @@ To build the tests, add `-DSDL_TESTS=On` to the `emcmake cmake` command line.
You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but You need to compile with `emcc` instead of `gcc` or `clang` or whatever, but
mostly it uses the same command line arguments as Clang. mostly it uses the same command line arguments as Clang.
Link against the SDL/build/libSDL3.a file you generated by building SDL, Link against the libSDL3.a file you generated by building SDL.
link with `-sUSE_SDL=2` to use Emscripten's prepackaged SDL2 build.
Usually you would produce a binary like this: Usually you would produce a binary like this:

View File

@@ -11,9 +11,6 @@ macOS, Windows, and Unix systems.
git clone https://github.com/libsdl-org/SDL git clone https://github.com/libsdl-org/SDL
If you are building SDL via configure, you will need to run autogen.sh
before running configure.
There is a web interface to the Git repository at: There is a web interface to the Git repository at:
http://github.com/libsdl-org/SDL/ http://github.com/libsdl-org/SDL/

View File

@@ -1,5 +1,33 @@
SDL 3.0 has new support for high DPI displays SDL 3.0 has new support for high DPI displays. Interfaces provided by SDL uses the platform's native coordinates unless otherwise specified.
To reconcile platform differences in their approach to high-density scaling, SDL provides the following interfaces:
- `SDL_GetWindowSize()` retrieves the window dimensions in native coordinates.
- `SDL_GetWindowSizeInPixels()` retrieves the window dimensions in pixels-addressable.
- `SDL_GetDisplayContentScale()` retrieves the suggested amplification factor when drawing in native coordinates.
- `SDL_GetWindowDisplayScale()` retrieves the suggested amplification factor when drawing in pixels-addressable.
- `SDL_GetWindowPixelDensity()` retrieves how many addressable pixels correspond to one unit of native coordinates.
- `SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED` is emitted when the value retrievable from `SDL_GetWindowSizeInPixels()` changes.
- `SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED` is emitted when the value retrievable from `SDL_GetWindowDisplayScale()` changes.
- Windows created with `SDL_WINDOW_HIGH_PIXEL_DENSITY` will ask the platform to display addressable pixels at their natural scale.
## Numeric example
Given a fullscreen window spanning a 3840x2160 monitor set to 2x display or 200% scaling, the following tabulates the effect of creating a window with or without `SDL_WINDOW_HIGH_PIXEL_DENSITY` on MacOS and Win32:
| Value | MacOS (Default) | MacOS (HD) | Win32 (Default & HD) |
|--------------------------------|-----------------|------------|----------------------|
| `SDL_GetWindowSize()` | 1920x1080 | 1920x1080 | 3840x2160 |
| `SDL_GetWindowSizeInPixels()` | 1920x1080 | 3840x2160 | 3840x2160 |
| `SDL_GetDisplayContentScale()` | 1.0 | 1.0 | 2.0 |
| `SDL_GetWindowDisplayScale()` | 1.0 | 2.0 | 2.0 |
| `SDL_GetWindowPixelDensity()` | 1.0 | 2.0 | 1.0 |
Observe the philosophical difference between the approaches taken by MacOS and Win32:
- Win32 coordinate system always deals in physical device pixels, high DPI support is achieved by providing an advisory hint for the developer to enlarge drawn objects. Ignoring the advisory scale factor results in graphics appearing tiny.
- MacOS coordinate system always deals in physical content sizes, high DPI support is achieved by providing an optional flag for the developer to request finer granularity. Omitting the granularity request results in graphics appearing coarse.
## Explanation
Displays now have a content display scale, which is the expected scale for content based on the DPI settings of the display. For example, a 4K display might have a 2.0 (200%) display scale, which means that the user expects UI elements to be twice as big on this display, to aid in readability. You can query the display content scale using `SDL_GetDisplayContentScale()`, and when this changes you get an `SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED` event. Displays now have a content display scale, which is the expected scale for content based on the DPI settings of the display. For example, a 4K display might have a 2.0 (200%) display scale, which means that the user expects UI elements to be twice as big on this display, to aid in readability. You can query the display content scale using `SDL_GetDisplayContentScale()`, and when this changes you get an `SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED` event.

View File

@@ -140,6 +140,8 @@ Notes -- Mouse
iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist
From iOS 17 onward, the key now defaults to true.
Notes -- Reading and Writing files Notes -- Reading and Writing files
============================================================================== ==============================================================================

View File

@@ -38,6 +38,10 @@ NOTES:
- The sndio audio target is unavailable on Fedora (but probably not what you - The sndio audio target is unavailable on Fedora (but probably not what you
should want to use anyhow). should want to use anyhow).
openSUSE Tumbleweed:
sudo zypper in libunwind-devel libusb-1_0-devel Mesa-libGL-devel libxkbcommon-devel libdrm-devel \
libgbm-devel pipewire-devel libpulse-devel sndio-devel Mesa-libEGL-devel
Joystick does not work Joystick does not work
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -13,7 +13,7 @@ To build SDL using the command line, use the CMake build script:
```bash ```bash
mkdir build mkdir build
cd build cd build
cmake .. cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
cmake --build . cmake --build .
sudo cmake --install . sudo cmake --install .
``` ```
@@ -25,7 +25,7 @@ You can also build SDL as a Universal library (a single binary for both
```bash ```bash
mkdir build mkdir build
cd build cd build
cmake .. "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" cmake .. "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11
cmake --build . cmake --build .
sudo cmake --install . sudo cmake --install .
``` ```

View File

@@ -798,7 +798,7 @@ The following functions have been removed:
Calling SDL_GetHint() with the name of the hint being changed from within a hint callback will now return the new value rather than the old value. The old value is still passed as a parameter to the hint callback. Calling SDL_GetHint() with the name of the hint being changed from within a hint callback will now return the new value rather than the old value. The old value is still passed as a parameter to the hint callback.
The environment variables SDL_VIDEODRIVER and SDL_AUDIODRIVER have been renamed to SDL_VIDEO_DRIVER and SDL_AUDIO_DRIVER. The environment variables SDL_VIDEODRIVER and SDL_AUDIODRIVER have been renamed to SDL_VIDEO_DRIVER and SDL_AUDIO_DRIVER, but the old names are still supported as a fallback.
The environment variables SDL_VIDEO_X11_WMCLASS and SDL_VIDEO_WAYLAND_WMCLASS have been removed and replaced by either using the appindentifier param to SDL_SetAppMetadata() or setting SDL_PROP_APP_METADATA_IDENTIFIER_STRING with SDL_SetAppMetadataProperty() The environment variables SDL_VIDEO_X11_WMCLASS and SDL_VIDEO_WAYLAND_WMCLASS have been removed and replaced by either using the appindentifier param to SDL_SetAppMetadata() or setting SDL_PROP_APP_METADATA_IDENTIFIER_STRING with SDL_SetAppMetadataProperty()
@@ -2134,7 +2134,9 @@ SDL_CreateWindow() has been simplified and no longer takes a window position. Yo
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_Y_NUMBER, y); SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_Y_NUMBER, y);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, width); SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, width);
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, height); SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, height);
SDL_SetNumberProperty(props, "flags", flags); // For window flags you should use separate window creation properties,
// but for easier migration from SDL2 you can use the following:
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER, flags);
pWindow = SDL_CreateWindowWithProperties(props); pWindow = SDL_CreateWindowWithProperties(props);
SDL_DestroyProperties(props); SDL_DestroyProperties(props);
if (window) { if (window) {
@@ -2227,6 +2229,10 @@ The following symbols have been renamed:
* SDL_DISPLAYEVENT_DISCONNECTED => SDL_EVENT_DISPLAY_REMOVED * SDL_DISPLAYEVENT_DISCONNECTED => SDL_EVENT_DISPLAY_REMOVED
* SDL_DISPLAYEVENT_MOVED => SDL_EVENT_DISPLAY_MOVED * SDL_DISPLAYEVENT_MOVED => SDL_EVENT_DISPLAY_MOVED
* SDL_DISPLAYEVENT_ORIENTATION => SDL_EVENT_DISPLAY_ORIENTATION * SDL_DISPLAYEVENT_ORIENTATION => SDL_EVENT_DISPLAY_ORIENTATION
* SDL_GLattr => SDL_GLAttr
* SDL_GLcontextFlag => SDL_GLContextFlag
* SDL_GLcontextReleaseFlag => SDL_GLContextReleaseFlag
* SDL_GLprofile => SDL_GLProfile
* SDL_WINDOWEVENT_CLOSE => SDL_EVENT_WINDOW_CLOSE_REQUESTED * SDL_WINDOWEVENT_CLOSE => SDL_EVENT_WINDOW_CLOSE_REQUESTED
* SDL_WINDOWEVENT_DISPLAY_CHANGED => SDL_EVENT_WINDOW_DISPLAY_CHANGED * SDL_WINDOWEVENT_DISPLAY_CHANGED => SDL_EVENT_WINDOW_DISPLAY_CHANGED
* SDL_WINDOWEVENT_ENTER => SDL_EVENT_WINDOW_MOUSE_ENTER * SDL_WINDOWEVENT_ENTER => SDL_EVENT_WINDOW_MOUSE_ENTER

Some files were not shown because too many files have changed in this diff Show More