Skip to content

Commit

Permalink
SDL2: Update to 2.30.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Esme Povirk committed Jun 7, 2024
1 parent b01e5c7 commit 8a654b8
Show file tree
Hide file tree
Showing 26 changed files with 170 additions and 181 deletions.
18 changes: 1 addition & 17 deletions SDL2/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 2)
set(SDL_MICRO_VERSION 3)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")

# Set defaults preventing destination file conflicts
Expand Down Expand Up @@ -926,22 +926,6 @@ if(SDL_ASSEMBLY)
endif()
endif()

if(SDL_LASX)
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "-mlasx")
check_c_source_compiles("
#ifndef __loongarch_asx
#error Assembler CPP flag not enabled
#endif
int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LASX)
check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
cmake_pop_check_state()
if(CPU_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
list(APPEND EXTRA_CFLAGS "-mlasx")
set(HAVE_LASX TRUE)
endif()
endif()

if(SDL_ARMSIMD)
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
Expand Down
2 changes: 1 addition & 1 deletion SDL2/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 = 2
MICRO_VERSION = 3
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2

Expand Down
2 changes: 1 addition & 1 deletion SDL2/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 = 2
MICRO_VERSION = 3
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)

LIBHOME = .
Expand Down
2 changes: 1 addition & 1 deletion SDL2/SDL2.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Simple DirectMedia Layer
Name: SDL2
Version: 2.30.2
Version: 2.30.3
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/
Expand Down
2 changes: 1 addition & 1 deletion SDL2/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release-2.30.2-0-gf461d91cd
release-2.30.3-0-gfb1497566
4 changes: 2 additions & 2 deletions SDL2/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.2</string>
<string>2.30.3</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.30.2</string>
<string>2.30.3</string>
</dict>
</plist>
12 changes: 6 additions & 6 deletions SDL2/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.2.0;
DYLIB_CURRENT_VERSION = 3001.3.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.2;
MARKETING_VERSION = 2.30.3;
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.2.0;
DYLIB_CURRENT_VERSION = 3001.3.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.2;
MARKETING_VERSION = 2.30.3;
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.2.0;
DYLIB_CURRENT_VERSION = 3001.3.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.2.0;
DYLIB_CURRENT_VERSION = 3001.3.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down
2 changes: 1 addition & 1 deletion SDL2/Xcode/SDL/pkg-support/SDL.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Title SDL 2.30.2
Title SDL 2.30.3
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 = 2;
private static final int SDL_MICRO_VERSION = 3;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
Expand Down
78 changes: 1 addition & 77 deletions SDL2/configure
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ enable_sse2
enable_sse3
enable_altivec
enable_lsx
enable_lasx
enable_oss
enable_alsa
with_alsa_prefix
Expand Down Expand Up @@ -1675,7 +1674,6 @@ Optional Features:
--enable-sse3 use SSE3 assembly routines [default=maybe]
--enable-altivec use Altivec assembly routines [default=yes]
--enable-lsx use LSX assembly routines [default=yes]
--enable-lasx use LASX assembly routines [default=yes]
--enable-oss support the OSS audio API [default=maybe]
--enable-alsa support the ALSA audio API [default=yes]
--disable-alsatest Do not try to compile and run a test Alsa program
Expand Down Expand Up @@ -3510,7 +3508,7 @@ orig_CFLAGS="$CFLAGS"
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=30
SDL_MICRO_VERSION=2
SDL_MICRO_VERSION=3
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down Expand Up @@ -21112,80 +21110,6 @@ printf "%s\n" "#define HAVE_LSXINTRIN_H 1" >>confdefs.h

fi

# Check whether --enable-lasx was given.
if test ${enable_lasx+y}
then :
enableval=$enable_lasx;
else $as_nop
enable_LASX=yes
fi

if test x$enable_LASX = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_lasx=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlasx option" >&5
printf %s "checking for GCC -mlasx option... " >&6; }
lasx_CFLAGS="-mlasx"
CFLAGS="$save_CFLAGS $lasx_CFLAGS"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

#ifndef __loongarch_asx
#error Assembler CPP flag not enabled
#endif

int
main (void)
{

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
have_gcc_lasx=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lasx" >&5
printf "%s\n" "$have_gcc_lasx" >&6; }
CFLAGS="$save_CFLAGS"

if test x$have_gcc_lasx = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
SUMMARY_math="${SUMMARY_math} lasx"
fi
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lasxintrin.h" >&5
printf %s "checking for lasxintrin.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <lasxintrin.h>
int
main (void)
{

;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
have_lasxintrin_h_hdr=yes
else $as_nop
have_lasxintrin_h_hdr=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lasxintrin_h_hdr" >&5
printf "%s\n" "$have_lasxintrin_h_hdr" >&6; }
if test x$have_lasxintrin_h_hdr = xyes; then

printf "%s\n" "#define HAVE_LASXINTRIN_H 1" >>confdefs.h

fi

