Skip to content

Commit

Permalink
Merge pull request #1050 from Areloch/SDLUpdate_2_28_1
Browse files Browse the repository at this point in the history
Updates the SDL library to the latest standard bugfix release 2.28.1
  • Loading branch information
Areloch authored Jul 23, 2023
2 parents 8a23392 + 0bdacb8 commit 92cb9b4
Show file tree
Hide file tree
Showing 1,282 changed files with 347,032 additions and 182,721 deletions.
90 changes: 90 additions & 0 deletions Engine/lib/sdl/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true

AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false

AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine

# Custom brace breaking
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true

# Make the closing brace of container literals go to a new line
Cpp11BracedListStyle: false

# Never format includes
IncludeBlocks: Preserve
# clang-format version 4.0 through 12.0:
#SortIncludes: false
# clang-format version 13.0+:
#SortIncludes: Never

# No length limit, in case it breaks macros, you can
# disable it with /* clang-format off/on */ comments
ColumnLimit: 0

IndentWidth: 4
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: NoIndent

PointerAlignment: Right
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false

UseCRLF: false
UseTab: Never

ForEachMacros:
[
"spa_list_for_each",
"spa_list_for_each_safe",
"wl_list_for_each",
"wl_array_for_each",
"udev_list_entry_foreach",
]

---

79 changes: 79 additions & 0 deletions Engine/lib/sdl/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For format see editorconfig.org
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: Zlib

root = true

[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
indent_size = 2
indent_style = space

[*.xml]
indent_size = 4
indent_style = space

[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
indent_size = 2
indent_style = space

[{cmake_uninstall.cmake.in,test/CMakeLists.txt}]
indent_size = 4
indent_style = space

[configure.ac]
# Inconsistently 2-, 4- or occasionally 3-space indented, but mostly 4,
# so let's use 4 for new code
indent_size = 4
indent_style = space

[{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
indent_size = 8
indent_style = tab
tab_width = 8

[Makefile.os2]
indent_size = 4
indent_style = space

[test/Makefile.os2]
indent_size = 2
indent_style = space

[{src/core/os2/geniconv/makefile,src/core/os2/geniconv/os2cp.c}]
indent_size = 2
indent_style = space

[src/joystick/controller_type.*]
indent_style = tab

[src/joystick/hidapi/steam/*.h]
indent_style = tab

[src/libm/*.c]
indent_style = tab

[src/test/SDL_test_{crc32,md5,random}.c]
indent_size = 2
indent_style = space

[src/video/yuv2rgb/*.{c,h}]
indent_style = tab

[wayland-protocols/*.xml]
indent_size = 2
indent_style = space

[*.{markdown,md}]
indent_size = 4
indent_style = space
# Markdown syntax treats tabs as 4 spaces
tab_width = 4

[{*.bat,*.rc}]
end_of_line = crlf
10 changes: 10 additions & 0 deletions Engine/lib/sdl/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ build
gen
Build
buildbot
/VERSION.txt

*.so
*.so.*
*.dll
*.exe
*.o
*.obj
*.res
*.lib
*.a
*.la
Expand Down Expand Up @@ -60,6 +62,11 @@ cmake-build-*
xcuserdata
*.xcworkspace

# for QtCreator
CMakeLists.txt.user
build*/
*.pro.user*

# for Visual C++
.vs
Debug
Expand Down Expand Up @@ -95,9 +102,11 @@ VisualC/visualtest/testsprite2.exe
VisualC/visualtest/testsprite2_sample.actions
VisualC/visualtest/testsprite2_sample.config
VisualC/visualtest/testsprite2_sample.parameters
VisualC-GDK/**/Layout

# for Android
android-project/local.properties
android-project/.gradle/

test/checkkeys
test/checkkeysthreads
Expand Down Expand Up @@ -169,6 +178,7 @@ test/testyuv
test/torturethread

builddir/
!build-scripts/
debian/*.debhelper.log
debian/*.substvars
debian/*.tar.gz
Expand Down
17 changes: 17 additions & 0 deletions Engine/lib/sdl/.wikiheaders-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
projectfullname = SDL2
projectshortname = SDL2
incsubdir = include
wikisubdir = SDL2
readmesubdir = docs
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
mainincludefname = SDL.h
versionfname = include/SDL_version.h
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
selectheaderregex = \ASDL.*?\.h\Z
projecturl = https://libsdl.org/
wikiurl = https://wiki.libsdl.org/SDL2
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
warn_about_missing = 0
wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.)
13 changes: 10 additions & 3 deletions Engine/lib/sdl/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS += \
-Wall -Wextra \
-Wdocumentation \
-Wdocumentation-unknown-command \
-Wmissing-prototypes \
-Wunreachable-code-break \
-Wunneeded-internal-declaration \
Expand All @@ -75,12 +74,15 @@ LOCAL_CFLAGS += \
-Wstrict-prototypes \
-Wkeyword-macro \


# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare

LOCAL_CXXFLAGS += -std=gnu++11

LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid

LOCAL_LDFLAGS := -Wl,--no-undefined

ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif
Expand All @@ -89,6 +91,7 @@ LOCAL_STATIC_LIBRARIES := cpufeatures

include $(BUILD_SHARED_LIBRARY)


###########################
#
# SDL static library
Expand All @@ -99,11 +102,15 @@ LOCAL_MODULE := SDL2_static

LOCAL_MODULE_FILENAME := libSDL2

LOCAL_LDLIBS :=
LOCAL_LDLIBS :=

LOCAL_LDFLAGS :=

LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid

include $(BUILD_STATIC_LIBRARY)


###########################
#
# SDL main static library
Expand Down
Loading

0 comments on commit 92cb9b4

Please sign in to comment.