Skip to content

Commit

Permalink
Merge tag 'release-2.30.6' into webOS-2.30.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Oct 30, 2024
2 parents 818e8c6 + ba2f78a commit ea80a3a
Show file tree
Hide file tree
Showing 131 changed files with 665 additions and 504 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cpactions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build
uses: cross-platform-actions/action@v0.23.0
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: freebsd
version: '13.2'
version: '13.3'
shell: bash
run: |
sudo pkg update
Expand Down
24 changes: 15 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif()
# See docs/release_checklist.md
set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 30)
set(SDL_MICRO_VERSION 5)
set(SDL_MICRO_VERSION 6)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")

# Set defaults preventing destination file conflicts
Expand Down Expand Up @@ -1812,14 +1812,6 @@ elseif(WINDOWS)
list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES})
endif()

if(MSVC AND NOT SDL_LIBC)
# Prevent codegen that would use the VC runtime libraries.
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-;/Gs1048576")
if(NOT ARCH_64 AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE")
endif()
endif()

if(SDL_MISC)
if(WINDOWS_STORE)
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
Expand Down Expand Up @@ -3562,6 +3554,20 @@ if(SDL_TEST)
set_property(TARGET SDL2_test PROPERTY INTERFACE_SDL_VERSION "SDL2")
endif()

if(MSVC AND NOT SDL_LIBC)
set(targets SDL2)
if(TARGET SDL2-static)
list(APPEND targets SDL2-static)
endif()
if(TARGET SDL2_test)
list(APPEND targets SDL2_test)
endif()
set_property(TARGET ${targets} APPEND PROPERTY COMPILE_OPTIONS "/GS-;/Gs1048576")
if(NOT ARCH_64 AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
set_property(TARGET ${targets} APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE")
endif()
endif()

##### Installation targets #####
if(NOT SDL2_DISABLE_INSTALL)
if(SDL_SHARED)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.os2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 30
MICRO_VERSION = 5
MICRO_VERSION = 6
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2

Expand Down
2 changes: 1 addition & 1 deletion Makefile.w32
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 30
MICRO_VERSION = 5
MICRO_VERSION = 6
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)

LIBHOME = .
Expand Down
8 changes: 4 additions & 4 deletions Xcode-iOS/Demos/src/fireworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ void spawnTrailFromEmitter(struct particle *emitter);
void spawnEmitterParticle(GLfloat x, GLfloat y);
void explodeEmitter(struct particle *emitter);
void initializeParticles(void);
void initializeTexture();
void initializeTexture(void);
int nextPowerOfTwo(int x);
void drawParticles();
void drawParticles(void);
void stepParticles(double deltaTime);

/* helper function (used in texture loading)
Expand Down Expand Up @@ -159,7 +159,7 @@ stepParticles(double deltaTime)
This draws all the particles shown on screen
*/
void
drawParticles()
drawParticles(void)
{

/* draw the background */
Expand Down Expand Up @@ -324,7 +324,7 @@ initializeParticles(void)
loads the particle texture
*/
void
initializeTexture()
initializeTexture(void)
{

int bpp; /* texture bits per pixel */
Expand Down
2 changes: 1 addition & 1 deletion Xcode-iOS/Demos/src/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ loadFont(void)
}

void
draw()
draw(void)
{
SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b, bg_color.a);
SDL_RenderClear(renderer);
Expand Down
4 changes: 2 additions & 2 deletions Xcode/SDL/Info-Framework.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.30.5</string>
<string>2.30.6</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.30.5</string>
<string>2.30.6</string>
</dict>
</plist>
12 changes: 6 additions & 6 deletions Xcode/SDL/SDL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9729,7 +9729,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.5.0;
DYLIB_CURRENT_VERSION = 3001.6.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
Expand Down Expand Up @@ -9770,7 +9770,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.30.5;
MARKETING_VERSION = 2.30.6;
OTHER_LDFLAGS = "-liconv";
};
name = Release;
Expand Down Expand Up @@ -9814,7 +9814,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.5.0;
DYLIB_CURRENT_VERSION = 3001.6.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -9856,7 +9856,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.30.5;
MARKETING_VERSION = 2.30.6;
OTHER_LDFLAGS = "-liconv";
};
name = Debug;
Expand Down Expand Up @@ -10063,7 +10063,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.5.0;
DYLIB_CURRENT_VERSION = 3001.6.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
Expand Down Expand Up @@ -10115,7 +10115,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.5.0;
DYLIB_CURRENT_VERSION = 3001.6.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down
2 changes: 1 addition & 1 deletion Xcode/SDL/pkg-support/SDL.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Title SDL 2.30.5
Title SDL 2.30.6
Version 1
Description SDL Library for Mac OS X (http://www.libsdl.org)
DefaultLocation /Library/Frameworks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 5;
private static final int SDL_MICRO_VERSION = 6;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
Expand Down
5 changes: 3 additions & 2 deletions cmake/sdlchecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1377,12 +1377,13 @@ endmacro()

macro(CheckLibUDev)
if(SDL_LIBUDEV)
check_include_file("libudev.h" have_libudev_header)
if(have_libudev_header)
check_include_file("libudev.h" HAVE_LIBUDEV_HEADER)
if(HAVE_LIBUDEV_HEADER)
set(HAVE_LIBUDEV_H TRUE)
FindLibraryAndSONAME(udev)
if(UDEV_LIB_SONAME)
set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"")
set(HAVE_LIBUDEV TRUE)
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -3508,7 +3508,7 @@ orig_CFLAGS="$CFLAGS"
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=30
SDL_MICRO_VERSION=5
SDL_MICRO_VERSION=6
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dnl Set various version strings - taken gratefully from the GTk sources
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=30
SDL_MICRO_VERSION=5
SDL_MICRO_VERSION=6
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down
8 changes: 4 additions & 4 deletions docs/README-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ Some things that may be of interest about how it all works...
## Working directory

In SDL 1.2, the working directory of your SDL app is by default set to its
parent, but this is no longer the case in SDL 2.0. SDL2 does change the
working directory, which means it'll be whatever the command line prompt
that launched the program was using, or if launched by double-clicking in
the finger, it will be "/", the _root of the filesystem_. Plan accordingly!
parent, but this is no longer the case in SDL 2.0 and later. SDL2 does not
change the working directory, which means it'll be whatever the command line
prompt that launched the program was using, or if launched by double-clicking
in the Finder, it will be "/", the _root of the filesystem_. Plan accordingly!
You can use SDL_GetBasePath() to find where the program is running from and
chdir() there directly.

Expand Down
3 changes: 3 additions & 0 deletions include/SDL_stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,12 @@ typedef uint64_t Uint64;

#ifndef SDL_COMPILE_TIME_ASSERT
#if defined(__cplusplus)
/* Keep C++ case alone: Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode. */
#if (__cplusplus >= 201103L)
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
#endif
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L)
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef struct SDL_version
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 30
#define SDL_PATCHLEVEL 5
#define SDL_PATCHLEVEL 6