CheckOSS()
{
# Check whether --enable-oss was given.
Expand Down
34 changes: 1 addition & 33 deletions SDL2/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=2
SDL_MICRO_VERSION=3
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down Expand Up @@ -938,38 +938,6 @@ fi
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
fi

AC_ARG_ENABLE(lasx,
[AS_HELP_STRING([--enable-lasx], [use LASX assembly routines [default=yes]])],
, enable_LASX=yes)
if test x$enable_LASX = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_lasx=no
AC_MSG_CHECKING(for GCC -mlasx option)
lasx_CFLAGS="-mlasx"
CFLAGS="$save_CFLAGS $lasx_CFLAGS"

AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifndef __loongarch_asx
#error Assembler CPP flag not enabled
#endif
]], [])], [have_gcc_lasx=yes], [])
AC_MSG_RESULT($have_gcc_lasx)
CFLAGS="$save_CFLAGS"

if test x$have_gcc_lasx = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
SUMMARY_math="${SUMMARY_math} lasx"
fi
fi

AC_MSG_CHECKING(for lasxintrin.h)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lasxintrin.h>]])],
[have_lasxintrin_h_hdr=yes],[have_lasxintrin_h_hdr=no])
AC_MSG_RESULT($have_lasxintrin_h_hdr)
if test x$have_lasxintrin_h_hdr = xyes; then
AC_DEFINE(HAVE_LASXINTRIN_H, 1, [ ])
fi

dnl See if the OSS audio interface is supported
CheckOSS()
{
Expand Down
4 changes: 2 additions & 2 deletions SDL2/include/SDL_revision.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Generated by updaterev.sh, do not edit */
#ifdef SDL_VENDOR_INFO
#define SDL_REVISION "SDL-release-2.30.2-0-gf461d91cd (" SDL_VENDOR_INFO ")"
#define SDL_REVISION "SDL-release-2.30.3-0-gfb1497566 (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "SDL-release-2.30.2-0-gf461d91cd"
#define SDL_REVISION "SDL-release-2.30.3-0-gfb1497566"
#endif
#define SDL_REVISION_NUMBER 0
2 changes: 1 addition & 1 deletion SDL2/include/SDL_stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
# elif defined(__MRC__)
void *alloca(unsigned);
# else
char *alloca();
void *alloca(size_t);
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion SDL2/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 2
#define SDL_PATCHLEVEL 3

/**
* Macro to determine SDL version program was compiled against.
Expand Down
21 changes: 21 additions & 0 deletions SDL2/src/core/gdk/SDL_gdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extern "C" {
static XTaskQueueHandle GDK_GlobalTaskQueue;

PAPPSTATE_REGISTRATION hPLM = {};
PAPPCONSTRAIN_REGISTRATION hCPLM = {};
HANDLE plmSuspendComplete = nullptr;

extern "C" DECLSPEC int
Expand Down Expand Up @@ -177,13 +178,33 @@ SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved)
return -1;
}

/* Register constrain/unconstrain handling */
auto raccn = [](BOOLEAN constrained, PVOID context) {
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppConstrainedChangeNotification handler");
SDL_VideoDevice *_this = SDL_GetVideoDevice();
if (_this) {
if (constrained) {
SDL_SetKeyboardFocus(NULL);
} else {
SDL_SetKeyboardFocus(_this->windows);
}
}
};
if (RegisterAppConstrainedChangeNotification(raccn, NULL, &hCPLM)) {
SDL_SetError("[GDK] Unable to call RegisterAppConstrainedChangeNotification");
return -1;
}

/* Run the application main() code */
result = mainFunction(argc, argv);

/* Unregister suspend/resume handling */
UnregisterAppStateChangeNotification(hPLM);
CloseHandle(plmSuspendComplete);

/* Unregister constrain/unconstrain handling */
UnregisterAppConstrainedChangeNotification(hCPLM);

/* !!! FIXME: This follows the docs exactly, but for some reason still leaks handles on exit? */
/* Terminate the task queue and dispatch any pending tasks */
XTaskQueueTerminate(taskQueue, false, nullptr, nullptr);
Expand Down
2 changes: 0 additions & 2 deletions SDL2/src/filesystem/gdk/SDL_sysfilesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
#include "../../SDL_internal.h"

#ifdef SDL_FILESYSTEM_XBOX

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent filesystem routines */
Expand Down Expand Up @@ -135,6 +134,5 @@ SDL_GetPrefPath(const char *org, const char *app)
return folderPath;
}

#endif /* SDL_FILESYSTEM_XBOX */

/* vi: set ts=4 sw=4 expandtab: */
2 changes: 2 additions & 0 deletions SDL2/src/joystick/SDL_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ static Uint32 initial_wheel_devices[] = {
MAKE_VIDPID(0x044f, 0xb65e), /* Thrustmaster T500RS */
MAKE_VIDPID(0x044f, 0xb664), /* Thrustmaster TX (initial mode) */
MAKE_VIDPID(0x044f, 0xb669), /* Thrustmaster TX (active mode) */
MAKE_VIDPID(0x044f, 0xb691), /* Thrustmaster TS-XW (initial mode) */
MAKE_VIDPID(0x044f, 0xb692), /* Thrustmaster TS-XW (active mode) */
MAKE_VIDPID(0x0483, 0x0522), /* Simagic Wheelbase (including M10, Alpha Mini, Alpha, Alpha U) */
MAKE_VIDPID(0x0eb7, 0x0001), /* Fanatec ClubSport Wheel Base V2 */
MAKE_VIDPID(0x0eb7, 0x0004), /* Fanatec ClubSport Wheel Base V2.5 */
Expand Down
Loading

0 comments on commit 8a654b8

Please sign in to comment.