Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/libsdl-org/SDL into libsdl-…
Browse files Browse the repository at this point in the history
…org-main
  • Loading branch information
capehill committed Jan 17, 2025
2 parents a3b806d + 4b429b9 commit 494a2f0
Show file tree
Hide file tree
Showing 173 changed files with 2,783 additions and 2,250 deletions.
4 changes: 2 additions & 2 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ LOCAL_SRC_FILES := \
$(LOCAL_PATH)/src/dialog/android/SDL_androiddialog.c \
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/generic/*.c) \
$(wildcard $(LOCAL_PATH)/src/io/*.c) \
$(wildcard $(LOCAL_PATH)/src/io/generic/*.c) \
$(wildcard $(LOCAL_PATH)/src/gpu/*.c) \
$(wildcard $(LOCAL_PATH)/src/gpu/vulkan/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
Expand Down
7 changes: 5 additions & 2 deletions BUGS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ You may also find help at the SDL forums/mailing list:

https://discourse.libsdl.org/

Bug reports are welcome here, but we really appreciate if you use the issue
tracker, as bugs discussed on the mailing list may be forgotten or missed.
or on Discord:

https://discord.com/invite/BwpFGBWsv8

Bug reports are welcome here, but we really appreciate if you use the issue tracker, as bugs discussed on the mailing list or Discord may be forgotten or missed.

32 changes: 13 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
endif()

# See docs/release_checklist.md
project(SDL3 LANGUAGES C VERSION "3.1.9")
project(SDL3 LANGUAGES C VERSION "3.1.11")

if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SDL3_MAINPROJECT ON)
Expand Down Expand Up @@ -308,7 +308,6 @@ dep_option(SDL_SSE4_1 "Use SSE4.1 assembly routines" ON "SDL_ASSEMB
dep_option(SDL_SSE4_2 "Use SSE4.2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_POWERPC32 OR SDL_CPU_POWERPC64" OFF)
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
dep_option(SDL_ARMNEON "Use NEON assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
dep_option(SDL_LSX "Use LSX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF)
dep_option(SDL_LASX "Use LASX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF)
Expand Down Expand Up @@ -1159,8 +1158,8 @@ sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/cpuinfo/*.c"
"${SDL3_SOURCE_DIR}/src/dynapi/*.c"
"${SDL3_SOURCE_DIR}/src/events/*.c"
"${SDL3_SOURCE_DIR}/src/file/*.c"
"${SDL3_SOURCE_DIR}/src/file/generic/*.c"
"${SDL3_SOURCE_DIR}/src/io/*.c"
"${SDL3_SOURCE_DIR}/src/io/generic/*.c"
"${SDL3_SOURCE_DIR}/src/filesystem/*.c"
"${SDL3_SOURCE_DIR}/src/gpu/*.c"
"${SDL3_SOURCE_DIR}/src/joystick/*.c"
Expand Down Expand Up @@ -1775,7 +1774,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
endif()

if(HAVE_LIBURING_H)
sdl_sources("${SDL3_SOURCE_DIR}/src/file/io_uring/SDL_asyncio_liburing.c")
sdl_sources("${SDL3_SOURCE_DIR}/src/io/io_uring/SDL_asyncio_liburing.c")
endif()

# Always compiled for Linux, unconditionally:
Expand Down Expand Up @@ -1890,6 +1889,7 @@ elseif(WINDOWS)

sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/windows/*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/windows/*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/io/windows/*.c")

if(TARGET SDL3-shared AND MSVC AND NOT SDL_LIBC)
# Prevent codegen that would use the VC runtime libraries.
Expand Down Expand Up @@ -2398,6 +2398,7 @@ elseif(APPLE)
endif()
if(SDL_FRAMEWORK_COCOA)
sdl_link_dependency(cocoa LIBS "$<LINK_LIBRARY:FRAMEWORK,Cocoa>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Cocoa")
# macOS 11.0+ iOS 14.0+ tvOS 14.0+
sdl_link_dependency(uniformtypeidentifiers LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,UniformTypeIdentifiers>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,UniformTypeIdentifiers")
endif()
if(SDL_FRAMEWORK_IOKIT)
Expand Down Expand Up @@ -2433,33 +2434,26 @@ elseif(APPLE)
if(SDL_FRAMEWORK_GAMECONTROLLER)
find_library(GAMECONTROLLER GameController)
if(GAMECONTROLLER)
sdl_link_dependency(game_controller LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,GameController>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,GameController")
sdl_link_dependency(game_controller LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,GameController>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,GameController")
endif()
endif()
if(SDL_FRAMEWORK_METAL)
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Metal")
else()
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,Metal")
endif()
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:FRAMEWORK,Metal>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,Metal")
endif()
if(SDL_FRAMEWORK_OPENGLES)
sdl_link_dependency(opengles LIBS "$<LINK_LIBRARY:FRAMEWORK,OpenGLES>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,OpenGLES")
endif()
if(SDL_FRAMEWORK_QUARTZCORE)
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
sdl_link_dependency(quartz_core LIBS "$<LINK_LIBRARY:FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,QuartzCore")
else()
sdl_link_dependency(metal LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,QuartzCore")
endif()
sdl_link_dependency(quartz_core LIBS "$<LINK_LIBRARY:FRAMEWORK,QuartzCore>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,QuartzCore")
endif()
if(SDL_FRAMEWORK_UIKIT)
sdl_link_dependency(ui_kit LIBS "$<LINK_LIBRARY:FRAMEWORK,UIKit>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,UIKit")
endif()
if(SDL_FRAMEWORK_COREHAPTICS)
find_library(COREHAPTICS CoreHaptics)
if(COREHAPTICS)
sdl_link_dependency(core_haptics LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreHaptics>" PKG_CONFIG_LINK_OPTIONS "-Wl,-framework,CoreHaptics")
# macOS 10.15+ iOS 13.0+ tvOS 14.0+
sdl_link_dependency(core_haptics LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreHaptics>" PKG_CONFIG_LINK_OPTIONS "-Wl,-weak_framework,CoreHaptics")
endif()
endif()

Expand Down Expand Up @@ -2919,7 +2913,7 @@ elseif(N3DS)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/n3ds/*.c")
set(HAVE_SDL_LOCALE TRUE)

sdl_glob_sources("${SDL3_SOURCE_DIR}/src/file/n3ds/*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/io/n3ds/*.c")
endif()

sdl_sources(${SDL3_SOURCE_DIR}/src/dialog/SDL_dialog.c)
Expand Down Expand Up @@ -3337,8 +3331,8 @@ endif()
set_source_files_properties(src/dynapi/SDL_dynapi.c PROPERTIES SKIP_PRECOMPILE_HEADERS 1)

set(SDL_FRAMEWORK_RESOURCES
Xcode/SDL/pkg-support/resources/ReadMe.txt
LICENSE.txt
README.md
)
if(SDL_FRAMEWORK)
sdl_sources(${SDL_FRAMEWORK_RESOURCES})
Expand Down
6 changes: 5 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Thanks to everyone who made this possible, including:

- Cliff Matthews, for giving me a reason to start this project. :) -- Executor rocks! *grin*
- Ryan Gordon for helping everybody out and keeping the dream alive. :)
- Frank Praznik for his Wayland support and general windowing development.
- Ozkan Sezer for sanity checks and make sure the i's are dotted and t's are crossed.
- Anonymous Maarten for CMake support and build system development.
- Evan Hemsley, Caleb Cornett, and Ethan Lee for SDL GPU development.
- Gabriel Jacobo for his work on the Android port and generally helping out all around.
- Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
- Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
Expand All @@ -24,7 +28,7 @@ Thanks to everyone who made this possible, including:
- Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
Google Summer of Code 2008.
- Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
- Everybody at Loki Software, Inc. for their great contributions!
- Everybody at Loki Software, Inc. and Valve Corporation for their great contributions!

And a big hand to everyone else who has contributed over the years.

Expand Down
69 changes: 22 additions & 47 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,47 @@
# To compile and install SDL:
# To build and use SDL:

## Windows with Visual Studio:
SDL supports a number of development environments:
- [CMake](docs/INTRO-cmake.md)
- [Visual Studio on Windows](docs/INTRO-visualstudio.md)
- [Xcode on Apple platforms](docs/INTRO-xcode.md)
- [Android Studio](docs/INTRO-androidstudio.md)
- [Emscripten for web](docs/INTRO-emscripten.md)

Read ./docs/README-visualc.md
SDL is also usable in other environments. The basic steps are to use CMake to build the library and then use the headers and library that you built in your project. You can search online to see if anyone has specific steps for your setup.

## Windows building with mingw-w64 for x86:
# Documentation

Read [README-windows.md](docs/README-windows.md) for more information on building with MinGW64.
An API reference, tutorials, and additional documentation is available at:

Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-i686.cmake && cmake --build build && cmake --install build`
https://wiki.libsdl.org/SDL3

## Windows building with mingw-w64 for x64:

Read [README-windows.md](docs/README-windows.md).

Run: `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake && cmake --build build && cmake --install build`

## macOS with Xcode:

Read docs/README-macos.md

## macOS from the command line:

Run: `cmake -S . -B build && cmake --build build && cmake --install build`

### macOS for universal architecture:

Run: `cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" && cmake --build build && cmake --install build`

## Linux and other UNIX systems:

Run: `cmake -S . -B build && cmake --build build --parallel $(nproc) && cmake --install build`

## Android:

Read docs/README-android.md
# Example code

## iOS:
There are simple example programs in the examples directory, and you can view them online at:

Read docs/README-ios.md
https://examples.libsdl.org/SDL3

## Using CMake:
More in-depth test programs are available in the tests directory and can be built by adding `-DSDL_TESTS=ON` to the CMake command line when building SDL.

Read docs/README-cmake.md
# Discussions

# Example code
## Discord

Look at the example programs in ./test, and check out the online
documentation at https://wiki.libsdl.org/SDL3/
You can join the official Discord server at:

# Discussion
https://discord.com/invite/BwpFGBWsv8

## Forums/mailing lists

Join the SDL developer discussions, sign up on
You can join SDL development discussions at:

https://discourse.libsdl.org/

and go to the development forum

https://discourse.libsdl.org/c/sdl-development/6

Once you sign up, you can use the forum through the website, or as a mailing
list from your email client.
Once you sign up, you can use the forum through the website or as a mailing list from your email client.

## Announcement list

Sign up for the announcement list through the web interface:
You can sign up for the low traffic announcement list at:

https://www.libsdl.org/mailing-list.php

8 changes: 5 additions & 3 deletions Makefile.amigaos4
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AMIGADATE = $(shell date +"%-d.%m.%Y")
CFLAGS = -mcrt=$(CRT) -gstabs -O2 -Wall -Werror -Wshadow -fPIC -fcommon -I./include -I./include/build_config -I./include/SDL3 -I./src -D__AMIGADATE__=\"$(AMIGADATE)\"

TARGET_STATIC = libSDL3.a
TARGET_SHARED = libSDL3-3.0.so
TARGET_SHARED = libSDL3-3.1.so
TESTLIB_STATIC = libSDL3_test.a
PREFS_PROGRAM = SDL3

Expand All @@ -29,13 +29,13 @@ SOURCES = \
./src/dialog/*.c \
./src/dialog/amigaos4/SDL_amigaos4dialog.c \
./src/events/*.c \
./src/file/*.c \
./src/file/generic/SDL_asyncio_generic.c \
./src/filesystem/SDL_filesystem.c \
./src/filesystem/amigaos4/*.c \
./src/gpu/SDL_gpu.c \
./src/haptic/*.c \
./src/haptic/dummy/*.c \
./src/io/*.c \
./src/io/generic/SDL_asyncio_generic.c \
./src/joystick/*.c \
./src/joystick/amigaos4/*.c \
./src/joystick/virtual/*.c \
Expand All @@ -60,6 +60,8 @@ SOURCES = \
./src/sensor/*.c \
./src/sensor/dummy/*.c \
./src/stdlib/*.c \
./src/storage/SDL_storage.c \
./src/storage/generic/SDL_genericstorage.c \
./src/thread/*.c \
./src/thread/amigaos4/*.c \
./src/thread/generic/SDL_syscond.c \
Expand Down
13 changes: 0 additions & 13 deletions README-SDL.txt

This file was deleted.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

# Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer (SDL for short) is a cross-platform library
designed to make it easy to write multi-media software, such as games
and emulators.

You can find the latest release and additional information at:
https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware. It is used by video playback software, emulators, and popular games
including Valve's award winning catalog and many Humble Bundle games.
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)

More extensive documentation is available in the docs directory, starting
with [README.md](docs/README.md). If you are migrating to SDL 3.0 from SDL 2.0,
the changes are extensively documented in [README-migration.md](docs/README-migration.md).
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).

Enjoy!

Expand Down
12 changes: 6 additions & 6 deletions VisualC-GDK/SDL/SDL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
<ClInclude Include="..\..\src\gpu\SDL_sysgpu.h" />
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h" />
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h" />
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
Expand Down Expand Up @@ -529,9 +529,9 @@
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c" />
<ClCompile Include="..\..\src\file\SDL_asyncio.c" />
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c" />
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
<ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp" />
<ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
Expand Down Expand Up @@ -673,7 +673,7 @@
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
Expand Down
12 changes: 6 additions & 6 deletions VisualC-GDK/SDL/SDL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_iostream.c" />
<ClCompile Include="..\..\src\io\SDL_iostream.c" />
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
<ClCompile Include="..\..\src\gpu\SDL_gpu.c" />
<ClCompile Include="..\..\src\gpu\d3d12\SDL_gpu_d3d12.c" />
Expand Down Expand Up @@ -204,9 +204,9 @@
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="..\..\src\file\generic\SDL_asyncio_generic.c" />
<ClCompile Include="..\..\src\file\SDL_asyncio.c" />
<ClCompile Include="..\..\src\file\windows\SDL_asyncio_windows_ioring.c" />
<ClCompile Include="..\..\src\io\generic\SDL_asyncio_generic.c" />
<ClCompile Include="..\..\src\io\SDL_asyncio.c" />
<ClCompile Include="..\..\src\io\windows\SDL_asyncio_windows_ioring.c" />
<ClCompile Include="..\..\src\dialog\dummy\SDL_dummydialog.c" />
<ClCompile Include="..\..\src\dialog\windows\SDL_windowsdialog.c" />
<ClCompile Include="..\..\src\render\gpu\SDL_pipeline_gpu.c" />
Expand Down Expand Up @@ -466,8 +466,8 @@
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h" />
<ClInclude Include="..\..\src\file\SDL_asyncio_c.h" />
<ClInclude Include="..\..\src\file\SDL_sysasyncio.h" />
<ClInclude Include="..\..\src\io\SDL_asyncio_c.h" />
<ClInclude Include="..\..\src\io\SDL_sysasyncio.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
Expand Down
Loading

0 comments on commit 494a2f0

Please sign in to comment.