/**
* Macro to determine SDL version program was compiled against.
Expand Down
56 changes: 33 additions & 23 deletions src/SDL.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
#endif
#if defined(__OS2__)
#include "core/os2/SDL_os2.h"
#ifdef SDL_THREAD_OS2
#include "thread/os2/SDL_systls_c.h"
#endif
#endif

/* this checks for HAVE_DBUS_DBUS_H internally. */
Expand All @@ -54,6 +51,7 @@
#include "haptic/SDL_haptic_c.h"
#include "joystick/SDL_joystick_c.h"
#include "sensor/SDL_sensor_c.h"
#include "thread/SDL_thread_c.h"

/* Initialization/Cleanup routines */
#ifndef SDL_TIMERS_DISABLED
Expand Down Expand Up @@ -118,6 +116,7 @@ static SDL_bool SDL_MainIsReady = SDL_FALSE;
#else
static SDL_bool SDL_MainIsReady = SDL_TRUE;
#endif
static SDL_bool SDL_main_thread_initialized = SDL_FALSE;
static SDL_bool SDL_bInMainQuit = SDL_FALSE;
static Uint8 SDL_SubsystemRefCount[32];
#ifdef __WEBOS__
Expand Down Expand Up @@ -186,6 +185,36 @@ void SDL_SetMainReady(void)
SDL_MainIsReady = SDL_TRUE;
}

void SDL_InitMainThread(void)
{
if (SDL_main_thread_initialized) {
return;
}

SDL_InitTLSData();
#ifndef SDL_TIMERS_DISABLED
SDL_TicksInit();
#endif
SDL_LogInit();

SDL_main_thread_initialized = SDL_TRUE;
}

static void SDL_QuitMainThread(void)
{
if (!SDL_main_thread_initialized) {
return;
}

SDL_LogQuit();
#ifndef SDL_TIMERS_DISABLED
SDL_TicksQuit();
#endif
SDL_QuitTLSData();

SDL_main_thread_initialized = SDL_FALSE;
}

int SDL_InitSubSystem(Uint32 flags)
{
Uint32 flags_initialized = 0;
Expand All @@ -194,8 +223,6 @@ int SDL_InitSubSystem(Uint32 flags)
return SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
}

SDL_LogInit();

/* Clear the error message */
SDL_ClearError();

Expand All @@ -217,10 +244,6 @@ int SDL_InitSubSystem(Uint32 flags)
}
#endif

#ifdef SDL_THREAD_OS2
SDL_OS2TLSAlloc(); /* thread/os2/SDL_systls.c */
#endif

#ifdef SDL_VIDEO_DRIVER_WINDOWS
if (flags & (SDL_INIT_HAPTIC | SDL_INIT_JOYSTICK)) {
if (SDL_HelperWindowCreate() < 0) {
Expand All @@ -229,10 +252,6 @@ int SDL_InitSubSystem(Uint32 flags)
}
#endif

#ifndef SDL_TIMERS_DISABLED
SDL_TicksInit();
#endif

/* Initialize the event subsystem */
if (flags & SDL_INIT_EVENTS) {
#ifndef SDL_EVENTS_DISABLED
Expand Down Expand Up @@ -397,9 +416,6 @@ int SDL_Init(Uint32 flags)
void SDL_QuitSubSystem(Uint32 flags)
{
#if defined(__OS2__)
#ifdef SDL_THREAD_OS2
SDL_OS2TLSFree(); /* thread/os2/SDL_systls.c */
#endif
SDL_OS2Quit();
#endif

Expand Down Expand Up @@ -523,10 +539,6 @@ void SDL_Quit(void)
#endif
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);

#ifndef SDL_TIMERS_DISABLED
SDL_TicksQuit();
#endif

#ifdef SDL_USE_LIBDBUS
SDL_DBus_Quit();
#endif
Expand All @@ -538,14 +550,12 @@ void SDL_Quit(void)
SDL_ClearHints();
SDL_AssertionsQuit();

SDL_LogQuit();

/* Now that every subsystem has been quit, we reset the subsystem refcount
* and the list of initialized subsystems.
*/
SDL_memset(SDL_SubsystemRefCount, 0x0, sizeof(SDL_SubsystemRefCount));

SDL_TLSCleanup();
SDL_QuitMainThread();

SDL_bInMainQuit = SDL_FALSE;
}
Expand Down
Loading

0 comments on commit ea80a3a

Please sign in to comment.