Skip to content

Commit

Permalink
Merge branch 'SDL2' into MorphOS-SDL-2
Browse files Browse the repository at this point in the history
  • Loading branch information
BeWorld2018 committed Jan 5, 2024
2 parents 3df436b + b1ad45a commit 352440a
Show file tree
Hide file tree
Showing 1,075 changed files with 2,438 additions and 1,848 deletions.
17 changes: 13 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,7 @@ elseif(VITA)
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syssem.c
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_systhread.c
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syscond.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
set(HAVE_SDL_THREADS TRUE)
endif()
Expand Down Expand Up @@ -2682,7 +2682,10 @@ elseif(PSP)
endif()
if(SDL_THREADS)
set(SDL_THREAD_PSP 1)
file(GLOB PSP_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
file(GLOB PSP_THREAD_SOURCES
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
list(APPEND SOURCE_FILES ${PSP_THREAD_SOURCES})
set(HAVE_SDL_THREADS TRUE)
endif()
Expand Down Expand Up @@ -2743,7 +2746,11 @@ elseif(PS2)
endif()
if(SDL_THREADS)
set(SDL_THREAD_PS2 1)
file(GLOB PS2_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c ${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
file(GLOB PS2_THREAD_SOURCES
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
list(APPEND SOURCE_FILES ${PS2_THREAD_SOURCES})
set(HAVE_SDL_THREADS TRUE)
endif()
Expand Down Expand Up @@ -2874,7 +2881,9 @@ elseif(N3DS)
if(SDL_THREADS)
set(SDL_THREAD_N3DS 1)
file(GLOB N3DS_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/n3ds/*.c)
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES} ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES}
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c)
set(HAVE_SDL_THREADS TRUE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion VisualC-GDK/tests/testgdk/src/testgdk.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Xcode/SDL/pkg-support/resources/License.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
1,122 changes: 993 additions & 129 deletions Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ private void connectHIDDeviceUSB(UsbDevice usbDevice) {
private void initializeBluetooth() {
Log.d(TAG, "Initializing Bluetooth");

if (Build.VERSION.SDK_INT >= 31 /* Android 12 */ &&
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH_CONNECT, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH_CONNECT");
return;
}

if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ &&
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
Expand Down
4 changes: 2 additions & 2 deletions build-scripts/gen_audio_channel_conversion.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -395,7 +395,7 @@ int main(void)
printf(
"/*\n"
" Simple DirectMedia Layer\n"
" Copyright (C) 1997-2023 Sam Lantinga <[email protected]>\n"
" Copyright (C) 1997-2024 Sam Lantinga <[email protected]>\n"
"\n"
" This software is provided 'as-is', without any express or implied\n"
" warranty. In no event will the authors be held liable for any damages\n"
Expand Down
4 changes: 2 additions & 2 deletions build-scripts/gen_audio_resampler_filter.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -113,7 +113,7 @@ int main(void)
printf(
"/*\n"
" Simple DirectMedia Layer\n"
" Copyright (C) 1997-2023 Sam Lantinga <[email protected]>\n"
" Copyright (C) 1997-2024 Sam Lantinga <[email protected]>\n"
"\n"
" This software is provided 'as-is', without any express or implied\n"
" warranty. In no event will the authors be held liable for any damages\n"
Expand Down
12 changes: 10 additions & 2 deletions build-scripts/update-copyright.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/bin/sh

find . -type f -exec grep -Il "Copyright" {} \; \
if [ "$SED" = "" ]; then
if type gsed >/dev/null; then
SED=gsed
else
SED=sed
fi
fi

find . -type f \
| grep -v \.git \
| while read file; do \
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
LC_ALL=C $SED -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
done
2 changes: 1 addition & 1 deletion include/SDL.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_assert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
4 changes: 2 additions & 2 deletions include/SDL_atomic.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -209,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
#ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */
#define SDL_MEMORY_BARRIER_USES_FUNCTION
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_audio.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_bits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_blendmode.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_clipboard.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config.h.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_android.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_emscripten.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_iphoneos.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_macosx.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_minimal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_ngage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_os2.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_pandora.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_windows.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_wingdk.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_winrt.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_config_xbox.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_copying.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_cpuinfo.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_egl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_endian.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_error.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_events.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
6 changes: 3 additions & 3 deletions include/SDL_filesystem.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -64,7 +64,7 @@ extern "C" {
* directory of the application as it is uncommon to store resources outside
* the executable. As such it is not a writable directory.
*
* The returned path is guaranteed to end with a path separator ('\' on
* The returned path is guaranteed to end with a path separator ('\\' on
* Windows, '/' on most other platforms).
*
* The pointer returned is owned by the caller. Please call SDL_free() on the
Expand Down Expand Up @@ -120,7 +120,7 @@ extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
*
* The returned path is guaranteed to end with a path separator ('\' on
* The returned path is guaranteed to end with a path separator ('\\' on
* Windows, '/' on most other platforms).
*
* The pointer returned is owned by the caller. Please call SDL_free() on the
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_gamecontroller.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
Loading

0 comments on commit 352440a

Please sign in to comment.