mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 17:21:08 +01:00
Compare commits
448 Commits
release-2.
...
prerelease
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59fb7acbf7 | ||
|
|
1eb247fa2e | ||
|
|
b004133f08 | ||
|
|
68beedde92 | ||
|
|
5c1b7f6ea7 | ||
|
|
5d5488ca71 | ||
|
|
269fc1bd79 | ||
|
|
a5949d7b03 | ||
|
|
16f55fbdb4 | ||
|
|
94f6080895 | ||
|
|
017e237005 | ||
|
|
a9cf313eef | ||
|
|
bfe81a0c05 | ||
|
|
a6a2cdbd7c | ||
|
|
fc78d0ff39 | ||
|
|
6b03c1adf6 | ||
|
|
52f00833b0 | ||
|
|
217d3a6dab | ||
|
|
7343ece806 | ||
|
|
e4409f6733 | ||
|
|
f0a05ed476 | ||
|
|
580416d3c8 | ||
|
|
273d9e4640 | ||
|
|
161a316dfa | ||
|
|
52f8d0357a | ||
|
|
5b4f53bc0f | ||
|
|
cd8f57ee4e | ||
|
|
ae7446a959 | ||
|
|
a5d338bd2d | ||
|
|
7d7c48302b | ||
|
|
72fea0ed6f | ||
|
|
6bd3e0b189 | ||
|
|
cee47a9ebe | ||
|
|
a52b8580f0 | ||
|
|
4d7f12f6bd | ||
|
|
8ebe640a36 | ||
|
|
62fd6aad39 | ||
|
|
6a6e93bc29 | ||
|
|
6b4b6d8e59 | ||
|
|
43f6983a24 | ||
|
|
95f6edb9a5 | ||
|
|
3b9f47b85f | ||
|
|
6be430c7f7 | ||
|
|
af79b46f9e | ||
|
|
b06eda55e9 | ||
|
|
adb445eafb | ||
|
|
a864180cf3 | ||
|
|
7a55fa4e56 | ||
|
|
afd812374f | ||
|
|
c389c32d30 | ||
|
|
5ecc75a4fc | ||
|
|
6349ad7319 | ||
|
|
7041bbaf00 | ||
|
|
dd30ff2e31 | ||
|
|
aacb5e1774 | ||
|
|
75b9aab6c1 | ||
|
|
0dbdf90e7b | ||
|
|
2ec48b36ba | ||
|
|
43c22e5d1e | ||
|
|
3d720ba381 | ||
|
|
a530fc9199 | ||
|
|
48a406db4d | ||
|
|
2130dff0fc | ||
|
|
324b96153f | ||
|
|
b09266a4ef | ||
|
|
9eb09d2392 | ||
|
|
0f630e9177 | ||
|
|
4e3a26e271 | ||
|
|
e64acb619a | ||
|
|
a3a852e912 | ||
|
|
c23216bf46 | ||
|
|
6208ed8604 | ||
|
|
6646edf692 | ||
|
|
d9ff6380ae | ||
|
|
7389eba943 | ||
|
|
b3faebb8a8 | ||
|
|
b72b5d0f99 | ||
|
|
86f50ae7d7 | ||
|
|
18206446bf | ||
|
|
b5f1fe5004 | ||
|
|
97711e99fe | ||
|
|
ad21c70408 | ||
|
|
c90e1ec3ef | ||
|
|
12f9bcd2f4 | ||
|
|
f8ae3ef1eb | ||
|
|
163f669745 | ||
|
|
960b86dcb5 | ||
|
|
6d1dfc8322 | ||
|
|
69df26a0d4 | ||
|
|
32df5aeb3d | ||
|
|
8a2c6b604c | ||
|
|
c950018fe0 | ||
|
|
fb7c03ebb5 | ||
|
|
afc350eeff | ||
|
|
ded6c22efb | ||
|
|
e427e80bfe | ||
|
|
714502d373 | ||
|
|
e974985998 | ||
|
|
507ce36d80 | ||
|
|
535fdc3adc | ||
|
|
8c9f7104e3 | ||
|
|
6606ab8b56 | ||
|
|
e99a7144ff | ||
|
|
851eecdf40 | ||
|
|
63b3b9a558 | ||
|
|
c95edd9450 | ||
|
|
33f8a4ddca | ||
|
|
6258f2ef3f | ||
|
|
7321537971 | ||
|
|
bdf141335c | ||
|
|
9a0367675f | ||
|
|
1963cccce1 | ||
|
|
b84ce0d484 | ||
|
|
fd8cafc72e | ||
|
|
e09551bc80 | ||
|
|
2830895740 | ||
|
|
ab81a559f4 | ||
|
|
df36f926fc | ||
|
|
448e05e3c8 | ||
|
|
1b797957c1 | ||
|
|
1488c40812 | ||
|
|
60ef11b3cb | ||
|
|
d3b970d4d5 | ||
|
|
51ebefeeee | ||
|
|
81d3adddbf | ||
|
|
b3260e7eb3 | ||
|
|
4a3277b0f9 | ||
|
|
78698a0ba2 | ||
|
|
146ea9b0e1 | ||
|
|
a20516d4f3 | ||
|
|
e1c8350439 | ||
|
|
e9d3dcea73 | ||
|
|
4fde7dd830 | ||
|
|
ce5763230b | ||
|
|
68544be44b | ||
|
|
b75cd2b36d | ||
|
|
51db775442 | ||
|
|
9202df0472 | ||
|
|
e5a3acd6bd | ||
|
|
dd7bed9ebc | ||
|
|
d11702ce29 | ||
|
|
74bcc5a0a3 | ||
|
|
c7f4103807 | ||
|
|
e6cb082232 | ||
|
|
0a93ac1294 | ||
|
|
25367efcba | ||
|
|
6f69bbc541 | ||
|
|
8303c5d0a3 | ||
|
|
6bd49fc00c | ||
|
|
d58d637ac6 | ||
|
|
526f417587 | ||
|
|
51d6d60f11 | ||
|
|
e201f338d7 | ||
|
|
0fcfaf9e94 | ||
|
|
b9c2ad8395 | ||
|
|
298ad937c0 | ||
|
|
ad272ac690 | ||
|
|
e8d89ce28f | ||
|
|
7a335df9cf | ||
|
|
5abd676917 | ||
|
|
2cc2260435 | ||
|
|
168b97ca32 | ||
|
|
7e71d08ab2 | ||
|
|
ef4e0e921a | ||
|
|
4082821822 | ||
|
|
63e12cf601 | ||
|
|
ec0204d243 | ||
|
|
61115aebd3 | ||
|
|
7cd165e2d9 | ||
|
|
50d8642fa3 | ||
|
|
17f63e53f8 | ||
|
|
9703f23663 | ||
|
|
30cf26e089 | ||
|
|
5f25a6ea78 | ||
|
|
c391bdc160 | ||
|
|
55a07d91fa | ||
|
|
a236bf4f25 | ||
|
|
6b4bd5a759 | ||
|
|
46624b4e1d | ||
|
|
3807e95029 | ||
|
|
3a20274ddf | ||
|
|
4e07d4722d | ||
|
|
b359282a5c | ||
|
|
20c76599f9 | ||
|
|
fd3f381021 | ||
|
|
65a3453b7f | ||
|
|
3604ae1d1b | ||
|
|
423141bfca | ||
|
|
d6143ab369 | ||
|
|
799d39a302 | ||
|
|
142a3630d3 | ||
|
|
17410887d0 | ||
|
|
2b59cb900e | ||
|
|
f858d1305a | ||
|
|
96e3733a18 | ||
|
|
5a8ccf4522 | ||
|
|
5ec2d46f47 | ||
|
|
9ff8f29f43 | ||
|
|
67792767f5 | ||
|
|
246f3ba52c | ||
|
|
6f3474db2d | ||
|
|
8e13cc309e | ||
|
|
1087eaad7e | ||
|
|
ae2cc29f8b | ||
|
|
345efdcb10 | ||
|
|
847539afeb | ||
|
|
7fa46ec40b | ||
|
|
3c3c02518c | ||
|
|
4809bd356e | ||
|
|
774c50174c | ||
|
|
423c7ef856 | ||
|
|
37ef6a765d | ||
|
|
f73c25648f | ||
|
|
4c3d1d32a5 | ||
|
|
7c2a6ea5f2 | ||
|
|
e30b9993b9 | ||
|
|
01492a24f1 | ||
|
|
2c591e408e | ||
|
|
8ac8230bfa | ||
|
|
964e979d06 | ||
|
|
c87b0142fe | ||
|
|
4ddf85b1d5 | ||
|
|
f78f775238 | ||
|
|
fd2a2eea10 | ||
|
|
d2c4d74dd0 | ||
|
|
bd22ca762e | ||
|
|
efdf43aa9b | ||
|
|
001d2e2f65 | ||
|
|
c02cd20352 | ||
|
|
26a75add31 | ||
|
|
bef9f2b2c4 | ||
|
|
5968f3d828 | ||
|
|
822cf0b34b | ||
|
|
347659e8cf | ||
|
|
cb43eb43f8 | ||
|
|
6eda520f64 | ||
|
|
4c711d2d43 | ||
|
|
22d6e09a8d | ||
|
|
195ca499ca | ||
|
|
7ce311bead | ||
|
|
bed96482fa | ||
|
|
96a04cb910 | ||
|
|
b28d304b23 | ||
|
|
a8e7548797 | ||
|
|
9220f92bae | ||
|
|
179765561c | ||
|
|
5dee08213b | ||
|
|
412ceb84d4 | ||
|
|
aeeccb5d16 | ||
|
|
d5e58049ae | ||
|
|
12cc636c8f | ||
|
|
6da6a6cba2 | ||
|
|
e97b506242 | ||
|
|
626a3c5ef7 | ||
|
|
f4fc4719a5 | ||
|
|
1f48f8cd28 | ||
|
|
fe46569cce | ||
|
|
e4b5afa576 | ||
|
|
e59cba95a0 | ||
|
|
1a1cc8028b | ||
|
|
dc62fec5e9 | ||
|
|
a95f5a792c | ||
|
|
848d2008c6 | ||
|
|
b1cf322971 | ||
|
|
83ae1b4987 | ||
|
|
d2b5965894 | ||
|
|
9edd411a83 | ||
|
|
b798e49c92 | ||
|
|
b0a27cb1de | ||
|
|
f0566702c5 | ||
|
|
3d52d04977 | ||
|
|
aa51a9791a | ||
|
|
9dfa000bc0 | ||
|
|
5ef36ead08 | ||
|
|
3066873126 | ||
|
|
5669743a43 | ||
|
|
efa2e6a1ea | ||
|
|
15781a6986 | ||
|
|
f5cf0e37f7 | ||
|
|
03ebc4397f | ||
|
|
973424d9cb | ||
|
|
501a499180 | ||
|
|
c6a77971bd | ||
|
|
0e6d4baa6b | ||
|
|
c7dff3a22e | ||
|
|
57130b75a9 | ||
|
|
47f1cb550d | ||
|
|
f7b774a7e0 | ||
|
|
f9a9d3c8d4 | ||
|
|
7044452dd6 | ||
|
|
dbd54dd708 | ||
|
|
e19a9a7931 | ||
|
|
622311c016 | ||
|
|
c8eea02071 | ||
|
|
0cca71a846 | ||
|
|
ffab9f46b5 | ||
|
|
4cb57bf199 | ||
|
|
06aca7edaa | ||
|
|
0ffd985972 | ||
|
|
c4cf63f812 | ||
|
|
b44241ab2f | ||
|
|
ea15253220 | ||
|
|
8c5bda6acd | ||
|
|
aa6ea607d9 | ||
|
|
56665e1d9d | ||
|
|
a12ffbd532 | ||
|
|
e9c7b5191c | ||
|
|
a48004952d | ||
|
|
ec1a0f62dd | ||
|
|
1f2a241688 | ||
|
|
3c3ccb1d48 | ||
|
|
2317a96c8e | ||
|
|
48b6cd8bc2 | ||
|
|
f0bc5c9cbf | ||
|
|
b3a18706ee | ||
|
|
7e005bd843 | ||
|
|
e3fd8feae6 | ||
|
|
5953422c09 | ||
|
|
e78a72ec38 | ||
|
|
bfac54b59c | ||
|
|
49ca8bf520 | ||
|
|
94eeb587c1 | ||
|
|
7ad15c5b8f | ||
|
|
996b3dc37a | ||
|
|
e0f3da497f | ||
|
|
f93e810780 | ||
|
|
6b9884d40a | ||
|
|
e4bb3c8649 | ||
|
|
6222bd3143 | ||
|
|
6f88cbe4c9 | ||
|
|
d7866ffac8 | ||
|
|
737b4fc32c | ||
|
|
9b75fa0165 | ||
|
|
2c2cbbe664 | ||
|
|
6da99d4a6c | ||
|
|
2f924020e8 | ||
|
|
2bc373622b | ||
|
|
f871c178b9 | ||
|
|
8ab3ae98f0 | ||
|
|
f7280dcebb | ||
|
|
ec8fa57750 | ||
|
|
d35c737f1c | ||
|
|
6422a5d259 | ||
|
|
2a7948016a | ||
|
|
cf1daafa3f | ||
|
|
d15f6e379c | ||
|
|
f661654fad | ||
|
|
6e6e425e23 | ||
|
|
c71ee68b8a | ||
|
|
318b5577f9 | ||
|
|
9ef6885743 | ||
|
|
b352b78345 | ||
|
|
0e63b514d5 | ||
|
|
8cd908e0b9 | ||
|
|
a3c1ca1fa1 | ||
|
|
95f9c3cf0f | ||
|
|
0c19602118 | ||
|
|
fa50597055 | ||
|
|
db36664f26 | ||
|
|
f0c870b908 | ||
|
|
b03e08f376 | ||
|
|
c244bbc515 | ||
|
|
ce502054ad | ||
|
|
38ef678990 | ||
|
|
76a7b629bf | ||
|
|
ecf1e15fec | ||
|
|
dba79ade59 | ||
|
|
40bef98f8b | ||
|
|
7d2808e30b | ||
|
|
b299f74d05 | ||
|
|
6fc7aa28e7 | ||
|
|
a459479769 | ||
|
|
79a16da61e | ||
|
|
4da47601be | ||
|
|
2a8297e427 | ||
|
|
fff97c95eb | ||
|
|
60d702ac74 | ||
|
|
cd7c2f1de7 | ||
|
|
63814ec767 | ||
|
|
22002d9155 | ||
|
|
d4b82bfa4c | ||
|
|
ba6f96275e | ||
|
|
e0daa2a530 | ||
|
|
f9a5cf77b8 | ||
|
|
50bc013695 | ||
|
|
b398a847be | ||
|
|
adac3bd1e2 | ||
|
|
85a77fb5fa | ||
|
|
90da399bbb | ||
|
|
3f813cf1ef | ||
|
|
2021a10927 | ||
|
|
db9e14e504 | ||
|
|
3b53555bcf | ||
|
|
13b1bf4f21 | ||
|
|
f7a19f9ea8 | ||
|
|
3696e23d09 | ||
|
|
0b8e796e2c | ||
|
|
fbd230bb6c | ||
|
|
3fcc2cb500 | ||
|
|
f25a78eede | ||
|
|
6150245d65 | ||
|
|
d1a3981bf8 | ||
|
|
bb0b6dd42e | ||
|
|
5394238cdc | ||
|
|
41b9198515 | ||
|
|
829f6b3d7d | ||
|
|
0687128c96 | ||
|
|
9e5cbf034a | ||
|
|
f81419702e | ||
|
|
6c2928b4be | ||
|
|
ca26df3404 | ||
|
|
888899244c | ||
|
|
645db217a0 | ||
|
|
73448fe245 | ||
|
|
97774cdf72 | ||
|
|
7e636b03cc | ||
|
|
1aa9754d96 | ||
|
|
2ccb0dfd16 | ||
|
|
a0cdc1fc30 | ||
|
|
29694869b1 | ||
|
|
5c1f5a7306 | ||
|
|
0f45a4e303 | ||
|
|
31e83cd14c | ||
|
|
fde9a7086e | ||
|
|
c4141bc11c | ||
|
|
2a42952281 | ||
|
|
12f15aaa74 | ||
|
|
05bd225a80 | ||
|
|
ccc70e644b | ||
|
|
7d7ec9c951 | ||
|
|
e551384a99 | ||
|
|
b293888c7d | ||
|
|
5066910bf5 | ||
|
|
111c3add73 | ||
|
|
de019568dc | ||
|
|
f6eb4b0759 | ||
|
|
01ef98a5d0 | ||
|
|
795744fc75 | ||
|
|
e2d268a399 | ||
|
|
d7c07d6b09 | ||
|
|
76afb8583b | ||
|
|
c39df2fb0c | ||
|
|
8c1584e8e8 | ||
|
|
e9ff4fdd49 | ||
|
|
0b2a55ea7d | ||
|
|
3dcfe86082 | ||
|
|
0964c84d77 | ||
|
|
fa29e2d7f7 |
89
.clang-format
Normal file
89
.clang-format
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
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: All
|
||||
AlwaysBreakAfterReturnType: AllDefinitions
|
||||
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: true
|
||||
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
|
||||
|
||||
SpaceAfterCStyleCast: true
|
||||
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",
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
77
.editorconfig
Normal file
77
.editorconfig
Normal file
@@ -0,0 +1,77 @@
|
||||
# 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
|
||||
|
||||
[*.{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
|
||||
|
||||
[src/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
|
||||
50
.github/workflows/android.yml
vendored
50
.github/workflows/android.yml
vendored
@@ -4,11 +4,57 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Android.mk }
|
||||
- { name: CMake, cmake: '-DCMAKE_SYSTEM_PROCESSOR=aarch64 -DANDROID_PLATFORM=android-23 -DCMAKE_SYSTEM_VERSION=23 ' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup_ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
- name: Build
|
||||
run: ./build-scripts/androidbuildlibs.sh
|
||||
- name: Build (Android.mk)
|
||||
if: ${{ matrix.platform.name == 'Android.mk' }}
|
||||
run: |
|
||||
./build-scripts/androidbuildlibs.sh
|
||||
- name: Setup (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build
|
||||
- name: Configure (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake -B build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
${{ matrix.platform.cmake }} \
|
||||
-DSDL_STATIC_PIC=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-GNinja
|
||||
- name: Build (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake --build build --config Release --parallel --verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake --install build --config Release
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
${{ matrix.platform.cmake }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
|
||||
25
.github/workflows/emscripten.yml
vendored
25
.github/workflows/emscripten.yml
vendored
@@ -11,6 +11,27 @@ jobs:
|
||||
with:
|
||||
version: 2.0.27
|
||||
- name: Configure CMake
|
||||
run: emcmake cmake -B build
|
||||
run: |
|
||||
emcmake cmake -S . -B build \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build/
|
||||
run: cmake --build build/ --verbose
|
||||
- name: Run build-time tests
|
||||
run: |
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/
|
||||
- name: Install
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
emcmake cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
|
||||
161
.github/workflows/main.yml
vendored
161
.github/workflows/main.yml
vendored
@@ -15,10 +15,12 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
|
||||
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
|
||||
- { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
|
||||
- { name: MacOS, os: macos-latest, shell: sh }
|
||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, cc: gcc }
|
||||
- { name: Windows (mingw64+clang), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, cc: clang }
|
||||
- { name: Linux (CMake), os: ubuntu-20.04, shell: sh, flags: true }
|
||||
- { name: Linux (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
|
||||
- { name: MacOS (CMake), os: macos-latest, shell: sh }
|
||||
- { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
|
||||
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
@@ -27,16 +29,30 @@ jobs:
|
||||
with:
|
||||
msystem: ${{ matrix.platform.msystem }}
|
||||
install: >-
|
||||
${{ matrix.platform.msys-env }}-gcc
|
||||
${{ matrix.platform.msys-env }}-${{ matrix.platform.cc }}
|
||||
${{ matrix.platform.msys-env }}-cmake
|
||||
${{ matrix.platform.msys-env }}-ninja
|
||||
${{ matrix.platform.msys-env }}-pkg-config
|
||||
- name: Configure MSYS2 compiler
|
||||
if: matrix.platform.shell == 'msys2 {0}'
|
||||
run: |
|
||||
if test x${{ matrix.platform.cc}} == xgcc; then
|
||||
echo "CC=gcc" >> $GITHUB_ENV
|
||||
echo "CXX=g++" >> $GITHUB_ENV
|
||||
fi
|
||||
if test x${{ matrix.platform.cc}} == xclang; then
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Setup Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wayland-protocols \
|
||||
sudo apt-get install \
|
||||
autoconf \
|
||||
gnome-desktop-testing \
|
||||
wayland-protocols \
|
||||
pkg-config \
|
||||
ninja-build \
|
||||
libasound2-dev \
|
||||
@@ -73,11 +89,132 @@ jobs:
|
||||
git clone --depth 1 https://gitlab.gnome.org/jadahl/libdecor.git --branch 0.1.0
|
||||
cd libdecor
|
||||
meson build --buildtype release -Ddemo=false -Ddbus=disabled
|
||||
ninja -C build
|
||||
ninja -v -C build
|
||||
sudo meson install -C build
|
||||
- name: Setup Macos dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install \
|
||||
ninja
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
||||
- name: Build
|
||||
run: cmake --build build/ --config Release
|
||||
|
||||
- name: Check that versioning is consistent
|
||||
# We only need to run this once: arbitrarily use the Linux/CMake build
|
||||
if: "runner.os == 'Linux' && ! matrix.platform.autotools"
|
||||
run: ./test/versioning.sh
|
||||
- name: Configure (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
- name: Run build-time tests (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/
|
||||
- name: Install (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
( cd cmake_prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Configure (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
rm -fr build-autotools
|
||||
mkdir build-autotools
|
||||
./autogen.sh
|
||||
(
|
||||
cd build-autotools
|
||||
${{ github.workspace }}/configure \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
)
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
curdir="$(pwd)"
|
||||
multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
(
|
||||
mkdir -p build-autotools/test
|
||||
cd build-autotools/test
|
||||
${{ github.workspace }}/test/configure \
|
||||
--x-includes=/usr/include \
|
||||
--x-libraries="/usr/lib/${multiarch}" \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
SDL_CFLAGS="-I${curdir}/include" \
|
||||
SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
|
||||
ac_cv_lib_SDL2_ttf_TTF_Init=no \
|
||||
${NULL+}
|
||||
)
|
||||
fi
|
||||
- name: Build (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools V=1
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
make -j"${parallel}" -C build-autotools/test V=1
|
||||
fi
|
||||
- name: Run build-time tests (Autotools)
|
||||
if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
|
||||
run: |
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
export SDL_TESTS_QUICK=1
|
||||
make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
|
||||
- name: Install (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools install V=1
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
make -j"${parallel}" -C build-autotools/test install V=1
|
||||
fi
|
||||
( cd autotools_prefix; find . ) | LC_ALL=C sort -u
|
||||
echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Distcheck (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools dist V=1
|
||||
# Similar to Automake `make distcheck`: check that the tarball
|
||||
# release is sufficient to do a new build
|
||||
mkdir distcheck
|
||||
tar -C distcheck -zxf build-autotools/SDL2-*.tar.gz
|
||||
( cd distcheck/SDL2-* && ./configure )
|
||||
make -j"${parallel}" -C distcheck/SDL2-*
|
||||
- name: Run installed-tests (Autotools)
|
||||
if: "runner.os == 'Linux' && matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
sudo make -j"${parallel}" -C build-autotools install
|
||||
sudo make -j"${parallel}" -C build-autotools/test install
|
||||
export SDL_TESTS_QUICK=1
|
||||
# We need to set LD_LIBRARY_PATH because it isn't in the default
|
||||
# linker search path. We don't need to set XDG_DATA_DIRS for
|
||||
# ginsttest-runner, because /usr/local/share *is* in the default
|
||||
# search path for that.
|
||||
env --chdir=/ \
|
||||
LD_LIBRARY_PATH=/usr/local/lib \
|
||||
SDL_AUDIODRIVER=dummy \
|
||||
SDL_VIDEODRIVER=dummy \
|
||||
ginsttest-runner --tap SDL2
|
||||
|
||||
28
.github/workflows/msvc.yml
vendored
28
.github/workflows/msvc.yml
vendored
@@ -13,17 +13,41 @@ jobs:
|
||||
platform:
|
||||
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
|
||||
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
|
||||
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
|
||||
- { name: Windows (ARM), flags: -A ARM }
|
||||
- { name: Windows (ARM64), flags: -A ARM64 }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TEST=OFF, project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF,
|
||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
||||
run: cmake -S . -B build `
|
||||
-DSDL_TESTS=ON `
|
||||
-DSDL_INSTALL_TESTS=ON `
|
||||
${{ matrix.platform.flags }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build CMake
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
- name: Run build-time tests
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release
|
||||
- name: Install CMake
|
||||
run: |
|
||||
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ !contains(matrix.platform.name, 'UWP') }} # FIXME: cmake/test/CMakeLists.txt should support UWP
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build `
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
|
||||
${{ matrix.platform.flags }}
|
||||
cmake --build cmake_config_build --config Release
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
|
||||
22
.github/workflows/os2.yml
vendored
22
.github/workflows/os2.yml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Build (OS/2)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
os2:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: open-watcom/setup-watcom@v0
|
||||
- name: Build SDL2
|
||||
run: |
|
||||
wmake -f Makefile.os2
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd test && wmake -f Makefile.os2
|
||||
cd ..
|
||||
- name: distclean
|
||||
run: |
|
||||
wmake -f Makefile.os2 distclean
|
||||
cd test && wmake -f Makefile.os2 distclean
|
||||
cd ..
|
||||
30
.github/workflows/ps2.yaml
vendored
Normal file
30
.github/workflows/ps2.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Build (Sony Playstation 2)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ps2:
|
||||
runs-on: ubuntu-latest
|
||||
container: ps2dev/ps2dev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake -DSDL_TESTS=ON
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ success() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tests-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
build/test
|
||||
23
.github/workflows/psp.yaml
vendored
23
.github/workflows/psp.yaml
vendored
@@ -13,6 +13,25 @@ jobs:
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DSDL_TEST=ON
|
||||
run: |
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
run: cmake --build build --config Release
|
||||
- name: Install
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build --config Release
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
|
||||
71
.github/workflows/riscos.yml
vendored
71
.github/workflows/riscos.yml
vendored
@@ -3,26 +3,65 @@ name: Build (RISC OS)
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
autotools:
|
||||
name: autotools
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
run: ./configure --host=arm-unknown-riscos --disable-gcc-atomics
|
||||
- name: Build
|
||||
run: make -j`nproc`
|
||||
|
||||
cmake:
|
||||
name: CMake
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: autotools, test_args: '-DTEST_SHARED=FALSE' } # FIXME: autotools should build and install shared libraries
|
||||
- { name: CMake }
|
||||
|
||||
steps:
|
||||
- name: Setup dependencies
|
||||
run: apt-get update && apt-get install -y cmake ninja-build
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -G Ninja -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake -DRISCOS=ON -DSDL_GCC_ATOMICS=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Configure (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: |
|
||||
mkdir build_autotools
|
||||
cd build_autotools
|
||||
../configure \
|
||||
--host=arm-unknown-riscos \
|
||||
--disable-gcc-atomics \
|
||||
--prefix=${{ github.workspace }}/prefix_autotools
|
||||
- name: Build (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: make -C build_autotools -j`nproc` V=1
|
||||
- name: Install (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: |
|
||||
echo "SDL2_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
|
||||
make -C build_autotools install
|
||||
( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
|
||||
- name: Configure (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DRISCOS=ON \
|
||||
-DSDL_GCC_ATOMICS=OFF \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
|
||||
- name: Build (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
echo "SDL2_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.test_args }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
|
||||
25
.github/workflows/vita.yaml
vendored
25
.github/workflows/vita.yaml
vendored
@@ -16,8 +16,27 @@ jobs:
|
||||
- name: Install CMake and GNU Make
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake make
|
||||
apk add cmake make ninja
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
run: cmake --build build --verbose
|
||||
- name: Install CMake
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
|
||||
35
.github/workflows/watcom.yml
vendored
Normal file
35
.github/workflows/watcom.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Build (OpenWatcom)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
os2:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows, makefile: Makefile.w32 }
|
||||
- { name: OS/2, makefile: Makefile.os2 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: open-watcom/setup-watcom@v0
|
||||
- name: Build SDL2
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }}
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }}
|
||||
cd ..
|
||||
- name: Run tests
|
||||
if: "matrix.platform.makefile == 'Makefile.w32'"
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
|
||||
cd ..
|
||||
- name: distclean
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd ..
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,6 +22,7 @@ buildbot
|
||||
*.exe
|
||||
*.o
|
||||
*.obj
|
||||
*.res
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
|
||||
15
.wikiheaders-options
Normal file
15
.wikiheaders-options
Normal file
@@ -0,0 +1,15 @@
|
||||
projectfullname = SDL_mixer
|
||||
projectshortname = SDL_mixer
|
||||
incsubdir = include
|
||||
wikisubdir =
|
||||
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
|
||||
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
||||
warn_about_missing = 0
|
||||
537
CMakeLists.txt
537
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
|
||||
|
||||
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
||||
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
@@ -80,6 +80,7 @@ HDRS = \
|
||||
SDL_filesystem.h \
|
||||
SDL_gamecontroller.h \
|
||||
SDL_gesture.h \
|
||||
SDL_guid.h \
|
||||
SDL_haptic.h \
|
||||
SDL_hidapi.h \
|
||||
SDL_hints.h \
|
||||
|
||||
15
Makefile.os2
15
Makefile.os2
@@ -11,7 +11,10 @@
|
||||
# wmake -f Makefile.os2 HIDAPI=1
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.22
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 23
|
||||
MICRO_VERSION = 1
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBICONV=0
|
||||
@@ -60,15 +63,19 @@ CFLAGS_DLL+= -DHAVE_LIBUSB_H=1
|
||||
# building SDL itself (for DECLSPEC):
|
||||
CFLAGS_DLL+= -DBUILD_SDL
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_memcpy.c SDL_memset.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
|
||||
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||
|
||||
273
Makefile.w32
Normal file
273
Makefile.w32
Normal file
@@ -0,0 +1,273 @@
|
||||
# Open Watcom makefile to build SDL2.dll for Win32
|
||||
# wmake -f Makefile.w32
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 23
|
||||
MICRO_VERSION = 1
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBHOME = .
|
||||
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
||||
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
|
||||
EXPFILE = $(LIBHOME)/$(LIBNAME).exp
|
||||
LNKFILE = $(LIBNAME).lnk
|
||||
|
||||
INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
|
||||
INCPATH+= -Iinclude
|
||||
INCPATH+= -I"src/video/khronos"
|
||||
|
||||
LIBM = SDL2libm.lib
|
||||
TLIB = SDL2test.lib
|
||||
LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
|
||||
|
||||
CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
# newer OpenWatcom versions enable W303 by default
|
||||
CFLAGS+= -wcd=303
|
||||
# the include paths :
|
||||
CFLAGS+= $(INCPATH)
|
||||
CFLAGS_STATIC=$(CFLAGS)
|
||||
# building dll:
|
||||
CFLAGS_DLL =$(CFLAGS)
|
||||
CFLAGS_DLL+= -bd
|
||||
# we override the DECLSPEC define in begin_code.h, because we are using
|
||||
# an exports file to remove the _cdecl '_' prefix from the symbol names
|
||||
CFLAGS_DLL+= -DDECLSPEC=
|
||||
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
|
||||
|
||||
RCFLAGS = -q -r -bt=nt $(INCPATH)
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_memcpy.c SDL_memset.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
|
||||
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
|
||||
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
|
||||
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
|
||||
|
||||
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
|
||||
SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
SRCS+= SDL_locale.c SDL_syslocale.c
|
||||
SRCS+= SDL_url.c SDL_sysurl.c
|
||||
|
||||
SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
|
||||
SRCS+= SDL_hid.c SDL_windows.c SDL_xinput.c
|
||||
SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
|
||||
SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
|
||||
SRCS+= SDL_syspower.c
|
||||
SRCS+= SDL_d3dmath.c
|
||||
SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
|
||||
SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
|
||||
SRCS+= SDL_render_d3d12.c SDL_shaders_d3d12.c
|
||||
SRCS+= SDL_render_gl.c SDL_shaders_gl.c
|
||||
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
|
||||
SRCS+= SDL_windowssensor.c
|
||||
SRCS+= SDL_syscond_cv.c
|
||||
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
|
||||
|
||||
SRCS+= SDL_dynapi.c
|
||||
|
||||
RCSRCS = version.rc
|
||||
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
RCOBJS= $(RCSRCS:.rc=.res)
|
||||
|
||||
.extensions:
|
||||
.extensions: .lib .dll .obj .res .c .rc .asm
|
||||
|
||||
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
|
||||
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
|
||||
.c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
|
||||
.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/direct3d12;./src/render/opengl;./src/render/opengles2
|
||||
.rc: ./src/main/windows
|
||||
|
||||
all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
|
||||
|
||||
build_dll: .symbolic
|
||||
@echo * Compiling dll objects
|
||||
|
||||
$(DLLFILE): build_dll $(OBJS) $(LIBM) $(RCOBJS) $(LNKFILE)
|
||||
@echo * Linking: $@
|
||||
wlink @$(LNKFILE)
|
||||
|
||||
$(LIBFILE): $(DLLFILE)
|
||||
@echo * Creating LIB file: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $* @$(EXPFILE)
|
||||
|
||||
.c.obj:
|
||||
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
|
||||
|
||||
.rc.res:
|
||||
wrc $(RCFLAGS) -fo=$^@ $<
|
||||
|
||||
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
|
||||
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
|
||||
SDL_cpuinfo.obj: SDL_cpuinfo.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_wave.obj: SDL_wave.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
|
||||
SDL_blendfillrect.obj: SDL_blendfillrect.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_blendline.obj: SDL_blendline.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
SDL_malloc.obj: SDL_malloc.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
|
||||
# SDL2libm
|
||||
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
|
||||
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
||||
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
|
||||
MOBJS= $(MSRCS:.c=.obj)
|
||||
|
||||
.c: ./src/libm;
|
||||
e_atan2.obj: e_atan2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_exp.obj: e_exp.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_fmod.obj: e_fmod.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_log10.obj: e_log10.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_log.obj: e_log.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_pow.obj: e_pow.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_rem_pio2.obj: e_rem_pio2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_sqrt.obj: e_sqrt.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_cos.obj: k_cos.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_rem_pio2.obj: k_rem_pio2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_sin.obj: k_sin.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_tan.obj: k_tan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_atan.obj: s_atan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_copysign.obj: s_copysign.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_cos.obj: s_cos.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_fabs.obj: s_fabs.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_floor.obj: s_floor.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_scalbn.obj: s_scalbn.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_sin.obj: s_sin.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_tan.obj: s_tan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
|
||||
build_libm: .symbolic
|
||||
@echo * Compiling libm objects
|
||||
$(LIBM): build_libm $(MOBJS)
|
||||
@echo * Creating: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
|
||||
|
||||
# SDL2test
|
||||
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
|
||||
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
|
||||
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
|
||||
SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
|
||||
SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
|
||||
TOBJS= $(TSRCS:.c=.obj)
|
||||
|
||||
.c: ./src/test;
|
||||
SDL_test_assert.obj: SDL_test_assert.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_common.obj: SDL_test_common.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_compare.obj: SDL_test_compare.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_crc32.obj: SDL_test_crc32.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_font.obj: SDL_test_font.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_fuzzer.obj: SDL_test_fuzzer.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_harness.obj: SDL_test_harness.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageBlit.obj: SDL_test_imageBlit.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageFace.obj: SDL_test_imageFace.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_log.obj: SDL_test_log.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_md5.obj: SDL_test_md5.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_random.obj: SDL_test_random.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_memory.obj: SDL_test_memory.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
|
||||
build_tlib: .symbolic
|
||||
@echo * Compiling testlib objects
|
||||
$(TLIB): build_tlib $(TOBJS)
|
||||
@echo * Creating: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
|
||||
|
||||
$(LNKFILE): Makefile.w32
|
||||
@echo * Creating linker file: $@
|
||||
@%create $@
|
||||
@%append $@ SYSTEM nt_dll INITINSTANCE TERMINSTANCE
|
||||
@%append $@ NAME $(DLLFILE)
|
||||
@for %i in ($(OBJS)) do @%append $@ FILE %i
|
||||
@for %i in ($(LIBS)) do @%append $@ LIB %i
|
||||
@%append $@ OPTION RESOURCE=$(RCOBJS)
|
||||
@%append $@ EXPORT=src/dynapi/SDL2.exports
|
||||
@%append $@ OPTION QUIET
|
||||
@%append $@ OPTION IMPF=$(EXPFILE)
|
||||
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
|
||||
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
|
||||
@%append $@ OPTION ELIMINATE
|
||||
@%append $@ OPTION SHOWDEAD
|
||||
|
||||
clean: .SYMBOLIC
|
||||
@echo * Clean: $(LIBNAME)
|
||||
@if exist *.obj rm *.obj
|
||||
@if exist *.res rm *.res
|
||||
@if exist *.err rm *.err
|
||||
@if exist $(LNKFILE) rm $(LNKFILE)
|
||||
@if exist $(LIBM) rm $(LIBM)
|
||||
|
||||
distclean: .SYMBOLIC clean
|
||||
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
||||
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
|
||||
@if exist $(LIBFILE) rm $(LIBFILE)
|
||||
@if exist $(DLLFILE) rm $(DLLFILE)
|
||||
@if exist $(TLIB) rm $(TLIB)
|
||||
119
SDL2Config.cmake
119
SDL2Config.cmake
@@ -1,119 +0,0 @@
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
endif()
|
||||
|
||||
# on static-only builds create an alias
|
||||
if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
|
||||
endif()
|
||||
|
||||
# provide ${SDL2_LIBRARIES}, ${SDL2_INCLUDE_DIRS} etc, like sdl2-config.cmake does,
|
||||
# for compatibility between SDL2 built with autotools and SDL2 built with CMake
|
||||
|
||||
# the following seems to work on Windows for both MSVC and MINGW+MSYS and with both SDL2Config/Target.cmake
|
||||
# from vcpkg and from building myself with cmake from latest git
|
||||
# AND on Linux when building SDL2 (tested current git) with CMake
|
||||
|
||||
# the headers are easy - but note that this adds both .../include/ and .../include/SDL2/
|
||||
# while the SDL2_INCLUDE_DIRS of sdl2-config.cmake only add ...include/SDL2/
|
||||
# But at least if building worked with sdl2-config.cmake it will also work with this.
|
||||
get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
# get the paths to the files to link against (.lib or .dll.a on Windows, .so or .a on Unix, ...) for both SDL2 and SDL2main
|
||||
|
||||
# for the "normal"/release build they could be in lots of different properties..
|
||||
set(relprops IMPORTED_IMPLIB_RELEASE IMPORTED_IMPLIB_NOCONFIG IMPORTED_IMPLIB IMPORTED_IMPLIB_MINSIZEREL IMPORTED_IMPLIB_RELWITHDEBINFO
|
||||
IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION IMPORTED_LOCATION_MINSIZEREL IMPORTED_LOCATION_RELWITHDEBINFO)
|
||||
|
||||
# fewer possibilities for debug builds
|
||||
set(dbgprops IMPORTED_IMPLIB_DEBUG IMPORTED_LOCATION_DEBUG)
|
||||
|
||||
foreach(prop ${relprops})
|
||||
get_target_property(sdl2implib SDL2::SDL2 ${prop})
|
||||
if(sdl2implib)
|
||||
#message("set sdl2implib from ${prop}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(prop ${relprops})
|
||||
get_target_property(sdl2mainimplib SDL2::SDL2main ${prop})
|
||||
if(sdl2mainimplib)
|
||||
#message("set sdl2mainimplib from ${prop}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(prop ${dbgprops})
|
||||
get_target_property(sdl2implibdbg SDL2::SDL2 ${prop})
|
||||
if(sdl2implibdbg)
|
||||
#message("set sdl2implibdbg from ${prop}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(prop ${dbgprops})
|
||||
get_target_property(sdl2mainimplibdbg SDL2::SDL2main ${prop})
|
||||
if(sdl2mainimplibdbg)
|
||||
#message("set sdl2mainimplibdbg from ${prop}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if( sdl2implib AND sdl2mainimplib AND sdl2implibdbg AND sdl2mainimplibdbg )
|
||||
# we have both release and debug builds of SDL2 and SDL2main, so use this ugly
|
||||
# generator expression in SDL2_LIBRARIES to support both in MSVC, depending on build type configured there
|
||||
set(SDL2_LIBRARIES $<IF:$<CONFIG:Debug>,${sdl2mainimplibdbg},${sdl2mainimplib}> $<IF:$<CONFIG:Debug>,${sdl2implibdbg},${sdl2implib}>)
|
||||
else()
|
||||
if( (NOT sdl2implib) AND sdl2implibdbg ) # if we only have a debug version of the lib
|
||||
set(sdl2implib ${sdl2implibdbg})
|
||||
endif()
|
||||
if( (NOT sdl2mainimplib) AND sdl2mainimplibdbg ) # if we only have a debug version of the lib
|
||||
set(sdl2mainimplib ${sdl2mainimplibdbg})
|
||||
endif()
|
||||
|
||||
if( sdl2implib AND sdl2mainimplib )
|
||||
set(SDL2_LIBRARIES ${sdl2mainimplib} ${sdl2implib})
|
||||
elseif(WIN32 OR APPLE) # I think these platforms have a non-dummy SDLmain?
|
||||
message(FATAL_ERROR, "SDL2::SDL2 and/or SDL2::SDL2main don't seem to contain any kind of IMPORTED_IMPLIB* or IMPORTED_LOCATION*")
|
||||
elseif(sdl2implib) # on other platforms just libSDL2 will hopefully do?
|
||||
set(SDL2_LIBRARIES ${sdl2implib})
|
||||
message(STATUS, "No SDL2main lib not found, I hope you don't need it..")
|
||||
else()
|
||||
message(FATAL_ERROR, "SDL2::SDL2 doesn't seem to contain any kind of lib to link against in IMPORTED_IMPLIB* or IMPORTED_LOCATION*")
|
||||
endif()
|
||||
|
||||
# TODO: should something like INTERFACE_LINK_LIBRARIES be appended? or wherever -mwindows and things like that
|
||||
# might be defined (if they were defined by the CMake build at all; autotools has @SDL_RLD_FLAGS@ @SDL_LIBS@)?
|
||||
# LINK_DEPENDS? LINK_FLAGS?
|
||||
|
||||
endif()
|
||||
|
||||
get_filename_component(SDL2_LIBDIR ${sdl2implib} PATH)
|
||||
|
||||
# NOTE: SDL2_LIBRARIES now looks like "c:/path/to/SDL2main.lib;c:/path/to/SDL2.lib"
|
||||
# which is different to what it looks like when coming from sdl2-config.cmake
|
||||
# (there it's more like "-L${SDL2_LIBDIR} -lSDL2main -lSDL2" - and also -lmingw32 and -mwindows)
|
||||
# This seems to work with both MSVC and MinGW though, while the other only worked with MinGW
|
||||
# On Linux it looks like "/tmp/sdl2inst/lib/libSDL2main.a;/tmp/sdl2inst/lib/libSDL2-2.0.so.0.14.1" which also seems to work
|
||||
|
||||
# the exec prefix is one level up from lib/ - TODO: really, always? at least on Linux there's /usr/lib/x86_64-bla-blub/libSDL2-asdf.so.0 ..
|
||||
get_filename_component(SDL2_EXEC_PREFIX ${SDL2_LIBDIR} PATH)
|
||||
set(SDL2_PREFIX ${SDL2_EXEC_PREFIX}) # TODO: could this be somewhere else? parent dir of include or sth?
|
||||
|
||||
unset(sdl2implib)
|
||||
unset(sdl2mainimplib)
|
||||
unset(sdl2implibdbg)
|
||||
unset(sdl2mainimplibdbg)
|
||||
unset(relprops)
|
||||
unset(dbgprops)
|
||||
65
SDL2Config.cmake.in
Normal file
65
SDL2Config.cmake.in
Normal file
@@ -0,0 +1,65 @@
|
||||
# sdl2 cmake project-config input for CMakeLists.txt script
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
set(SDL2_SDL2_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
if(ANDROID)
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
set(SDL2_SDL2-static_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
set(SDL2_SDL2main_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
|
||||
set(SDL2_SDL2test_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
check_required_components(SDL2)
|
||||
|
||||
# Create SDL2::SDL2 alias for static-only builds
|
||||
if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||
set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
|
||||
else()
|
||||
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
||||
set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
||||
set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
|
||||
set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
|
||||
set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
|
||||
set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
set(SDL2_LIBRARIES SDL2::SDL2)
|
||||
set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
|
||||
set(SDL2_STATIC_PRIVATE_LIBS)
|
||||
|
||||
set(SDL2MAIN_LIBRARY)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
||||
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
|
||||
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
||||
endif()
|
||||
|
||||
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
||||
@@ -45,6 +45,7 @@
|
||||
<ClInclude Include="..\include\SDL_error.h" />
|
||||
<ClInclude Include="..\include\SDL_events.h" />
|
||||
<ClInclude Include="..\include\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\include\SDL_guid.h" />
|
||||
<ClInclude Include="..\include\SDL_haptic.h" />
|
||||
<ClInclude Include="..\include\SDL_hints.h" />
|
||||
<ClInclude Include="..\include\SDL_hidapi.h" />
|
||||
@@ -114,6 +115,7 @@
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
||||
@@ -145,6 +147,7 @@
|
||||
<ClInclude Include="..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_syssensor.h" />
|
||||
@@ -249,6 +252,7 @@
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
@@ -298,6 +302,7 @@
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\src\SDL_guid.c" />
|
||||
<ClCompile Include="..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
@@ -306,6 +311,8 @@
|
||||
<ClCompile Include="..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_memcpy.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_memset.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\src\stdlib\SDL_string.c" />
|
||||
@@ -418,8 +425,7 @@
|
||||
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
|
||||
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<ClInclude Include="..\include\SDL_filesystem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_guid.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_haptic.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -330,6 +333,9 @@
|
||||
<ClInclude Include="..\src\SDL_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_log_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -630,6 +636,9 @@
|
||||
<ClCompile Include="..\src\SDL_error.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_guid.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_hints.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -819,10 +828,16 @@
|
||||
<ClCompile Include="..\src\misc\SDL_url.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\joystick\controller_type.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windows_gaming_input.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\controller_type.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -234,6 +234,7 @@
|
||||
<ClInclude Include="..\..\include\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\..\include\SDL_gamecontroller.h" />
|
||||
<ClInclude Include="..\..\include\SDL_gesture.h" />
|
||||
<ClInclude Include="..\..\include\SDL_guid.h" />
|
||||
<ClInclude Include="..\..\include\SDL_haptic.h" />
|
||||
<ClInclude Include="..\..\include\SDL_hints.h" />
|
||||
<ClInclude Include="..\..\include\SDL_hidapi.h" />
|
||||
@@ -347,6 +348,7 @@
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
|
||||
@@ -367,9 +369,11 @@
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
@@ -475,6 +479,7 @@
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
@@ -523,6 +528,8 @@
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
@@ -555,6 +562,8 @@
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memcpy.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_memset.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
@@ -613,4 +622,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -169,6 +169,9 @@
|
||||
<Filter Include="video\khronos\vulkan">
|
||||
<UniqueIdentifier>{4755f3a6-49ac-46d6-86be-21f5c21f2197}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="render\direct3d12">
|
||||
<UniqueIdentifier>{f48c2b17-1bee-4fec-a7c8-24cf619abe08}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\begin_code.h">
|
||||
@@ -231,6 +234,9 @@
|
||||
<ClInclude Include="..\..\include\SDL_gesture.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_guid.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_haptic.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@@ -825,6 +831,10 @@
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_log_c.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h">
|
||||
<Filter>render\direct3d12</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
@@ -832,6 +842,7 @@
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c">
|
||||
@@ -915,6 +926,9 @@
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c">
|
||||
<Filter>hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\controller_type.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
@@ -1203,7 +1217,7 @@
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c">
|
||||
<Filter>thread</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" >
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c">
|
||||
<Filter>thread\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c">
|
||||
@@ -1318,8 +1332,14 @@
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c">
|
||||
<Filter>power\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c">
|
||||
<Filter>render\direct3d12</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c">
|
||||
<Filter>render\direct3d12</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
54
VisualC/pkg-support/cmake/sdl2-config-version.cmake
Normal file
54
VisualC/pkg-support/cmake/sdl2-config-version.cmake
Normal file
@@ -0,0 +1,54 @@
|
||||
# based on the files generated by CMake's write_basic_package_version_file
|
||||
|
||||
# SDL2 CMake version configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h")
|
||||
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL2-devel-2.x.y-VC")
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h" _sdl_version_h)
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
|
||||
set(_sdl_major "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
|
||||
set(_sdl_minor "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_version_h}")
|
||||
set(_sdl_patch "${CMAKE_MATCH_1}")
|
||||
if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
|
||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT (CMAKE_SIZEOF_VOID_P STREQUAL "8" OR CMAKE_SIZEOF_VOID_P STREQUAL "4"))
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (32+64bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
111
VisualC/pkg-support/cmake/sdl2-config.cmake
Normal file
111
VisualC/pkg-support/cmake/sdl2-config.cmake
Normal file
@@ -0,0 +1,111 @@
|
||||
# SDL2 CMake configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(set_and_check _var _file)
|
||||
set(${_var} "${_file}")
|
||||
if(NOT EXISTS "${_file}")
|
||||
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT ${_NAME}_${comp}_FOUND)
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
|
||||
set(_sdl_arch_subdir "x86")
|
||||
elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
||||
set(_sdl_arch_subdir "x64")
|
||||
else()
|
||||
set(SDL2_FOUND FALSE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
set_and_check(SDL2_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
set_and_check(SDL2_EXEC_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
set_and_check(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include/SDL2")
|
||||
set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../include;${SDL2_INCLUDE_DIR}")
|
||||
set_and_check(SDL2_BINDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
|
||||
set_and_check(SDL2_LIBDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
|
||||
|
||||
set(SDL2_LIBRARIES SDL2::SDL2main SDL2::SDL2)
|
||||
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
||||
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
||||
|
||||
|
||||
# All targets are created, even when some might not be requested though COMPONENTS.
|
||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||
|
||||
set(_sdl2_library "${SDL2_LIBDIR}/SDL2.lib")
|
||||
set(_sdl2_dll_library "${SDL2_BINDIR}/SDL2.dll")
|
||||
if(EXISTS "${_sdl2_library}" AND EXISTS "${_sdl2_dll_library}")
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||
set_target_properties(SDL2::SDL2
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||
IMPORTED_IMPLIB "${_sdl2_library}"
|
||||
IMPORTED_LOCATION "${_sdl2_dll_library}"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2_library)
|
||||
unset(_sdl2_dll_library)
|
||||
|
||||
set(_sdl2main_library "${SDL2_LIBDIR}/SDL2main.lib")
|
||||
if(EXISTS "${_sdl2main_library}")
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_library(SDL2::SDL2main STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2main
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2main_library}"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2main_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2main_library)
|
||||
|
||||
set(_sdl2test_library "${SDL2_LIBDIR}/SDL2test.lib")
|
||||
if(EXISTS "${_sdl2test_library}")
|
||||
if(NOT TARGET SDL2::SDL2test)
|
||||
add_library(SDL2::SDL2test STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2test
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${_sdl2test_library}"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2test_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2test_library)
|
||||
|
||||
check_required_components(SDL2)
|
||||
@@ -271,6 +271,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\controllermap.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\Test\loopwave.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\test\sample.wav">
|
||||
@@ -227,4 +228,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_pixels.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_platform.c" />
|
||||
|
||||
@@ -271,6 +271,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testgamecontroller.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -217,6 +217,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testoverlay2.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
<ClCompile Include="..\..\..\test\testyuv_cvt.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -241,8 +241,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testrendertarget.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -241,8 +241,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testscale.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -223,8 +223,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testsprite2.c" />
|
||||
<ClCompile Include="..\..\..\test\testutils.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
40
WhatsNew.txt
40
WhatsNew.txt
@@ -1,6 +1,46 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.24.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* New version numbering scheme, similar to GLib and Flatpak.
|
||||
* An even number in the minor version (second component) indicates
|
||||
a production-ready stable release such as 2.24.0, which would have
|
||||
been 2.0.24 under the old system.
|
||||
* The patchlevel (micro version, third component) indicates a
|
||||
bugfix-only update: for example, 2.24.1 would be a bugfix-only
|
||||
release to fix bugs in 2.24.0, without adding new features.
|
||||
* An odd number in the minor version indicates a prerelease such
|
||||
as 2.23.0. Stable distributions should not use these prereleases.
|
||||
* The patchlevel indicates successive prereleases, for example
|
||||
2.23.1 and 2.23.2 would be prereleases during development of
|
||||
the SDL 2.24.0 stable release.
|
||||
* Added SDL_bsearch() and SDL_utf8strnlen() to the stdlib routines
|
||||
* Added SDL_size_mul_overflow() and SDL_size_add_overflow() for better size overflow protection
|
||||
* Added functions to get the platform dependent name for a joystick or game controller:
|
||||
* SDL_JoystickPathForIndex()
|
||||
* SDL_JoystickPath()
|
||||
* SDL_GameControllerPathForIndex()
|
||||
* SDL_GameControllerPath()
|
||||
* Added SDL_GameControllerGetFirmwareVersion() and SDL_JoystickGetFirmwareVersion(), currently implemented for DualSense(tm) Wireless Controllers using HIDAPI
|
||||
* Added SDL_JoystickAttachVirtualEx() for extended virtual controller support
|
||||
* Added joystick event SDL_JOYBATTERYUPDATED for when battery status changes.
|
||||
* Added SDL_GUIDToString() and SDL_GUIDFromString() to convert between SDL GUID and string
|
||||
* Added SDL_HasLSX() and SDL_HasLASX() to detect LoongArch SIMD support
|
||||
|
||||
Windows:
|
||||
* Added a D3D12 renderer implementation and SDL_RenderGetD3D12Device() to retrieve the D3D12 device associated with it
|
||||
* Added the hint SDL_HINT_WINDOWS_DPI_AWARENESS to set whether the application is DPI-aware. This hint must be set before initializing the video subsystem.
|
||||
* Added the hint SDL_HINT_WINDOWS_DPI_SCALING to control whether the SDL coordinates are in DPI-scaled points or pixels.
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION to control whether to expose a set of emulated modes in addition to the native resolution modes available on Wayland
|
||||
* Added the hint SDL_HINT_LINUX_DIGITAL_HATS to control whether to treat hats as digital rather than checking to see if they may be analog
|
||||
* Added the hint SDL_HINT_LINUX_HAT_DEADZONES to control whether to use deadzones on analog hats
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.22:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.22</string>
|
||||
<string>2.23.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.22</string>
|
||||
<string>2.23.1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -3382,6 +3382,24 @@
|
||||
DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
|
||||
DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
|
||||
DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
|
||||
F3249B1E285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B1F285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B20285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B21285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B22285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B23285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B24285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B25285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B26285A85FF00DB9B5C /* SDL_memset.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1C285A85FF00DB9B5C /* SDL_memset.c */; };
|
||||
F3249B27285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B28285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B29285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2A285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2B285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2C285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2D285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2E285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3249B2F285A85FF00DB9B5C /* SDL_memcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */; };
|
||||
F3631C6424884ACF004F28EA /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26792462701100718109 /* SDL_locale.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3631C652488534E004F28EA /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26792462701100718109 /* SDL_locale.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F376F6192559B29300CFC0BC /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F376F6182559B29300CFC0BC /* OpenGLES.framework */; platformFilter = ios; };
|
||||
@@ -3413,8 +3431,38 @@
|
||||
F376F7262559B76800CFC0BC /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F376F7252559B76800CFC0BC /* CoreFoundation.framework */; };
|
||||
F376F7282559B77100CFC0BC /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F376F7272559B77100CFC0BC /* CoreAudio.framework */; };
|
||||
F376F7332559B79B00CFC0BC /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F376F6DE2559B5BA00CFC0BC /* GameController.framework */; };
|
||||
F37A8E1A28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
|
||||
F37A8E1B28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
|
||||
F37A8E1C28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
|
||||
F37DC5F325350EBC0002E6F7 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37DC5F225350EBC0002E6F7 /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F37DC5F525350ECC0002E6F7 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37DC5F425350ECC0002E6F7 /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3820713284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820714284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820715284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820716284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820717284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820718284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F3820719284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F382071A284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F382071B284F3609004DD584 /* controller_type.c in Sources */ = {isa = PBXBuildFile; fileRef = F3820712284F3609004DD584 /* controller_type.c */; };
|
||||
F382071D284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F382071E284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F382071F284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820720284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820721284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820722284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820723284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820724284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820725284F362F004DD584 /* SDL_guid.c in Sources */ = {isa = PBXBuildFile; fileRef = F382071C284F362F004DD584 /* SDL_guid.c */; };
|
||||
F3820727284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3820728284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F3820729284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F382072A284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; };
|
||||
F382072B284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; };
|
||||
F382072C284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; };
|
||||
F382072D284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F382072E284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F382072F284F3643004DD584 /* SDL_guid.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820726284F3643004DD584 /* SDL_guid.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F38233852738EB8600F7F527 /* SDL_hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = F38233842738EB8600F7F527 /* SDL_hidapi.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F38233862738EB8600F7F527 /* SDL_hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = F38233842738EB8600F7F527 /* SDL_hidapi.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F38233872738EB8600F7F527 /* SDL_hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = F38233842738EB8600F7F527 /* SDL_hidapi.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -3469,13 +3517,13 @@
|
||||
F395C1A22569C68F00942BFF /* SDL_iokitjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F395C1922569C68E00942BFF /* SDL_iokitjoystick.c */; };
|
||||
F395C1A32569C68F00942BFF /* SDL_iokitjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F395C1922569C68E00942BFF /* SDL_iokitjoystick.c */; };
|
||||
F395C1A42569C68F00942BFF /* SDL_iokitjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F395C1922569C68E00942BFF /* SDL_iokitjoystick.c */; };
|
||||
F395C1B12569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||
F395C1B12569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B22569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B32569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B42569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||
F395C1B42569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B52569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B62569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B72569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||
F395C1B72569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B82569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1B92569C6A000942BFF /* SDL_mfijoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = F395C1AF2569C6A000942BFF /* SDL_mfijoystick.m */; };
|
||||
F395C1BA2569C6A000942BFF /* SDL_mfijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F395C1B02569C6A000942BFF /* SDL_mfijoystick_c.h */; };
|
||||
@@ -3997,6 +4045,8 @@
|
||||
BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BECDF6BE0761BA81005FE872 /* SDL2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDL2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F3249B1C285A85FF00DB9B5C /* SDL_memset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_memset.c; sourceTree = "<group>"; };
|
||||
F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_memcpy.c; sourceTree = "<group>"; };
|
||||
F376F6182559B29300CFC0BC /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F376F61A2559B2AF00CFC0BC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
F376F6312559B31D00CFC0BC /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/iOSSupport/System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
|
||||
@@ -4011,8 +4061,12 @@
|
||||
F376F7212559B74900CFC0BC /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F376F7252559B76800CFC0BC /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F376F7272559B77100CFC0BC /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreAudio.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F37A8E1928405AA100C38E95 /* CMake */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CMake; sourceTree = "<group>"; };
|
||||
F37DC5F225350EBC0002E6F7 /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
|
||||
F37DC5F425350ECC0002E6F7 /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F3820712284F3609004DD584 /* controller_type.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = controller_type.c; sourceTree = "<group>"; };
|
||||
F382071C284F362F004DD584 /* SDL_guid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_guid.c; sourceTree = "<group>"; };
|
||||
F3820726284F3643004DD584 /* SDL_guid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_guid.h; sourceTree = "<group>"; };
|
||||
F38233842738EB8600F7F527 /* SDL_hidapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi.h; sourceTree = "<group>"; };
|
||||
F382339B2738ED6600F7F527 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.0.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F3950CD7212BC88D00F51292 /* SDL_sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor.h; sourceTree = "<group>"; };
|
||||
@@ -4202,6 +4256,7 @@
|
||||
567E2F2017C44C35005F1892 /* SDL_filesystem.h */,
|
||||
A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */,
|
||||
AA7557D51595D4D800BBD41B /* SDL_gesture.h */,
|
||||
F3820726284F3643004DD584 /* SDL_guid.h */,
|
||||
AA7557D61595D4D800BBD41B /* SDL_haptic.h */,
|
||||
F38233842738EB8600F7F527 /* SDL_hidapi.h */,
|
||||
AA7557D71595D4D800BBD41B /* SDL_hints.h */,
|
||||
@@ -4320,6 +4375,7 @@
|
||||
A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */,
|
||||
A7D8A57523E2513D00DCD162 /* SDL_error_c.h */,
|
||||
A7D8A8BF23E2513F00DCD162 /* SDL_error.c */,
|
||||
F382071C284F362F004DD584 /* SDL_guid.c */,
|
||||
A7D8A8D123E2514000DCD162 /* SDL_hints_c.h */,
|
||||
A7D8A5AB23E2513D00DCD162 /* SDL_hints.c */,
|
||||
A7D8A58323E2513D00DCD162 /* SDL_internal.h */,
|
||||
@@ -4817,6 +4873,7 @@
|
||||
75E09157241EA924004729E1 /* virtual */,
|
||||
A7D8A7AD23E2513E00DCD162 /* SDL_gamecontroller.c */,
|
||||
A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */,
|
||||
F3820712284F3609004DD584 /* controller_type.c */,
|
||||
A7D8A7D923E2513E00DCD162 /* controller_type.h */,
|
||||
A7D8A79E23E2513E00DCD162 /* SDL_gamecontrollerdb.h */,
|
||||
A7D8A7D023E2513E00DCD162 /* SDL_joystick_c.h */,
|
||||
@@ -5048,6 +5105,8 @@
|
||||
A7D8A8D423E2514000DCD162 /* SDL_getenv.c */,
|
||||
A7D8A8D323E2514000DCD162 /* SDL_iconv.c */,
|
||||
A7D8A8D923E2514000DCD162 /* SDL_malloc.c */,
|
||||
F3249B1D285A85FF00DB9B5C /* SDL_memcpy.c */,
|
||||
F3249B1C285A85FF00DB9B5C /* SDL_memset.c */,
|
||||
A7D8A8D723E2514000DCD162 /* SDL_qsort.c */,
|
||||
A7D8A8D823E2514000DCD162 /* SDL_stdlib.c */,
|
||||
A7D8A8D523E2514000DCD162 /* SDL_string.c */,
|
||||
@@ -5223,6 +5282,7 @@
|
||||
F59C710100D5CB5801000001 /* resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F37A8E1928405AA100C38E95 /* CMake */,
|
||||
00794D3F09D0C461003FC8A1 /* License.txt */,
|
||||
F59C710300D5CB5801000001 /* ReadMe.txt */,
|
||||
);
|
||||
@@ -5249,6 +5309,7 @@
|
||||
A75FCD0823E25AB700529352 /* SDL_atomic.h in Headers */,
|
||||
A75FCD0923E25AB700529352 /* SDL_rect_c.h in Headers */,
|
||||
A75FCD0B23E25AB700529352 /* SDL_shaders_metal_osx.h in Headers */,
|
||||
F382072E284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A75FCD0C23E25AB700529352 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A75FCD0D23E25AB700529352 /* SDL_offscreenwindow.h in Headers */,
|
||||
A75FCD0E23E25AB700529352 /* SDL_audio.h in Headers */,
|
||||
@@ -5478,6 +5539,7 @@
|
||||
A75FCEC523E25AC700529352 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A75FCEC623E25AC700529352 /* SDL_offscreenwindow.h in Headers */,
|
||||
A75FCEC723E25AC700529352 /* SDL_audio.h in Headers */,
|
||||
F382072F284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A75FCEC823E25AC700529352 /* SDL_coremotionsensor.h in Headers */,
|
||||
A75FCEC923E25AC700529352 /* SDL_uikitview.h in Headers */,
|
||||
A75FCECA23E25AC700529352 /* SDL_bits.h in Headers */,
|
||||
@@ -5827,6 +5889,7 @@
|
||||
A769B14623E259AE00872273 /* SDL_syspower.h in Headers */,
|
||||
A769B14723E259AE00872273 /* vulkan_macos.h in Headers */,
|
||||
A769B14823E259AE00872273 /* vulkan_xcb.h in Headers */,
|
||||
F382072C284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A769B14923E259AE00872273 /* vulkan_ios.h in Headers */,
|
||||
A769B14A23E259AE00872273 /* SDL_internal.h in Headers */,
|
||||
A769B14E23E259AE00872273 /* vulkan.h in Headers */,
|
||||
@@ -5869,6 +5932,7 @@
|
||||
A7D8BA0E23E2514400DCD162 /* SDL_blendpoint.h in Headers */,
|
||||
A7D8B3B723E2514200DCD162 /* SDL_blit.h in Headers */,
|
||||
A7D8B2BB23E2514200DCD162 /* SDL_blit_auto.h in Headers */,
|
||||
F3820728284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A7D8B39923E2514200DCD162 /* SDL_blit_copy.h in Headers */,
|
||||
A7D8ADED23E2514100DCD162 /* SDL_blit_slow.h in Headers */,
|
||||
A7D88A2123E2437C00DCD162 /* SDL_clipboard.h in Headers */,
|
||||
@@ -6101,6 +6165,7 @@
|
||||
A7D8B3B823E2514200DCD162 /* SDL_blit.h in Headers */,
|
||||
A7D8B2BC23E2514200DCD162 /* SDL_blit_auto.h in Headers */,
|
||||
A7D8B39A23E2514200DCD162 /* SDL_blit_copy.h in Headers */,
|
||||
F3820729284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A7D8ADEE23E2514100DCD162 /* SDL_blit_slow.h in Headers */,
|
||||
A7D88BD823E24BED00DCD162 /* SDL_clipboard.h in Headers */,
|
||||
A7D8BB7123E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
|
||||
@@ -6455,6 +6520,7 @@
|
||||
A7D8B61523E2514300DCD162 /* SDL_syspower.h in Headers */,
|
||||
A7D8B28823E2514200DCD162 /* vulkan_macos.h in Headers */,
|
||||
A7D8B29423E2514200DCD162 /* vulkan_xcb.h in Headers */,
|
||||
F382072B284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A7D8B2A623E2514200DCD162 /* vulkan_ios.h in Headers */,
|
||||
A7D8A99D23E2514000DCD162 /* SDL_internal.h in Headers */,
|
||||
A7D8B26423E2514200DCD162 /* vulkan.h in Headers */,
|
||||
@@ -6499,6 +6565,7 @@
|
||||
A7D8B2BA23E2514200DCD162 /* SDL_blit_auto.h in Headers */,
|
||||
A7D8B39823E2514200DCD162 /* SDL_blit_copy.h in Headers */,
|
||||
A7D8ADEC23E2514100DCD162 /* SDL_blit_slow.h in Headers */,
|
||||
F3820727284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
AA7558061595D4D800BBD41B /* SDL_clipboard.h in Headers */,
|
||||
A7D8BB6F23E2514500DCD162 /* SDL_clipboardevents_c.h in Headers */,
|
||||
A7D8AECA23E2514100DCD162 /* SDL_cocoaclipboard.h in Headers */,
|
||||
@@ -6862,6 +6929,7 @@
|
||||
A7D8AF1523E2514100DCD162 /* SDL_cocoaevents.h in Headers */,
|
||||
A7D8B25723E2514200DCD162 /* vk_icd.h in Headers */,
|
||||
A7D8ABE823E2514100DCD162 /* SDL_nullframebuffer_c.h in Headers */,
|
||||
F382072A284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A7D8AB1F23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
|
||||
A7D8B27523E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
|
||||
5616CA57252BB35C005D5928 /* SDL_sysurl.h in Headers */,
|
||||
@@ -6893,6 +6961,7 @@
|
||||
A7D8AC0823E2514100DCD162 /* SDL_rect_c.h in Headers */,
|
||||
A7D8B9A023E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
|
||||
A7D8B99123E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
F382072D284F3643004DD584 /* SDL_guid.h in Headers */,
|
||||
A7D8AB8A23E2514100DCD162 /* SDL_offscreenwindow.h in Headers */,
|
||||
DB313FCC17554B71006C0E22 /* SDL_audio.h in Headers */,
|
||||
A7D8A97423E2514000DCD162 /* SDL_coremotionsensor.h in Headers */,
|
||||
@@ -7172,6 +7241,7 @@
|
||||
A7D88ABF23E2437C00DCD162 /* Sources */,
|
||||
A7D88B4623E2437C00DCD162 /* Frameworks */,
|
||||
A75FDB9F23E4CAFA00529352 /* Embed Frameworks */,
|
||||
F3ED8107281DB8E600C33C5B /* Convert SDL includes to SDL Framework includes */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -7193,6 +7263,7 @@
|
||||
A7D88C7823E24BED00DCD162 /* Sources */,
|
||||
A7D88D0423E24BED00DCD162 /* Frameworks */,
|
||||
A75FDBA223E4CAFF00529352 /* Embed Frameworks */,
|
||||
F3ED8108281DB8F200C33C5B /* Convert SDL includes to SDL Framework includes */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -7234,6 +7305,7 @@
|
||||
BECDF62C0761BA81005FE872 /* Sources */,
|
||||
BECDF6680761BA81005FE872 /* Frameworks */,
|
||||
A75FDB9C23E4CAEF00529352 /* Embed Frameworks */,
|
||||
F3ED8106281DB8A500C33C5B /* Convert SDL includes to SDL Framework includes */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -7344,6 +7416,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F37A8E1B28405AA100C38E95 /* CMake in Resources */,
|
||||
A75FDBBA23E4CBC700529352 /* ReadMe.txt in Resources */,
|
||||
A75FDBB923E4CBC700529352 /* License.txt in Resources */,
|
||||
);
|
||||
@@ -7353,6 +7426,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F37A8E1C28405AA100C38E95 /* CMake in Resources */,
|
||||
A75FDBBC23E4CBC800529352 /* ReadMe.txt in Resources */,
|
||||
A75FDBBB23E4CBC800529352 /* License.txt in Resources */,
|
||||
);
|
||||
@@ -7362,6 +7436,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F37A8E1A28405AA100C38E95 /* CMake in Resources */,
|
||||
A75FDBB823E4CBC700529352 /* ReadMe.txt in Resources */,
|
||||
A75FDBB723E4CBC700529352 /* License.txt in Resources */,
|
||||
);
|
||||
@@ -7424,6 +7499,60 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL2.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
|
||||
};
|
||||
F3ED8106281DB8A500C33C5B /* Convert SDL includes to SDL Framework includes */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Convert SDL includes to SDL Framework includes";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
|
||||
};
|
||||
F3ED8107281DB8E600C33C5B /* Convert SDL includes to SDL Framework includes */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Convert SDL includes to SDL Framework includes";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
|
||||
};
|
||||
F3ED8108281DB8F200C33C5B /* Convert SDL includes to SDL Framework includes */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Convert SDL includes to SDL Framework includes";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -7490,10 +7619,12 @@
|
||||
A75FCE2023E25AB700529352 /* SDL_haptic.c in Sources */,
|
||||
A75FCE2123E25AB700529352 /* SDL_uikitvulkan.m in Sources */,
|
||||
F3984CD725BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
F382071A284F3609004DD584 /* controller_type.c in Sources */,
|
||||
75E09161241EA924004729E1 /* SDL_virtualjoystick.c in Sources */,
|
||||
A75FCE2323E25AB700529352 /* SDL_cocoametalview.m in Sources */,
|
||||
A75FCE2423E25AB700529352 /* SDL_audiotypecvt.c in Sources */,
|
||||
A75FCE2523E25AB700529352 /* SDL_uikitevents.m in Sources */,
|
||||
F3820724284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A75FCE2623E25AB700529352 /* SDL_uikitmodes.m in Sources */,
|
||||
A75FCE2723E25AB700529352 /* SDL_blit_N.c in Sources */,
|
||||
A75FCE2823E25AB700529352 /* SDL_dropevents.c in Sources */,
|
||||
@@ -7537,6 +7668,7 @@
|
||||
A75FCE5023E25AB700529352 /* SDL_syspower.m in Sources */,
|
||||
A75FCE5123E25AB700529352 /* e_log10.c in Sources */,
|
||||
A75FCE5223E25AB700529352 /* SDL_uikitopenglview.m in Sources */,
|
||||
F3249B2E285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A75FCE5323E25AB700529352 /* SDL_mixer.c in Sources */,
|
||||
5616CA64252BB35F005D5928 /* SDL_url.c in Sources */,
|
||||
A75FCE5423E25AB700529352 /* SDL_events.c in Sources */,
|
||||
@@ -7591,6 +7723,7 @@
|
||||
F3F07D61269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
A75FCE8923E25AB700529352 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A75FCE8A23E25AB700529352 /* SDL_video.c in Sources */,
|
||||
F3249B25285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A75FCE8B23E25AB700529352 /* SDL_offscreenopengl.c in Sources */,
|
||||
A75FCE8C23E25AB700529352 /* SDL_uikitmetalview.m in Sources */,
|
||||
A75FCE8D23E25AB700529352 /* SDL_steamcontroller.c in Sources */,
|
||||
@@ -7678,10 +7811,12 @@
|
||||
A75FCFD923E25AC700529352 /* SDL_haptic.c in Sources */,
|
||||
A75FCFDA23E25AC700529352 /* SDL_uikitvulkan.m in Sources */,
|
||||
F3984CD825BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
F382071B284F3609004DD584 /* controller_type.c in Sources */,
|
||||
75E09162241EA924004729E1 /* SDL_virtualjoystick.c in Sources */,
|
||||
A75FCFDC23E25AC700529352 /* SDL_cocoametalview.m in Sources */,
|
||||
A75FCFDD23E25AC700529352 /* SDL_audiotypecvt.c in Sources */,
|
||||
A75FCFDE23E25AC700529352 /* SDL_uikitevents.m in Sources */,
|
||||
F3820725284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A75FCFDF23E25AC700529352 /* SDL_uikitmodes.m in Sources */,
|
||||
A75FCFE023E25AC700529352 /* SDL_blit_N.c in Sources */,
|
||||
A75FCFE123E25AC700529352 /* SDL_dropevents.c in Sources */,
|
||||
@@ -7725,6 +7860,7 @@
|
||||
A75FD00923E25AC700529352 /* SDL_syspower.m in Sources */,
|
||||
A75FD00A23E25AC700529352 /* e_log10.c in Sources */,
|
||||
A75FD00B23E25AC700529352 /* SDL_uikitopenglview.m in Sources */,
|
||||
F3249B2F285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A75FD00C23E25AC700529352 /* SDL_mixer.c in Sources */,
|
||||
5616CA67252BB361005D5928 /* SDL_url.c in Sources */,
|
||||
A75FD00D23E25AC700529352 /* SDL_events.c in Sources */,
|
||||
@@ -7779,6 +7915,7 @@
|
||||
F3F07D62269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
A75FD04223E25AC700529352 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A75FD04323E25AC700529352 /* SDL_video.c in Sources */,
|
||||
F3249B26285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A75FD04423E25AC700529352 /* SDL_offscreenopengl.c in Sources */,
|
||||
A75FD04523E25AC700529352 /* SDL_uikitmetalview.m in Sources */,
|
||||
A75FD04623E25AC700529352 /* SDL_steamcontroller.c in Sources */,
|
||||
@@ -7877,6 +8014,7 @@
|
||||
A769B1B823E259AE00872273 /* e_log.c in Sources */,
|
||||
A769B1B923E259AE00872273 /* SDL_cocoamessagebox.m in Sources */,
|
||||
A769B1BA23E259AE00872273 /* SDL_blendfillrect.c in Sources */,
|
||||
F3820722284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A769B1BB23E259AE00872273 /* SDL_uikitvideo.m in Sources */,
|
||||
A769B1BC23E259AE00872273 /* SDL_cocoashape.m in Sources */,
|
||||
A769B1BD23E259AE00872273 /* SDL_cocoamouse.m in Sources */,
|
||||
@@ -7903,6 +8041,7 @@
|
||||
A769B1D523E259AE00872273 /* SDL_render.c in Sources */,
|
||||
A769B1D623E259AE00872273 /* SDL_stretch.c in Sources */,
|
||||
A769B1D723E259AE00872273 /* s_floor.c in Sources */,
|
||||
F3249B23285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A769B1D823E259AE00872273 /* SDL_blit_copy.c in Sources */,
|
||||
A769B1D923E259AE00872273 /* e_fmod.c in Sources */,
|
||||
A769B1DA23E259AE00872273 /* SDL_syspower.m in Sources */,
|
||||
@@ -7948,6 +8087,7 @@
|
||||
F3984CD525BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
A769B20523E259AE00872273 /* SDL_strtokr.c in Sources */,
|
||||
5605720B2473687A00B46B66 /* SDL_syslocale.m in Sources */,
|
||||
F3820718284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A769B20623E259AE00872273 /* SDL_clipboardevents.c in Sources */,
|
||||
A769B20823E259AE00872273 /* k_cos.c in Sources */,
|
||||
A769B20923E259AE00872273 /* SDL_hidapijoystick.c in Sources */,
|
||||
@@ -7964,6 +8104,7 @@
|
||||
A769B21123E259AE00872273 /* SDL_quit.c in Sources */,
|
||||
A769B21223E259AE00872273 /* SDL_cocoawindow.m in Sources */,
|
||||
A769B21323E259AE00872273 /* SDL_sysmutex.c in Sources */,
|
||||
F3249B2C285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A769B21423E259AE00872273 /* SDL_syshaptic.c in Sources */,
|
||||
A769B21523E259AE00872273 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A769B21623E259AE00872273 /* SDL_video.c in Sources */,
|
||||
@@ -8055,10 +8196,12 @@
|
||||
A7D8AF2523E2514100DCD162 /* SDL_cocoametalview.m in Sources */,
|
||||
A7D8B86123E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
|
||||
F3984CD125BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
F3820714284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8AC5823E2514100DCD162 /* SDL_uikitevents.m in Sources */,
|
||||
A7D8ACB823E2514100DCD162 /* SDL_uikitmodes.m in Sources */,
|
||||
A7D8AD3323E2514100DCD162 /* SDL_blit_N.c in Sources */,
|
||||
A7D8BB7C23E2514500DCD162 /* SDL_dropevents.c in Sources */,
|
||||
F382071E284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8BACE23E2514500DCD162 /* e_atan2.c in Sources */,
|
||||
A7D8BA8C23E2514400DCD162 /* s_sin.c in Sources */,
|
||||
A7D8B5E823E2514300DCD162 /* SDL_power.c in Sources */,
|
||||
@@ -8102,6 +8245,7 @@
|
||||
A7D8AC7023E2514100DCD162 /* SDL_uikitopenglview.m in Sources */,
|
||||
A7D8B76523E2514300DCD162 /* SDL_mixer.c in Sources */,
|
||||
A7D8BB5823E2514500DCD162 /* SDL_events.c in Sources */,
|
||||
F3249B28285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8ADE723E2514100DCD162 /* SDL_blit_0.c in Sources */,
|
||||
A7D8BB0A23E2514500DCD162 /* k_tan.c in Sources */,
|
||||
A75FDBCF23EA380300529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
@@ -8156,6 +8300,7 @@
|
||||
F3F07D5B269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
A7D8AB5623E2514100DCD162 /* SDL_offscreenopengl.c in Sources */,
|
||||
A7D8ACC423E2514100DCD162 /* SDL_uikitmetalview.m in Sources */,
|
||||
F3249B1F285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8BA5C23E2514400DCD162 /* SDL_shaders_gles2.c in Sources */,
|
||||
A7D8B14123E2514200DCD162 /* SDL_blit_1.c in Sources */,
|
||||
5605720F2473688000B46B66 /* SDL_locale.c in Sources */,
|
||||
@@ -8243,10 +8388,12 @@
|
||||
A7D8AF2623E2514100DCD162 /* SDL_cocoametalview.m in Sources */,
|
||||
A7D8B86223E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
|
||||
F3984CD225BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
F3820715284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8AC5923E2514100DCD162 /* SDL_uikitevents.m in Sources */,
|
||||
A7D8ACB923E2514100DCD162 /* SDL_uikitmodes.m in Sources */,
|
||||
A7D8AD3423E2514100DCD162 /* SDL_blit_N.c in Sources */,
|
||||
A7D8BB7D23E2514500DCD162 /* SDL_dropevents.c in Sources */,
|
||||
F382071F284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8BACF23E2514500DCD162 /* e_atan2.c in Sources */,
|
||||
A7D8BA8D23E2514400DCD162 /* s_sin.c in Sources */,
|
||||
A7D8B5E923E2514300DCD162 /* SDL_power.c in Sources */,
|
||||
@@ -8290,6 +8437,7 @@
|
||||
A7D8AC7123E2514100DCD162 /* SDL_uikitopenglview.m in Sources */,
|
||||
A7D8B76623E2514300DCD162 /* SDL_mixer.c in Sources */,
|
||||
A7D8BB5923E2514500DCD162 /* SDL_events.c in Sources */,
|
||||
F3249B29285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8ADE823E2514100DCD162 /* SDL_blit_0.c in Sources */,
|
||||
A7D8BB0B23E2514500DCD162 /* k_tan.c in Sources */,
|
||||
A75FDBD023EA380300529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
@@ -8344,6 +8492,7 @@
|
||||
F3F07D5C269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
A7D8AB5723E2514100DCD162 /* SDL_offscreenopengl.c in Sources */,
|
||||
A7D8ACC523E2514100DCD162 /* SDL_uikitmetalview.m in Sources */,
|
||||
F3249B20285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8BA5D23E2514400DCD162 /* SDL_shaders_gles2.c in Sources */,
|
||||
A7D8B14223E2514200DCD162 /* SDL_blit_1.c in Sources */,
|
||||
560572102473688000B46B66 /* SDL_locale.c in Sources */,
|
||||
@@ -8442,6 +8591,7 @@
|
||||
A7D8BAF523E2514500DCD162 /* e_log.c in Sources */,
|
||||
A7D8AED423E2514100DCD162 /* SDL_cocoamessagebox.m in Sources */,
|
||||
A7D8BA2F23E2514400DCD162 /* SDL_blendfillrect.c in Sources */,
|
||||
F3820721284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8ACDF23E2514100DCD162 /* SDL_uikitvideo.m in Sources */,
|
||||
A7D8AEE623E2514100DCD162 /* SDL_cocoashape.m in Sources */,
|
||||
A7D8AEBC23E2514100DCD162 /* SDL_cocoamouse.m in Sources */,
|
||||
@@ -8468,6 +8618,7 @@
|
||||
A7D8B97E23E2514400DCD162 /* SDL_render.c in Sources */,
|
||||
A7D8ABD723E2514100DCD162 /* SDL_stretch.c in Sources */,
|
||||
A7D8BB0123E2514500DCD162 /* s_floor.c in Sources */,
|
||||
F3249B22285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8AC3D23E2514100DCD162 /* SDL_blit_copy.c in Sources */,
|
||||
A7D8BAE323E2514500DCD162 /* e_fmod.c in Sources */,
|
||||
A7D8B5D323E2514300DCD162 /* SDL_syspower.m in Sources */,
|
||||
@@ -8513,6 +8664,7 @@
|
||||
F3984CD425BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
A7D8B96623E2514400DCD162 /* SDL_strtokr.c in Sources */,
|
||||
560572092473687900B46B66 /* SDL_syslocale.m in Sources */,
|
||||
F3820717284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8BB7923E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
|
||||
A7D8BAB923E2514400DCD162 /* k_cos.c in Sources */,
|
||||
A7D8B54923E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
|
||||
@@ -8529,6 +8681,7 @@
|
||||
A7D8BB8523E2514500DCD162 /* SDL_quit.c in Sources */,
|
||||
A7D8AEAA23E2514100DCD162 /* SDL_cocoawindow.m in Sources */,
|
||||
A7D8B43E23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
|
||||
F3249B2B285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8AAB423E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
A7D8B5CD23E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A7D8AC1323E2514100DCD162 /* SDL_video.c in Sources */,
|
||||
@@ -8581,6 +8734,7 @@
|
||||
A7D8BBE323E2574800DCD162 /* SDL_uikitvideo.m in Sources */,
|
||||
5616CA4E252BB2A6005D5928 /* SDL_sysurl.m in Sources */,
|
||||
A7D8A97523E2514000DCD162 /* SDL_coremotionsensor.m in Sources */,
|
||||
F382071D284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8BB8D23E2514500DCD162 /* SDL_touch.c in Sources */,
|
||||
A1626A3E2617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
A7D8B3F223E2514300DCD162 /* SDL_thread.c in Sources */,
|
||||
@@ -8622,6 +8776,7 @@
|
||||
F3984CD025BCC92900374F43 /* SDL_hidapi_stadia.c in Sources */,
|
||||
A7D8AAB623E2514100DCD162 /* SDL_haptic.c in Sources */,
|
||||
A7D8AF2423E2514100DCD162 /* SDL_cocoametalview.m in Sources */,
|
||||
F3249B1E285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8B86023E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
|
||||
A7D8BBC523E2561500DCD162 /* SDL_steamcontroller.c in Sources */,
|
||||
A7D8AD3223E2514100DCD162 /* SDL_blit_N.c in Sources */,
|
||||
@@ -8692,6 +8847,7 @@
|
||||
A7D8B4DC23E2514300DCD162 /* SDL_joystick.c in Sources */,
|
||||
A7D8BA4923E2514400DCD162 /* SDL_render_gles2.c in Sources */,
|
||||
A7D8AC2D23E2514100DCD162 /* SDL_surface.c in Sources */,
|
||||
F3249B27285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8B54B23E2514300DCD162 /* SDL_hidapi_xboxone.c in Sources */,
|
||||
A7D8AD2323E2514100DCD162 /* SDL_blit_auto.c in Sources */,
|
||||
F3A4909E2554D38600E92A8B /* SDL_hidapi_ps5.c in Sources */,
|
||||
@@ -8708,6 +8864,7 @@
|
||||
A7D8B97423E2514400DCD162 /* SDL_malloc.c in Sources */,
|
||||
A7D8B8C623E2514400DCD162 /* SDL_audio.c in Sources */,
|
||||
A7D8B61D23E2514300DCD162 /* SDL_sysfilesystem.c in Sources */,
|
||||
F3820713284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8AB8B23E2514100DCD162 /* SDL_offscreenvideo.c in Sources */,
|
||||
A7D8B42E23E2514300DCD162 /* SDL_syscond.c in Sources */,
|
||||
A7D8AADA23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
@@ -8767,6 +8924,7 @@
|
||||
A7D8A97823E2514000DCD162 /* SDL_coremotionsensor.m in Sources */,
|
||||
A7D8BB9023E2514500DCD162 /* SDL_touch.c in Sources */,
|
||||
A7D8B3F523E2514300DCD162 /* SDL_thread.c in Sources */,
|
||||
F3820720284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8B56023E2514300DCD162 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
A1626A412617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
5616CA59252BB35C005D5928 /* SDL_sysurl.m in Sources */,
|
||||
@@ -8808,6 +8966,7 @@
|
||||
A7D8AF2723E2514100DCD162 /* SDL_cocoametalview.m in Sources */,
|
||||
A7D8B86323E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
|
||||
A7D8AD3523E2514100DCD162 /* SDL_blit_N.c in Sources */,
|
||||
F3249B21285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8BB7E23E2514500DCD162 /* SDL_dropevents.c in Sources */,
|
||||
A7D8BBFA23E2574800DCD162 /* SDL_uikitopengles.m in Sources */,
|
||||
A7D8BAD023E2514500DCD162 /* e_atan2.c in Sources */,
|
||||
@@ -8878,6 +9037,7 @@
|
||||
A7D8BA4C23E2514400DCD162 /* SDL_render_gles2.c in Sources */,
|
||||
A7D8AC3023E2514100DCD162 /* SDL_surface.c in Sources */,
|
||||
A7D8B54E23E2514300DCD162 /* SDL_hidapi_xboxone.c in Sources */,
|
||||
F3249B2A285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8AD2623E2514100DCD162 /* SDL_blit_auto.c in Sources */,
|
||||
A7D8BB6C23E2514500DCD162 /* SDL_keyboard.c in Sources */,
|
||||
A7D8ACEA23E2514100DCD162 /* SDL_rect.c in Sources */,
|
||||
@@ -8894,6 +9054,7 @@
|
||||
A7D8BBF023E2574800DCD162 /* SDL_uikitclipboard.m in Sources */,
|
||||
A7D8B8C923E2514400DCD162 /* SDL_audio.c in Sources */,
|
||||
A7D8B62023E2514300DCD162 /* SDL_sysfilesystem.c in Sources */,
|
||||
F3820716284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8AB8E23E2514100DCD162 /* SDL_offscreenvideo.c in Sources */,
|
||||
A7D8B43123E2514300DCD162 /* SDL_syscond.c in Sources */,
|
||||
A7D8AADD23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
@@ -8953,6 +9114,7 @@
|
||||
A7D8BB9223E2514500DCD162 /* SDL_touch.c in Sources */,
|
||||
A7D8AC5623E2514100DCD162 /* SDL_uikitmessagebox.m in Sources */,
|
||||
A7D8B3F723E2514300DCD162 /* SDL_thread.c in Sources */,
|
||||
F3820723284F362F004DD584 /* SDL_guid.c in Sources */,
|
||||
A7D8B56223E2514300DCD162 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
A1626A442617006A003F1973 /* SDL_triangle.c in Sources */,
|
||||
5616CA62252BB35E005D5928 /* SDL_sysurl.m in Sources */,
|
||||
@@ -8994,6 +9156,7 @@
|
||||
A7D8AF2923E2514100DCD162 /* SDL_cocoametalview.m in Sources */,
|
||||
A7D8B86523E2514400DCD162 /* SDL_audiotypecvt.c in Sources */,
|
||||
A7D8AC5C23E2514100DCD162 /* SDL_uikitevents.m in Sources */,
|
||||
F3249B24285A85FF00DB9B5C /* SDL_memset.c in Sources */,
|
||||
A7D8ACBC23E2514100DCD162 /* SDL_uikitmodes.m in Sources */,
|
||||
A7D8AD3723E2514100DCD162 /* SDL_blit_N.c in Sources */,
|
||||
A7D8BB8023E2514500DCD162 /* SDL_dropevents.c in Sources */,
|
||||
@@ -9064,6 +9227,7 @@
|
||||
A7D8B4E123E2514300DCD162 /* SDL_joystick.c in Sources */,
|
||||
A7D8BA4E23E2514400DCD162 /* SDL_render_gles2.c in Sources */,
|
||||
A7D8AC3223E2514100DCD162 /* SDL_surface.c in Sources */,
|
||||
F3249B2D285A85FF00DB9B5C /* SDL_memcpy.c in Sources */,
|
||||
A7D8B55023E2514300DCD162 /* SDL_hidapi_xboxone.c in Sources */,
|
||||
A7D8AD2823E2514100DCD162 /* SDL_blit_auto.c in Sources */,
|
||||
A7D8BB6E23E2514500DCD162 /* SDL_keyboard.c in Sources */,
|
||||
@@ -9080,6 +9244,7 @@
|
||||
A7D8B8CB23E2514400DCD162 /* SDL_audio.c in Sources */,
|
||||
A7D8B62223E2514300DCD162 /* SDL_sysfilesystem.c in Sources */,
|
||||
A7D8AB9023E2514100DCD162 /* SDL_offscreenvideo.c in Sources */,
|
||||
F3820719284F3609004DD584 /* controller_type.c in Sources */,
|
||||
A7D8B43323E2514300DCD162 /* SDL_syscond.c in Sources */,
|
||||
A7D8AADF23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
A7D8BAEA23E2514500DCD162 /* e_exp.c in Sources */,
|
||||
@@ -9131,6 +9296,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
@@ -9151,7 +9317,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
|
||||
DYLIB_CURRENT_VERSION = 23.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2302.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -9180,7 +9346,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
|
||||
PRODUCT_NAME = SDL2;
|
||||
STRIP_STYLE = "non-global";
|
||||
@@ -9216,6 +9382,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
@@ -9235,7 +9402,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
|
||||
DYLIB_CURRENT_VERSION = 23.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2302.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -9264,7 +9431,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
|
||||
PRODUCT_NAME = SDL2;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# based on the files generated by CMake's write_basic_package_version_file
|
||||
|
||||
# SDL2 CMake version configuration file:
|
||||
# This file is meant to be placed in Resources/CMake of a SDL2 framework
|
||||
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h")
|
||||
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL2.framework")
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h" _sdl_version_h)
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
|
||||
set(_sdl_major "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
|
||||
set(_sdl_minor "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_version_h}")
|
||||
set(_sdl_patch "${CMAKE_MATCH_1}")
|
||||
if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
|
||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
64
Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
Normal file
64
Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
Normal file
@@ -0,0 +1,64 @@
|
||||
# SDL2 CMake configuration file:
|
||||
# This file is meant to be placed in Resources/CMake of a SDL2 framework
|
||||
|
||||
# INTERFACE_LINK_OPTIONS needs CMake 3.12
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(set_and_check _var _file)
|
||||
set(${_var} "${_file}")
|
||||
if(NOT EXISTS "${_file}")
|
||||
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT ${_NAME}_${comp}_FOUND)
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
set_and_check(SDL2_PREFIX "${SDL2_FRAMEWORK_PATH}")
|
||||
set_and_check(SDL2_EXEC_PREFIX "${SDL2_FRAMEWORK_PATH}")
|
||||
set_and_check(SDL2_INCLUDE_DIR "${SDL2_FRAMEWORK_PATH}/Headers")
|
||||
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
|
||||
set_and_check(SDL2_BINDIR "${SDL2_FRAMEWORK_PATH}")
|
||||
set_and_check(SDL2_LIBDIR "${SDL2_FRAMEWORK_PATH}")
|
||||
|
||||
set(SDL2_LIBRARIES "SDL2::SDL2")
|
||||
|
||||
# All targets are created, even when some might not be requested though COMPONENTS.
|
||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||
set_target_properties(SDL2::SDL2
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2_FOUND)
|
||||
|
||||
check_required_components(SDL2)
|
||||
@@ -18,7 +18,19 @@ To Install:
|
||||
Copy the SDL2.framework to /Library/Frameworks
|
||||
|
||||
You may alternatively install it in <Your home directory>/Library/Frameworks
|
||||
if your access privileges are not high enough.
|
||||
if your access privileges are not high enough.
|
||||
|
||||
|
||||
Use in CMake projects:
|
||||
SDL2.framework can be used in CMake projects using the following pattern:
|
||||
```
|
||||
find_package(SDL2 REQUIRED COMPONENTS SDL2)
|
||||
add_executable(my_game ${MY_SOURCES})
|
||||
target_link_libraries(my_game PRIVATE SDL2::SDL2)
|
||||
```
|
||||
If SDL2.framework is installed in a non-standard location,
|
||||
please refer to the following link for ways to configure CMake:
|
||||
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
|
||||
|
||||
|
||||
Additional References:
|
||||
|
||||
@@ -4041,6 +4041,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../SDL/build/$(CONFIGURATION)",
|
||||
"$(HOME)/Library/Frameworks",
|
||||
@@ -4048,7 +4049,7 @@
|
||||
);
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = ../../include;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -4168,6 +4169,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../SDL/build/$(CONFIGURATION)",
|
||||
"$(HOME)/Library/Frameworks",
|
||||
@@ -4175,7 +4177,7 @@
|
||||
);
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
HEADER_SEARCH_PATHS = ../../include;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<string>10.7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -84,7 +84,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
|
||||
|
||||
int s2 = s_copy & ~InputDevice.SOURCE_ANY; // keep class bits
|
||||
s2 &= ~( InputDevice.SOURCE_CLASS_BUTTON
|
||||
s2 &= ~( InputDevice.SOURCE_CLASS_BUTTON
|
||||
| InputDevice.SOURCE_CLASS_JOYSTICK
|
||||
| InputDevice.SOURCE_CLASS_POINTER
|
||||
| InputDevice.SOURCE_CLASS_POSITION
|
||||
@@ -94,9 +94,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
|
||||
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
|
||||
|
||||
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
|
||||
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
|
||||
s2 &= ~tst;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
|
||||
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
|
||||
s2 &= ~tst;
|
||||
}
|
||||
|
||||
tst = InputDevice.SOURCE_DPAD;
|
||||
if ((s & tst) == tst) src += " DPAD";
|
||||
@@ -106,9 +108,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
if ((s & tst) == tst) src += " GAMEPAD";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_HDMI;
|
||||
if ((s & tst) == tst) src += " HDMI";
|
||||
s2 &= ~tst;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
tst = InputDevice.SOURCE_HDMI;
|
||||
if ((s & tst) == tst) src += " HDMI";
|
||||
s2 &= ~tst;
|
||||
}
|
||||
|
||||
tst = InputDevice.SOURCE_JOYSTICK;
|
||||
if ((s & tst) == tst) src += " JOYSTICK";
|
||||
@@ -143,9 +147,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
if ((s & tst) == tst) src += " TOUCHSCREEN";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
|
||||
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
|
||||
s2 &= ~tst;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
|
||||
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
|
||||
s2 &= ~tst;
|
||||
}
|
||||
|
||||
tst = InputDevice.SOURCE_TRACKBALL;
|
||||
if ((s & tst) == tst) src += " TRACKBALL";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Generating build information using autoconf"
|
||||
echo "This may take a while ..."
|
||||
|
||||
@@ -10,11 +12,7 @@ cd "$srcdir"
|
||||
# Regenerate configuration files
|
||||
cat acinclude/* >aclocal.m4
|
||||
|
||||
if test "$AUTOCONF"x = x; then
|
||||
AUTOCONF=autoconf
|
||||
fi
|
||||
|
||||
$AUTOCONF || exit 1
|
||||
"${AUTOCONF:-autoconf}"
|
||||
rm aclocal.m4
|
||||
rm -rf autom4te.cache
|
||||
|
||||
|
||||
@@ -33,22 +33,21 @@ lib=
|
||||
ndk_args=
|
||||
|
||||
# Allow an external caller to specify locations.
|
||||
for arg in $*
|
||||
do
|
||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||
obj=${arg#NDK_OUT=}
|
||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||
lib=${arg#NDK_LIBS_OUT=}
|
||||
else
|
||||
ndk_args="$ndk_args $arg"
|
||||
fi
|
||||
for arg in $*; do
|
||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||
obj=${arg#NDK_OUT=}
|
||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||
lib=${arg#NDK_LIBS_OUT=}
|
||||
else
|
||||
ndk_args="$ndk_args $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $obj ]; then
|
||||
obj=$buildandroid/obj
|
||||
obj=$buildandroid/obj
|
||||
fi
|
||||
if [ -z $lib ]; then
|
||||
lib=$buildandroid/lib
|
||||
lib=$buildandroid/lib
|
||||
fi
|
||||
|
||||
for dir in $build $buildandroid $obj $lib; do
|
||||
@@ -64,11 +63,11 @@ done
|
||||
# ndk-build makefile segments that use them, e.g., default-application.mk.
|
||||
# For consistency, pass all values on the command line.
|
||||
ndk-build \
|
||||
NDK_PROJECT_PATH=null \
|
||||
NDK_OUT=$obj \
|
||||
NDK_LIBS_OUT=$lib \
|
||||
APP_BUILD_SCRIPT=Android.mk \
|
||||
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
|
||||
APP_PLATFORM=android-16 \
|
||||
APP_MODULES="SDL2 SDL2_main" \
|
||||
$ndk_args
|
||||
NDK_PROJECT_PATH=null \
|
||||
NDK_OUT=$obj \
|
||||
NDK_LIBS_OUT=$lib \
|
||||
APP_BUILD_SCRIPT=Android.mk \
|
||||
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
|
||||
APP_PLATFORM=android-16 \
|
||||
APP_MODULES="SDL2 SDL2_main" \
|
||||
$ndk_args
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
|
||||
|
||||
# Intel 64-bit compiler flags (10.6 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang++ -arch x86_64 -mmacosx-version-min=10.6 \
|
||||
# Intel 64-bit compiler flags (10.7 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang++ -arch x86_64 -mmacosx-version-min=10.7 \
|
||||
-I/usr/local/include"
|
||||
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.6"
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.7"
|
||||
|
||||
# ARM 64-bit compiler flags (11.0 runtime compatibility)
|
||||
CLANG_COMPILE_ARM64="clang++ -arch arm64 -mmacosx-version-min=11.0 \
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
|
||||
|
||||
# Intel 64-bit compiler flags (10.6 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.6 \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=1060 \
|
||||
# Intel 64-bit compiler flags (10.7 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.7 \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=1070 \
|
||||
-I/usr/local/include"
|
||||
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.6"
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.7"
|
||||
|
||||
# ARM 64-bit compiler flags (11.0 runtime compatibility)
|
||||
CLANG_COMPILE_ARM64="clang -arch arm64 -mmacosx-version-min=11.0 \
|
||||
|
||||
37
build-scripts/config.guess
vendored
37
build-scripts/config.guess
vendored
@@ -4,7 +4,7 @@
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2022-01-03'
|
||||
timestamp='2022-05-25'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -929,6 +929,9 @@ EOF
|
||||
i*:PW*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-pw32
|
||||
;;
|
||||
*:SerenityOS:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-serenity
|
||||
;;
|
||||
*:Interix*:*)
|
||||
case $UNAME_MACHINE in
|
||||
x86)
|
||||
@@ -1148,16 +1151,27 @@ EOF
|
||||
;;
|
||||
x86_64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_X32 >/dev/null
|
||||
then
|
||||
LIBCABI=${LIBC}x32
|
||||
fi
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __i386__
|
||||
ABI=x86
|
||||
#else
|
||||
#ifdef __ILP32__
|
||||
ABI=x32
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
x86) CPU=i686 ;;
|
||||
x32) LIBCABI=${LIBC}x32 ;;
|
||||
esac
|
||||
fi
|
||||
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
|
||||
GUESS=$CPU-pc-linux-$LIBCABI
|
||||
;;
|
||||
xtensa*:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
@@ -1364,8 +1378,11 @@ EOF
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
GUESS=i586-pc-haiku
|
||||
;;
|
||||
x86_64:Haiku:*:*)
|
||||
GUESS=x86_64-unknown-haiku
|
||||
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
|
||||
GUESS=powerpc-apple-haiku
|
||||
;;
|
||||
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
|
||||
GUESS=$UNAME_MACHINE-unknown-haiku
|
||||
;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
GUESS=sx4-nec-superux$UNAME_RELEASE
|
||||
|
||||
@@ -46,9 +46,15 @@ my @releases = sort {
|
||||
|
||||
# this happens to work for how SDL versions things at the moment.
|
||||
my $current_release = $releases[-1];
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
@current_release_segments[2] = '' . ($current_release_segments[2] + 2);
|
||||
my $next_release = join('.', @current_release_segments);
|
||||
my $next_release;
|
||||
|
||||
if ($current_release eq '2.0.22') { # Hack for our jump from 2.0.22 to 2.24.0...
|
||||
$next_release = '2.24.0';
|
||||
} else {
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
@current_release_segments[1] = '' . ($current_release_segments[1] + 2);
|
||||
$next_release = join('.', @current_release_segments);
|
||||
}
|
||||
|
||||
#print("\n\nSORTED\n");
|
||||
#foreach (@releases) {
|
||||
|
||||
163
build-scripts/gen_audio_resampler_filter.c
Normal file
163
build-scripts/gen_audio_resampler_filter.c
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Built with:
|
||||
|
||||
gcc -o genfilter build-scripts/gen_audio_resampler_filter.c -lm && ./genfilter > src/audio/SDL_audio_resampler_filter.h
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
SDL's resampler uses a "bandlimited interpolation" algorithm:
|
||||
https://ccrma.stanford.edu/~jos/resample/
|
||||
|
||||
This code pre-generates the kaiser tables so we don't have to do this at
|
||||
run time, at a cost of about 20 kilobytes of static data in SDL. This code
|
||||
used to be part of SDL itself and generated the tables on the first use,
|
||||
but that was expensive to produce on platforms without floating point
|
||||
hardware.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#define RESAMPLER_ZERO_CROSSINGS 5
|
||||
#define RESAMPLER_BITS_PER_SAMPLE 16
|
||||
#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))
|
||||
#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)
|
||||
|
||||
/* This is a "modified" bessel function, so you can't use POSIX j0() */
|
||||
static double
|
||||
bessel(const double x)
|
||||
{
|
||||
const double xdiv2 = x / 2.0;
|
||||
double i0 = 1.0f;
|
||||
double f = 1.0f;
|
||||
int i = 1;
|
||||
|
||||
while (1) {
|
||||
const double diff = pow(xdiv2, i * 2) / pow(f, 2);
|
||||
if (diff < 1.0e-21f) {
|
||||
break;
|
||||
}
|
||||
i0 += diff;
|
||||
i++;
|
||||
f *= (double) i;
|
||||
}
|
||||
|
||||
return i0;
|
||||
}
|
||||
|
||||
/* build kaiser table with cardinal sine applied to it, and array of differences between elements. */
|
||||
static void
|
||||
kaiser_and_sinc(float *table, float *diffs, const int tablelen, const double beta)
|
||||
{
|
||||
const int lenm1 = tablelen - 1;
|
||||
const int lenm1div2 = lenm1 / 2;
|
||||
const double bessel_beta = bessel(beta);
|
||||
int i;
|
||||
|
||||
table[0] = 1.0f;
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const double kaiser = bessel(beta * sqrt(1.0 - pow(((i - lenm1) / 2.0) / lenm1div2, 2.0))) / bessel_beta;
|
||||
table[tablelen - i] = (float) kaiser;
|
||||
}
|
||||
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const float x = (((float) i) / ((float) RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) * ((float) M_PI);
|
||||
table[i] *= sinf(x) / x;
|
||||
diffs[i - 1] = table[i] - table[i - 1];
|
||||
}
|
||||
diffs[lenm1] = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
static float ResamplerFilter[RESAMPLER_FILTER_SIZE];
|
||||
static float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE];
|
||||
|
||||
static void
|
||||
PrepareResampleFilter(void)
|
||||
{
|
||||
/* if dB > 50, beta=(0.1102 * (dB - 8.7)), according to Matlab. */
|
||||
const double dB = 80.0;
|
||||
const double beta = 0.1102 * (dB - 8.7);
|
||||
kaiser_and_sinc(ResamplerFilter, ResamplerFilterDifference, RESAMPLER_FILTER_SIZE, beta);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
PrepareResampleFilter();
|
||||
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>\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"
|
||||
" arising from the use of this software.\n"
|
||||
"\n"
|
||||
" Permission is granted to anyone to use this software for any purpose,\n"
|
||||
" including commercial applications, and to alter it and redistribute it\n"
|
||||
" freely, subject to the following restrictions:\n"
|
||||
"\n"
|
||||
" 1. The origin of this software must not be misrepresented; you must not\n"
|
||||
" claim that you wrote the original software. If you use this software\n"
|
||||
" in a product, an acknowledgment in the product documentation would be\n"
|
||||
" appreciated but is not required.\n"
|
||||
" 2. Altered source versions must be plainly marked as such, and must not be\n"
|
||||
" misrepresented as being the original software.\n"
|
||||
" 3. This notice may not be removed or altered from any source distribution.\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"/* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_resampler_filter.c */\n"
|
||||
"\n"
|
||||
"#define RESAMPLER_ZERO_CROSSINGS %d\n"
|
||||
"#define RESAMPLER_BITS_PER_SAMPLE %d\n"
|
||||
"#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))\n"
|
||||
"#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)\n"
|
||||
"\n", RESAMPLER_ZERO_CROSSINGS, RESAMPLER_BITS_PER_SAMPLE
|
||||
);
|
||||
|
||||
printf("static const float ResamplerFilter[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilter[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilter[i+1]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static const float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilterDifference[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilterDifference[i+1]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
printf("/* vi: set ts=4 sw=4 expandtab: */\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
| 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"; \
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
| 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"; \
|
||||
done
|
||||
|
||||
@@ -4,10 +4,27 @@ use warnings;
|
||||
use strict;
|
||||
use Text::Wrap;
|
||||
|
||||
$Text::Wrap::huge = 'overflow';
|
||||
|
||||
my $projectfullname = 'Simple Directmedia Layer';
|
||||
my $projectshortname = 'SDL';
|
||||
my $wikisubdir = '';
|
||||
my $incsubdir = 'include';
|
||||
my $apiprefixregex = undef;
|
||||
my $versionfname = 'include/SDL_version.h';
|
||||
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
|
||||
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
|
||||
my $versionpatchregex = '\A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z';
|
||||
my $mainincludefname = 'SDL.h';
|
||||
my $selectheaderregex = '\ASDL.*?\.h\Z';
|
||||
my $projecturl = 'https://libsdl.org/';
|
||||
my $wikiurl = 'https://wiki.libsdl.org';
|
||||
my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new';
|
||||
my $srcpath = undef;
|
||||
my $wikipath = undef;
|
||||
my $warn_about_missing = 0;
|
||||
my $copy_direction = 0;
|
||||
my $optionsfname = undef;
|
||||
|
||||
foreach (@ARGV) {
|
||||
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
|
||||
@@ -15,14 +32,73 @@ foreach (@ARGV) {
|
||||
$copy_direction = 1, next if $_ eq '--copy-to-header';
|
||||
$copy_direction = -1, next if $_ eq '--copy-to-wiki';
|
||||
$copy_direction = -2, next if $_ eq '--copy-to-manpages';
|
||||
if (/\A--options=(.*)\Z/) {
|
||||
$optionsfname = $1;
|
||||
next;
|
||||
}
|
||||
$srcpath = $_, next if not defined $srcpath;
|
||||
$wikipath = $_, next if not defined $wikipath;
|
||||
}
|
||||
|
||||
my $default_optionsfname = '.wikiheaders-options';
|
||||
$default_optionsfname = "$srcpath/$default_optionsfname" if defined $srcpath;
|
||||
|
||||
if ((not defined $optionsfname) && (-f $default_optionsfname)) {
|
||||
$optionsfname = $default_optionsfname;
|
||||
}
|
||||
|
||||
if (defined $optionsfname) {
|
||||
open OPTIONS, '<', $optionsfname or die("Failed to open options file '$optionsfname': $!\n");
|
||||
while (<OPTIONS>) {
|
||||
chomp;
|
||||
if (/\A(.*?)\=(.*)\Z/) {
|
||||
my $key = $1;
|
||||
my $val = $2;
|
||||
$key =~ s/\A\s+//;
|
||||
$key =~ s/\s+\Z//;
|
||||
$val =~ s/\A\s+//;
|
||||
$val =~ s/\s+\Z//;
|
||||
$warn_about_missing = int($val), next if $key eq 'warn_about_missing';
|
||||
$srcpath = $val, next if $key eq 'srcpath';
|
||||
$wikipath = $val, next if $key eq 'wikipath';
|
||||
$apiprefixregex = $val, next if $key eq 'apiprefixregex';
|
||||
$projectfullname = $val, next if $key eq 'projectfullname';
|
||||
$projectshortname = $val, next if $key eq 'projectshortname';
|
||||
$wikisubdir = $val, next if $key eq 'wikisubdir';
|
||||
$incsubdir = $val, next if $key eq 'incsubdir';
|
||||
$versionmajorregex = $val, next if $key eq 'versionmajorregex';
|
||||
$versionminorregex = $val, next if $key eq 'versionminorregex';
|
||||
$versionpatchregex = $val, next if $key eq 'versionpatchregex';
|
||||
$versionfname = $val, next if $key eq 'versionfname';
|
||||
$mainincludefname = $val, next if $key eq 'mainincludefname';
|
||||
$selectheaderregex = $val, next if $key eq 'selectheaderregex';
|
||||
$projecturl = $val, next if $key eq 'projecturl';
|
||||
$wikiurl = $val, next if $key eq 'wikiurl';
|
||||
$bugreporturl = $val, next if $key eq 'bugreporturl';
|
||||
}
|
||||
}
|
||||
close(OPTIONS);
|
||||
}
|
||||
|
||||
my $wordwrap_mode = 'mediawiki';
|
||||
sub wordwrap_atom { # don't call this directly.
|
||||
my $str = shift;
|
||||
return fill('', '', $str);
|
||||
my $retval = '';
|
||||
|
||||
# wordwrap but leave links intact, even if they overflow.
|
||||
if ($wordwrap_mode eq 'mediawiki') {
|
||||
while ($str =~ s/(.*?)\s*(\[https?\:\/\/.*?\s+.*?\])\s*//ms) {
|
||||
$retval .= fill('', '', $1); # wrap it.
|
||||
$retval .= "\n$2\n"; # don't wrap it.
|
||||
}
|
||||
} elsif ($wordwrap_mode eq 'md') {
|
||||
while ($str =~ s/(.*?)\s*(\[.*?\]\(https?\:\/\/.*?\))\s*//ms) {
|
||||
$retval .= fill('', '', $1); # wrap it.
|
||||
$retval .= "\n$2\n"; # don't wrap it.
|
||||
}
|
||||
}
|
||||
|
||||
return $retval . fill('', '', $str);
|
||||
}
|
||||
|
||||
sub wordwrap_with_bullet_indent { # don't call this directly.
|
||||
@@ -142,16 +218,23 @@ sub wikify_chunk {
|
||||
while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
|
||||
my $codeblock = $2;
|
||||
$codedstr .= wikify_chunk($wikitype, $1, undef, undef);
|
||||
# Convert obvious SDL things to wikilinks, even inside `code` blocks.
|
||||
$codeblock =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
if (defined $apiprefixregex) {
|
||||
# Convert obvious API things to wikilinks, even inside `code` blocks.
|
||||
$codeblock =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
}
|
||||
$codedstr .= "<code>$codeblock</code>";
|
||||
}
|
||||
|
||||
# Convert obvious SDL things to wikilinks.
|
||||
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
# Convert obvious API things to wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
}
|
||||
|
||||
# Make some Markdown things into MediaWiki...
|
||||
|
||||
# links
|
||||
$str =~ s/\[(.*?)\]\((https?\:\/\/.*?)\)/\[$2 $1\]/g;
|
||||
|
||||
# bold+italic
|
||||
$str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
|
||||
|
||||
@@ -170,8 +253,10 @@ sub wikify_chunk {
|
||||
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
|
||||
}
|
||||
} elsif ($wikitype eq 'md') {
|
||||
# Convert obvious SDL things to wikilinks.
|
||||
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
||||
# Convert obvious API things to wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
||||
}
|
||||
if (defined $code) {
|
||||
$str .= "```$codelang$code```";
|
||||
}
|
||||
@@ -216,7 +301,13 @@ sub dewikify_chunk {
|
||||
# Doxygen supports Markdown (and it just simply looks better than MediaWiki
|
||||
# when looking at the raw headers), so do some conversions here as necessary.
|
||||
|
||||
$str =~ s/\[\[(SDL_[a-zA-Z0-9_]+)\]\]/$1/gms; # Dump obvious wikilinks.
|
||||
# Dump obvious wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]/$1/gms;
|
||||
}
|
||||
|
||||
# links
|
||||
$str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\[$2\]\($1\)/g;
|
||||
|
||||
# <code></code> is also popular. :/
|
||||
$str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
|
||||
@@ -240,7 +331,13 @@ sub dewikify_chunk {
|
||||
} elsif ($dewikify_mode eq 'manpage') {
|
||||
$str =~ s/\./\\[char46]/gms; # make sure these can't become control codes.
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
$str =~ s/\s*\[\[(SDL_[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms; # Dump obvious wikilinks.
|
||||
# Dump obvious wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\s*\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms;
|
||||
}
|
||||
|
||||
# links
|
||||
$str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\n.URL "$1" "$2"\n/g;
|
||||
|
||||
# <code></code> is also popular. :/
|
||||
$str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
|
||||
@@ -336,11 +433,13 @@ my %headerfuncslocation = (); # $headerfuncslocation{"SDL_OpenAudio"} -> name
|
||||
my %headerfuncschunk = (); # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
|
||||
my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
|
||||
|
||||
my $incpath = "$srcpath/include";
|
||||
my $incpath = "$srcpath";
|
||||
$incpath .= "/$incsubdir" if $incsubdir ne '';
|
||||
|
||||
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
|
||||
while (readdir(DH)) {
|
||||
my $dent = $_;
|
||||
next if not $dent =~ /\ASDL.*?\.h\Z/; # just SDL*.h headers.
|
||||
next if not $dent =~ /$selectheaderregex/; # just selected headers.
|
||||
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
|
||||
|
||||
my @contents = ();
|
||||
@@ -490,7 +589,7 @@ opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
||||
while (readdir(DH)) {
|
||||
my $dent = $_;
|
||||
my $type = '';
|
||||
if ($dent =~ /\ASDL.*?\.(md|mediawiki)\Z/) {
|
||||
if ($dent =~ /\.(md|mediawiki)\Z/) {
|
||||
$type = $1;
|
||||
} else {
|
||||
next; # only dealing with wiki pages.
|
||||
@@ -718,6 +817,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
foreach (@desclines) {
|
||||
s/\A(\:|\* )//;
|
||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||
s/\A\/*//;
|
||||
$str .= "\\sa $_\n";
|
||||
}
|
||||
}
|
||||
@@ -926,7 +1026,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
$sections{'Related Functions'} .= ":[[$sa]]\n";
|
||||
} elsif ($wikitype eq 'md') {
|
||||
$sections{'Related Functions'} .= "* [$sa](/$sa)\n";
|
||||
$sections{'Related Functions'} .= "* [$sa]($sa)\n";
|
||||
} else { die("Expected wikitype '$wikitype'\n"); }
|
||||
}
|
||||
}
|
||||
@@ -1076,22 +1176,23 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
|
||||
chomp($gitrev);
|
||||
|
||||
open(FH, '<', "$srcpath/include/SDL_version.h") or die("Can't open '$srcpath/include/SDL_version.h': $!\n");
|
||||
# !!! FIXME
|
||||
open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
|
||||
my $majorver = 0;
|
||||
my $minorver = 0;
|
||||
my $patchver = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (/\A\#define SDL_MAJOR_VERSION\s+(\d+)\Z/) {
|
||||
if (/$versionmajorregex/) {
|
||||
$majorver = int($1);
|
||||
} elsif (/\A\#define SDL_MINOR_VERSION\s+(\d+)\Z/) {
|
||||
} elsif (/$versionminorregex/) {
|
||||
$minorver = int($1);
|
||||
} elsif (/\A\#define SDL_PATCHLEVEL\s+(\d+)\Z/) {
|
||||
} elsif (/$versionpatchregex/) {
|
||||
$patchver = int($1);
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
my $sdlversion = "$majorver.$minorver.$patchver";
|
||||
my $fullversion = "$majorver.$minorver.$patchver";
|
||||
|
||||
foreach (keys %headerfuncs) {
|
||||
my $fn = $_;
|
||||
@@ -1126,17 +1227,24 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
$str .= ".\\\" This manpage content is licensed under Creative Commons\n";
|
||||
$str .= ".\\\" Attribution 4.0 International (CC BY 4.0)\n";
|
||||
$str .= ".\\\" https://creativecommons.org/licenses/by/4.0/\n";
|
||||
$str .= ".\\\" This manpage was generated from SDL's wiki page for $fn:\n";
|
||||
$str .= ".\\\" https://wiki.libsdl.org/$fn\n";
|
||||
$str .= ".\\\" This manpage was generated from ${projectshortname}'s wiki page for $fn:\n";
|
||||
$str .= ".\\\" $wikiurl/$fn\n";
|
||||
$str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
|
||||
$str .= ".\\\" revision $gitrev\n" if $gitrev ne '';
|
||||
$str .= ".\\\" Please report issues in this manpage's content at:\n";
|
||||
$str .= ".\\\" https://github.com/libsdl-org/sdlwiki/issues/new?title=Feedback%20on%20page%20$fn\n";
|
||||
$str .= ".\\\" $bugreporturl\n";
|
||||
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
|
||||
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
|
||||
$str .= ".\\\" SDL can be found at https://libsdl.org/\n";
|
||||
$str .= ".\\\" $projectshortname can be found at $projecturl\n";
|
||||
|
||||
$str .= ".TH $fn 3 \"SDL $sdlversion\" \"Simple Directmedia Layer\" \"SDL$majorver FUNCTIONS\"\n";
|
||||
# Define a .URL macro. The "www.tmac" thing decides if we're using GNU roff (which has a .URL macro already), and if so, overrides the macro we just created.
|
||||
# This wizadry is from https://web.archive.org/web/20060102165607/http://people.debian.org/~branden/talks/wtfm/wtfm.pdf
|
||||
$str .= ".de URL\n";
|
||||
$str .= '\\$2 \(laURL: \\$1 \(ra\\$3' . "\n";
|
||||
$str .= "..\n";
|
||||
$str .= '.if \n[.g] .mso www.tmac' . "\n";
|
||||
|
||||
$str .= ".TH $fn 3 \"$projectshortname $fullversion\" \"$projectfullname\" \"$projectshortname$majorver FUNCTIONS\"\n";
|
||||
$str .= ".SH NAME\n";
|
||||
|
||||
$str .= "$fn";
|
||||
@@ -1145,7 +1253,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
|
||||
$str .= ".SH SYNOPSIS\n";
|
||||
$str .= ".nf\n";
|
||||
$str .= ".B #include \\(dqSDL.h\\(dq\n";
|
||||
$str .= ".B #include \\(dq$mainincludefname\\(dq\n";
|
||||
$str .= ".PP\n";
|
||||
|
||||
my @decllines = split /\n/, $decl;
|
||||
@@ -1216,6 +1324,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
foreach (@desclines) {
|
||||
s/\A(\:|\* )//;
|
||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||
s/\A\/*//;
|
||||
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
@@ -1234,14 +1343,14 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
$str .= ".UE\n";
|
||||
$str .= ".PP\n";
|
||||
$str .= "This manpage was generated from\n";
|
||||
$str .= ".UR https://wiki.libsdl.org/$fn\n";
|
||||
$str .= "SDL's wiki\n";
|
||||
$str .= ".UR $wikiurl/$fn\n";
|
||||
$str .= "${projectshortname}'s wiki\n";
|
||||
$str .= ".UE\n";
|
||||
$str .= "using SDL/build-scripts/wikiheaders.pl";
|
||||
$str .= " revision $gitrev" if $gitrev ne '';
|
||||
$str .= ".\n";
|
||||
$str .= "Please report issues in this manpage at\n";
|
||||
$str .= ".UR https://github.com/libsdl-org/sdlwiki/issues/new\n";
|
||||
$str .= ".UR $bugreporturl\n";
|
||||
$str .= "our bugtracker!\n";
|
||||
$str .= ".UE\n";
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.22"
|
||||
$SDLVersion = "2.23.1"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
||||
@@ -17,8 +17,8 @@ macro(SET_OPTION _NAME _DESC)
|
||||
endmacro()
|
||||
|
||||
macro(DEP_OPTION _NAME _DESC _DEFLT _DEPTEST _FAILDFLT)
|
||||
add_to_alloptions(${_NAME})
|
||||
cmake_dependent_option(${_NAME} ${_DESC} ${_DEFLT} ${_DEPTEST} ${_FAILDFLT})
|
||||
add_to_alloptions("${_NAME}")
|
||||
cmake_dependent_option("${_NAME}" "${_DESC}" "${_DEFLT}" "${_DEPTEST}" "${_FAILDFLT}")
|
||||
endmacro()
|
||||
|
||||
macro(OPTION_STRING _NAME _DESC _VALUE)
|
||||
|
||||
@@ -83,7 +83,7 @@ macro(CheckOSS)
|
||||
set(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H 1)
|
||||
endif()
|
||||
set(SDL_AUDIO_DRIVER_OSS 1)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${OSS_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${OSS_SOURCES})
|
||||
if(NETBSD OR OPENBSD)
|
||||
list(APPEND EXTRA_LIBS ossaudio)
|
||||
endif()
|
||||
@@ -106,13 +106,13 @@ macro(CheckALSA)
|
||||
if(HAVE_LIBASOUND)
|
||||
set(HAVE_ALSA TRUE)
|
||||
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${ALSA_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ALSA 1)
|
||||
if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading")
|
||||
endif()
|
||||
if(SDL_ALSA_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("asound")
|
||||
FindLibraryAndSONAME("asound")
|
||||
if(SDL_ALSA_SHARED AND ASOUND_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
|
||||
set(HAVE_ALSA_SHARED TRUE)
|
||||
else()
|
||||
@@ -134,14 +134,14 @@ macro(CheckPipewire)
|
||||
if(PKG_PIPEWIRE_FOUND)
|
||||
set(HAVE_PIPEWIRE TRUE)
|
||||
file(GLOB PIPEWIRE_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pipewire/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PIPEWIRE_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${PIPEWIRE_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
|
||||
if(SDL_PIPEWIRE_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic Pipewire loading")
|
||||
endif()
|
||||
if(SDL_PIPEWIRE_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("pipewire-0.3")
|
||||
FindLibraryAndSONAME("pipewire-0.3")
|
||||
if(SDL_PIPEWIRE_SHARED AND PIPEWIRE_0.3_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC "\"${PIPEWIRE_0.3_LIB_SONAME}\"")
|
||||
set(HAVE_PIPEWIRE_SHARED TRUE)
|
||||
else()
|
||||
@@ -163,14 +163,14 @@ macro(CheckPulseAudio)
|
||||
if(PKG_PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO TRUE)
|
||||
file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${PULSEAUDIO_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${PULSEAUDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
|
||||
if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
|
||||
endif()
|
||||
if(SDL_PULSEAUDIO_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("pulse-simple")
|
||||
FindLibraryAndSONAME("pulse-simple")
|
||||
if(SDL_PULSEAUDIO_SHARED AND PULSE_SIMPLE_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
|
||||
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
||||
else()
|
||||
@@ -192,14 +192,14 @@ macro(CheckJACK)
|
||||
if(PKG_JACK_FOUND)
|
||||
set(HAVE_JACK TRUE)
|
||||
file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JACK_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${JACK_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_JACK 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
|
||||
if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
|
||||
endif()
|
||||
if(SDL_JACK_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("jack")
|
||||
FindLibraryAndSONAME("jack")
|
||||
if(SDL_JACK_SHARED AND JACK_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
|
||||
set(HAVE_JACK_SHARED TRUE)
|
||||
else()
|
||||
@@ -221,14 +221,14 @@ macro(CheckESD)
|
||||
if(PKG_ESD_FOUND)
|
||||
set(HAVE_ESD TRUE)
|
||||
file(GLOB ESD_SOURCES ${SDL2_SOURCE_DIR}/src/audio/esd/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ESD_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${ESD_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ESD 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
|
||||
if(SDL_ESD_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ESD loading")
|
||||
endif()
|
||||
if(SDL_ESD_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(esd)
|
||||
FindLibraryAndSONAME(esd)
|
||||
if(SDL_ESD_SHARED AND ESD_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"")
|
||||
set(HAVE_ESD_SHARED TRUE)
|
||||
else()
|
||||
@@ -254,15 +254,15 @@ macro(CheckARTS)
|
||||
execute_process(CMD_ARTSLIBS ${ARTS_CONFIG} --libs
|
||||
OUTPUT_VARIABLE ARTS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
file(GLOB ARTS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/arts/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ARTS_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${ARTS_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ARTS 1)
|
||||
set(HAVE_ARTS TRUE)
|
||||
if(SDL_ARTS_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading")
|
||||
endif()
|
||||
if(SDL_ARTS_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(artsc)
|
||||
if(SDL_ARTS_SHARED AND ARTSC_LIB AND HAVE_SDL_LOADSO)
|
||||
# TODO
|
||||
FindLibraryAndSONAME(artsc)
|
||||
set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"")
|
||||
set(HAVE_ARTS_SHARED TRUE)
|
||||
else()
|
||||
@@ -286,13 +286,13 @@ macro(CheckNAS)
|
||||
if(HAVE_NAS_H AND D_NAS_LIB)
|
||||
set(HAVE_NAS TRUE)
|
||||
file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${NAS_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${NAS_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_NAS 1)
|
||||
if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic NAS loading")
|
||||
endif()
|
||||
if(SDL_NAS_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("audio")
|
||||
FindLibraryAndSONAME("audio")
|
||||
if(SDL_NAS_SHARED AND AUDIO_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"")
|
||||
set(HAVE_NAS_SHARED TRUE)
|
||||
else()
|
||||
@@ -316,13 +316,13 @@ macro(CheckSNDIO)
|
||||
if(HAVE_SNDIO_H AND D_SNDIO_LIB)
|
||||
set(HAVE_SNDIO TRUE)
|
||||
file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SNDIO_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_SNDIO 1)
|
||||
if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
|
||||
endif()
|
||||
if(SDL_SNDIO_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("sndio")
|
||||
FindLibraryAndSONAME("sndio")
|
||||
if(SDL_SNDIO_SHARED AND SNDIO_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
|
||||
set(HAVE_SNDIO_SHARED TRUE)
|
||||
else()
|
||||
@@ -344,14 +344,14 @@ macro(CheckFusionSound)
|
||||
if(PKG_FUSIONSOUND_FOUND)
|
||||
set(HAVE_FUSIONSOUND TRUE)
|
||||
file(GLOB FUSIONSOUND_SOURCES ${SDL2_SOURCE_DIR}/src/audio/fusionsound/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FUSIONSOUND_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${FUSIONSOUND_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
|
||||
if(FUSIONSOUND_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading")
|
||||
endif()
|
||||
if(FUSIONSOUND_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("fusionsound")
|
||||
FindLibraryAndSONAME("fusionsound")
|
||||
if(FUSIONSOUND_SHARED AND FUSIONSOUND_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"")
|
||||
set(HAVE_FUSIONSOUND_SHARED TRUE)
|
||||
else()
|
||||
@@ -375,8 +375,8 @@ macro(CheckLibSampleRate)
|
||||
if(SDL_LIBSAMPLERATE_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
||||
endif()
|
||||
if(SDL_LIBSAMPLERATE_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("samplerate")
|
||||
FindLibraryAndSONAME("samplerate")
|
||||
if(SDL_LIBSAMPLERATE_SHARED AND SAMPLERATE_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
|
||||
set(HAVE_LIBSAMPLERATE_SHARED TRUE)
|
||||
else()
|
||||
@@ -393,7 +393,7 @@ endmacro()
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckX11)
|
||||
if(SDL_X11)
|
||||
foreach(_LIB X11 Xext Xcursor Xinerama Xi Xfixes Xrandr Xrender Xss Xxf86vm)
|
||||
foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
|
||||
FindLibraryAndSONAME("${_LIB}")
|
||||
endforeach()
|
||||
|
||||
@@ -415,7 +415,6 @@ macro(CheckX11)
|
||||
endif()
|
||||
|
||||
check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
|
||||
check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
|
||||
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
|
||||
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
|
||||
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H_)
|
||||
@@ -423,7 +422,6 @@ macro(CheckX11)
|
||||
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
|
||||
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
|
||||
check_include_files("X11/Xlib.h;X11/extensions/Xdbe.h" HAVE_XDBE_H)
|
||||
check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
|
||||
check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
|
||||
|
||||
if(X11_LIB)
|
||||
@@ -435,7 +433,7 @@ macro(CheckX11)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${X11_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_X11 1)
|
||||
|
||||
# !!! FIXME: why is this disabled for Apple?
|
||||
@@ -461,7 +459,7 @@ macro(CheckX11)
|
||||
else()
|
||||
set(HAVE_X11_SHARED TRUE)
|
||||
endif()
|
||||
if(HAVE_X11_SHARED)
|
||||
if(HAVE_X11_SHARED AND X11_LIB AND XEXT_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC "\"${X11_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "\"${XEXT_LIB_SONAME}\"")
|
||||
else()
|
||||
@@ -504,16 +502,6 @@ macro(CheckX11)
|
||||
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
||||
endif()
|
||||
|
||||
if(SDL_X11_XINERAMA AND HAVE_XINERAMA_H)
|
||||
set(HAVE_X11_XINERAMA TRUE)
|
||||
if(HAVE_X11_SHARED AND XINERAMA_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "\"${XINERAMA_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XINERAMA_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XINERAMA 1)
|
||||
endif()
|
||||
|
||||
if(SDL_X11_XINPUT AND HAVE_XINPUT2_H)
|
||||
set(HAVE_X11_XINPUT TRUE)
|
||||
if(HAVE_X11_SHARED AND XI_LIB)
|
||||
@@ -584,16 +572,6 @@ macro(CheckX11)
|
||||
set(HAVE_X11_XSHAPE TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_X11_XVM AND HAVE_XF86VM_H)
|
||||
if(HAVE_X11_SHARED AND XXF86VM_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "\"${XXF86VM_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XXF86VM_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XVIDMODE 1)
|
||||
set(HAVE_X11_XVM TRUE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
endif()
|
||||
@@ -621,7 +599,7 @@ macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
|
||||
ARGS "${_CODE_MODE}" "${_XML}" "${_WAYLAND_PROT_C_CODE}"
|
||||
)
|
||||
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${_WAYLAND_PROT_C_CODE}")
|
||||
list(APPEND SOURCE_FILES "${_WAYLAND_PROT_C_CODE}")
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
@@ -664,7 +642,7 @@ macro(CheckWayland)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${WAYLAND_SOURCES})
|
||||
|
||||
# We have to generate some protocol interface code for some unstable Wayland features.
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
@@ -684,18 +662,18 @@ macro(CheckWayland)
|
||||
if(SDL_WAYLAND_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic Wayland loading")
|
||||
endif()
|
||||
if(SDL_WAYLAND_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(wayland-client)
|
||||
FindLibraryAndSONAME(wayland-egl)
|
||||
FindLibraryAndSONAME(wayland-cursor)
|
||||
FindLibraryAndSONAME(xkbcommon)
|
||||
FindLibraryAndSONAME(wayland-client)
|
||||
FindLibraryAndSONAME(wayland-egl)
|
||||
FindLibraryAndSONAME(wayland-cursor)
|
||||
FindLibraryAndSONAME(xkbcommon)
|
||||
if(SDL_WAYLAND_SHARED AND WAYLAND_CLIENT_LIB AND WAYLAND_EGL_LIB AND WAYLAND_CURSOR_LIB AND XKBCOMMON_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "\"${WAYLAND_CLIENT_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL "\"${WAYLAND_EGL_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "\"${WAYLAND_CURSOR_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
|
||||
set(HAVE_WAYLAND_SHARED TRUE)
|
||||
else()
|
||||
set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
|
||||
list(APPEND EXTRA_LIBS ${WAYLAND_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(SDL_WAYLAND_LIBDECOR)
|
||||
@@ -708,12 +686,12 @@ macro(CheckWayland)
|
||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
||||
endif()
|
||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(decor-0)
|
||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND DECOR_0_LIB AND HAVE_SDL_LOADSO)
|
||||
set(HAVE_LIBDECOR_SHARED TRUE)
|
||||
FindLibraryAndSONAME(decor-0)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
|
||||
else()
|
||||
set(EXTRA_LIBS ${LIBDECOR_LIBRARIES} ${EXTRA_LIBS})
|
||||
list(APPEND EXTRA_LIBS ${LIBDECOR_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -733,8 +711,7 @@ macro(CheckCOCOA)
|
||||
endif()
|
||||
if(HAVE_COCOA)
|
||||
file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
|
||||
set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${COCOA_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${COCOA_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_COCOA 1)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
endif()
|
||||
@@ -752,15 +729,16 @@ macro(CheckDirectFB)
|
||||
if(PKG_DIRECTFB_FOUND)
|
||||
set(HAVE_DIRECTFB TRUE)
|
||||
file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DIRECTFB_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${DIRECTFB_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_DIRECTFB 1)
|
||||
set(SDL_VIDEO_RENDER_DIRECTFB 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
|
||||
list(APPEND SDL_CFLAGS ${PKG_DIRECTFB_CFLAGS})
|
||||
if(SDL_DIRECTFB_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
|
||||
endif()
|
||||
if(SDL_DIRECTFB_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("directfb")
|
||||
FindLibraryAndSONAME("directfb")
|
||||
if(SDL_DIRECTFB_SHARED AND DIRECTFB_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"")
|
||||
set(HAVE_DIRECTFB_SHARED TRUE)
|
||||
else()
|
||||
@@ -788,7 +766,7 @@ macro(CheckVivante)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIVANTE_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${VIVANTE_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE 1)
|
||||
if(HAVE_VIVANTE_VDK)
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
|
||||
@@ -796,7 +774,7 @@ macro(CheckVivante)
|
||||
find_library(VIVANTE_VDK_LIBRARY VDK REQUIRED)
|
||||
list(APPEND EXTRA_LIBS ${VIVANTE_LIBRARY} ${VIVANTE_VDK_LIBRARY})
|
||||
else()
|
||||
set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB")
|
||||
list(APPEND SDL_CFLAGS -DLINUX -DEGL_API_FB)
|
||||
list(APPEND EXTRA_LIBS EGL)
|
||||
endif(HAVE_VIVANTE_VDK)
|
||||
endif()
|
||||
@@ -944,8 +922,7 @@ macro(CheckPTHREAD)
|
||||
set(SDL_THREAD_PTHREAD 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PTHREAD_CFLAGS})
|
||||
list(APPEND EXTRA_LDFLAGS ${PTHREAD_LDFLAGS})
|
||||
set(SDL_CFLAGS "${SDL_CFLAGS} ${PTHREAD_CFLAGS}")
|
||||
list(APPEND SDL_LIBS ${PTHREAD_LDFLAGS})
|
||||
list(APPEND SDL_CFLAGS ${PTHREAD_CFLAGS})
|
||||
|
||||
check_c_source_compiles("
|
||||
#define _GNU_SOURCE 1
|
||||
@@ -1150,7 +1127,7 @@ macro(CheckUSBHID)
|
||||
endif()
|
||||
set(SDL_JOYSTICK_USBHID 1)
|
||||
file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${BSD_JOYSTICK_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${BSD_JOYSTICK_SOURCES})
|
||||
list(APPEND EXTRA_CFLAGS ${USB_CFLAGS})
|
||||
list(APPEND EXTRA_LIBS ${USB_LIBS})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
@@ -1178,7 +1155,9 @@ macro(CheckHIDAPI)
|
||||
else()
|
||||
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
|
||||
FindLibraryAndSONAME("usb-1.0")
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
|
||||
if(USB_1.0_LIB)
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -1189,10 +1168,10 @@ macro(CheckHIDAPI)
|
||||
|
||||
if(HAVE_HIDAPI)
|
||||
if(ANDROID)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
|
||||
list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
|
||||
list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
|
||||
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
|
||||
endif()
|
||||
set(HAVE_SDL_HIDAPI TRUE)
|
||||
@@ -1202,7 +1181,7 @@ macro(CheckHIDAPI)
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
set(HAVE_HIDAPI_JOYSTICK TRUE)
|
||||
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_JOYSTICK_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1238,7 +1217,7 @@ macro(CheckRPI)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
set(SDL_VIDEO_DRIVER_RPI 1)
|
||||
file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${VIDEO_RPI_SOURCES})
|
||||
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
|
||||
# !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
|
||||
@@ -1265,7 +1244,7 @@ macro(CheckKMSDRM)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
|
||||
list(APPEND SOURCE_FILES ${KMSDRM_SOURCES})
|
||||
|
||||
list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
|
||||
|
||||
@@ -1281,7 +1260,7 @@ macro(CheckKMSDRM)
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
|
||||
set(HAVE_KMSDRM_SHARED TRUE)
|
||||
else()
|
||||
set(EXTRA_LIBS ${KMSDRM_LIBRARIES} ${EXTRA_LIBS})
|
||||
list(APPEND EXTRA_LIBS ${KMSDRM_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
100
cmake/test/CMakeLists.txt
Normal file
100
cmake/test/CMakeLists.txt
Normal file
@@ -0,0 +1,100 @@
|
||||
# This cmake build script is meant for verifying the various CMake configuration script.
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(sdl_test LANGUAGES C)
|
||||
|
||||
if(ANDROID)
|
||||
macro(add_executable NAME)
|
||||
set(args ${ARGN})
|
||||
list(REMOVE_ITEM args WIN32)
|
||||
add_library(${NAME} SHARED ${args})
|
||||
unset(args)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
||||
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
option(TEST_SHARED "Test linking to shared SDL2 library" ON)
|
||||
add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
|
||||
|
||||
option(TEST_STATIC "Test linking to static SDL2 libary" ON)
|
||||
add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
|
||||
|
||||
if(TEST_SHARED)
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2)
|
||||
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||
endif()
|
||||
add_executable(gui-shared WIN32 main_gui.c)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
target_link_libraries(gui-shared PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
target_link_libraries(gui-shared PRIVATE SDL2::SDL2)
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET gui-shared POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:gui-shared>"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_executable(gui-shared-vars WIN32 main_gui.c)
|
||||
target_link_libraries(gui-shared-vars PRIVATE ${SDL2_LIBRARIES})
|
||||
target_include_directories(gui-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(cli-shared main_cli.c)
|
||||
target_link_libraries(cli-shared PRIVATE SDL2::SDL2)
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET cli-shared POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:cli-shared>"
|
||||
)
|
||||
endif()
|
||||
|
||||
# SDL2_LIBRARIES does not support creating a cli SDL2 application
|
||||
# (it is possible that SDL2main is a stub, but we don't know for sure)
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_executable(cli-shared-vars main_cli.c)
|
||||
target_link_libraries(cli-shared-vars PRIVATE ${SDL2_LIBRARIES})
|
||||
target_include_directories(cli-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TEST_STATIC)
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2-static)
|
||||
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||
endif()
|
||||
add_executable(gui-static WIN32 main_gui.c)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
target_link_libraries(gui-static PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
target_link_libraries(gui-static PRIVATE SDL2::SDL2-static)
|
||||
|
||||
add_executable(gui-static-vars WIN32 main_gui.c)
|
||||
target_link_libraries(gui-static-vars PRIVATE ${SDL2MAIN_LIBRARY} ${SDL2_STATIC_LIBRARIES})
|
||||
target_include_directories(gui-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(cli-static main_cli.c)
|
||||
target_link_libraries(cli-static PRIVATE SDL2::SDL2-static)
|
||||
|
||||
# SDL2_LIBRARIES does not support creating a cli SDL2 application (when SDL2::SDL2main is available)
|
||||
# (it is possible that SDL2main is a stub, but we don't know for sure)
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_executable(cli-static-vars main_cli.c)
|
||||
target_link_libraries(cli-static-vars PRIVATE ${SDL2_STATIC_LIBRARIES})
|
||||
target_include_directories(cli-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "SDL2_PREFIX: ${SDL2_PREFIX}")
|
||||
message(STATUS "SDL2_INCLUDE_DIR: ${SDL2_INCLUDE_DIR}")
|
||||
message(STATUS "SDL2_INCLUDE_DIRS: ${SDL2_INCLUDE_DIRS}")
|
||||
message(STATUS "SDL2_LIBRARIES: ${SDL2_LIBRARIES}")
|
||||
message(STATUS "SDL2_STATIC_LIBRARIES: ${SDL2_STATIC_LIBRARIES}")
|
||||
message(STATUS "SDL2MAIN_LIBRARY: ${SDL2MAIN_LIBRARY}")
|
||||
message(STATUS "SDL2TEST_LIBRARY: ${SDL2TEST_LIBRARY}")
|
||||
|
||||
feature_summary(WHAT ALL)
|
||||
14
cmake/test/main_cli.c
Normal file
14
cmake/test/main_cli.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#define SDL_MAIN_HANDLED
|
||||
#include "SDL.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
SDL_SetMainReady();
|
||||
if (SDL_Init(0) < 0) {
|
||||
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
SDL_Delay(100);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
28
cmake/test/main_gui.c
Normal file
28
cmake/test/main_gui.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "SDL.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Surface *screenSurface = NULL;
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
window = SDL_CreateWindow(
|
||||
"hello_sdl2",
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
640, 480,
|
||||
SDL_WINDOW_SHOWN
|
||||
);
|
||||
if (window == NULL) {
|
||||
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
screenSurface = SDL_GetWindowSurface(window);
|
||||
SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xff, 0xff, 0xff));
|
||||
SDL_UpdateWindowSurface(window);
|
||||
SDL_Delay(100);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
227
configure.ac
227
configure.ac
@@ -10,23 +10,21 @@ dnl Save the CFLAGS to see whether they were passed in or generated
|
||||
orig_CFLAGS="$CFLAGS"
|
||||
|
||||
dnl Set various version strings - taken gratefully from the GTk sources
|
||||
#
|
||||
# Making releases:
|
||||
# Edit include/SDL_version.h and change the version, then:
|
||||
# SDL_MICRO_VERSION += 1;
|
||||
# SDL_INTERFACE_AGE += 1;
|
||||
# SDL_BINARY_AGE += 1;
|
||||
# if any functions have been added, set SDL_INTERFACE_AGE to 0.
|
||||
# if backwards compatibility has been broken,
|
||||
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
||||
#
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=22
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=22
|
||||
SDL_MINOR_VERSION=23
|
||||
SDL_MICRO_VERSION=1
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
AS_CASE(["$SDL_MINOR_VERSION"],
|
||||
[*@<:@02468@:>@],
|
||||
dnl Stable branch, 2.24.1 -> libSDL2-2.0.so.0.2400.1
|
||||
[SDL_INTERFACE_AGE="$SDL_MICRO_VERSION"],
|
||||
[*],
|
||||
dnl Development branch, 2.23.1 -> libSDL2-2.0.so.0.2301.0
|
||||
[SDL_INTERFACE_AGE=0])
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
AC_SUBST(SDL_MINOR_VERSION)
|
||||
AC_SUBST(SDL_MICRO_VERSION)
|
||||
@@ -38,10 +36,17 @@ AC_SUBST(SDL_VERSION)
|
||||
LT_INIT([win32-dll])
|
||||
LT_LANG([Windows Resource])
|
||||
|
||||
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
|
||||
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
|
||||
LT_REVISION=$SDL_INTERFACE_AGE
|
||||
# For historical reasons, the library name redundantly includes the major
|
||||
# version twice: libSDL2-2.0.so.0.
|
||||
# TODO: in SDL 3, stop using -release, which will simplify it to libSDL3.so.0
|
||||
LT_RELEASE=2.0
|
||||
# Increment this if there is an incompatible change - but if that happens,
|
||||
# we should rename the library from SDL2 to SDL3, at which point this would
|
||||
# reset to 0 anyway.
|
||||
LT_MAJOR=0
|
||||
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
|
||||
LT_CURRENT=`expr $LT_MAJOR + $LT_AGE`
|
||||
LT_REVISION=$SDL_INTERFACE_AGE
|
||||
m4_pattern_allow([^LT_])
|
||||
|
||||
AC_SUBST(LT_RELEASE)
|
||||
@@ -55,10 +60,14 @@ dnl AC_CANONICAL_HOST
|
||||
dnl Check for tools
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_EGREP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl 64-bit file offsets if possible unless --disable-largefile is specified
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Make sure that srcdir is a full pathname
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
@@ -218,6 +227,10 @@ case "$enable_assertions" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED([SDL_BUILD_MAJOR_VERSION], $SDL_MAJOR_VERSION, [ ])
|
||||
AC_DEFINE_UNQUOTED([SDL_BUILD_MINOR_VERSION], $SDL_MINOR_VERSION, [ ])
|
||||
AC_DEFINE_UNQUOTED([SDL_BUILD_MICRO_VERSION], $SDL_MICRO_VERSION, [ ])
|
||||
|
||||
dnl See whether we can use gcc style dependency tracking
|
||||
AC_ARG_ENABLE(dependency-tracking,
|
||||
[AS_HELP_STRING([--enable-dependency-tracking],
|
||||
@@ -309,7 +322,8 @@ if test x$enable_libc = xyes; then
|
||||
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
||||
|
||||
dnl Check for C library headers
|
||||
AC_HEADER_STDC
|
||||
dnl AC_CHECK_INCLUDES_DEFAULT is an autoconf-2.7x thing where AC_HEADER_STDC is deprecated.
|
||||
m4_ifdef([AC_CHECK_INCLUDES_DEFAULT], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
|
||||
|
||||
dnl Check for typedefs, structures, etc.
|
||||
@@ -337,7 +351,7 @@ dnl Checks for library functions.
|
||||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||
],[]),
|
||||
)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
@@ -574,8 +588,6 @@ AC_ARG_ENABLE(assembly,
|
||||
if test x$enable_assembly = xyes; then
|
||||
SUMMARY_modules="${SUMMARY_modules} assembly"
|
||||
|
||||
AC_DEFINE(SDL_ASSEMBLY_ROUTINES, 1, [ ])
|
||||
|
||||
# Make sure that we don't generate floating point code that would
|
||||
# cause illegal instruction exceptions on older processors
|
||||
case "$host" in
|
||||
@@ -844,6 +856,70 @@ dnl Check for various instruction support
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(lsx,
|
||||
[AS_HELP_STRING([--enable-lsx], [use LSX assembly routines [default=yes]])],
|
||||
, enable_lsx=yes)
|
||||
if test x$enable_lsx = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_gcc_lsx=no
|
||||
AC_MSG_CHECKING(for GCC -mlsx option)
|
||||
lsx_CFLAGS="-mlsx"
|
||||
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifndef __loongarch_sx
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
]], [])], [have_gcc_lsx=yes], [])
|
||||
AC_MSG_RESULT($have_gcc_lsx)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_gcc_lsx = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
|
||||
SUMMARY_math="${SUMMARY_math} lsx"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for lsxintrin.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lsxintrin.h>]])],
|
||||
[have_lsxintrin_h_hdr=yes],[have_lsxintrin_h_hdr=no])
|
||||
AC_MSG_RESULT($have_lsxintrin_h_hdr)
|
||||
if test x$have_lsxintrin_h_hdr = xyes; then
|
||||
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()
|
||||
{
|
||||
@@ -1423,6 +1499,26 @@ CheckNEON()
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if clang's -fobjc-arc supported.
|
||||
dnl Reference: https://github.com/libsdl-org/SDL/pull/5632
|
||||
CheckObjectiveCARC()
|
||||
{
|
||||
AC_MSG_CHECKING(for clang -fobjc-arc option)
|
||||
have_clang_objc_arc=no
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS -fobjc-arc"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
int x = 0;
|
||||
]],[])], [have_clang_objc_arc=yes],[])
|
||||
AC_MSG_RESULT($have_clang_objc_arc)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_clang_objc_arc = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -fobjc-arc"
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
|
||||
dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
|
||||
CheckVisibilityHidden()
|
||||
@@ -1768,37 +1864,31 @@ CheckX11()
|
||||
x11_lib='/opt/X11/lib/libX11.6.dylib'
|
||||
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
|
||||
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/opt/X11/lib/libXi.6.dylib'
|
||||
xfixes_lib='/opt/X11/lib/libXfixes.3.dylib'
|
||||
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
|
||||
xss_lib='/opt/X11/lib/libXss.1.dylib'
|
||||
xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
x11_lib='libX11.so'
|
||||
x11ext_lib='libXext.so'
|
||||
xcursor_lib='libXcursor.so'
|
||||
xinerama_lib='libXinerama.so'
|
||||
xinput_lib='libXi.so'
|
||||
xfixes_lib='libXfixes.so'
|
||||
xrandr_lib='libXrandr.so'
|
||||
xrender_lib='libXrender.so'
|
||||
xss_lib='libXss.so'
|
||||
xvidmode_lib='libXxf86vm.so'
|
||||
;;
|
||||
*)
|
||||
x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1910,34 +2000,6 @@ XFreeEventData(display, cookie);
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xdbe"
|
||||
fi
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-xinerama,
|
||||
[AS_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [default=yes]])],
|
||||
, enable_video_x11_xinerama=yes)
|
||||
if test x$enable_video_x11_xinerama = xyes; then
|
||||
definitely_enable_video_x11_xinerama=no
|
||||
AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
have_xinerama_h_hdr=yes,
|
||||
have_xinerama_h_hdr=no,
|
||||
[#include <X11/Xlib.h>
|
||||
])
|
||||
if test x$have_xinerama_h_hdr = xyes; then
|
||||
if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
|
||||
echo "-- dynamic libXinerama -> $xinerama_lib"
|
||||
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib", [ ])
|
||||
definitely_enable_video_x11_xinerama=yes
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
|
||||
if test x$have_xinerama_lib = xyes ; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
|
||||
definitely_enable_video_x11_xinerama=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$definitely_enable_video_x11_xinerama = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA, 1, [ ])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-xinput,
|
||||
[AS_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [default=yes]])],
|
||||
, enable_video_x11_xinput=yes)
|
||||
@@ -2087,34 +2149,6 @@ dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xshape"
|
||||
fi
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-vm,
|
||||
[AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [default=yes]])],
|
||||
, enable_video_x11_vm=yes)
|
||||
if test x$enable_video_x11_vm = xyes; then
|
||||
definitely_enable_video_x11_vm=no
|
||||
AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
|
||||
have_vm_h_hdr=yes,
|
||||
have_vm_h_hdr=no,
|
||||
[#include <X11/Xlib.h>
|
||||
])
|
||||
if test x$have_vm_h_hdr = xyes; then
|
||||
if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
|
||||
echo "-- dynamic libXxf86vm -> $xvidmode_lib"
|
||||
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib", [ ])
|
||||
definitely_enable_video_x11_vm=yes
|
||||
else
|
||||
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
|
||||
if test x$have_vm_lib = xyes ; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
|
||||
definitely_enable_video_x11_vm=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$definitely_enable_video_x11_vm = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE, 1, [ ])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$have_x != xyes; then
|
||||
@@ -3234,6 +3268,17 @@ CheckDIRECTX()
|
||||
if test x$enable_directx = xyes; then
|
||||
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
|
||||
AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
|
||||
AC_MSG_CHECKING(for d3d12 Windows SDK version)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <winsdkver.h>
|
||||
#include <sdkddkver.h>
|
||||
#include <d3d12.h>
|
||||
ID3D12Device1 *device;
|
||||
#if WDK_NTDDI_VERSION <= 0x0A000008
|
||||
asdf
|
||||
#endif
|
||||
]])], [have_d3d12=yes],[have_d3d12=no])
|
||||
AC_MSG_RESULT($have_d3d12)
|
||||
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
||||
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
||||
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
|
||||
@@ -3961,6 +4006,10 @@ case "$host" in
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} d3d11"
|
||||
fi
|
||||
if test x$enable_render_d3d = xyes -a x$have_d3d12 = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_D3D12, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} d3d12"
|
||||
fi
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
@@ -4250,6 +4299,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
|
||||
|
||||
CheckObjectiveCARC
|
||||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
@@ -4722,6 +4772,17 @@ fi
|
||||
|
||||
SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
|
||||
|
||||
dnl Calculate the location of the prefix, relative to the cmake folder
|
||||
eval pkg_prefix=$prefix
|
||||
eval pkg_cmakedir=$libdir/cmake/SDL2
|
||||
cmake_prefix_relpath="$(echo -n "$pkg_cmakedir" | sed -E "s#^$pkg_prefix##" | sed -E "s#[A-Za-z0-9_ .-]+#..#g" )"
|
||||
AC_SUBST([cmake_prefix_relpath])
|
||||
|
||||
dnl Calculate the location of the prefix, relative to bindir
|
||||
eval pkg_bindir=$bindir
|
||||
bin_prefix_relpath="$(echo -n "pkg_bindir" | sed -E "s#^$pkg_prefix##" | sed -E "s#[A-Za-z0-9_ .-]+#..#g" )"
|
||||
AC_SUBST([bin_prefix_relpath])
|
||||
|
||||
dnl Expand the cflags and libraries needed by apps using SDL
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
AC_SUBST(SDL_LIBS)
|
||||
|
||||
@@ -73,7 +73,7 @@ To use, set the following CMake variables when running CMake's configuration sta
|
||||
|
||||
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
|
||||
|
||||
`cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
`cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
|
||||
- for tvOS-Simulator, using the latest, installed SDK:
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ Linux
|
||||
|
||||
By default SDL will only link against glibc, the rest of the features will be
|
||||
enabled dynamically at runtime depending on the available features on the target
|
||||
system. So, for example if you built SDL with Xinerama support and the target
|
||||
system does not have the Xinerama libraries installed, it will be disabled
|
||||
system. So, for example if you built SDL with XRandR support and the target
|
||||
system does not have the XRandR libraries installed, it will be disabled
|
||||
at runtime, and you won't get a missing library error, at least with the
|
||||
default configuration parameters.
|
||||
|
||||
@@ -17,7 +17,7 @@ Ubuntu 20.04, all available features enabled:
|
||||
sudo apt-get install build-essential git make cmake autoconf automake \
|
||||
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
|
||||
libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
|
||||
libxss-dev libgl1-mesa-dev libdbus-1-dev \
|
||||
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev
|
||||
@@ -27,12 +27,11 @@ Fedora 35, all available features enabled:
|
||||
sudo yum install gcc git-core make cmake autoconf automake libtool \
|
||||
alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
|
||||
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
|
||||
libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
|
||||
dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
|
||||
libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
|
||||
wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
|
||||
libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
|
||||
libsamplerate-devel
|
||||
libXi-devel libXScrnSaver-devel dbus-devel ibus-devel fcitx-devel \
|
||||
systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \
|
||||
mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \
|
||||
libdrm-devel mesa-libgbm-devel libusb-devel libdecor-devel \
|
||||
libsamplerate-devel pipewire-jack-audio-connection-kit-devel \
|
||||
|
||||
NOTES:
|
||||
- This includes all the audio targets except arts and esd, because Ubuntu
|
||||
|
||||
@@ -43,15 +43,14 @@ make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
This script builds SDL with 10.6 ABI compatibility on 64-bit Intel and 11.0
|
||||
This script builds SDL with 10.7 ABI compatibility on 64-bit Intel and 11.0
|
||||
ABI compatibility on ARM64 architectures. For best compatibility you
|
||||
should compile your application the same way.
|
||||
|
||||
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK
|
||||
(even if you target back to 10.6 systems). PowerPC support for Mac OS X has
|
||||
been officially dropped as of SDL 2.0.2. 32-bit Intel, using an older Xcode
|
||||
release, is still supported at the time of this writing, but current Xcode
|
||||
releases no longer support it, and eventually neither will SDL.
|
||||
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK.
|
||||
PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
|
||||
32-bit Intel and macOS 10.6 runtime support has been officially dropped as
|
||||
of SDL 2.24.0.
|
||||
|
||||
To use the library once it's built, you essential have two possibilities:
|
||||
use the traditional autoconf/automake/make method, or use Xcode.
|
||||
|
||||
44
docs/README-ngage.md
Normal file
44
docs/README-ngage.md
Normal file
@@ -0,0 +1,44 @@
|
||||
Nokia N-Gage
|
||||
============
|
||||
|
||||
SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
|
||||
(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project.
|
||||
The library is included in the
|
||||
[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
|
||||
sub-module.
|
||||
|
||||
A complete example project based on SDL2 can be found in the GitHub
|
||||
account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
|
||||
|
||||
Current level of implementation
|
||||
-------------------------------
|
||||
|
||||
The video driver currently provides full screen video support with
|
||||
keyboard input.
|
||||
|
||||
At the moment only the software renderer works.
|
||||
|
||||
Audio is not yet implemented.
|
||||
|
||||
Acknowledgements
|
||||
----------------
|
||||
|
||||
Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the
|
||||
valuable insight into Symbian programming. Without the SDL 1.2 port
|
||||
which was specially developed for CDoom (Doom for the Nokia 9210), this
|
||||
adaptation would not have been possible.
|
||||
|
||||
I would like to thank my friends
|
||||
[Razvan](https://twitter.com/bewarerazvan) and [Dan
|
||||
Whelan](https://danwhelan.ie/), for their continuous support. Without
|
||||
you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would
|
||||
have lost my patience long ago.
|
||||
|
||||
Last but not least, I would like to thank the development team of
|
||||
[EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your
|
||||
patience and support in troubleshooting helped me a lot.
|
||||
34
docs/README-ps2.md
Normal file
34
docs/README-ps2.md
Normal file
@@ -0,0 +1,34 @@
|
||||
PS2
|
||||
======
|
||||
SDL2 port for the Sony Playstation 2 contributed by:
|
||||
- Francisco Javier Trujillo Mata
|
||||
|
||||
|
||||
Credit to
|
||||
- The guys that ported SDL to PSP & Vita because I'm taking them as reference.
|
||||
- David G. F. for helping me with several issues and tests.
|
||||
|
||||
## Building
|
||||
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
|
||||
## Getting PS2 Dev
|
||||
[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
|
||||
|
||||
## Running on PCSX2 Emulator
|
||||
[PCSX2](https://github.com/PCSX2/pcsx2)
|
||||
|
||||
[More PCSX2 information](https://pcsx2.net/)
|
||||
|
||||
## To Do
|
||||
- PS2 Screen Keyboard
|
||||
- Dialogs
|
||||
- Audio
|
||||
- Video
|
||||
- Controllers
|
||||
- Others
|
||||
@@ -63,7 +63,7 @@ Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
|
||||
edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
|
||||
|
||||
sudo chroot $SYSROOT
|
||||
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev
|
||||
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
|
||||
exit
|
||||
sudo umount $SYSROOT/dev
|
||||
sudo umount $SYSROOT/proc
|
||||
|
||||
60
docs/README-versions.md
Normal file
60
docs/README-versions.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Versioning
|
||||
|
||||
## Since 2.23.0
|
||||
|
||||
SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
|
||||
and older versions of the Linux kernel:
|
||||
|
||||
* The major version (first part) increases when backwards compatibility
|
||||
is broken, which will happen infrequently.
|
||||
|
||||
* If the minor version (second part) is divisible by 2
|
||||
(for example 2.24.x, 2.26.x), this indicates a version of SDL that
|
||||
is believed to be stable and suitable for production use.
|
||||
|
||||
* In stable releases, the patchlevel or micro version (third part)
|
||||
indicates bugfix releases. Bugfix releases should not add or
|
||||
remove ABI, so the ".0" release (for example 2.24.0) should be
|
||||
forwards-compatible with all the bugfix releases from the
|
||||
same cycle (for example 2.24.1).
|
||||
|
||||
* The minor version increases when new API or ABI is added, or when
|
||||
other significant changes are made. Newer minor versions are
|
||||
backwards-compatible, but not fully forwards-compatible.
|
||||
For example, programs built against SDL 2.24.x should work fine
|
||||
with SDL 2.26.x, but programs built against SDL 2.26.x will not
|
||||
necessarily work with 2.24.x.
|
||||
|
||||
* If the minor version (second part) is not divisible by 2
|
||||
(for example 2.23.x, 2.25.x), this indicates a development prerelease
|
||||
of SDL that is not suitable for stable software distributions.
|
||||
Use with caution.
|
||||
|
||||
* The patchlevel or micro version (third part) increases with
|
||||
each prerelease.
|
||||
|
||||
* Each prerelease might add new API and/or ABI.
|
||||
|
||||
* Prereleases are backwards-compatible with older stable branches.
|
||||
For example, 2.25.x will be backwards-compatible with 2.24.x.
|
||||
|
||||
* Prereleases are not guaranteed to be backwards-compatible with
|
||||
each other. For example, new API or ABI added in 2.25.1
|
||||
might be removed or changed in 2.25.2.
|
||||
If this would be a problem for you, please do not use prereleases.
|
||||
|
||||
* Only upgrade to a prerelease if you can guarantee that you will
|
||||
promptly upgrade to the stable release that follows it.
|
||||
For example, do not upgrade to 2.23.x unless you will be able to
|
||||
upgrade to 2.24.0 when it becomes available.
|
||||
|
||||
* Software distributions that have a freeze policy (in particular Linux
|
||||
distributions with a release cycle, such as Debian and Fedora)
|
||||
should usually only package stable releases, and not prereleases.
|
||||
|
||||
## Before 2.23.0
|
||||
|
||||
Older versions of SDL followed a similar policy, but instead of the
|
||||
odd/even rule applying to the minor version, it applied to the patchlevel
|
||||
(micro version, third part). For example, 2.0.22 was a stable release
|
||||
and 2.0.21 was a prerelease.
|
||||
@@ -45,12 +45,15 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
|
||||
- [Supported Platforms](README-platforms.md)
|
||||
- [Porting information](README-porting.md)
|
||||
- [PSP](README-psp.md)
|
||||
- [PS2](README-ps2.md)
|
||||
- [Raspberry Pi](README-raspberrypi.md)
|
||||
- [Touch](README-touch.md)
|
||||
- [Versions](README-versions.md)
|
||||
- [WinCE](README-wince.md)
|
||||
- [Windows](README-windows.md)
|
||||
- [WinRT](README-winrt.md)
|
||||
- [PSVita](README-vita.md)
|
||||
- [Nokia N-Gage](README-ngage.md)
|
||||
|
||||
If you need help with the library, or just want to discuss SDL related
|
||||
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
|
||||
|
||||
@@ -640,6 +640,7 @@ EXCLUDE = ../include/SDL_opengles2_gl2ext.h \
|
||||
../include/SDL_opengles.h \
|
||||
../include/SDL_opengl.h \
|
||||
../include/SDL_egl.h \
|
||||
./release_checklist.md \
|
||||
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
|
||||
92
docs/release_checklist.md
Normal file
92
docs/release_checklist.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Release checklist
|
||||
|
||||
## New feature release
|
||||
|
||||
* Update `WhatsNew.txt`
|
||||
|
||||
* Bump version number to 2.EVEN.0 in all these locations:
|
||||
|
||||
* `configure.ac`, `CMakeLists.txt`: `SDL_*_VERSION`
|
||||
* `Xcode/SDL/Info-Framework.plist`: `CFBundleShortVersionString`,
|
||||
`CFBundleVersion`
|
||||
* `Makefile.os2`: `VERSION`
|
||||
* `Makefile.w32`: `*_VERSION`
|
||||
* `build-scripts/winrtbuild.ps1`: `$SDLVersion`
|
||||
* `include/SDL_version.h`: `SDL_*_VERSION`, `SDL_PATCHLEVEL`
|
||||
* `src/main/windows/version.rc`: `FILEVERSION`, `PRODUCTVERSION`,
|
||||
`FileVersion`, `ProductVersion`
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set first number in `DYLIB_CURRENT_VERSION` to
|
||||
(100 * *minor*) + 1
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to 0
|
||||
* if backwards compatibility has been broken,
|
||||
increase `DYLIB_COMPATIBILITY_VERSION` (?)
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
||||
|
||||
## New bugfix release
|
||||
|
||||
* Check that no new API/ABI was added
|
||||
|
||||
* If it was, do a new feature release (see above) instead
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
||||
|
||||
## After a feature release
|
||||
|
||||
* Create a branch like `release-2.24.x`
|
||||
|
||||
* Bump version number to 2.ODD.0 for next development branch
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* Same places as listed above
|
||||
* Assume that the next feature release will contain new API/ABI
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
## New development prerelease
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set first number in `DYLIB_CURRENT_VERSION` to
|
||||
(100 * *minor*) + *patchlevel* + 1
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to 0
|
||||
* if backwards compatibility has been broken,
|
||||
increase `DYLIB_COMPATIBILITY_VERSION` (?)
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@@ -51,6 +51,8 @@ assert can have unique static variables associated with it.
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
|
||||
@@ -584,6 +584,7 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
||||
* - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_SAMPLES_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_ANY_CHANGE`
|
||||
*
|
||||
* These flags specify how SDL should behave when a device cannot offer a
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "SDL_config_os2.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#include "SDL_config_emscripten.h"
|
||||
#elif defined(__NGAGE__)
|
||||
#include "SDL_config_ngage.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||
#include "SDL_config_minimal.h"
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
#cmakedefine HAVE_UNSETENV 1
|
||||
#endif
|
||||
#cmakedefine HAVE_QSORT 1
|
||||
#cmakedefine HAVE_BSEARCH 1
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_BCOPY 1
|
||||
#cmakedefine HAVE_MEMSET 1
|
||||
@@ -242,6 +243,7 @@
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
#cmakedefine HAVE_D3D12_H @HAVE_D3D12_H@
|
||||
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
@@ -259,7 +261,9 @@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#if @SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED@
|
||||
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
|
||||
#endif
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#cmakedefine SDL_ATOMIC_DISABLED @SDL_ATOMIC_DISABLED@
|
||||
@@ -374,6 +378,7 @@
|
||||
#cmakedefine SDL_THREAD_OS2 @SDL_THREAD_OS2@
|
||||
#cmakedefine SDL_THREAD_VITA @SDL_THREAD_VITA@
|
||||
#cmakedefine SDL_THREAD_PSP @SDL_THREAD_PSP@
|
||||
#cmakedefine SDL_THREAD_PS2 @SDL_THREAD_PS2@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
@@ -383,6 +388,7 @@
|
||||
#cmakedefine SDL_TIMER_OS2 @SDL_TIMER_OS2@
|
||||
#cmakedefine SDL_TIMER_VITA @SDL_TIMER_VITA@
|
||||
#cmakedefine SDL_TIMER_PSP @SDL_TIMER_PSP@
|
||||
#cmakedefine SDL_TIMER_PS2 @SDL_TIMER_PS2@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
@@ -420,28 +426,25 @@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES @SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XFIXES @SDL_VIDEO_DRIVER_X11_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VITA @SDL_VIDEO_DRIVER_VITA@
|
||||
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D12 @SDL_VIDEO_RENDER_D3D12@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
@@ -493,6 +496,7 @@
|
||||
#cmakedefine SDL_FILESYSTEM_OS2 @SDL_FILESYSTEM_OS2@
|
||||
#cmakedefine SDL_FILESYSTEM_VITA @SDL_FILESYSTEM_VITA@
|
||||
#cmakedefine SDL_FILESYSTEM_PSP @SDL_FILESYSTEM_PSP@
|
||||
#cmakedefine SDL_FILESYSTEM_PS2 @SDL_FILESYSTEM_PS2@
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#cmakedefine SDL_MISC_DUMMY @SDL_MISC_DUMMY@
|
||||
@@ -501,7 +505,6 @@
|
||||
#cmakedefine SDL_LOCALE_DUMMY @SDL_LOCALE_DUMMY@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
#undef HAVE_UNSETENV
|
||||
#endif
|
||||
#undef HAVE_QSORT
|
||||
#undef HAVE_BSEARCH
|
||||
#undef HAVE_ABS
|
||||
#undef HAVE_BCOPY
|
||||
#undef HAVE_MEMSET
|
||||
@@ -228,6 +229,8 @@
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBDECOR_H
|
||||
#undef HAVE_LSXINTRIN_H
|
||||
#undef HAVE_LASXINTRIN_H
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
@@ -387,22 +390,18 @@
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XDBE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
#undef SDL_VIDEO_DRIVER_X11_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
@@ -414,6 +413,7 @@
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
#undef SDL_VIDEO_RENDER_D3D12
|
||||
#undef SDL_VIDEO_RENDER_OGL
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||
@@ -460,6 +460,7 @@
|
||||
#undef SDL_FILESYSTEM_OS2
|
||||
#undef SDL_FILESYSTEM_VITA
|
||||
#undef SDL_FILESYSTEM_PSP
|
||||
#undef SDL_FILESYSTEM_PS2
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#undef SDL_MISC_DUMMY
|
||||
@@ -468,7 +469,6 @@
|
||||
#undef SDL_LOCALE_DUMMY
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
#undef SDL_ARM_SIMD_BLITTERS
|
||||
#undef SDL_ARM_NEON_BLITTERS
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
@@ -117,7 +118,7 @@
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
@@ -120,7 +121,7 @@
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
@@ -185,17 +186,13 @@
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_8
|
||||
@@ -272,7 +269,6 @@
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#ifdef __ppc__
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
89
include/SDL_config_ngage.h
Normal file
89
include/SDL_config_ngage.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_ngage_h_
|
||||
#define SDL_config_ngage_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define SDL_MAIN_NEEDED 1
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the N-Gage thread support (src/thread/ngage/\*.c) */
|
||||
#define SDL_THREAD_NGAGE 1
|
||||
|
||||
/* Enable the N-Gage timer support (src/timer/ngage/\*.c) */
|
||||
#define SDL_TIMER_NGAGE 1
|
||||
|
||||
/* Enable the N-Gage video driver (src/video/ngage/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_NGAGE 1
|
||||
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub HIDAPI */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
|
||||
#define SDL_SENSOR_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* SDL_config_ngage_h_ */
|
||||
@@ -56,9 +56,6 @@
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
/* use libsamplerate for audio rate conversion. */
|
||||
/*#define HAVE_LIBSAMPLERATE_H 1 */
|
||||
|
||||
@@ -105,7 +102,11 @@
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
/* OpenWatcom requires specific calling conventions for qsort and bsearch */
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#endif
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
@@ -38,6 +38,18 @@
|
||||
#include <winsdkver.h>
|
||||
#endif
|
||||
|
||||
/* sdkddkver.h defines more specific SDK version numbers. This is needed because older versions of the
|
||||
* Windows 10 SDK have broken declarations for the C API for DirectX 12. */
|
||||
#if !defined(HAVE_SDKDDKVER_H) && defined(__has_include)
|
||||
#if __has_include(<sdkddkver.h>)
|
||||
#define HAVE_SDKDDKVER_H 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SDKDDKVER_H
|
||||
#include <sdkddkver.h>
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
@@ -97,6 +109,7 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
|
||||
@@ -106,10 +119,14 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#endif
|
||||
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
|
||||
#define HAVE_D3D12_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
#define HAVE_SENSORSAPI_H 1
|
||||
#endif
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
@@ -136,7 +153,11 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
/* OpenWatcom requires specific calling conventions for qsort and bsearch */
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#endif
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
@@ -167,37 +188,40 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_TAN 1
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
@@ -217,8 +241,18 @@ typedef unsigned int uintptr_t;
|
||||
#if _MSC_VER >= 1400
|
||||
#define HAVE__FSEEKI64 1
|
||||
#endif
|
||||
#ifdef _USE_MATH_DEFINES
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#elif defined(__WATCOMC__)
|
||||
#define HAVE__FSEEKI64 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_TRUNC 1
|
||||
#else
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#else
|
||||
@@ -227,7 +261,9 @@ typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#if defined(HAVE_MMDEVICEAPI_H) && defined(HAVE_AUDIOCLIENT_H)
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#endif
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
@@ -248,7 +284,11 @@ typedef unsigned int uintptr_t;
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the sensor driver */
|
||||
#ifdef HAVE_SENSORSAPI_H
|
||||
#define SDL_SENSOR_WINDOWS 1
|
||||
#else
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#endif
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
@@ -270,6 +310,9 @@ typedef unsigned int uintptr_t;
|
||||
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
#if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H)
|
||||
#define SDL_VIDEO_RENDER_D3D12 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
@@ -300,11 +343,6 @@ typedef unsigned int uintptr_t;
|
||||
/* Enable filesystem support */
|
||||
#define SDL_FILESYSTEM_WINDOWS 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -123,6 +123,7 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
@@ -249,6 +250,9 @@ typedef unsigned int uintptr_t;
|
||||
/* Enable appropriate renderer(s) */
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
|
||||
/* Disable D3D12 as it's not implemented for WinRT */
|
||||
#define SDL_VIDEO_RENDER_D3D12 0
|
||||
|
||||
#if SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
@@ -256,9 +260,4 @@ typedef unsigned int uintptr_t;
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINRT 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_winrt_h_ */
|
||||
|
||||
@@ -98,6 +98,14 @@ _m_prefetch(void *__P)
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
|
||||
#include <lsxintrin.h>
|
||||
#define __LSX__
|
||||
#endif
|
||||
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
|
||||
#include <lasxintrin.h>
|
||||
#define __LASX__
|
||||
#endif
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
@@ -433,6 +441,32 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
|
||||
|
||||
/**
|
||||
* Get the amount of RAM configured in the system.
|
||||
*
|
||||
@@ -494,7 +528,7 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
@@ -518,7 +552,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,28 @@ _m_prefetch(void *__P)
|
||||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
#ifndef SDL_FLOATWORDORDER /* Not defined in SDL_config.h? */
|
||||
/* predefs from newer gcc versions: */
|
||||
#if defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
|
||||
#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#elif defined(__MAVERICK__)
|
||||
/* For Maverick, float words are always little-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
|
||||
/* For FPA, float words are always big-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
/* By default, assume that floats words follow the memory system mode. */
|
||||
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||
#endif /* __FLOAT_WORD_ORDER__ */
|
||||
#endif /* !SDL_FLOATWORDORDER */
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
||||
@@ -118,6 +118,7 @@ typedef enum
|
||||
SDL_JOYBUTTONUP, /**< Joystick button released */
|
||||
SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
|
||||
SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
|
||||
SDL_JOYBATTERYUPDATED, /**< Joystick battery level change */
|
||||
|
||||
/* Game controller events */
|
||||
SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
|
||||
@@ -395,6 +396,16 @@ typedef struct SDL_JoyDeviceEvent
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
||||
/**
|
||||
* \brief Joysick battery level change event structure (event.jbattery.*)
|
||||
*/
|
||||
typedef struct SDL_JoyBatteryEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBATTERYUPDATED */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
SDL_JoystickPowerLevel level; /**< The joystick battery level */
|
||||
} SDL_JoyBatteryEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller axis motion event structure (event.caxis.*)
|
||||
@@ -625,6 +636,7 @@ typedef union SDL_Event
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_JoyBatteryEvent jbattery; /**< Joystick battery event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
|
||||
@@ -289,6 +289,25 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path for the game controller.
|
||||
*
|
||||
* This function can be called before any controllers are opened.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the implementation-dependent path for the game controller, or NULL
|
||||
* if there is no path or the index is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GameControllerPath
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerPathForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the type of a game controller.
|
||||
*
|
||||
@@ -386,6 +405,23 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(in
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent path for an opened game controller.
|
||||
*
|
||||
* This is the same path as returned by SDL_GameControllerNameForIndex(), but
|
||||
* it takes a controller identifier instead of the (unstable) device index.
|
||||
*
|
||||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
* \returns the implementation dependent path for the game controller, or NULL
|
||||
* if there is no path or the identifier passed is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GameControllerPathForIndex
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerPath(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the type of this currently opened controller
|
||||
*
|
||||
@@ -457,6 +493,18 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the firmware version of an opened controller, if available.
|
||||
*
|
||||
* If the firmware version isn't available this function returns 0.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the controller firmware version, or zero if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened controller, if available.
|
||||
*
|
||||
|
||||
100
include/SDL_guid.h
Normal file
100
include/SDL_guid.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_guid.h
|
||||
*
|
||||
* Include file for handling ::SDL_GUID values.
|
||||
*/
|
||||
|
||||
#ifndef SDL_guid_h_
|
||||
#define SDL_guid_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An SDL_GUID is a 128-bit identifier for an input device that
|
||||
* identifies that device across runs of SDL programs on the same
|
||||
* platform. If the device is detached and then re-attached to a
|
||||
* different port, or if the base system is rebooted, the device
|
||||
* should still report the same GUID.
|
||||
*
|
||||
* GUIDs are as precise as possible but are not guaranteed to
|
||||
* distinguish physically distinct but equivalent devices. For
|
||||
* example, two game controllers from the same vendor with the same
|
||||
* product ID and revision may have the same GUID.
|
||||
*
|
||||
* GUIDs may be platform-dependent (i.e., the same device may report
|
||||
* different GUIDs on different operating systems).
|
||||
*/
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_GUID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given ::SDL_GUID.
|
||||
*
|
||||
* You should supply at least 33 bytes for pszGUID.
|
||||
*
|
||||
* \param guid the ::SDL_GUID you wish to convert to string
|
||||
* \param pszGUID buffer in which to write the ASCII string
|
||||
* \param cbGUID the size of pszGUID
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a GUID string into a ::SDL_GUID structure.
|
||||
*
|
||||
* Performs no error checking. If this function is given a string containing
|
||||
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||
* will not be useful.
|
||||
*
|
||||
* \param pchGUID string containing an ASCII representation of a GUID
|
||||
* \returns a ::SDL_GUID structure.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDToString
|
||||
*/
|
||||
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_guid_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -392,13 +392,14 @@ extern "C" {
|
||||
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
|
||||
* \brief A variable controlling verbosity of the logging of SDL events pushed onto the internal queue.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* This variable can be set to the following values, from least to most verbose:
|
||||
*
|
||||
* "0" - Don't log any events (default)
|
||||
* "1" - Log all events except mouse and finger motion, which are pretty spammy.
|
||||
* "2" - Log all events.
|
||||
* "1" - Log most events (other than the really spammy ones).
|
||||
* "2" - Include mouse and finger motion events.
|
||||
* "3" - Include SDL_SysWMEvent events.
|
||||
*
|
||||
* This is generally meant to be used to debug SDL itself, but can be useful
|
||||
* for application developers that need better visibility into what is going
|
||||
@@ -651,7 +652,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -662,7 +663,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -799,7 +800,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -808,7 +809,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -821,7 +822,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -830,7 +831,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether a separate thread should be used
|
||||
* for handling joystick detection and raw input messages on Windows
|
||||
*
|
||||
@@ -864,14 +865,32 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A comma separated list of devices to open as joysticks
|
||||
*
|
||||
* This variable is currently only used by the Linux joystick driver.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux will always treat 'hat' axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking whether they may be analog.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Only map hat axis inputs to digital hat outputs if the input axes appear to actually be digital (the default)
|
||||
* "1" - Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as digital hats
|
||||
*/
|
||||
#define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether digital hats on Linux will apply deadzones to their underlying input axes or use unfiltered values.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Return digital hat values based on unfiltered input axis values
|
||||
* "1" - Return digital hat values with deadzones on the input axes taken into account (the default)
|
||||
*/
|
||||
#define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -882,7 +901,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
@@ -1181,6 +1200,8 @@ extern "C" {
|
||||
*
|
||||
* This variable is case insensitive and can be set to the following values:
|
||||
* "direct3d"
|
||||
* "direct3d11"
|
||||
* "direct3d12"
|
||||
* "opengl"
|
||||
* "opengles2"
|
||||
* "opengles"
|
||||
@@ -1237,7 +1258,7 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
*
|
||||
@@ -1450,9 +1471,7 @@ extern "C" {
|
||||
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
||||
* button on their titlebars).
|
||||
*
|
||||
* The default value is "1". Spaces are disabled regardless of this hint if
|
||||
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
||||
* any windows are created.
|
||||
* The default value is "1". This hint must be set before any windows are created.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||
|
||||
@@ -1489,6 +1508,21 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether video mode emulation is enabled under Wayland.
|
||||
*
|
||||
* When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
|
||||
* If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
|
||||
* desktop, the native display resolution.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Video mode emulation is disabled.
|
||||
* "1" - Video mode emulation is enabled.
|
||||
*
|
||||
* By default video mode emulation is enabled.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
|
||||
|
||||
/**
|
||||
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
|
||||
*
|
||||
@@ -1590,13 +1624,11 @@ extern "C" {
|
||||
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 Xinerama extension should be used.
|
||||
* \brief A no-longer-used variable controlling whether the X11 Xinerama extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable Xinerama
|
||||
* "1" - Enable Xinerama
|
||||
*
|
||||
* By default SDL will use Xinerama if it is available.
|
||||
* Before SDL 2.0.24, this would let apps and users disable Xinerama support on X11.
|
||||
* Now SDL never uses Xinerama, and does not check for this hint at all.
|
||||
* The preprocessor define is left here for source compatibility.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
|
||||
|
||||
@@ -1607,18 +1639,16 @@ extern "C" {
|
||||
* "0" - Disable XRandR
|
||||
* "1" - Enable XRandR
|
||||
*
|
||||
* By default SDL will not use XRandR because of window manager issues.
|
||||
* By default SDL will use XRandR.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
||||
* \brief A no-longer-used variable controlling whether the X11 VidMode extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable XVidMode
|
||||
* "1" - Enable XVidMode
|
||||
*
|
||||
* By default SDL will use XVidMode if it is available.
|
||||
* Before SDL 2.0.24, this would let apps and users disable XVidMode support on X11.
|
||||
* Now SDL never uses XVidMode, and does not check for this hint at all.
|
||||
* The preprocessor define is left here for source compatibility.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
|
||||
|
||||
@@ -1778,6 +1808,57 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
|
||||
|
||||
/**
|
||||
* \brief Controls whether SDL will declare the process to be DPI aware.
|
||||
*
|
||||
* This hint must be set before initializing the video subsystem.
|
||||
*
|
||||
* The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with
|
||||
* a DPI scale factor.
|
||||
*
|
||||
* This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext)
|
||||
* and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel
|
||||
* even on high-DPI displays.
|
||||
*
|
||||
* For more information, see:
|
||||
* https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "" - Do not change the DPI awareness (default).
|
||||
* "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later).
|
||||
* "system" - Request system DPI awareness. (Vista and later).
|
||||
* "permonitor" - Request per-monitor DPI awareness. (Windows 8.1 and later).
|
||||
* "permonitorv2" - Request per-monitor V2 DPI awareness. (Windows 10, version 1607 and later).
|
||||
* The most visible difference from "permonitor" is that window title bar will be scaled
|
||||
* to the visually correct size when dragging between monitors with different scale factors.
|
||||
* This is the preferred DPI awareness level.
|
||||
*
|
||||
* If the requested DPI awareness is not available on the currently running OS, SDL will try to request the best
|
||||
* available match.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS"
|
||||
|
||||
/**
|
||||
* \brief Uses DPI-scaled points as the SDL coordinate system on Windows.
|
||||
*
|
||||
* This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere.
|
||||
* This means windows will be appropriately sized, even when created on high-DPI displays with scaling.
|
||||
*
|
||||
* e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings,
|
||||
* will create a window with an 800x600 client area (in pixels).
|
||||
*
|
||||
* Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary),
|
||||
* and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging
|
||||
* between monitors with different scale factors (unless this is performed by
|
||||
* Windows itself, which is the case when the process is DPI unaware).
|
||||
* "1" - SDL coordinates are in DPI-scaled points. Automatically resize windows as needed on
|
||||
* displays with non-100% scale factors.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||
*
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_guid.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@@ -69,9 +70,7 @@ struct _SDL_Joystick;
|
||||
typedef struct _SDL_Joystick SDL_Joystick;
|
||||
|
||||
/* A structure that encodes the stable unique id for a joystick device */
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_JoystickGUID;
|
||||
typedef SDL_GUID SDL_JoystickGUID;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a joystick for the time it is connected to the system,
|
||||
@@ -153,6 +152,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
@@ -174,6 +174,23 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system)
|
||||
* \returns the path of the selected joystick. If no path can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPathForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the player index of a joystick, or -1 if it's not available This can be
|
||||
* called before any joysticks are opened.
|
||||
@@ -330,6 +347,54 @@ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
int nbuttons,
|
||||
int nhats);
|
||||
|
||||
/**
|
||||
* The structure that defines an extended virtual joystick description
|
||||
*
|
||||
* The caller must zero the structure and then initialize the version with `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` before passing it to SDL_JoystickAttachVirtualEx()
|
||||
* All other elements of this structure are optional and can be left 0.
|
||||
*
|
||||
* \sa SDL_JoystickAttachVirtualEx
|
||||
*/
|
||||
typedef struct SDL_VirtualJoystickDesc
|
||||
{
|
||||
Uint16 version; /**< `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` */
|
||||
Uint16 type; /**< `SDL_JoystickType` */
|
||||
Uint16 naxes; /**< the number of axes on this joystick */
|
||||
Uint16 nbuttons; /**< the number of buttons on this joystick */
|
||||
Uint16 nhats; /**< the number of hats on this joystick */
|
||||
Uint16 vendor_id; /**< the USB vendor ID of this joystick */
|
||||
Uint16 product_id; /**< the USB product ID of this joystick */
|
||||
Uint16 padding; /**< unused */
|
||||
Uint32 button_mask; /**< A mask of which buttons are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_BUTTON_A) */
|
||||
Uint32 axis_mask; /**< A mask of which axes are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_AXIS_LEFTX) */
|
||||
const char *name; /**< the name of the joystick */
|
||||
|
||||
void *userdata; /**< User data pointer passed to callbacks */
|
||||
void (SDLCALL *Update)(void *userdata); /**< Called when the joystick state should be updated */
|
||||
void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index); /**< Called when the player index is set */
|
||||
int (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); /**< Implements SDL_JoystickRumble() */
|
||||
int (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); /**< Implements SDL_JoystickRumbleTriggers() */
|
||||
int (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); /**< Implements SDL_JoystickSetLED() */
|
||||
int (SDLCALL *SendEffect)(void *userdata, const void *data, int size); /**< Implements SDL_JoystickSendEffect() */
|
||||
|
||||
} SDL_VirtualJoystickDesc;
|
||||
|
||||
/**
|
||||
* \brief The current version of the SDL_VirtualJoystickDesc structure
|
||||
*/
|
||||
#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1
|
||||
|
||||
/**
|
||||
* Attach a new virtual joystick with extended properties.
|
||||
*
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc);
|
||||
|
||||
/**
|
||||
* Detach a virtual joystick.
|
||||
*
|
||||
@@ -419,6 +484,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, in
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the path of the selected joystick. If no path can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_JoystickPathForIndex
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPath(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick.
|
||||
*
|
||||
@@ -495,6 +573,19 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the firmware version of an opened joystick, if available.
|
||||
*
|
||||
* If the firmware version isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the firmware version of the selected joystick, or 0 if
|
||||
* unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened joystick, if available.
|
||||
*
|
||||
|
||||
@@ -318,7 +318,12 @@ typedef enum
|
||||
SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
|
||||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD),
|
||||
|
||||
SDLK_SOFTLEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT),
|
||||
SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT),
|
||||
SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL),
|
||||
SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
|
||||
} SDL_KeyCode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,9 +47,9 @@ extern "C" {
|
||||
|
||||
|
||||
/**
|
||||
* \brief The maximum size of a log message
|
||||
* \brief The maximum size of a log message prior to SDL 2.0.24
|
||||
*
|
||||
* Messages longer than the maximum size will be truncated
|
||||
* As of 2.0.24 there is no limit to the length of SDL log messages.
|
||||
*/
|
||||
#define SDL_MAX_LOG_MESSAGE 4096
|
||||
|
||||
|
||||
@@ -65,11 +65,15 @@
|
||||
#undef __LINUX__ /* do we need to do this? */
|
||||
#define __ANDROID__ 1
|
||||
#endif
|
||||
#if defined(__NGAGE__)
|
||||
#undef __NGAGE__
|
||||
#define __NGAGE__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
#include "AvailabilityMacros.h"
|
||||
#include "TargetConditionals.h"
|
||||
#include <AvailabilityMacros.h>
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
/* Fix building with older SDKs that don't define these
|
||||
See this for more information:
|
||||
@@ -104,9 +108,9 @@
|
||||
/* if not compiling for iOS */
|
||||
#undef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
# error SDL for Mac OS X only supports deploying on 10.6 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
# error SDL for Mac OS X only supports deploying on 10.7 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1070 */
|
||||
#endif /* TARGET_OS_IPHONE */
|
||||
#endif /* defined(__APPLE__) */
|
||||
|
||||
@@ -179,6 +183,9 @@
|
||||
#undef __PSP__
|
||||
#define __PSP__ 1
|
||||
#endif
|
||||
#if defined(PS2)
|
||||
#define __PS2__ 1
|
||||
#endif
|
||||
|
||||
/* The NACL compiler defines __native_client__ and __pnacl__
|
||||
* Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
|
||||
|
||||
@@ -252,10 +252,10 @@ SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
|
||||
{
|
||||
return (a && b && ((a == b) ||
|
||||
((SDL_fabs(a->x - b->x) <= epsilon) &&
|
||||
(SDL_fabs(a->y - b->y) <= epsilon) &&
|
||||
(SDL_fabs(a->w - b->w) <= epsilon) &&
|
||||
(SDL_fabs(a->h - b->h) <= epsilon))))
|
||||
((SDL_fabsf(a->x - b->x) <= epsilon) &&
|
||||
(SDL_fabsf(a->y - b->y) <= epsilon) &&
|
||||
(SDL_fabsf(a->w - b->w) <= epsilon) &&
|
||||
(SDL_fabsf(a->h - b->h) <= epsilon))))
|
||||
? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -825,9 +825,13 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
|
||||
/**
|
||||
* Get device independent resolution for rendering.
|
||||
*
|
||||
* This may return 0 for `w` and `h` if the SDL_Renderer has never had its
|
||||
* logical size set by SDL_RenderSetLogicalSize() and never had a render
|
||||
* target set.
|
||||
* When using the main rendering target (eg no target texture is set): this
|
||||
* may return 0 for `w` and `h` if the SDL_Renderer has never had its logical
|
||||
* size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical
|
||||
* width and height.
|
||||
*
|
||||
* When using a target texture: Never return 0 for `w` and `h` at first. Then
|
||||
* it returns the logical width and height that are set.
|
||||
*
|
||||
* \param renderer a rendering context
|
||||
* \param w an int to be filled with the width
|
||||
@@ -1017,19 +1021,23 @@ extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
|
||||
int windowX, int windowY,
|
||||
float *logicalX, float *logicalY);
|
||||
|
||||
/**
|
||||
* Get real coordinates of point in window when given logical coordinates of point in renderer.
|
||||
* Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
|
||||
*
|
||||
* \param renderer the renderer from which the window coordinates should be calculated
|
||||
|
||||
/**
|
||||
* Get real coordinates of point in window when given logical coordinates of
|
||||
* point in renderer.
|
||||
*
|
||||
* Logical coordinates will differ from real coordinates when render is scaled
|
||||
* and logical renderer size set
|
||||
*
|
||||
* \param renderer the renderer from which the window coordinates should be
|
||||
* calculated
|
||||
* \param logicalX the logical x coordinate
|
||||
* \param logicalY the logical y coordinate
|
||||
* \param windowX the pointer filled with the real X coordinate in the window
|
||||
* \param windowY the pointer filled with the real Y coordinate in the window
|
||||
|
||||
*
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
*
|
||||
* \sa SDL_RenderGetScale
|
||||
* \sa SDL_RenderSetScale
|
||||
* \sa SDL_RenderGetLogicalSize
|
||||
|
||||
@@ -45,9 +45,6 @@ extern "C" {
|
||||
#define SDL_RWOPS_JNIFILE 3U /**< Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4U /**< Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
|
||||
#if defined(__VITA__)
|
||||
#define SDL_RWOPS_VITAFILE 6U /**< Vita file */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is the read/write operation structure -- very basic.
|
||||
@@ -113,17 +110,6 @@ typedef struct SDL_RWops
|
||||
size_t left;
|
||||
} buffer;
|
||||
} windowsio;
|
||||
#elif defined(__VITA__)
|
||||
struct
|
||||
{
|
||||
int h;
|
||||
struct
|
||||
{
|
||||
void *data;
|
||||
size_t size;
|
||||
size_t left;
|
||||
} buffer;
|
||||
} vitaio;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
|
||||
@@ -402,6 +402,26 @@ typedef enum
|
||||
|
||||
/* @} *//* Usage page 0x0C (additional media keys) */
|
||||
|
||||
/**
|
||||
* \name Mobile keys
|
||||
*
|
||||
* These are values that are often used on mobile phones.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_SOFTLEFT = 287, /**< Usually situated below the display on phones and
|
||||
used as a multi-function feature key for selecting
|
||||
a software defined function shown on the bottom left
|
||||
of the display. */
|
||||
SDL_SCANCODE_SOFTRIGHT = 288, /**< Usually situated below the display on phones and
|
||||
used as a multi-function feature key for selecting
|
||||
a software defined function shown on the bottom right
|
||||
of the display. */
|
||||
SDL_SCANCODE_CALL = 289, /**< Used for accepting phone calls. */
|
||||
SDL_SCANCODE_ENDCALL = 290, /**< Used for rejecting phone calls. */
|
||||
|
||||
/* @} *//* Mobile keys */
|
||||
|
||||
/* Add any other keys here. */
|
||||
|
||||
SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
|
||||
|
||||
@@ -115,6 +115,12 @@ char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SIZE_MAX
|
||||
# define SDL_SIZE_MAX SIZE_MAX
|
||||
#else
|
||||
# define SDL_SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if the compiler supports a given builtin.
|
||||
* Supported by virtually all clang versions and recent gcc. Use this
|
||||
@@ -462,7 +468,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
|
||||
extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (SDLCALL *compare) (const void *, const void *));
|
||||
extern DECLSPEC void * SDLCALL SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (SDLCALL *compare) (const void *, const void *));
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_abs(int x);
|
||||
|
||||
@@ -554,6 +561,7 @@ extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
|
||||
extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strnlen(const char *str, size_t bytes);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
|
||||
@@ -727,6 +735,65 @@ SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_B
|
||||
return SDL_memcpy(dst, src, dwords * 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* If a * b would overflow, return -1. Otherwise store a * b via ret
|
||||
* and return 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int SDL_size_mul_overflow (size_t a,
|
||||
size_t b,
|
||||
size_t *ret)
|
||||
{
|
||||
if (a != 0 && b > SDL_SIZE_MAX / a) {
|
||||
return -1;
|
||||
}
|
||||
*ret = a * b;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if _SDL_HAS_BUILTIN(__builtin_mul_overflow)
|
||||
/* This needs to be wrapped in an inline rather than being a direct #define,
|
||||
* because __builtin_mul_overflow() is type-generic, but we want to be
|
||||
* consistent about interpreting a and b as size_t. */
|
||||
SDL_FORCE_INLINE int _SDL_size_mul_overflow_builtin (size_t a,
|
||||
size_t b,
|
||||
size_t *ret)
|
||||
{
|
||||
return __builtin_mul_overflow(a, b, ret) == 0 ? 0 : -1;
|
||||
}
|
||||
#define SDL_size_mul_overflow(a, b, ret) (_SDL_size_mul_overflow_builtin(a, b, ret))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If a + b would overflow, return -1. Otherwise store a + b via ret
|
||||
* and return 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int SDL_size_add_overflow (size_t a,
|
||||
size_t b,
|
||||
size_t *ret)
|
||||
{
|
||||
if (b > SDL_SIZE_MAX - a) {
|
||||
return -1;
|
||||
}
|
||||
*ret = a + b;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if _SDL_HAS_BUILTIN(__builtin_add_overflow)
|
||||
/* This needs to be wrapped in an inline rather than being a direct #define,
|
||||
* the same as the call to __builtin_mul_overflow() above. */
|
||||
SDL_FORCE_INLINE int _SDL_size_add_overflow_builtin (size_t a,
|
||||
size_t b,
|
||||
size_t *ret)
|
||||
{
|
||||
return __builtin_add_overflow(a, b, ret) == 0 ? 0 : -1;
|
||||
}
|
||||
#define SDL_size_add_overflow(a, b, ret) (_SDL_size_add_overflow_builtin(a, b, ret))
|
||||
#endif
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -102,6 +102,22 @@ typedef struct ID3D11Device ID3D11Device;
|
||||
*/
|
||||
extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
|
||||
|
||||
typedef struct ID3D12Device ID3D12Device;
|
||||
|
||||
/**
|
||||
* Get the D3D12 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D12 device
|
||||
* \returns the D3D12 device associated with given renderer or NULL if it is
|
||||
* not a D3D12 renderer; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC ID3D12Device* SDLCALL SDL_RenderGetD3D12Device(SDL_Renderer* renderer);
|
||||
|
||||
/**
|
||||
* Get the DXGI Adapter and Output indices for the specified display index.
|
||||
*
|
||||
@@ -178,7 +194,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID,
|
||||
* This function is only available on Apple iOS.
|
||||
*
|
||||
* For more information see:
|
||||
* [README-ios.md](https://hg.libsdl.org/SDL/file/default/docs/README-ios.md)
|
||||
* https://github.com/libsdl-org/SDL/blob/main/docs/README-ios.md
|
||||
*
|
||||
* This functions is also accessible using the macro
|
||||
* SDL_iOSSetAnimationCallback() since SDL 2.0.4.
|
||||
@@ -195,7 +211,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID,
|
||||
*
|
||||
* \sa SDL_iPhoneSetEventPump
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
|
||||
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (SDLCALL *callback)(void*), void *callbackParam);
|
||||
|
||||
#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
|
||||
|
||||
@@ -532,7 +548,7 @@ extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path
|
||||
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||
|
||||
/**
|
||||
* Detects the device family of WinRT plattform at runtime.
|
||||
* Detects the device family of WinRT platform at runtime.
|
||||
*
|
||||
* \returns a value from the SDL_WinRT_DeviceFamily enum.
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user