mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 09:11:09 +01:00
Compare commits
483 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53dea98309 | ||
|
|
981e1e3c44 | ||
|
|
7a5743031d | ||
|
|
fa073ed01a | ||
|
|
8986efd643 | ||
|
|
2ca0837888 | ||
|
|
04bf7c9434 | ||
|
|
d9b5805ba5 | ||
|
|
0288de8529 | ||
|
|
ba62ead5ec | ||
|
|
145824f6ab | ||
|
|
00b2e10a7a | ||
|
|
8982d9f403 | ||
|
|
923cb4463e | ||
|
|
d4a01bfef0 | ||
|
|
a40405d724 | ||
|
|
5bc2933425 | ||
|
|
fc944859d1 | ||
|
|
00feca27b0 | ||
|
|
5d4a1f8356 | ||
|
|
aeadbdd788 | ||
|
|
c8c59a2139 | ||
|
|
d9009388c8 | ||
|
|
3753a7b1c3 | ||
|
|
02225aa738 | ||
|
|
49a2e4b0ea | ||
|
|
b9fe6ba0e7 | ||
|
|
57927a2458 | ||
|
|
1ede941f5c | ||
|
|
9919d1a7a5 | ||
|
|
009a0ff95f | ||
|
|
de711e1685 | ||
|
|
7c140429a8 | ||
|
|
e7b01ee745 | ||
|
|
2b52946143 | ||
|
|
c37090f9a4 | ||
|
|
9e264b921b | ||
|
|
254fcc90eb | ||
|
|
c1336b21ed | ||
|
|
634b9edc7f | ||
|
|
dc5bc5237c | ||
|
|
67e0f546c5 | ||
|
|
edb473cf46 | ||
|
|
13393a1c4b | ||
|
|
0adb67017b | ||
|
|
01b14e14e6 | ||
|
|
55a4e1d336 | ||
|
|
c36bd78474 | ||
|
|
46616af722 | ||
|
|
9c2f46b0d5 | ||
|
|
99ae6395b1 | ||
|
|
68b6fff245 | ||
|
|
b4256d03e9 | ||
|
|
c2946902fa | ||
|
|
f708cebe10 | ||
|
|
b75996138a | ||
|
|
b1831715a2 | ||
|
|
727eef7064 | ||
|
|
505d6a4a05 | ||
|
|
a256e6ba7f | ||
|
|
6d7d142b70 | ||
|
|
c2093fab99 | ||
|
|
ba0ba9ef16 | ||
|
|
cb81630816 | ||
|
|
5613a56032 | ||
|
|
2823534fef | ||
|
|
49b9e3470b | ||
|
|
85977354fb | ||
|
|
6dbca7c911 | ||
|
|
64c7896f09 | ||
|
|
d1f7f9e35d | ||
|
|
279aeb59be | ||
|
|
3ada694e62 | ||
|
|
dcfb7fff00 | ||
|
|
7ea1b69dd4 | ||
|
|
0249df9d96 | ||
|
|
eb660e862c | ||
|
|
138d96c8a6 | ||
|
|
8bae343f25 | ||
|
|
268c2fa882 | ||
|
|
def27267b5 | ||
|
|
ff5b67e5e0 | ||
|
|
27fc582b59 | ||
|
|
86acb1a347 | ||
|
|
0e198a8799 | ||
|
|
006a5a9e03 | ||
|
|
a5672b858e | ||
|
|
45372b1c27 | ||
|
|
7b3449b89f | ||
|
|
6cd444f0fa | ||
|
|
57118fb7de | ||
|
|
312c899f4f | ||
|
|
c0bb39e5e9 | ||
|
|
575dadb11d | ||
|
|
8ebef12d31 | ||
|
|
1c9299b00d | ||
|
|
78834b50d6 | ||
|
|
ad6bc521bd | ||
|
|
0d7edcb703 | ||
|
|
ea7d5307ac | ||
|
|
fe79eb2fbb | ||
|
|
268cc2a49c | ||
|
|
3136a53070 | ||
|
|
404158595c | ||
|
|
4dca8f7fb4 | ||
|
|
1c7bf478ae | ||
|
|
db718998bd | ||
|
|
95c0fec518 | ||
|
|
b5700ab31e | ||
|
|
8e5adc62eb | ||
|
|
8c542a3591 | ||
|
|
2c04df8d65 | ||
|
|
7e15ad2fc4 | ||
|
|
3425e9950e | ||
|
|
cbdb67b4f6 | ||
|
|
178ac19615 | ||
|
|
4d1905c9b6 | ||
|
|
fa4c51989d | ||
|
|
d875416ac4 | ||
|
|
4d76c9cb46 | ||
|
|
aec86ba8bb | ||
|
|
96be9cddcc | ||
|
|
1db47d468a | ||
|
|
a60986caa8 | ||
|
|
6d1c3cd691 | ||
|
|
95ed83137f | ||
|
|
2591f7e39c | ||
|
|
7ba4d24c25 | ||
|
|
0dcfa92e4c | ||
|
|
6529bf3de7 | ||
|
|
0bc9e243b9 | ||
|
|
7bc498d325 | ||
|
|
a630b02938 | ||
|
|
713a675401 | ||
|
|
5655be1558 | ||
|
|
40417b188a | ||
|
|
94ed6b0a54 | ||
|
|
5acb4b70ab | ||
|
|
26bfee8578 | ||
|
|
beecae31f6 | ||
|
|
d6122704e8 | ||
|
|
7a1c45bd1c | ||
|
|
69d0b6e3c6 | ||
|
|
bf38fd4679 | ||
|
|
2891f0821b | ||
|
|
6d9ca92626 | ||
|
|
a75c6150e0 | ||
|
|
ee96407edf | ||
|
|
ab74b6a3c3 | ||
|
|
ee52ad08cd | ||
|
|
b4d28085bf | ||
|
|
d5bbbd3f73 | ||
|
|
d597a9b431 | ||
|
|
6c56193a2a | ||
|
|
2398c43be2 | ||
|
|
4fe7b2cbd1 | ||
|
|
eadc064e2c | ||
|
|
0af2db6f29 | ||
|
|
0dae35bf3d | ||
|
|
9125b244e7 | ||
|
|
13337e17a5 | ||
|
|
f3ff0c568e | ||
|
|
2a4e0f8fd0 | ||
|
|
c23a7ad38a | ||
|
|
57df1dfce6 | ||
|
|
f5a980448e | ||
|
|
006aafabcf | ||
|
|
8df045cc7d | ||
|
|
4b8d69a416 | ||
|
|
25203222f5 | ||
|
|
aec58d8208 | ||
|
|
b59ca92e82 | ||
|
|
b944dc8f2e | ||
|
|
2302b2d5e5 | ||
|
|
83df4a354e | ||
|
|
f782abe5f0 | ||
|
|
34fd83ca06 | ||
|
|
74680f5c4c | ||
|
|
dd6c46cb34 | ||
|
|
9dc201d448 | ||
|
|
7f1feee02a | ||
|
|
2b3c16eb5b | ||
|
|
24ffcbd9ad | ||
|
|
8f964576da | ||
|
|
0517b61ed6 | ||
|
|
b559a4accc | ||
|
|
a485ffc3c8 | ||
|
|
d81fee7623 | ||
|
|
4d9bef604a | ||
|
|
c573ebe143 | ||
|
|
fbbd0270eb | ||
|
|
aef1e56737 | ||
|
|
40b7326b38 | ||
|
|
6c96217727 | ||
|
|
d3cc5764c0 | ||
|
|
1868c5b521 | ||
|
|
3167ba342d | ||
|
|
0387bf821a | ||
|
|
5ff42438e3 | ||
|
|
09b8152fae | ||
|
|
b22ce2b5a8 | ||
|
|
d406278513 | ||
|
|
4e784fce43 | ||
|
|
e5f45455c9 | ||
|
|
4e49b78a11 | ||
|
|
0bf8ccfb60 | ||
|
|
ecaa22cbe6 | ||
|
|
3318590796 | ||
|
|
829e15a490 | ||
|
|
a164c9d245 | ||
|
|
cc152103ba | ||
|
|
e8c3ff56e0 | ||
|
|
bcb0f1de23 | ||
|
|
01bfde4520 | ||
|
|
01663238dc | ||
|
|
f0d2747df1 | ||
|
|
dfbe1f7248 | ||
|
|
b2db570ce9 | ||
|
|
93e7caab9a | ||
|
|
56568ffb38 | ||
|
|
1c1f5c180f | ||
|
|
2c6a9c5194 | ||
|
|
85dff3e453 | ||
|
|
123b9aaa41 | ||
|
|
5905696e66 | ||
|
|
61a93d3c46 | ||
|
|
d1e4367f58 | ||
|
|
1ee196b483 | ||
|
|
90b13e1488 | ||
|
|
c44966b78b | ||
|
|
f3e86b9fd3 | ||
|
|
67848b6531 | ||
|
|
3bebdaccb7 | ||
|
|
7c421fec16 | ||
|
|
363c36781d | ||
|
|
7495b98141 | ||
|
|
0ad606b48d | ||
|
|
ecc1c871e6 | ||
|
|
ee6bfcdd66 | ||
|
|
3ab739afff | ||
|
|
072db7b005 | ||
|
|
229297d97f | ||
|
|
d14a126383 | ||
|
|
9de97e19cc | ||
|
|
afb0606f5a | ||
|
|
50575aa184 | ||
|
|
677dc1015c | ||
|
|
bf69868924 | ||
|
|
01d38e7ade | ||
|
|
09b652b70a | ||
|
|
c6eef542ab | ||
|
|
911ba8d343 | ||
|
|
ea5b482bff | ||
|
|
45833a148d | ||
|
|
a4a80c8607 | ||
|
|
04256a5372 | ||
|
|
0983fcee5e | ||
|
|
3f8b450de2 | ||
|
|
ce1883e1e7 | ||
|
|
14db417e12 | ||
|
|
c3ca3445bd | ||
|
|
6a787619e6 | ||
|
|
b064ad6ac5 | ||
|
|
1b7669374e | ||
|
|
41e7d1baa6 | ||
|
|
f03215bc70 | ||
|
|
b2463a917c | ||
|
|
bdafe1e049 | ||
|
|
2e801b1ae7 | ||
|
|
232c3556ac | ||
|
|
ae73ea9c07 | ||
|
|
13756b5c72 | ||
|
|
2f7b885df9 | ||
|
|
b7f8117d40 | ||
|
|
550b8377bc | ||
|
|
98353533e5 | ||
|
|
af40cb6f00 | ||
|
|
669a7f8552 | ||
|
|
4a43321c81 | ||
|
|
94d43186f2 | ||
|
|
b946e31ec8 | ||
|
|
60ddb74cfe | ||
|
|
08d27dfd7b | ||
|
|
293a0aa80e | ||
|
|
9299a3e796 | ||
|
|
978fbc3250 | ||
|
|
6c531c4334 | ||
|
|
d90bd261f3 | ||
|
|
9d86ec8573 | ||
|
|
ceb09ee740 | ||
|
|
18032979d8 | ||
|
|
75ffa24e3a | ||
|
|
61abc4e5b6 | ||
|
|
18b76fcc5d | ||
|
|
e366ad1288 | ||
|
|
66ee79bd68 | ||
|
|
f97a29f6e1 | ||
|
|
85e6500065 | ||
|
|
4cb6181808 | ||
|
|
a75041e8dd | ||
|
|
abc8198a1f | ||
|
|
5b41844c75 | ||
|
|
3a9bbf604e | ||
|
|
59f1e2875a | ||
|
|
228db35287 | ||
|
|
9da9e85cba | ||
|
|
5b36a527ed | ||
|
|
48b4d1c412 | ||
|
|
67f12ede3b | ||
|
|
54304b971d | ||
|
|
2b572dff88 | ||
|
|
2df2da11f6 | ||
|
|
1fc5dba3d5 | ||
|
|
7935cfacc5 | ||
|
|
9b817248c5 | ||
|
|
f185711203 | ||
|
|
68dd84f1de | ||
|
|
94e5c3f30e | ||
|
|
580d231822 | ||
|
|
e7e44df039 | ||
|
|
34d4f5b14e | ||
|
|
8ce003a42c | ||
|
|
14bc3bf4ec | ||
|
|
53091e36a3 | ||
|
|
66866249a2 | ||
|
|
0cb39ed468 | ||
|
|
b0dd4c7d36 | ||
|
|
90f0d2ce49 | ||
|
|
423feac69b | ||
|
|
9403543671 | ||
|
|
3c9ac4489e | ||
|
|
686a0f3456 | ||
|
|
6d5592a201 | ||
|
|
e8c48981f9 | ||
|
|
5c4fff7f63 | ||
|
|
c8cee0b8ca | ||
|
|
b5614d0c6e | ||
|
|
c93e552068 | ||
|
|
050a5e1a15 | ||
|
|
c459eceee1 | ||
|
|
3b9e6c1cec | ||
|
|
86b7a0642f | ||
|
|
dd69c28d6f | ||
|
|
b59e75c259 | ||
|
|
2005dd9595 | ||
|
|
2cfc83eab7 | ||
|
|
3bef4a5da6 | ||
|
|
b5c5052608 | ||
|
|
19df4af2aa | ||
|
|
ecd922b5cf | ||
|
|
df0d696a62 | ||
|
|
87b02d3795 | ||
|
|
daea9fa19e | ||
|
|
ff5f5d0ef4 | ||
|
|
ec632aba15 | ||
|
|
220a9596f3 | ||
|
|
9e46a512b1 | ||
|
|
b11dfd7611 | ||
|
|
a90a2e7582 | ||
|
|
03c4405b3b | ||
|
|
e1cf8d8748 | ||
|
|
4fa21dd65b | ||
|
|
d46cc18afc | ||
|
|
d224a63bda | ||
|
|
61b6a2cad4 | ||
|
|
fe2ed6cf6f | ||
|
|
97269e143d | ||
|
|
6f404d0f04 | ||
|
|
ec8e3104c8 | ||
|
|
0b34f18045 | ||
|
|
f7d3abddba | ||
|
|
8b139e26a3 | ||
|
|
a5c610b0a3 | ||
|
|
43f0271b4e | ||
|
|
a70bb259c7 | ||
|
|
47ddb04e17 | ||
|
|
2eafe4340c | ||
|
|
3939ef72f8 | ||
|
|
113109f839 | ||
|
|
f91211eb17 | ||
|
|
c9e8d1573a | ||
|
|
1043dd8c0d | ||
|
|
e2f70a2dff | ||
|
|
32c7d5d352 | ||
|
|
25aa7244dc | ||
|
|
60deadba59 | ||
|
|
ebdd536676 | ||
|
|
4a17612bff | ||
|
|
0770c5829c | ||
|
|
e0236c02ce | ||
|
|
0dda8a7f4c | ||
|
|
6fcfcc3d6f | ||
|
|
3c85cef46c | ||
|
|
0af391cbe9 | ||
|
|
ff2d62d89f | ||
|
|
a633a3c33e | ||
|
|
398f9a0e40 | ||
|
|
fa8075c4fc | ||
|
|
39c723fc9c | ||
|
|
3dba2a73f1 | ||
|
|
014e2bbdb2 | ||
|
|
3936af99d8 | ||
|
|
21510387cf | ||
|
|
95f30c7a48 | ||
|
|
11cdde01f3 | ||
|
|
176941a4fb | ||
|
|
b1b2ad725c | ||
|
|
eb80f2c65a | ||
|
|
65e9415b98 | ||
|
|
ea8cf4bd0f | ||
|
|
118de86202 | ||
|
|
606d2ea87f | ||
|
|
998117b3ff | ||
|
|
942b01a54c | ||
|
|
739f350f45 | ||
|
|
bf66720a4d | ||
|
|
905e2e22ef | ||
|
|
d7110b4490 | ||
|
|
e11ba0f5d9 | ||
|
|
f5911bdc59 | ||
|
|
096fe37bb2 | ||
|
|
a988ce5544 | ||
|
|
7bf8c5a388 | ||
|
|
5b74459255 | ||
|
|
19ae71b2db | ||
|
|
d7e0c54dde | ||
|
|
cc40f732f9 | ||
|
|
3044310518 | ||
|
|
77a9ca6ba0 | ||
|
|
c6ec5a07f1 | ||
|
|
f37e4a94d3 | ||
|
|
71e06a536a | ||
|
|
8ceba27d62 | ||
|
|
68a71f91c6 | ||
|
|
84320266f2 | ||
|
|
f0e768da43 | ||
|
|
8c660ccb6f | ||
|
|
e2d74bcbe5 | ||
|
|
ca22b30e46 | ||
|
|
57bc90403e | ||
|
|
d7873e656b | ||
|
|
15ebad6e7d | ||
|
|
99af3281ee | ||
|
|
53df0e6619 | ||
|
|
8f8b14cbb6 | ||
|
|
d2456b6e4c | ||
|
|
67cb548bef | ||
|
|
a23b3c767f | ||
|
|
e1b4761c62 | ||
|
|
ed3442d7a5 | ||
|
|
426c1f4b85 | ||
|
|
b3984df1c6 | ||
|
|
381520ad92 | ||
|
|
a0e3c884d4 | ||
|
|
1bfefb5b4d | ||
|
|
a575e2cf5e | ||
|
|
33dadbf137 | ||
|
|
d3952a8a2c | ||
|
|
b06866ef97 | ||
|
|
09aed1020b | ||
|
|
85961b61a1 | ||
|
|
2a0cde8fd5 | ||
|
|
1a50334c46 | ||
|
|
e9511f7136 | ||
|
|
9a2bbd8acb | ||
|
|
0abc0a6f32 | ||
|
|
d37c9777b9 | ||
|
|
bff867013e | ||
|
|
094e94402d | ||
|
|
407d4e470a | ||
|
|
f199f832e9 | ||
|
|
5b6e2d69a5 | ||
|
|
ae9e2149a5 | ||
|
|
42302d0a59 | ||
|
|
f9b918ff40 | ||
|
|
bb9ebad74b | ||
|
|
fcf0e524bb | ||
|
|
73434a964c | ||
|
|
c3a7cc34fb | ||
|
|
ea0bca573d | ||
|
|
7527c8d3d7 | ||
|
|
c6c4d4211b | ||
|
|
b265677610 |
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@@ -15,11 +15,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
|
||||
- { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
|
||||
- { name: Windows (clang-cl x64), os: windows-latest, shell: pwsh, flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), os: windows-latest, shell: pwsh, flags: -T ClangCL -A Win32 }
|
||||
- { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
|
||||
- { 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 }
|
||||
@@ -84,5 +79,5 @@ jobs:
|
||||
- name: Configure CMake
|
||||
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
||||
- name: Build
|
||||
run: cmake --build build/
|
||||
run: cmake --build build/ --config Release
|
||||
|
||||
|
||||
33
.github/workflows/msvc.yml
vendored
Normal file
33
.github/workflows/msvc.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Build (MSVC)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
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 (clang-cl x64), flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
|
||||
- { 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' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
||||
- name: Build CMake
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||
30
.github/workflows/os2.yml
vendored
30
.github/workflows/os2.yml
vendored
@@ -7,20 +7,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache OpenWatcom
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-openwatcom
|
||||
with:
|
||||
path: ~/openwatcom
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}
|
||||
|
||||
- name: Download OpenWatcom if not cached
|
||||
run: if [ ! -d ~/openwatcom/binl64 ]; then wget --no-verbose 'https://github.com/open-watcom/open-watcom-v2/releases/download/Current-build/open-watcom-2_0-c-linux-x64' -O ~/ow.zip && mkdir -p ~/openwatcom && cd ~/openwatcom && unzip ~/ow.zip && chmod -R a+rx ~/openwatcom ; fi
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: WATCOM="$HOME/openwatcom" build-scripts/os2-buildbot.sh
|
||||
shell: bash
|
||||
|
||||
- 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 ..
|
||||
|
||||
641
CMakeLists.txt
641
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -8,10 +8,10 @@ To compile and install SDL:
|
||||
* Read the FAQ at https://wiki.libsdl.org/FAQWindows
|
||||
* Run './configure; make; make install'
|
||||
|
||||
Mac OS X with Xcode:
|
||||
macOS with Xcode:
|
||||
* Read docs/README-macosx.md
|
||||
|
||||
Mac OS X from the command line:
|
||||
macOS from the command line:
|
||||
* Run './configure; make; make install'
|
||||
|
||||
Linux and other UNIX systems:
|
||||
|
||||
@@ -19,6 +19,7 @@ distfile = $(distdir).tar.gz
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
INCLUDE = @INCLUDE@
|
||||
CFLAGS = @BUILD_CFLAGS@
|
||||
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
||||
@@ -49,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 debian 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.* 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)
|
||||
|
||||
20
Makefile.os2
20
Makefile.os2
@@ -11,7 +11,7 @@
|
||||
# wmake -f Makefile.os2 HIDAPI=1
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.20
|
||||
VERSION = 2.0.22
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBICONV=0
|
||||
@@ -28,7 +28,13 @@ INCPATH+= -Iinclude
|
||||
LIBM = SDL2libm.lib
|
||||
TLIB = SDL2test.lib
|
||||
LIBS = mmpm2.lib $(LIBM)
|
||||
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
|
||||
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
|
||||
# Debug options:
|
||||
# - debug messages from OS/2 related code to stdout:
|
||||
#CFLAGS+= -DOS2DEBUG
|
||||
# - debug messages from OS/2 code via SDL_LogDebug():
|
||||
#CFLAGS+= -DOS2DEBUG=2
|
||||
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
# newer OpenWatcom versions enable W303 by default
|
||||
@@ -54,13 +60,7 @@ CFLAGS_DLL+= -DHAVE_LIBUSB_H=1
|
||||
# building SDL itself (for DECLSPEC):
|
||||
CFLAGS_DLL+= -DBUILD_SDL
|
||||
|
||||
# Debug options:
|
||||
# - debug messages from OS/2 related code to stdout:
|
||||
#CFLAGS+= -DOS2DEBUG
|
||||
# - debug messages from OS/2 code via SDL_LogDebug():
|
||||
#CFLAGS+= -DOS2DEBUG=2
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
|
||||
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
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
@@ -140,9 +140,11 @@ SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
!ifeq HIDAPI 1
|
||||
# c99 mode needed because of structs with flexible array members in libusb.h
|
||||
SDL_hidapi.obj: SDL_hidapi.c
|
||||
wcc386 $(CFLAGS_DLL) -za99 -fo=$^@ $<
|
||||
!endif
|
||||
|
||||
$(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
|
||||
@echo * Creating: $@
|
||||
|
||||
117
Makefile.psp
117
Makefile.psp
@@ -1,117 +0,0 @@
|
||||
# The threads code require a rather new PSP SDK with SceLwMutexWorkarea:
|
||||
# https://github.com/pspdev/pspsdk/commit/276d9e3ca6fb26479ad050c21431b2a40f518365
|
||||
#
|
||||
TARGET_LIB = libSDL2.a
|
||||
EXTRA_TARGETS = libSDL2main.a
|
||||
OBJS= src/SDL.o \
|
||||
src/SDL_assert.o \
|
||||
src/SDL_dataqueue.o \
|
||||
src/SDL_error.o \
|
||||
src/SDL_hints.o \
|
||||
src/SDL_log.o \
|
||||
src/atomic/SDL_atomic.o \
|
||||
src/atomic/SDL_spinlock.o \
|
||||
src/audio/SDL_audio.o \
|
||||
src/audio/SDL_audiocvt.o \
|
||||
src/audio/SDL_audiodev.o \
|
||||
src/audio/SDL_audiotypecvt.o \
|
||||
src/audio/SDL_mixer.o \
|
||||
src/audio/SDL_wave.o \
|
||||
src/audio/psp/SDL_pspaudio.o \
|
||||
src/cpuinfo/SDL_cpuinfo.o \
|
||||
src/events/SDL_clipboardevents.o \
|
||||
src/events/SDL_displayevents.o \
|
||||
src/events/SDL_dropevents.o \
|
||||
src/events/SDL_events.o \
|
||||
src/events/SDL_gesture.o \
|
||||
src/events/SDL_keyboard.o \
|
||||
src/events/SDL_mouse.o \
|
||||
src/events/SDL_quit.o \
|
||||
src/events/SDL_touch.o \
|
||||
src/events/SDL_windowevents.o \
|
||||
src/file/SDL_rwops.o \
|
||||
src/haptic/SDL_haptic.o \
|
||||
src/haptic/dummy/SDL_syshaptic.o \
|
||||
src/hidapi/SDL_hidapi.o \
|
||||
src/joystick/SDL_joystick.o \
|
||||
src/joystick/SDL_gamecontroller.o \
|
||||
src/joystick/psp/SDL_sysjoystick.o \
|
||||
src/joystick/virtual/SDL_virtualjoystick.o \
|
||||
src/power/SDL_power.o \
|
||||
src/power/psp/SDL_syspower.o \
|
||||
src/filesystem/psp/SDL_sysfilesystem.o \
|
||||
src/locale/SDL_locale.o \
|
||||
src/locale/dummy/SDL_syslocale.o \
|
||||
src/misc/SDL_url.o \
|
||||
src/misc/dummy/SDL_sysurl.o \
|
||||
src/render/SDL_render.o \
|
||||
src/render/SDL_yuv_sw.o \
|
||||
src/render/psp/SDL_render_psp.o \
|
||||
src/render/software/SDL_blendfillrect.o \
|
||||
src/render/software/SDL_blendline.o \
|
||||
src/render/software/SDL_blendpoint.o \
|
||||
src/render/software/SDL_drawline.o \
|
||||
src/render/software/SDL_drawpoint.o \
|
||||
src/render/software/SDL_render_sw.o \
|
||||
src/render/software/SDL_rotate.o \
|
||||
src/render/software/SDL_triangle.o \
|
||||
src/sensor/SDL_sensor.o \
|
||||
src/sensor/dummy/SDL_dummysensor.o \
|
||||
src/stdlib/SDL_getenv.o \
|
||||
src/stdlib/SDL_iconv.o \
|
||||
src/stdlib/SDL_malloc.o \
|
||||
src/stdlib/SDL_qsort.o \
|
||||
src/stdlib/SDL_stdlib.o \
|
||||
src/stdlib/SDL_string.o \
|
||||
src/stdlib/SDL_strtokr.o \
|
||||
src/thread/SDL_thread.o \
|
||||
src/thread/generic/SDL_systls.o \
|
||||
src/thread/psp/SDL_syssem.o \
|
||||
src/thread/psp/SDL_systhread.o \
|
||||
src/thread/psp/SDL_sysmutex.o \
|
||||
src/thread/psp/SDL_syscond.o \
|
||||
src/timer/SDL_timer.o \
|
||||
src/timer/psp/SDL_systimer.o \
|
||||
src/video/SDL_RLEaccel.o \
|
||||
src/video/SDL_blit.o \
|
||||
src/video/SDL_blit_0.o \
|
||||
src/video/SDL_blit_1.o \
|
||||
src/video/SDL_blit_A.o \
|
||||
src/video/SDL_blit_N.o \
|
||||
src/video/SDL_blit_auto.o \
|
||||
src/video/SDL_blit_copy.o \
|
||||
src/video/SDL_blit_slow.o \
|
||||
src/video/SDL_bmp.o \
|
||||
src/video/SDL_clipboard.o \
|
||||
src/video/SDL_fillrect.o \
|
||||
src/video/SDL_pixels.o \
|
||||
src/video/SDL_rect.o \
|
||||
src/video/SDL_stretch.o \
|
||||
src/video/SDL_surface.o \
|
||||
src/video/SDL_video.o \
|
||||
src/video/SDL_yuv.o \
|
||||
src/video/psp/SDL_pspevents.o \
|
||||
src/video/psp/SDL_pspvideo.o \
|
||||
src/video/psp/SDL_pspgl.o \
|
||||
src/video/psp/SDL_pspmouse.o \
|
||||
src/video/yuv2rgb/yuv_rgb.o
|
||||
|
||||
SDLMAIN_OBJ = src/main/psp/SDL_psp_main.o
|
||||
EXTRA_CLEAN = $(SDLMAIN_OBJ)
|
||||
|
||||
INCDIR = ./include
|
||||
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
||||
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
LIBDIR =
|
||||
LIBS = -lGL -lGLU -lglut -lz \
|
||||
-lpspvfpu -lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgum -lpspgu -lpspaudiolib -lpspaudio -lpsphttp -lpspssl -lpspwlan \
|
||||
-lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lm -lpspvram
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
|
||||
libSDL2main.a: $(SDLMAIN_OBJ)
|
||||
$(AR) cru $@ $^
|
||||
$(RANLIB) $@
|
||||
88
Makefile.wiz
88
Makefile.wiz
@@ -1,88 +0,0 @@
|
||||
# Makefile to build the pandora SDL library
|
||||
WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
|
||||
|
||||
AR = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
|
||||
RANLIB = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
|
||||
CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
|
||||
CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
|
||||
STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
|
||||
|
||||
CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
|
||||
|
||||
TARGET_STATIC = libSDL2.a
|
||||
TARGET_SHARED = libSDL2.so
|
||||
|
||||
SOURCES = \
|
||||
./src/*.c \
|
||||
./src/atomic/*.c \
|
||||
./src/audio/*.c \
|
||||
./src/audio/disk/*.c \
|
||||
./src/audio/dsp/*.c \
|
||||
./src/audio/dummy/*.c \
|
||||
./src/cpuinfo/*.c \
|
||||
./src/events/*.c \
|
||||
./src/file/*.c \
|
||||
./src/filesystem/unix/*.c \
|
||||
./src/haptic/*.c \
|
||||
./src/haptic/linux/*.c \
|
||||
./src/hidapi/*.c \
|
||||
./src/joystick/*.c \
|
||||
./src/joystick/linux/*.c \
|
||||
./src/loadso/dlopen/*.c \
|
||||
./src/locale/*.c \
|
||||
./src/locale/unix/*.c \
|
||||
./src/misc/*.c \
|
||||
./src/misc/unix/*.c \
|
||||
./src/power/*.c \
|
||||
./src/sensor/*.c \
|
||||
./src/sensor/dummy/*.c \
|
||||
./src/stdlib/*.c \
|
||||
./src/thread/*.c \
|
||||
./src/thread/pthread/SDL_syscond.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c \
|
||||
./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_systhread.c \
|
||||
./src/timer/*.c \
|
||||
./src/timer/unix/*.c \
|
||||
./src/video/*.c \
|
||||
./src/video/yuv2rgb/*.c \
|
||||
./src/video/dummy/*.c \
|
||||
./src/video/pandora/*.c
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
|
||||
|
||||
$(TARGET_STATIC): $(OBJECTS)
|
||||
$(AR) crv $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
$(TARGET_SHARED):
|
||||
$(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1 $(OBJECTS)
|
||||
ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
|
||||
ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
|
||||
|
||||
config_copy:
|
||||
cp include/SDL_config_wiz.h include/SDL_config.h
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
|
||||
|
||||
install:
|
||||
mkdir -p $(WIZSDK)/lib
|
||||
mkdir -p $(WIZSDK)/include/SDL2
|
||||
cp -f $(TARGET_STATIC) $(WIZSDK)/lib
|
||||
cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
|
||||
rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
|
||||
ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
|
||||
ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
|
||||
|
||||
cp $(TARGET_STATIC) ../../toolchain/libs
|
||||
cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
|
||||
rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
|
||||
ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
|
||||
ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
|
||||
|
||||
cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
|
||||
cp -f include/*.h $(WIZSDK)/include/SDL2/
|
||||
cp -f include/*.h ../../toolchain/include/SDL2/
|
||||
@@ -144,6 +144,7 @@
|
||||
<ClInclude Include="..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\src\sensor\SDL_syssensor.h" />
|
||||
@@ -295,6 +296,7 @@
|
||||
<ClCompile Include="..\src\SDL.c" />
|
||||
<ClCompile Include="..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\src\SDL_log.c" />
|
||||
@@ -414,10 +416,10 @@
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
|
||||
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
||||
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
||||
@@ -411,6 +411,9 @@
|
||||
<ClInclude Include="..\src\SDL_dataqueue.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_list.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -780,6 +783,9 @@
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_list.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -819,4 +825,4 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -369,6 +369,7 @@
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
@@ -543,6 +544,7 @@
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
|
||||
@@ -401,6 +401,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
<ClInclude Include="..\..\include\SDL_metal.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
@@ -832,6 +833,7 @@
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_list.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c">
|
||||
<Filter>audio</Filter>
|
||||
</ClCompile>
|
||||
|
||||
38
WhatsNew.txt
38
WhatsNew.txt
@@ -1,6 +1,44 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.22:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_RenderGetWindow() to get the window associated with a renderer
|
||||
* Added floating point rectangle functions:
|
||||
* SDL_PointInFRect()
|
||||
* SDL_FRectEmpty()
|
||||
* SDL_FRectEquals()
|
||||
* SDL_FRectEqualsEpsilon()
|
||||
* SDL_HasIntersectionF()
|
||||
* SDL_IntersectFRect()
|
||||
* SDL_UnionFRect()
|
||||
* SDL_EncloseFPoints()
|
||||
* SDL_IntersectFRectAndLine()
|
||||
* Added SDL_IsTextInputShown() which returns whether the IME window is currently shown
|
||||
* Added SDL_ClearComposition() to dismiss the composition window without disabling IME input
|
||||
* Added SDL_TEXTEDITING_EXT event for handling long composition text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable it
|
||||
* Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control whether the mouse should be constrained to the whole window or the center of the window when relative mode is enabled
|
||||
* The mouse is now automatically captured when mouse buttons are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows you to control this behavior
|
||||
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let SDL know that a foreign window will be used with OpenGL
|
||||
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let SDL know that a foreign window will be used with Vulkan
|
||||
* Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify whether an SDL_QUIT event will be delivered when the last application window is closed
|
||||
* Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
|
||||
|
||||
Windows:
|
||||
* Added support for SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM to the D3D9 renderer
|
||||
|
||||
Linux:
|
||||
* Compiling with Wayland support requires libwayland-client version 1.18.0 or later
|
||||
* Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows
|
||||
* Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to allow using libdecor with compositors that support xdg-decoration
|
||||
|
||||
Android:
|
||||
* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.20:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.20</string>
|
||||
<string>2.0.22</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.20</string>
|
||||
<string>2.0.22</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -111,6 +111,24 @@
|
||||
A1626A582617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
|
||||
A1626A592617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
|
||||
A1626A5A2617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
|
||||
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6427F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6527F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6627F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6727F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6827F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6927F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6A27F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6B27F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
|
||||
A1BB8B6C27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B6D27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B6E27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B6F27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B7027F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B7127F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B7227F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B7327F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A1BB8B7427F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
|
||||
A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
|
||||
A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
|
||||
A75FCCFD23E25AB700529352 /* SDL_shaders_metal_tvos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */; };
|
||||
@@ -3574,6 +3592,8 @@
|
||||
75E09159241EA924004729E1 /* SDL_virtualjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_virtualjoystick_c.h; sourceTree = "<group>"; };
|
||||
A1626A3D2617006A003F1973 /* SDL_triangle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_triangle.c; sourceTree = "<group>"; };
|
||||
A1626A512617008C003F1973 /* SDL_triangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_triangle.h; sourceTree = "<group>"; };
|
||||
A1BB8B6127F6CF320057CFA8 /* SDL_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_list.c; sourceTree = "<group>"; };
|
||||
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_list.h; sourceTree = "<group>"; };
|
||||
A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
A75FCEB323E25AB700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -4304,6 +4324,8 @@
|
||||
A7D8A5AB23E2513D00DCD162 /* SDL_hints.c */,
|
||||
A7D8A58323E2513D00DCD162 /* SDL_internal.h */,
|
||||
A7D8A5DD23E2513D00DCD162 /* SDL_log.c */,
|
||||
A1BB8B6127F6CF320057CFA8 /* SDL_list.c */,
|
||||
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */,
|
||||
A7D8A57123E2513D00DCD162 /* SDL.c */,
|
||||
);
|
||||
name = "Library Source";
|
||||
@@ -5284,6 +5306,7 @@
|
||||
A75FCD4523E25AB700529352 /* SDL_gesture_c.h in Headers */,
|
||||
A75FCD4623E25AB700529352 /* SDL_shaders_gl.h in Headers */,
|
||||
A75FCD4723E25AB700529352 /* SDL_systhread_c.h in Headers */,
|
||||
A1BB8B7327F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A75FCD4823E25AB700529352 /* SDL_keycode.h in Headers */,
|
||||
5616CA63252BB35F005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A75FCD4A23E25AB700529352 /* SDL_cocoakeyboard.h in Headers */,
|
||||
@@ -5509,6 +5532,7 @@
|
||||
A75FCEFE23E25AC700529352 /* SDL_gesture_c.h in Headers */,
|
||||
A75FCEFF23E25AC700529352 /* SDL_shaders_gl.h in Headers */,
|
||||
A75FCF0023E25AC700529352 /* SDL_systhread_c.h in Headers */,
|
||||
A1BB8B7427F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A75FCF0123E25AC700529352 /* SDL_keycode.h in Headers */,
|
||||
5616CA66252BB361005D5928 /* SDL_sysurl.h in Headers */,
|
||||
A75FCF0323E25AC700529352 /* SDL_cocoakeyboard.h in Headers */,
|
||||
@@ -5707,6 +5731,7 @@
|
||||
A769B0C623E259AE00872273 /* SDL_windowevents_c.h in Headers */,
|
||||
A769B0C823E259AE00872273 /* SDL_cocoavideo.h in Headers */,
|
||||
5605721C2473688D00B46B66 /* SDL_syslocale.h in Headers */,
|
||||
A1BB8B7127F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A769B0CA23E259AE00872273 /* SDL_uikitevents.h in Headers */,
|
||||
A769B0CB23E259AE00872273 /* SDL_gesture_c.h in Headers */,
|
||||
A769B0CC23E259AE00872273 /* SDL_shaders_gl.h in Headers */,
|
||||
@@ -5955,6 +5980,7 @@
|
||||
A7D8A98E23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
|
||||
A7D8BA7423E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
A7D8BA5023E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
|
||||
A1BB8B6D27F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8B98D23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A7D8B99C23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
|
||||
A7D8B9A223E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
|
||||
@@ -6185,6 +6211,7 @@
|
||||
A7D8A98F23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
|
||||
A7D8BA7523E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
A7D8BA5123E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
|
||||
A1BB8B6E27F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8B98E23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A7D8B99D23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
|
||||
A7D8B9A323E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
|
||||
@@ -6332,6 +6359,7 @@
|
||||
A7D8BBAF23E2514500DCD162 /* SDL_windowevents_c.h in Headers */,
|
||||
A7D8AF0423E2514100DCD162 /* SDL_cocoavideo.h in Headers */,
|
||||
5605721A2473688C00B46B66 /* SDL_syslocale.h in Headers */,
|
||||
A1BB8B7027F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8ACC123E2514100DCD162 /* SDL_uikitevents.h in Headers */,
|
||||
A7D8BB3D23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
|
||||
A7D8BA7723E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
@@ -6580,6 +6608,7 @@
|
||||
A7D8A98D23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
|
||||
A7D8BA7323E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
A7D8BA4F23E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
|
||||
A1BB8B6C27F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8B98C23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
|
||||
A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
|
||||
A7D8B9A123E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
|
||||
@@ -6796,6 +6825,7 @@
|
||||
A7D8B29F23E2514200DCD162 /* vulkan_xlib.h in Headers */,
|
||||
A7D8B25D23E2514200DCD162 /* vulkan_vi.h in Headers */,
|
||||
A7D8B29923E2514200DCD162 /* vulkan_mir.h in Headers */,
|
||||
A1BB8B6F27F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
A7D8BB4E23E2514500DCD162 /* default_cursor.h in Headers */,
|
||||
A7D8B9FE23E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
|
||||
A7D8BBED23E2574800DCD162 /* SDL_uikitappdelegate.h in Headers */,
|
||||
@@ -6918,6 +6948,7 @@
|
||||
A7D8BB3E23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
|
||||
A7D8BA7823E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
|
||||
A7D8B42D23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
|
||||
A1BB8B7227F6CF330057CFA8 /* SDL_list.h in Headers */,
|
||||
DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */,
|
||||
A7D8AE9323E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
|
||||
A7D8ACE623E2514100DCD162 /* SDL_uikitvulkan.h in Headers */,
|
||||
@@ -7554,6 +7585,7 @@
|
||||
A75FCE8423E25AB700529352 /* e_exp.c in Sources */,
|
||||
A75FCE8523E25AB700529352 /* SDL_quit.c in Sources */,
|
||||
A75FCE8623E25AB700529352 /* SDL_cocoawindow.m in Sources */,
|
||||
A1BB8B6A27F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A75FCE8723E25AB700529352 /* SDL_sysmutex.c in Sources */,
|
||||
A75FCE8823E25AB700529352 /* SDL_syshaptic.c in Sources */,
|
||||
F3F07D61269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
@@ -7741,6 +7773,7 @@
|
||||
A75FD03D23E25AC700529352 /* e_exp.c in Sources */,
|
||||
A75FD03E23E25AC700529352 /* SDL_quit.c in Sources */,
|
||||
A75FD03F23E25AC700529352 /* SDL_cocoawindow.m in Sources */,
|
||||
A1BB8B6B27F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A75FD04023E25AC700529352 /* SDL_sysmutex.c in Sources */,
|
||||
A75FD04123E25AC700529352 /* SDL_syshaptic.c in Sources */,
|
||||
F3F07D62269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
@@ -7927,6 +7960,7 @@
|
||||
A769B20F23E259AE00872273 /* SDL_syshaptic.c in Sources */,
|
||||
A769B21023E259AE00872273 /* e_exp.c in Sources */,
|
||||
F395C1A12569C68F00942BFF /* SDL_iokitjoystick.c in Sources */,
|
||||
A1BB8B6827F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A769B21123E259AE00872273 /* SDL_quit.c in Sources */,
|
||||
A769B21223E259AE00872273 /* SDL_cocoawindow.m in Sources */,
|
||||
A769B21323E259AE00872273 /* SDL_sysmutex.c in Sources */,
|
||||
@@ -8116,6 +8150,7 @@
|
||||
A7D8B43B23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
|
||||
A7D8AAB123E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
A7D8B5CA23E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A1BB8B6427F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8AC1023E2514100DCD162 /* SDL_video.c in Sources */,
|
||||
560572062473687700B46B66 /* SDL_syslocale.m in Sources */,
|
||||
F3F07D5B269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
@@ -8303,6 +8338,7 @@
|
||||
A7D8B43C23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
|
||||
A7D8AAB223E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
A7D8B5CB23E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
A1BB8B6527F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8AC1123E2514100DCD162 /* SDL_video.c in Sources */,
|
||||
560572072473687800B46B66 /* SDL_syslocale.m in Sources */,
|
||||
F3F07D5C269640160074468B /* SDL_hidapi_luna.c in Sources */,
|
||||
@@ -8489,6 +8525,7 @@
|
||||
A7D8AADE23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
|
||||
A7D8BAE923E2514500DCD162 /* e_exp.c in Sources */,
|
||||
F395C1A02569C68F00942BFF /* SDL_iokitjoystick.c in Sources */,
|
||||
A1BB8B6727F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8BB8523E2514500DCD162 /* SDL_quit.c in Sources */,
|
||||
A7D8AEAA23E2514100DCD162 /* SDL_cocoawindow.m in Sources */,
|
||||
A7D8B43E23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
|
||||
@@ -8665,6 +8702,7 @@
|
||||
A7D8B55123E2514300DCD162 /* SDL_hidapi_switch.c in Sources */,
|
||||
A7D8B96223E2514400DCD162 /* SDL_strtokr.c in Sources */,
|
||||
A7D8BB7523E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
|
||||
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8BAB523E2514400DCD162 /* k_cos.c in Sources */,
|
||||
A7D8B54523E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
|
||||
A7D8B97423E2514400DCD162 /* SDL_malloc.c in Sources */,
|
||||
@@ -8850,6 +8888,7 @@
|
||||
A7D8B96523E2514400DCD162 /* SDL_strtokr.c in Sources */,
|
||||
A7D8BB7823E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
|
||||
A7D8BAB823E2514400DCD162 /* k_cos.c in Sources */,
|
||||
A1BB8B6627F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8B54823E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
|
||||
A7D8B97723E2514400DCD162 /* SDL_malloc.c in Sources */,
|
||||
A7D8BBF023E2574800DCD162 /* SDL_uikitclipboard.m in Sources */,
|
||||
@@ -9035,6 +9074,7 @@
|
||||
A7D8B96723E2514400DCD162 /* SDL_strtokr.c in Sources */,
|
||||
A7D8BB7A23E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
|
||||
A7D8BABA23E2514400DCD162 /* k_cos.c in Sources */,
|
||||
A1BB8B6927F6CF330057CFA8 /* SDL_list.c in Sources */,
|
||||
A7D8B54A23E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
|
||||
A7D8B97923E2514400DCD162 /* SDL_malloc.c in Sources */,
|
||||
A7D8B8CB23E2514400DCD162 /* SDL_audio.c in Sources */,
|
||||
@@ -9111,7 +9151,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
|
||||
DYLIB_CURRENT_VERSION = 19.2.0;
|
||||
DYLIB_CURRENT_VERSION = 23.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -9195,7 +9235,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
|
||||
DYLIB_CURRENT_VERSION = 19.2.0;
|
||||
DYLIB_CURRENT_VERSION = 23.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -9387,6 +9427,7 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
@@ -9398,6 +9439,7 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
|
||||
2
acinclude/libtool.m4
vendored
2
acinclude/libtool.m4
vendored
@@ -1068,7 +1068,7 @@ _LT_EOF
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*)
|
||||
case ${MACOSX_DEPLOYMENT_TARGET},$host in
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
|
||||
@@ -35,6 +35,10 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
applicationVariants.all { variant ->
|
||||
tasks["merge${variant.name.capitalize()}Assets"]
|
||||
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
|
||||
}
|
||||
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
|
||||
@@ -13,6 +13,6 @@ LOCAL_SRC_FILES := YourSourceHere.c
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := SDL2
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -63,6 +63,106 @@ import java.util.Locale;
|
||||
*/
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
// SDLActivity.debugSource(device.getSources(), "device[" + device.getName() + "]");
|
||||
// SDLActivity.debugSource(event.getSource(), "event");
|
||||
public static void debugSource(int sources, String prefix) {
|
||||
int s = sources;
|
||||
int s_copy = sources;
|
||||
String cls = "";
|
||||
String src = "";
|
||||
int tst = 0;
|
||||
int FLAG_TAINTED = 0x80000000;
|
||||
|
||||
if ((s & InputDevice.SOURCE_CLASS_BUTTON) != 0) cls += " BUTTON";
|
||||
if ((s & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) cls += " JOYSTICK";
|
||||
if ((s & InputDevice.SOURCE_CLASS_POINTER) != 0) cls += " POINTER";
|
||||
if ((s & InputDevice.SOURCE_CLASS_POSITION) != 0) cls += " POSITION";
|
||||
if ((s & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) cls += " TRACKBALL";
|
||||
|
||||
|
||||
int s2 = s_copy & ~InputDevice.SOURCE_ANY; // keep class bits
|
||||
s2 &= ~( InputDevice.SOURCE_CLASS_BUTTON
|
||||
| InputDevice.SOURCE_CLASS_JOYSTICK
|
||||
| InputDevice.SOURCE_CLASS_POINTER
|
||||
| InputDevice.SOURCE_CLASS_POSITION
|
||||
| InputDevice.SOURCE_CLASS_TRACKBALL);
|
||||
|
||||
if (s2 != 0) cls += "Some_Unkown";
|
||||
|
||||
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;
|
||||
|
||||
tst = InputDevice.SOURCE_DPAD;
|
||||
if ((s & tst) == tst) src += " DPAD";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_GAMEPAD;
|
||||
if ((s & tst) == tst) src += " GAMEPAD";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_HDMI;
|
||||
if ((s & tst) == tst) src += " HDMI";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_JOYSTICK;
|
||||
if ((s & tst) == tst) src += " JOYSTICK";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_KEYBOARD;
|
||||
if ((s & tst) == tst) src += " KEYBOARD";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_MOUSE;
|
||||
if ((s & tst) == tst) src += " MOUSE";
|
||||
s2 &= ~tst;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
tst = InputDevice.SOURCE_MOUSE_RELATIVE;
|
||||
if ((s & tst) == tst) src += " MOUSE_RELATIVE";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_ROTARY_ENCODER;
|
||||
if ((s & tst) == tst) src += " ROTARY_ENCODER";
|
||||
s2 &= ~tst;
|
||||
}
|
||||
tst = InputDevice.SOURCE_STYLUS;
|
||||
if ((s & tst) == tst) src += " STYLUS";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_TOUCHPAD;
|
||||
if ((s & tst) == tst) src += " TOUCHPAD";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_TOUCHSCREEN;
|
||||
if ((s & tst) == tst) src += " TOUCHSCREEN";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
|
||||
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_TRACKBALL;
|
||||
if ((s & tst) == tst) src += " TRACKBALL";
|
||||
s2 &= ~tst;
|
||||
|
||||
tst = InputDevice.SOURCE_ANY;
|
||||
if ((s & tst) == tst) src += " ANY";
|
||||
s2 &= ~tst;
|
||||
|
||||
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
|
||||
s2 &= ~FLAG_TAINTED;
|
||||
|
||||
if (s2 != 0) src += " Some_Unkown";
|
||||
|
||||
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
|
||||
}
|
||||
*/
|
||||
|
||||
public static boolean mIsResumedCalled, mHasFocus;
|
||||
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
|
||||
@@ -1204,8 +1304,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
|
||||
for (int id : ids) {
|
||||
InputDevice device = InputDevice.getDevice(id);
|
||||
if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
|
||||
nativeAddTouch(device.getId(), device.getName());
|
||||
/* Allow SOURCE_TOUCHSCREEN and also Virtual InputDevices because they can send TOUCHSCREEN events */
|
||||
if (device != null && ((device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) == InputDevice.SOURCE_TOUCHSCREEN
|
||||
|| device.isVirtual())) {
|
||||
|
||||
int touchDevId = device.getId();
|
||||
/*
|
||||
* Prevent id to be -1, since it's used in SDL internal for synthetic events
|
||||
* Appears when using Android emulator, eg:
|
||||
* adb shell input mouse tap 100 100
|
||||
* adb shell input touchscreen tap 100 100
|
||||
*/
|
||||
if (touchDevId < 0) {
|
||||
touchDevId -= 1;
|
||||
}
|
||||
nativeAddTouch(touchDevId, device.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1895,7 +2008,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (SDLActivity.isTextInputEvent(event)) {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
@@ -1908,7 +2021,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_MOUSE) != 0) {
|
||||
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
||||
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
||||
// they are ignored here because sending them as mouse input to SDL is messy
|
||||
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
|
||||
|
||||
@@ -255,23 +255,21 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
|
||||
@Override
|
||||
public boolean handleMotionEvent(MotionEvent event) {
|
||||
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -319,6 +317,7 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
|
||||
KeyEvent.KEYCODE_BUTTON_X,
|
||||
KeyEvent.KEYCODE_BUTTON_Y,
|
||||
KeyEvent.KEYCODE_BACK,
|
||||
KeyEvent.KEYCODE_MENU,
|
||||
KeyEvent.KEYCODE_BUTTON_MODE,
|
||||
KeyEvent.KEYCODE_BUTTON_START,
|
||||
KeyEvent.KEYCODE_BUTTON_THUMBL,
|
||||
@@ -360,6 +359,7 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
|
||||
(1 << 2), // X -> X
|
||||
(1 << 3), // Y -> Y
|
||||
(1 << 4), // BACK -> BACK
|
||||
(1 << 6), // MENU -> START
|
||||
(1 << 5), // MODE -> GUIDE
|
||||
(1 << 6), // START -> START
|
||||
(1 << 7), // THUMBL -> LEFTSTICK
|
||||
@@ -560,8 +560,6 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
case InputDevice.SOURCE_GAMEPAD:
|
||||
case InputDevice.SOURCE_DPAD:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
@@ -691,8 +689,6 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
case InputDevice.SOURCE_GAMEPAD:
|
||||
case InputDevice.SOURCE_DPAD:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
|
||||
@@ -7081,8 +7081,20 @@ func_mode_link ()
|
||||
prev=xcompiler
|
||||
continue
|
||||
;;
|
||||
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
# Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
|
||||
-pthread)
|
||||
case $host in
|
||||
*solaris2*) ;;
|
||||
*)
|
||||
case "$new_inherited_linker_flags " in
|
||||
*" $arg "*) ;;
|
||||
* ) func_append new_inherited_linker_flags " $arg" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
continue
|
||||
;;
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
|
||||
# x86 Linux to OS/2, using OpenWatcom.
|
||||
|
||||
# The final zipfile can be unpacked on any machine that supports OpenWatcom
|
||||
# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
|
||||
# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
|
||||
|
||||
if [ -z "$WATCOM" ]; then
|
||||
echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
|
||||
echo "This is often something like '/usr/local/share/watcom'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
export PATH="$WATCOM/binl:$PATH"
|
||||
|
||||
ZIPFILE="$1"
|
||||
if [ -z $1 ]; then
|
||||
ZIPFILE=sdl-os2.zip
|
||||
fi
|
||||
ZIPDIR=buildbot/SDL
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
cd `dirname "$0"`
|
||||
cd ..
|
||||
|
||||
rm -f $ZIPFILE
|
||||
wmake -f Makefile.os2
|
||||
rm -rf $ZIPDIR
|
||||
mkdir -p $ZIPDIR
|
||||
chmod 644 SDL2.dll SDL2.lib SDL2test.lib
|
||||
mv SDL2.dll SDL2.lib SDL2test.lib $ZIPDIR/
|
||||
cp -R include $ZIPDIR/
|
||||
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
|
||||
|
||||
wmake -f Makefile.os2 distclean
|
||||
|
||||
set +x
|
||||
echo "All done. Final installable is in $ZIPFILE ...";
|
||||
@@ -39,7 +39,7 @@
|
||||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.20"
|
||||
$SDLVersion = "2.0.22"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
||||
@@ -92,12 +92,19 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
|
||||
set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
|
||||
CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
|
||||
endmacro()
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
|
||||
macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
|
||||
set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
|
||||
CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
|
||||
endmacro()
|
||||
else()
|
||||
include(CheckOBJCSourceCompiles)
|
||||
if (APPLE)
|
||||
enable_language(OBJC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13.0)
|
||||
macro(target_link_directories _TARGET _SCOPE)
|
||||
|
||||
@@ -48,6 +48,7 @@ macro(CheckDLOPEN)
|
||||
int main(int argc, char **argv) {
|
||||
void *handle = dlopen(\"\", RTLD_NOW);
|
||||
const char *loaderror = (char *) dlerror();
|
||||
return 0;
|
||||
}" HAVE_DLOPEN)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
@@ -57,8 +58,7 @@ macro(CheckO_CLOEXEC)
|
||||
check_c_source_compiles("
|
||||
#include <fcntl.h>
|
||||
int flag = O_CLOEXEC;
|
||||
int main(void) {
|
||||
}" HAVE_O_CLOEXEC)
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_O_CLOEXEC)
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
@@ -68,12 +68,12 @@ macro(CheckOSS)
|
||||
set(OSS_HEADER_FILE "sys/soundcard.h")
|
||||
check_c_source_compiles("
|
||||
#include <sys/soundcard.h>
|
||||
int main() { int arg = SNDCTL_DSP_SETFRAGMENT; }" OSS_FOUND)
|
||||
int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
|
||||
if(NOT OSS_FOUND)
|
||||
set(OSS_HEADER_FILE "soundcard.h")
|
||||
check_c_source_compiles("
|
||||
#include <soundcard.h>
|
||||
int main() { int arg = SNDCTL_DSP_SETFRAGMENT; }" OSS_FOUND)
|
||||
int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
|
||||
endif()
|
||||
|
||||
if(OSS_FOUND)
|
||||
@@ -174,7 +174,7 @@ macro(CheckPulseAudio)
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
|
||||
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_sPULSEAUDIO_LDFLAGS})
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
@@ -467,6 +467,8 @@ macro(CheckX11)
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
|
||||
@@ -479,7 +481,8 @@ macro(CheckX11)
|
||||
XGenericEventCookie *cookie = &event.xcookie;
|
||||
XNextEvent(display, &event);
|
||||
XGetEventData(display, cookie);
|
||||
XFreeEventData(display, cookie); }" HAVE_XGENERICEVENT)
|
||||
XFreeEventData(display, cookie);
|
||||
return 0; }" HAVE_XGENERICEVENT)
|
||||
if(HAVE_XGENERICEVENT)
|
||||
set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1)
|
||||
endif()
|
||||
@@ -527,11 +530,10 @@ macro(CheckX11)
|
||||
#include <X11/extensions/XInput2.h>
|
||||
int event_type = XI_TouchBegin;
|
||||
XITouchClassInfo *t;
|
||||
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f)
|
||||
{
|
||||
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
|
||||
return (Status)0;
|
||||
}
|
||||
int main(int argc, char **argv) {}" HAVE_XINPUT2_MULTITOUCH)
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_MULTITOUCH)
|
||||
if(HAVE_XINPUT2_MULTITOUCH)
|
||||
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1)
|
||||
endif()
|
||||
@@ -545,7 +547,7 @@ macro(CheckX11)
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
BarrierEventID b;
|
||||
int main(void) { }" HAVE_XFIXES_H)
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
|
||||
endif()
|
||||
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
|
||||
if(HAVE_X11_SHARED AND XFIXES_LIB)
|
||||
@@ -630,7 +632,7 @@ endmacro()
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckWayland)
|
||||
if(SDL_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
|
||||
pkg_check_modules(WAYLAND "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
|
||||
@@ -775,12 +777,12 @@ macro(CheckVivante)
|
||||
if(SDL_VIVANTE)
|
||||
check_c_source_compiles("
|
||||
#include <gc_vdk.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIVANTE_VDK)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_VIVANTE_VDK)
|
||||
check_c_source_compiles("
|
||||
#define LINUX
|
||||
#define EGL_API_FB
|
||||
#include <EGL/eglvivante.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIVANTE_EGL_FB)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_VIVANTE_EGL_FB)
|
||||
if(HAVE_VIVANTE_VDK OR HAVE_VIVANTE_EGL_FB)
|
||||
set(HAVE_VIVANTE TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
@@ -790,7 +792,9 @@ macro(CheckVivante)
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE 1)
|
||||
if(HAVE_VIVANTE_VDK)
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
|
||||
list(APPEND EXTRA_LIBS VDK VIVANTE)
|
||||
find_library(VIVANTE_LIBRARY REQUIRED NAMES VIVANTE vivante drm_vivante)
|
||||
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 EXTRA_LIBS EGL)
|
||||
@@ -805,7 +809,7 @@ macro(CheckGLX)
|
||||
if(SDL_OPENGL)
|
||||
check_c_source_compiles("
|
||||
#include <GL/glx.h>
|
||||
int main(int argc, char** argv) {}" HAVE_OPENGL_GLX)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL_GLX)
|
||||
if(HAVE_OPENGL_GLX)
|
||||
set(SDL_VIDEO_OPENGL_GLX 1)
|
||||
endif()
|
||||
@@ -817,15 +821,14 @@ endmacro()
|
||||
macro(CheckEGL)
|
||||
if (SDL_OPENGL OR SDL_OPENGLES)
|
||||
pkg_check_modules(EGL egl)
|
||||
string(REPLACE "-D_THREAD_SAFE;" "-D_THREAD_SAFE=1;" EGL_CFLAGS "${EGL_CFLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${EGL_CFLAGS}")
|
||||
check_c_source_compiles("
|
||||
#define EGL_API_FB
|
||||
#define MESA_EGL_NO_X11_HEADERS
|
||||
#define EGL_NO_X11
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGL_EGL)
|
||||
int main (int argc, char** argv) { return 0; }" HAVE_OPENGL_EGL)
|
||||
if(HAVE_OPENGL_EGL)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
endif()
|
||||
@@ -839,7 +842,7 @@ macro(CheckOpenGL)
|
||||
check_c_source_compiles("
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
int main(int argc, char** argv) {}" HAVE_OPENGL)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL)
|
||||
if(HAVE_OPENGL)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
@@ -854,7 +857,7 @@ macro(CheckOpenGLES)
|
||||
check_c_source_compiles("
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGLES_V1)
|
||||
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V1)
|
||||
if(HAVE_OPENGLES_V1)
|
||||
set(HAVE_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES 1)
|
||||
@@ -863,7 +866,7 @@ macro(CheckOpenGLES)
|
||||
check_c_source_compiles("
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGLES_V2)
|
||||
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V2)
|
||||
if(HAVE_OPENGLES_V2)
|
||||
set(HAVE_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
@@ -1170,10 +1173,12 @@ macro(CheckHIDAPI)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS}")
|
||||
if(HIDAPI_ONLY_LIBUSB)
|
||||
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
|
||||
elseif(OS2)
|
||||
set(SDL_LIBUSB_DYNAMIC "\"usb100.dll\"")
|
||||
else()
|
||||
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
|
||||
FindLibraryAndSONAME("usb-1.0")
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
372
configure
vendored
372
configure
vendored
@@ -673,6 +673,8 @@ X_CFLAGS
|
||||
XMKMF
|
||||
RPI_LIBS
|
||||
RPI_CFLAGS
|
||||
DECOR_LIBS
|
||||
DECOR_CFLAGS
|
||||
FUSIONSOUND_LIBS
|
||||
FUSIONSOUND_CFLAGS
|
||||
ARTSCONFIG
|
||||
@@ -822,6 +824,8 @@ enable_filesystem
|
||||
enable_threads
|
||||
enable_timers
|
||||
enable_file
|
||||
enable_misc
|
||||
enable_locale
|
||||
enable_loadso
|
||||
enable_cpuinfo
|
||||
enable_assembly
|
||||
@@ -942,6 +946,8 @@ PULSEAUDIO_CFLAGS
|
||||
PULSEAUDIO_LIBS
|
||||
FUSIONSOUND_CFLAGS
|
||||
FUSIONSOUND_LIBS
|
||||
DECOR_CFLAGS
|
||||
DECOR_LIBS
|
||||
RPI_CFLAGS
|
||||
RPI_LIBS
|
||||
XMKMF
|
||||
@@ -1599,6 +1605,8 @@ Optional Features:
|
||||
--enable-threads Enable the threading subsystem [default=yes]
|
||||
--enable-timers Enable the timer subsystem [default=yes]
|
||||
--enable-file Enable the file subsystem [default=yes]
|
||||
--enable-misc Enable the misc subsystem [default=yes]
|
||||
--enable-locale Enable the locale subsystem [default=yes]
|
||||
--enable-loadso Enable the shared object loading subsystem
|
||||
[default=yes]
|
||||
--enable-cpuinfo Enable the cpuinfo subsystem [default=yes]
|
||||
@@ -1775,6 +1783,9 @@ Some influential environment variables:
|
||||
C compiler flags for FUSIONSOUND, overriding pkg-config
|
||||
FUSIONSOUND_LIBS
|
||||
linker flags for FUSIONSOUND, overriding pkg-config
|
||||
DECOR_CFLAGS
|
||||
C compiler flags for DECOR, overriding pkg-config
|
||||
DECOR_LIBS linker flags for DECOR, overriding pkg-config
|
||||
RPI_CFLAGS C compiler flags for RPI, overriding pkg-config
|
||||
RPI_LIBS linker flags for RPI, overriding pkg-config
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
@@ -2855,9 +2866,9 @@ orig_CFLAGS="$CFLAGS"
|
||||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=20
|
||||
SDL_INTERFACE_AGE=2
|
||||
SDL_BINARY_AGE=20
|
||||
SDL_MICRO_VERSION=22
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=22
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
|
||||
@@ -7120,7 +7131,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*)
|
||||
case ${MACOSX_DEPLOYMENT_TARGET},$host in
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[012],*|,*powerpc*-darwin[5-8]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
@@ -16999,9 +17010,8 @@ fi
|
||||
$as_echo_n "checking for linker option --no-undefined... " >&6; }
|
||||
have_no_undefined=no
|
||||
case "$host" in
|
||||
*-*-openbsd*)
|
||||
*-*-openbsd*)
|
||||
;;
|
||||
|
||||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
|
||||
@@ -17138,7 +17148,7 @@ if test x$enable_libc = xyes; then
|
||||
$as_echo "#define HAVE_LIBC 1" >>confdefs.h
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
$as_echo_n "checking for ANSI C header files... " >&6; }
|
||||
if ${ac_cv_header_stdc+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -17264,7 +17274,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
|
||||
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
|
||||
if test "x$ac_cv_type_size_t" = xyes; then :
|
||||
|
||||
else
|
||||
@@ -17276,7 +17286,7 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for M_PI in math.h" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for M_PI in math.h" >&5
|
||||
$as_echo_n "checking for M_PI in math.h... " >&6; }
|
||||
if ${ac_cv_define_M_PI+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -17309,11 +17319,7 @@ $as_echo "#define HAVE_M_PI /**/" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
;;
|
||||
*)
|
||||
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
|
||||
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
|
||||
# for constant arguments. Useless!
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
|
||||
$as_echo_n "checking for working alloca.h... " >&6; }
|
||||
@@ -17499,8 +17505,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
|
||||
$as_echo_n "checking for working memcmp... " >&6; }
|
||||
@@ -17840,7 +17844,7 @@ $as_echo "#define HAVE_SA_SIGACTION 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
for ac_header in libunwind.h
|
||||
for ac_header in libunwind.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libunwind_h" = xyes; then :
|
||||
@@ -17953,11 +17957,20 @@ SOURCES="$SOURCES $srcdir/src/video/yuv2rgb/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/locale/*.c"
|
||||
|
||||
|
||||
case "$host" in
|
||||
*-*-emscripten*)
|
||||
default_atomic=no
|
||||
;;
|
||||
*)
|
||||
default_atomic=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check whether --enable-atomic was given.
|
||||
if test "${enable_atomic+set}" = set; then :
|
||||
enableval=$enable_atomic;
|
||||
else
|
||||
enable_atomic=yes
|
||||
enable_atomic=$default_atomic
|
||||
fi
|
||||
|
||||
if test x$enable_atomic != xyes; then
|
||||
@@ -18149,6 +18162,34 @@ $as_echo "#define SDL_FILE_DISABLED 1" >>confdefs.h
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} file"
|
||||
fi
|
||||
# Check whether --enable-misc was given.
|
||||
if test "${enable_misc+set}" = set; then :
|
||||
enableval=$enable_misc;
|
||||
else
|
||||
enable_misc=yes
|
||||
fi
|
||||
|
||||
if test x$enable_misc != xyes; then
|
||||
|
||||
$as_echo "#define SDL_MISC_DISABLED 1" >>confdefs.h
|
||||
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} misc"
|
||||
fi
|
||||
# Check whether --enable-locale was given.
|
||||
if test "${enable_locale+set}" = set; then :
|
||||
enableval=$enable_locale;
|
||||
else
|
||||
enable_locale=yes
|
||||
fi
|
||||
|
||||
if test x$enable_locale != xyes; then
|
||||
|
||||
$as_echo "#define SDL_LOCALE_DISABLED 1" >>confdefs.h
|
||||
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} locale"
|
||||
fi
|
||||
# Check whether --enable-loadso was given.
|
||||
if test "${enable_loadso+set}" = set; then :
|
||||
enableval=$enable_loadso;
|
||||
@@ -18219,7 +18260,7 @@ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether --enable-mmx was given.
|
||||
# Check whether --enable-mmx was given.
|
||||
if test "${enable_mmx+set}" = set; then :
|
||||
enableval=$enable_mmx;
|
||||
else
|
||||
@@ -20150,6 +20191,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_DISK 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} disk"
|
||||
have_audio=yes
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -20168,6 +20210,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_DUMMY 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} dummy"
|
||||
have_audio=yes
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -20496,7 +20539,7 @@ $as_echo "$have_gcc_Wall" >&6; }
|
||||
if test x$have_gcc_Wall = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for necessary GCC -Wno-multichar option" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for necessary GCC -Wno-multichar option" >&5
|
||||
$as_echo_n "checking for necessary GCC -Wno-multichar option... " >&6; }
|
||||
need_gcc_Wno_multichar=no
|
||||
case "$host" in
|
||||
@@ -20536,7 +20579,7 @@ $as_echo_n "checking for Wayland support... " >&6; }
|
||||
video_wayland=no
|
||||
if test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
if $PKG_CONFIG --exists 'wayland-client >= 1.18' wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
@@ -20577,7 +20620,8 @@ fi
|
||||
wayland_client_lib=`find_lib "libwayland-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
wayland_egl_lib=`find_lib "libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
if test x$wayland_egl_lib = x; then
|
||||
wayland_egl_lib=`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
# This works in Ubuntu 13.10, maybe others
|
||||
wayland_egl_lib=`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
fi
|
||||
wayland_cursor_lib=`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
@@ -20639,17 +20683,79 @@ else
|
||||
fi
|
||||
|
||||
if test x$enable_libdecor = xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdecor support" >&5
|
||||
$as_echo_n "checking for libdecor support... " >&6; }
|
||||
if $PKG_CONFIG --exists libdecor-0; then :
|
||||
video_libdecor=yes
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdecor-0" >&5
|
||||
$as_echo_n "checking for libdecor-0... " >&6; }
|
||||
|
||||
if test -n "$DECOR_CFLAGS"; then
|
||||
pkg_cv_DECOR_CFLAGS="$DECOR_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdecor-0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libdecor-0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_DECOR_CFLAGS=`$PKG_CONFIG --cflags "libdecor-0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
video_libdecor=no
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$DECOR_LIBS"; then
|
||||
pkg_cv_DECOR_LIBS="$DECOR_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdecor-0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libdecor-0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_DECOR_LIBS=`$PKG_CONFIG --libs "libdecor-0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
DECOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdecor-0" 2>&1`
|
||||
else
|
||||
DECOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdecor-0" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$DECOR_PKG_ERRORS" >&5
|
||||
|
||||
video_libdecor=no
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
video_libdecor=no
|
||||
else
|
||||
DECOR_CFLAGS=$pkg_cv_DECOR_CFLAGS
|
||||
DECOR_LIBS=$pkg_cv_DECOR_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
video_libdecor=yes
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_libdecor" >&5
|
||||
$as_echo "$video_libdecor" >&6; }
|
||||
if test x$video_libdecor = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $DECOR_CFLAGS"
|
||||
|
||||
$as_echo "#define HAVE_LIBDECOR_H 1" >>confdefs.h
|
||||
|
||||
@@ -20662,18 +20768,16 @@ else
|
||||
fi
|
||||
|
||||
|
||||
decor_lib=`find_lib "libdecor-0.so.*" "$DECOR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
|
||||
if test x$enable_wayland_shared != xyes; then
|
||||
enable_libdecor_shared=no
|
||||
fi
|
||||
|
||||
decor_lib=`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
|
||||
if test x$have_loadso != xyes && \
|
||||
test x$enable_libdecor_shared = xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&5
|
||||
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic libdecor loading" >&2;}
|
||||
fi
|
||||
|
||||
if test x$have_loadso = xyes && \
|
||||
test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
|
||||
echo "-- dynamic libdecor -> $decor_lib"
|
||||
@@ -20683,7 +20787,7 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -20734,8 +20838,10 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} nacl"
|
||||
have_audio=yes
|
||||
SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
|
||||
SUMMARY_video="${SUMMARY_video} nacl opengles2"
|
||||
have_video=yes
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
@@ -20880,6 +20986,7 @@ $as_echo "$have_video_rpi" >&6; }
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
|
||||
|
||||
SUMMARY_video="${SUMMARY_video} rpi"
|
||||
have_video=yes
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -21731,7 +21838,7 @@ _ACEOF
|
||||
fi
|
||||
have_video=yes
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGenericEvent" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGenericEvent" >&5
|
||||
$as_echo_n "checking for XGenericEvent... " >&6; }
|
||||
have_XGenericEvent=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -22219,7 +22326,7 @@ else
|
||||
fi
|
||||
|
||||
if test x$enable_video_x11_xrandr = xyes; then
|
||||
definitely_enable_video_x11_xrandr=no
|
||||
definitely_enable_video_x11_xrandr=no
|
||||
have_xrandr_h_hdr=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
@@ -22601,7 +22708,7 @@ fi
|
||||
|
||||
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cocoa framework" >&5
|
||||
$as_echo_n "checking for Cocoa framework... " >&6; }
|
||||
have_cocoa=no
|
||||
@@ -22654,7 +22761,7 @@ fi
|
||||
|
||||
if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Metal framework" >&5
|
||||
$as_echo_n "checking for Metal framework... " >&6; }
|
||||
have_metal=no
|
||||
@@ -23592,7 +23699,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
;;
|
||||
*-*-darwin*)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -23645,7 +23752,7 @@ $as_echo "#define SDL_VIDEO_VULKAN 1" >>confdefs.h
|
||||
|
||||
CheckInputEvents()
|
||||
{
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
|
||||
$as_echo_n "checking for Linux 2.4 unified input interface... " >&6; }
|
||||
use_input_events=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -23681,7 +23788,6 @@ $as_echo "#define SDL_INPUT_LINUXEV 1" >>confdefs.h
|
||||
|
||||
CheckInputKD()
|
||||
{
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux kd.h" >&5
|
||||
$as_echo_n "checking for Linux kd.h... " >&6; }
|
||||
use_input_kd=no
|
||||
@@ -24161,7 +24267,7 @@ fi
|
||||
if test x$enable_joystick_mfi = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
CFLAGS="$CFLAGS -x objective-c -fobjc-weak"
|
||||
CFLAGS="$CFLAGS -x objective-c -fobjc-weak"
|
||||
LDFLAGS="$LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GameController framework" >&5
|
||||
$as_echo_n "checking for GameController framework... " >&6; }
|
||||
@@ -24228,7 +24334,7 @@ else
|
||||
enable_pthreads=maybe
|
||||
fi
|
||||
|
||||
# Check whether --enable-pthread-sem was given.
|
||||
# Check whether --enable-pthread-sem was given.
|
||||
if test "${enable_pthread_sem+set}" = set; then :
|
||||
enableval=$enable_pthread_sem;
|
||||
else
|
||||
@@ -24673,6 +24779,30 @@ $as_echo "$have_wince" >&6; }
|
||||
|
||||
# This fixes Windows stack alignment with newer GCC
|
||||
CheckStackBoundary
|
||||
|
||||
# headers needed elsewhere
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_tpcshrd_h" = xyes; then :
|
||||
have_tpcshrd_h=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_tpcshrd_h = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_TPCSHRD_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "roapi.h" "ac_cv_header_roapi_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_roapi_h" = xyes; then :
|
||||
have_roapi_h=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_roapi_h = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_ROAPI_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
CheckOS2()
|
||||
@@ -25744,6 +25874,7 @@ case "$host" in
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
|
||||
|
||||
SUMMARY_video="${SUMMARY_video} android"
|
||||
have_video=yes
|
||||
fi
|
||||
;;
|
||||
*-*-linux*) ARCH=linux ;;
|
||||
@@ -25825,12 +25956,16 @@ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
|
||||
CheckRPATH
|
||||
CheckVivanteVideo
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
|
||||
have_misc=yes
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
case $ARCH in
|
||||
@@ -26042,12 +26177,16 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Use the Windows locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
|
||||
@@ -26140,17 +26279,6 @@ $as_echo "#define SDL_HAPTIC_DINPUT 1" >>confdefs.h
|
||||
have_haptic=yes
|
||||
fi
|
||||
fi
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_tpcshrd_h" = xyes; then :
|
||||
have_tpcshrd_h=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_tpcshrd_h = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_TPCSHRD_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
# Set up files for the sensor library
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "sensorsapi.h" "ac_cv_header_sensorsapi_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_sensorsapi_h" = xyes; then :
|
||||
@@ -26271,13 +26399,11 @@ fi
|
||||
SDL_LIBS="-lcygwin $SDL_LIBS"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-beos*)
|
||||
*-*-beos*)
|
||||
as_fn_error $? "
|
||||
*** BeOS support has been removed as of SDL 2.0.2.
|
||||
" "$LINENO" 5
|
||||
;;
|
||||
|
||||
*-*-haiku*)
|
||||
ARCH=haiku
|
||||
ac_default_prefix=/boot/system
|
||||
@@ -26332,14 +26458,16 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
|
||||
have_locale=yes
|
||||
fi
|
||||
# The Haiku platform requires special setup.
|
||||
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
||||
@@ -26359,13 +26487,16 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
|
||||
@@ -26448,6 +26579,8 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES 1" >>confdefs.h
|
||||
$as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
|
||||
SUMMARY_video="${SUMMARY_video} uikit"
|
||||
have_video=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
|
||||
@@ -26493,13 +26626,16 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
||||
CheckPTHREAD
|
||||
CheckHIDAPI
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
|
||||
@@ -26627,6 +26763,12 @@ $as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
|
||||
CheckClockGettime
|
||||
CheckEmscriptenGLES
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
|
||||
@@ -26636,7 +26778,7 @@ $as_echo "#define SDL_POWER_EMSCRIPTEN 1" >>confdefs.h
|
||||
have_power=yes
|
||||
fi
|
||||
|
||||
# Set up files for the power library
|
||||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_EMSCRIPTEN 1" >>confdefs.h
|
||||
@@ -26662,8 +26804,10 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
have_timers=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
|
||||
have_locale=yes
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
;;
|
||||
*-*-riscos*)
|
||||
ARCH=riscos
|
||||
@@ -26679,9 +26823,11 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
|
||||
@@ -26734,8 +26880,10 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
|
||||
fi
|
||||
# Use the Unix locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
|
||||
@@ -26832,10 +26980,36 @@ INSTALL_SDL2_CONFIG=$enable_sdl2_config
|
||||
|
||||
# Verify that we have all the platform specific files we need
|
||||
|
||||
if test x$have_audio != xyes; then
|
||||
if test x$enable_audio = xyes; then
|
||||
|
||||
$as_echo "#define SDL_AUDIO_DRIVER_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
|
||||
fi
|
||||
if test x$have_video != xyes; then
|
||||
if test x$enable_video = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
|
||||
fi
|
||||
if test x$have_misc != xyes; then
|
||||
if test x$enable_misc = xyes; then
|
||||
|
||||
$as_echo "#define SDL_MISC_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/misc/dummy/*.c"
|
||||
fi
|
||||
if test x$have_locale != xyes; then
|
||||
if test x$enable_locale = xyes; then
|
||||
|
||||
$as_echo "#define SDL_LOCALE_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/locale/dummy/*.c"
|
||||
fi
|
||||
if test x$have_joystick != xyes; then
|
||||
@@ -26873,7 +27047,7 @@ fi
|
||||
if test x$have_timers != xyes; then
|
||||
if test x$enable_timers = xyes; then
|
||||
|
||||
$as_echo "#define SDL_TIMERS_DISABLED 1" >>confdefs.h
|
||||
$as_echo "#define SDL_TIMER_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
|
||||
@@ -26881,7 +27055,7 @@ fi
|
||||
if test x$have_filesystem != xyes; then
|
||||
if test x$enable_filesystem = xyes; then
|
||||
|
||||
$as_echo "#define SDL_FILESYSTEM_DISABLED 1" >>confdefs.h
|
||||
$as_echo "#define SDL_FILESYSTEM_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/dummy/*.c"
|
||||
@@ -26889,7 +27063,7 @@ fi
|
||||
if test x$have_loadso != xyes; then
|
||||
if test x$enable_loadso = xyes; then
|
||||
|
||||
$as_echo "#define SDL_LOADSO_DISABLED 1" >>confdefs.h
|
||||
$as_echo "#define SDL_LOADSO_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
|
||||
|
||||
270
configure.ac
270
configure.ac
@@ -22,9 +22,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
||||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=20
|
||||
SDL_INTERFACE_AGE=2
|
||||
SDL_BINARY_AGE=20
|
||||
SDL_MICRO_VERSION=22
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=22
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
@@ -241,10 +241,9 @@ fi
|
||||
AC_MSG_CHECKING(for linker option --no-undefined)
|
||||
have_no_undefined=no
|
||||
case "$host" in
|
||||
dnl Skip this on platforms where it is just simply busted.
|
||||
dnl Skip this on platforms where it is just simply busted.
|
||||
*-*-openbsd*)
|
||||
;;
|
||||
|
||||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
|
||||
@@ -309,25 +308,19 @@ AC_ARG_ENABLE(libc,
|
||||
if test x$enable_libc = xyes; then
|
||||
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
||||
|
||||
dnl Check for C library headers
|
||||
dnl Check for C library headers
|
||||
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.
|
||||
dnl Check for typedefs, structures, etc.
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
dnl Check for defines
|
||||
dnl Check for defines
|
||||
AC_CHECK_DEFINE(M_PI, math.h)
|
||||
|
||||
dnl Checks for library functions.
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
;;
|
||||
*)
|
||||
AC_FUNC_ALLOCA
|
||||
;;
|
||||
esac
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_MEMCMP
|
||||
if test x$ac_cv_func_memcmp_working = xyes; then
|
||||
AC_DEFINE(HAVE_MEMCMP, 1, [ ])
|
||||
@@ -354,7 +347,7 @@ if test x$enable_libc = xyes; then
|
||||
|
||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
||||
|
||||
dnl Check for additional non-standard headers
|
||||
dnl Check for additional non-standard headers
|
||||
AC_CHECK_HEADERS(libunwind.h)
|
||||
fi
|
||||
|
||||
@@ -422,9 +415,18 @@ SOURCES="$SOURCES $srcdir/src/locale/*.c"
|
||||
|
||||
dnl Enable/disable various subsystems of the SDL library
|
||||
|
||||
case "$host" in
|
||||
*-*-emscripten*)
|
||||
default_atomic=no
|
||||
;;
|
||||
*)
|
||||
default_atomic=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(atomic,
|
||||
[AS_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [default=yes]])],
|
||||
, enable_atomic=yes)
|
||||
, enable_atomic=$default_atomic)
|
||||
if test x$enable_atomic != xyes; then
|
||||
AC_DEFINE(SDL_ATOMIC_DISABLED, 1, [ ])
|
||||
else
|
||||
@@ -534,6 +536,22 @@ if test x$enable_file != xyes; then
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} file"
|
||||
fi
|
||||
AC_ARG_ENABLE(misc,
|
||||
[AS_HELP_STRING([--enable-misc], [Enable the misc subsystem [default=yes]])],
|
||||
, enable_misc=yes)
|
||||
if test x$enable_misc != xyes; then
|
||||
AC_DEFINE(SDL_MISC_DISABLED, 1, [ ])
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} misc"
|
||||
fi
|
||||
AC_ARG_ENABLE(locale,
|
||||
[AS_HELP_STRING([--enable-locale], [Enable the locale subsystem [default=yes]])],
|
||||
, enable_locale=yes)
|
||||
if test x$enable_locale != xyes; then
|
||||
AC_DEFINE(SDL_LOCALE_DISABLED, 1, [ ])
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} locale"
|
||||
fi
|
||||
AC_ARG_ENABLE(loadso,
|
||||
[AS_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [default=yes]])],
|
||||
, enable_loadso=yes)
|
||||
@@ -582,7 +600,7 @@ if test x$enable_assembly = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for various instruction support
|
||||
dnl Check for various instruction support
|
||||
AC_ARG_ENABLE(mmx,
|
||||
[AS_HELP_STRING([--enable-mmx], [use MMX assembly routines [default=yes]])],
|
||||
, enable_mmx=yes)
|
||||
@@ -1280,6 +1298,7 @@ CheckDiskAudio()
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} disk"
|
||||
have_audio=yes
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1293,6 +1312,7 @@ CheckDummyAudio()
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} dummy"
|
||||
have_audio=yes
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1504,7 +1524,7 @@ CheckWarnAll()
|
||||
if test x$have_gcc_Wall = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
|
||||
|
||||
dnl Haiku headers use multicharacter constants all over the place. Ignore these warnings when using -Wall.
|
||||
dnl Haiku headers use multicharacter constants all over the place. Ignore these warnings when using -Wall.
|
||||
AC_MSG_CHECKING(for necessary GCC -Wno-multichar option)
|
||||
need_gcc_Wno_multichar=no
|
||||
case "$host" in
|
||||
@@ -1535,7 +1555,7 @@ CheckWayland()
|
||||
video_wayland=no
|
||||
if test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
if $PKG_CONFIG --exists 'wayland-client >= 1.18' wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
@@ -1566,7 +1586,7 @@ dnl FIXME: Do BSD and OS X need special cases?
|
||||
wayland_client_lib=[`find_lib "libwayland-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
wayland_egl_lib=[`find_lib "libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
if test x$wayland_egl_lib = x; then
|
||||
dnl This works in Ubuntu 13.10, maybe others
|
||||
# This works in Ubuntu 13.10, maybe others
|
||||
wayland_egl_lib=[`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
fi
|
||||
wayland_cursor_lib=[`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
@@ -1606,39 +1626,31 @@ dnl FIXME: Do BSD and OS X need special cases?
|
||||
|
||||
dnl See if libdecor is available
|
||||
AC_ARG_ENABLE(libdecor,
|
||||
[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],
|
||||
, enable_libdecor=yes)
|
||||
[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],, enable_libdecor=yes)
|
||||
if test x$enable_libdecor = xyes; then
|
||||
AC_MSG_CHECKING(for libdecor support)
|
||||
AS_IF([$PKG_CONFIG --exists libdecor-0],
|
||||
[video_libdecor=yes],
|
||||
[video_libdecor=no])
|
||||
AC_MSG_RESULT($video_libdecor)
|
||||
PKG_CHECK_MODULES([DECOR], [libdecor-0], video_libdecor=yes, video_libdecor=no)
|
||||
if test x$video_libdecor = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $DECOR_CFLAGS"
|
||||
AC_DEFINE(HAVE_LIBDECOR_H, 1, [ ])
|
||||
|
||||
AC_ARG_ENABLE(libdecor-shared,
|
||||
[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],
|
||||
, enable_libdecor_shared=yes)
|
||||
[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],, enable_libdecor_shared=yes)
|
||||
|
||||
decor_lib=[`find_lib "libdecor-0.so.*" "$DECOR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
|
||||
if test x$enable_wayland_shared != xyes; then
|
||||
enable_libdecor_shared=no
|
||||
fi
|
||||
|
||||
decor_lib=[`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
|
||||
if test x$have_loadso != xyes && \
|
||||
test x$enable_libdecor_shared = xyes; then
|
||||
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libdecor loading])
|
||||
fi
|
||||
|
||||
if test x$have_loadso = xyes && \
|
||||
test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
|
||||
echo "-- dynamic libdecor -> $decor_lib"
|
||||
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR, "$decor_lib", [ ])
|
||||
else
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -1666,8 +1678,10 @@ CheckNativeClient()
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} nacl"
|
||||
have_audio=yes
|
||||
SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
|
||||
SUMMARY_video="${SUMMARY_video} nacl opengles2"
|
||||
have_video=yes
|
||||
],[])
|
||||
}
|
||||
|
||||
@@ -1717,6 +1731,7 @@ CheckRPI()
|
||||
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} rpi"
|
||||
have_video=yes
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -1834,7 +1849,6 @@ CheckX11()
|
||||
fi
|
||||
have_video=yes
|
||||
|
||||
dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
|
||||
AC_MSG_CHECKING([for XGenericEvent])
|
||||
have_XGenericEvent=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -2005,7 +2019,7 @@ XITouchClassInfo *t;
|
||||
[AS_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [default=yes]])],
|
||||
, enable_video_x11_xrandr=yes)
|
||||
if test x$enable_video_x11_xrandr = xyes; then
|
||||
dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
|
||||
dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
|
||||
definitely_enable_video_x11_xrandr=no
|
||||
have_xrandr_h_hdr=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -2167,7 +2181,7 @@ CheckCOCOA()
|
||||
, enable_video_cocoa=yes)
|
||||
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
AC_MSG_CHECKING(for Cocoa framework)
|
||||
have_cocoa=no
|
||||
@@ -2195,7 +2209,7 @@ CheckMETAL()
|
||||
, enable_render_metal=yes)
|
||||
if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
AC_MSG_CHECKING(for Metal framework)
|
||||
have_metal=no
|
||||
@@ -2619,7 +2633,7 @@ CheckVulkan()
|
||||
;;
|
||||
*-*-darwin*)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <Cocoa/Cocoa.h>
|
||||
@@ -2654,7 +2668,7 @@ CheckVulkan()
|
||||
dnl See if we can use the new unified event interface in Linux 2.4
|
||||
CheckInputEvents()
|
||||
{
|
||||
dnl Check for Linux 2.4 unified input event interface support
|
||||
dnl Check for Linux 2.4 unified input event interface support
|
||||
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
||||
use_input_events=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -2674,7 +2688,6 @@ CheckInputEvents()
|
||||
dnl See if we can use the kernel kd.h header
|
||||
CheckInputKD()
|
||||
{
|
||||
|
||||
AC_MSG_CHECKING(for Linux kd.h)
|
||||
use_input_kd=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -2876,7 +2889,7 @@ CheckJoystickMFI()
|
||||
if test x$enable_joystick_mfi = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c -fobjc-weak"
|
||||
LDFLAGS="$LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
|
||||
AC_MSG_CHECKING(for GameController framework)
|
||||
@@ -2908,15 +2921,15 @@ CheckJoystickMFI()
|
||||
dnl See what type of thread model to use on Linux and Solaris
|
||||
CheckPTHREAD()
|
||||
{
|
||||
dnl Check for pthread support
|
||||
dnl Check for pthread support
|
||||
|
||||
dnl Emscripten pthreads work, but you need to have a non-pthread fallback build
|
||||
dnl for systems without support. It's not currently enough to not use
|
||||
dnl pthread functions in a pthread-build; it won't start up on unsupported
|
||||
dnl browsers. As such, you have to explicitly enable it on Emscripten builds
|
||||
dnl for the time being. This default with change to ON once this becomes
|
||||
dnl commonly supported in browsers or the Emscripten teams makes a single
|
||||
dnl binary work everywhere.
|
||||
dnl Emscripten pthreads work, but you need to have a non-pthread fallback build
|
||||
dnl for systems without support. It's not currently enough to not use
|
||||
dnl pthread functions in a pthread-build; it won't start up on unsupported
|
||||
dnl browsers. As such, you have to explicitly enable it on Emscripten builds
|
||||
dnl for the time being. This default with change to ON once this becomes
|
||||
dnl commonly supported in browsers or the Emscripten teams makes a single
|
||||
dnl binary work everywhere.
|
||||
|
||||
case "$host" in
|
||||
*-*-emscripten*)
|
||||
@@ -2930,7 +2943,7 @@ CheckPTHREAD()
|
||||
AC_ARG_ENABLE(pthreads,
|
||||
[AS_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [default=maybe]])],
|
||||
, enable_pthreads=maybe)
|
||||
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
||||
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
||||
AC_ARG_ENABLE(pthread-sem,
|
||||
[AS_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [default=maybe]])],
|
||||
, enable_pthread_sem=maybe)
|
||||
@@ -3185,6 +3198,16 @@ CheckWINDOWS()
|
||||
|
||||
# This fixes Windows stack alignment with newer GCC
|
||||
CheckStackBoundary
|
||||
|
||||
# headers needed elsewhere
|
||||
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
|
||||
if test x$have_tpcshrd_h = xyes; then
|
||||
AC_DEFINE(HAVE_TPCSHRD_H, 1, [ ])
|
||||
fi
|
||||
AC_CHECK_HEADER(roapi.h,have_roapi_h=yes)
|
||||
if test x$have_roapi_h = xyes; then
|
||||
AC_DEFINE(HAVE_ROAPI_H, 1, [ ])
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Determine whether the compiler can produce OS/2 executables
|
||||
@@ -3643,6 +3666,7 @@ case "$host" in
|
||||
SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_ANDROID, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} android"
|
||||
have_video=yes
|
||||
fi
|
||||
;;
|
||||
*-*-linux*) ARCH=linux ;;
|
||||
@@ -3724,12 +3748,16 @@ case "$host" in
|
||||
CheckRPATH
|
||||
CheckVivanteVideo
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
|
||||
have_misc=yes
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
case $ARCH in
|
||||
@@ -3907,12 +3935,16 @@ case "$host" in
|
||||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Use the Windows locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
|
||||
@@ -3977,10 +4009,6 @@ case "$host" in
|
||||
have_haptic=yes
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
|
||||
if test x$have_tpcshrd_h = xyes; then
|
||||
AC_DEFINE(HAVE_TPCSHRD_H, 1, [ ])
|
||||
fi
|
||||
# Set up files for the sensor library
|
||||
AC_CHECK_HEADER(sensorsapi.h,have_winsensors=yes,have_winsensors=no)
|
||||
if test x$have_winsensors = xyes; then
|
||||
@@ -4045,14 +4073,12 @@ case "$host" in
|
||||
SDL_LIBS="-lcygwin $SDL_LIBS"
|
||||
fi
|
||||
;;
|
||||
|
||||
dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
*-*-beos*)
|
||||
AC_MSG_ERROR([
|
||||
*** BeOS support has been removed as of SDL 2.0.2.
|
||||
])
|
||||
;;
|
||||
|
||||
*-*-haiku*)
|
||||
ARCH=haiku
|
||||
ac_default_prefix=/boot/system
|
||||
@@ -4097,14 +4123,16 @@ case "$host" in
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
|
||||
have_locale=yes
|
||||
fi
|
||||
# The Haiku platform requires special setup.
|
||||
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
||||
@@ -4124,13 +4152,16 @@ case "$host" in
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
|
||||
@@ -4191,6 +4222,8 @@ case "$host" in
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
|
||||
SUMMARY_video="${SUMMARY_video} uikit"
|
||||
have_video=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
|
||||
@@ -4236,13 +4269,16 @@ case "$host" in
|
||||
CheckPTHREAD
|
||||
CheckHIDAPI
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
|
||||
@@ -4350,6 +4386,12 @@ case "$host" in
|
||||
CheckClockGettime
|
||||
CheckEmscriptenGLES
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
AC_DEFINE(SDL_POWER_EMSCRIPTEN, 1, [ ])
|
||||
@@ -4357,7 +4399,7 @@ case "$host" in
|
||||
have_power=yes
|
||||
fi
|
||||
|
||||
# Set up files for the power library
|
||||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
|
||||
@@ -4377,8 +4419,10 @@ case "$host" in
|
||||
have_timers=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
|
||||
have_locale=yes
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
;;
|
||||
*-*-riscos*)
|
||||
ARCH=riscos
|
||||
@@ -4394,9 +4438,11 @@ case "$host" in
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the misc library
|
||||
if test x$enable_misc = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS, 1, [ ])
|
||||
@@ -4443,8 +4489,10 @@ case "$host" in
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
|
||||
fi
|
||||
# Use the Unix locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
if test x$enable_locale = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
fi
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
|
||||
@@ -4520,10 +4568,28 @@ AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
|
||||
|
||||
# Verify that we have all the platform specific files we need
|
||||
|
||||
if test x$have_audio != xyes; then
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
|
||||
fi
|
||||
if test x$have_video != xyes; then
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
|
||||
fi
|
||||
if test x$have_misc != xyes; then
|
||||
if test x$enable_misc = xyes; then
|
||||
AC_DEFINE(SDL_MISC_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/misc/dummy/*.c"
|
||||
fi
|
||||
if test x$have_locale != xyes; then
|
||||
if test x$enable_locale = xyes; then
|
||||
AC_DEFINE(SDL_LOCALE_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/locale/dummy/*.c"
|
||||
fi
|
||||
if test x$have_joystick != xyes; then
|
||||
@@ -4552,19 +4618,19 @@ if test x$have_threads != xyes; then
|
||||
fi
|
||||
if test x$have_timers != xyes; then
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
|
||||
AC_DEFINE(SDL_TIMER_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
|
||||
fi
|
||||
if test x$have_filesystem != xyes; then
|
||||
if test x$enable_filesystem = xyes; then
|
||||
AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
|
||||
AC_DEFINE(SDL_FILESYSTEM_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/dummy/*.c"
|
||||
fi
|
||||
if test x$have_loadso != xyes; then
|
||||
if test x$enable_loadso = xyes; then
|
||||
AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
|
||||
AC_DEFINE(SDL_LOADSO_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
|
||||
fi
|
||||
|
||||
186
debian/changelog
vendored
186
debian/changelog
vendored
@@ -1,186 +0,0 @@
|
||||
libsdl2 (2.0.20) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.20
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Fri, 7 Jan 2022 18:24:41 -0800
|
||||
|
||||
libsdl2 (2.0.19) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.19
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 30 Nov 2021 09:57:40 -0800
|
||||
|
||||
libsdl2 (2.0.18) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.18
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Fri, 26 Nov 2021 08:07:21 -0800
|
||||
|
||||
libsdl2 (2.0.17) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.17
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Aug 2021 15:00:14 -0800
|
||||
|
||||
libsdl2 (2.0.16) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.16
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sat, 31 Jul 2021 13:27:38 -0800
|
||||
|
||||
libsdl2 (2.0.15) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.15 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 22 Dec 2020 10:29:01 -0800
|
||||
|
||||
libsdl2 (2.0.14) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.14
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 8 Dec 2020 17:54:33 -0800
|
||||
|
||||
libsdl2 (2.0.13) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.13 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Mar 2020 18:24:22 -0800
|
||||
|
||||
libsdl2 (2.0.12) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.12
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 1 Mar 2020 14:57:07 -0800
|
||||
|
||||
libsdl2 (2.0.11) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.11 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 22 Sep 2019 10:33:03 -0800
|
||||
|
||||
libsdl2 (2.0.10) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.10
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2019 08:48:47 -0800
|
||||
|
||||
libsdl2 (2.0.9) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.9
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Wed, 26 Sep 2018 10:02:21 -0800
|
||||
|
||||
libsdl2 (2.0.8) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.8
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sat, 4 Nov 2017 21:21:53 -0800
|
||||
|
||||
libsdl2 (2.0.7) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.7
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Thu, 12 Oct 2017 08:01:16 -0800
|
||||
|
||||
libsdl2 (2.0.6) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.6
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sat, 9 Sep 2017 07:29:36 -0800
|
||||
|
||||
libsdl2 (2.0.5) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.5
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Mon, 28 Nov 2016 07:32:52 -0800
|
||||
|
||||
libsdl2 (2.0.4) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.4
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Thu, 07 Jan 2016 11:02:39 -0800
|
||||
|
||||
libsdl2 (2.0.3) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.3
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 9 Mar 2014 10:35:54 -0800
|
||||
|
||||
libsdl2 (2.0.2) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.2
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 9 Feb 2014 2:55:59 -0800
|
||||
|
||||
libsdl2 (2.0.1) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.1
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Wed, 23 Oct 2013 16:31:38 -0800
|
||||
|
||||
libsdl2 (2.0.0) UNRELEASED; urgency=low
|
||||
|
||||
* SDL is now a native debian package.
|
||||
* Removed udeb package
|
||||
* Disabled DirectFB support by default, to avoid runtime dependencies
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Fri, 15 Feb 2013 08:55:04 -0800
|
||||
|
||||
libsdl2 (2.0.0~20130127-1) UNRELEASED; urgency=low
|
||||
|
||||
* New upstream snapshot.
|
||||
|
||||
-- Sam Hocevar <sho@debian.org> Wed, 30 Jan 2013 23:01:12 +0100
|
||||
|
||||
libsdl2 (2.0.0~20130103-1) unstable; urgency=low
|
||||
|
||||
[ Manuel A. Fernandez Montecelo ]
|
||||
* debian/control:
|
||||
- Updating maintainers/permissions:
|
||||
- Add myself and Felix Geyer
|
||||
- Update Build-Depends:
|
||||
- Remove a few obsolete items
|
||||
- Add items added lately to libsdl1.2, such as libts (touch screen)
|
||||
support
|
||||
- Add "libsdl2-dbg", analog to libsdl1.2-dbg
|
||||
- Change "XC-Package-Type: udeb" to "Package-Type"
|
||||
* debian/compat: set level 9
|
||||
* debian/source/format: Set to "3.0 (quilt)"
|
||||
- Remove README.source, not needed with new format
|
||||
* debian/sdl2-config.1: Fix typo, "progams"->"programs"
|
||||
* debian/libsdl2-dev.install:
|
||||
- Remove "usr/lib/*/*.la", discouraged
|
||||
- Add man pages: "usr/share/man/man3/*"
|
||||
* debian/libsdl2-dev.manpages: add file to install local "sdl2-config.1"
|
||||
* debian/sources: Removed, possible obsolete file from long ago?
|
||||
* debian/copyright:
|
||||
- Upstream updated to zlib/libpng
|
||||
- Copyright-file format conversion to 1.0
|
||||
- Complete revamp and detailed research about copyright and licenses used,
|
||||
it's very messy but hopefully complete
|
||||
|
||||
[ Felix Geyer ]
|
||||
* Simplify debian/rules by using dh(1).
|
||||
|
||||
-- Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com> Sun, 27 Jan 2013 16:40:49 +0100
|
||||
|
||||
libsdl2 (2.0~20120220c-1) experimental; urgency=low
|
||||
|
||||
* Upstream version was renamed to 2.0 (Closes: #669367).
|
||||
* New upstream snapshot (Closes: #671506).
|
||||
* This package no longer conflicts with libsdl-1.2.
|
||||
* debian/rules: add multiarch support (Closes: #669364).
|
||||
|
||||
* debian/patches/fix_joystick_misc_axes.diff: fix a joystick remapping
|
||||
bug causing some axes to malfunction.
|
||||
* debian/patches/external_header_paths.diff: provide additional CFLAGS
|
||||
so that headers such as SDL_syswm.h can be included (Closes: #669363).
|
||||
|
||||
-- Sam Hocevar <sho@debian.org> Thu, 17 May 2012 19:03:59 +0200
|
||||
|
||||
libsdl-1.3 (1.3.0~20111204-1) experimental; urgency=low
|
||||
|
||||
* Initial upload from upstream snapshot.
|
||||
|
||||
-- Sam Hocevar <sho@debian.org> Sun, 04 Dec 2011 14:35:05 +0100
|
||||
|
||||
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
9
|
||||
91
debian/control
vendored
91
debian/control
vendored
@@ -1,91 +0,0 @@
|
||||
Source: libsdl2
|
||||
Priority: optional
|
||||
Section: libs
|
||||
Maintainer: Debian SDL packages maintainers <pkg-sdl-maintainers@lists.alioth.debian.org>
|
||||
Uploaders: Barry deFreese <bdefreese@debian.org>,
|
||||
Sam Hocevar <sho@debian.org>,
|
||||
Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>,
|
||||
Felix Geyer <fgeyer@debian.org>,
|
||||
Sam Lantinga <slouken@libsdl.org>
|
||||
Standards-Version: 3.9.3
|
||||
Build-Depends: debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
dpkg-dev (>= 1.16.1~),
|
||||
fcitx-libs-dev [linux-any],
|
||||
libasound2-dev [linux-any],
|
||||
libdbus-1-dev,
|
||||
libegl1-mesa-dev [!hurd-any],
|
||||
libdrm-dev [linux-any],
|
||||
libgl1-mesa-dev,
|
||||
libgles-dev [!hurd-any],
|
||||
libpulse-dev,
|
||||
libudev-dev [linux-any],
|
||||
libdbus-1-dev [linux-any],
|
||||
libibus-1.0-dev[linux-any],
|
||||
libpulse-dev,
|
||||
libsndio-dev,
|
||||
libudev-dev [linux-any],
|
||||
libusb2-dev [kfreebsd-any],
|
||||
libusbhid-dev [kfreebsd-any],
|
||||
libwayland-dev [linux-any],
|
||||
libx11-dev,
|
||||
libxcursor-dev,
|
||||
libxext-dev,
|
||||
libxfixes-dev,
|
||||
libxi-dev,
|
||||
libxinerama-dev,
|
||||
libxkbcommon-dev,
|
||||
libxrandr-dev,
|
||||
libxss-dev,
|
||||
libxxf86vm-dev,
|
||||
libxt-dev,
|
||||
libxv-dev,
|
||||
pkg-config,
|
||||
libsamplerate0-dev,
|
||||
wayland-protocols
|
||||
Homepage: http://www.libsdl.org/
|
||||
|
||||
Package: libsdl2-2.0-0
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libudev1 [linux-any],
|
||||
libdbus-1-3 [linux-any]
|
||||
Conflicts: libsdl-1.3-0
|
||||
Replaces: libsdl-1.3-0
|
||||
Description: Simple DirectMedia Layer
|
||||
SDL is a library that allows programs portable low level access to
|
||||
a video framebuffer, audio output, mouse, and keyboard.
|
||||
.
|
||||
This package contains the shared library, compiled with X11 graphics drivers and OSS, ALSA and PulseAudio sound drivers.
|
||||
|
||||
Package: libsdl2-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends},
|
||||
libsdl2-2.0-0 (= ${binary:Version}),
|
||||
libc6-dev,
|
||||
libgl1-mesa-dev
|
||||
Conflicts: libsdl-1.3-dev
|
||||
Replaces: libsdl-1.3-dev
|
||||
Description: Simple DirectMedia Layer development files
|
||||
SDL is a library that allows programs portable low level access to a video
|
||||
framebuffer, audio output, mouse, and keyboard.
|
||||
.
|
||||
This package contains files needed if you wish to use the SDL library in your own programs.
|
||||
|
||||
Package: libsdl2-dbg
|
||||
Priority: extra
|
||||
Section: debug
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends},
|
||||
libsdl2-2.0-0 (= ${binary:Version}),
|
||||
Description: Simple DirectMedia Layer debug files
|
||||
SDL is a library that allows programs portable low level access to a video
|
||||
framebuffer, audio output, mouse, and keyboard.
|
||||
.
|
||||
This package contains the debug symbols for the SDL library.
|
||||
351
debian/copyright
vendored
351
debian/copyright
vendored
@@ -1,351 +0,0 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: SDL
|
||||
Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
|
||||
Source: http://www.libsdl.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
License: zlib/libpng
|
||||
|
||||
Files: src/libm/*
|
||||
Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
License: SunPro
|
||||
|
||||
Files: src/main/windows/SDL_windows_main.c
|
||||
Copyright: 2022 Sam Lantinga
|
||||
License: PublicDomain_Sam_Lantinga
|
||||
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
|
||||
|
||||
Files: src/render/mmx.h
|
||||
Copyright: 1997-99 by H. Dietz and R. Fisher
|
||||
License: zlib/libpng
|
||||
Comment:
|
||||
Copyright but no mention to license.
|
||||
.
|
||||
Included since long ago with SDL (and its Debian package) under directory
|
||||
src/video/mmx.h
|
||||
|
||||
Files: src/render/SDL_yuv_sw.c
|
||||
Copyright: 1995 Erik Corry
|
||||
1995 The Regents of the University of California
|
||||
1995 Brown University
|
||||
License: BrownUn_UnCalifornia_ErikCorry
|
||||
|
||||
Files: src/test/SDL_test_md5.c
|
||||
Copyright: 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
1990 RSA Data Security, Inc.
|
||||
License: zlib/libpng and RSA_Data_Security
|
||||
|
||||
Files: src/thread/windows/win_ce_semaphore.c
|
||||
Copyright: 1998, Johnson M. Hart (with corrections 2001 by Rainer Loritz)
|
||||
License: Johnson_M._Hart
|
||||
|
||||
Files: src/video/x11/imKStoUCS.c
|
||||
src/video/x11/imKStoUCS.h
|
||||
Copyright: 1994-2003 The XFree86 Project, Inc.
|
||||
License: MIT/X11
|
||||
|
||||
Files: test/testhaptic.c
|
||||
Copyright: 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
2008 Edgar Simo Serra
|
||||
License: BSD_3_clause
|
||||
|
||||
Files: test/testrumble.c
|
||||
Copyright: 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
2011 Edgar Simo Serra
|
||||
License: BSD_3_clause
|
||||
|
||||
Files: test/shapes/*
|
||||
Copyright: none
|
||||
License: zlib/libpng
|
||||
Comment: No specific information about the images
|
||||
|
||||
Files: Xcode/TemplatesForXcode*/*/main.c
|
||||
Copyright: none
|
||||
License: zlib/libpng
|
||||
Comment: SDL files, no copyright or license notice
|
||||
|
||||
Files: Xcode/TemplatesForXcode*/*/atlantis/*
|
||||
Copyright: 1993, 1994, Silicon Graphics, Inc.
|
||||
License: SGI_atlantis
|
||||
|
||||
Files: Xcode/TemplatesForXcode*/*/atlantis/atlantis.c
|
||||
Copyright: 1994 Mark J. Kilgard
|
||||
1993, 1994, Silicon Graphics, Inc.
|
||||
License: SGI_atlantis
|
||||
Comment: See license for full copyright notice, this one is the same except for
|
||||
the additional copyright holder
|
||||
|
||||
Files: Xcode/SDLTest/sdlcommon_prefix.h
|
||||
Copyright: 2003 Darrell Walisser
|
||||
License: zlib/libpng
|
||||
Comment:
|
||||
Created by Darrell Walisser on Wed Aug 06 2003.
|
||||
Copyright (c) 2003 __MyCompanyName__. All rights reserved.
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2011-2012, Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>
|
||||
2011-2012, Felix Geyer <debfx-pkg@fobos.de>
|
||||
2011, Roman Vasiyarov <rvasiyarov@gmail.com>
|
||||
2010, Jon Dowland <jmtd@debian.org>
|
||||
2009, Barry deFreese <bdefreese@debian.org>
|
||||
2007-2008, Aurelien Jarno <aurel32@debian.org>
|
||||
2007-2008, Sam Hocevar (Debian packages) <sam+deb@zoy.org>
|
||||
2002-2007, Josselin Mouette <joss@debian.org>
|
||||
2001, Christian T. Steigies <cts@debian.org>
|
||||
2001, Branden Robinson <branden@debian.org>
|
||||
License: LGPL-2.1+
|
||||
|
||||
|
||||
License: zlib/libpng
|
||||
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.
|
||||
|
||||
License: LGPL-2.1+
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
your option) any later version.
|
||||
.
|
||||
On Debian systems, the complete text of version 2.1 of the GNU Lesser
|
||||
Public License can be found in '/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
License: MIT/X11
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
.
|
||||
Except as contained in this notice, the name of the XFree86 Project shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from the XFree86
|
||||
Project.
|
||||
|
||||
License: BSD_3_clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the LibQxt project nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Comment:
|
||||
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.
|
||||
.
|
||||
.
|
||||
Copyright (c) 2011, Edgar Simo Serra
|
||||
All rights reserved.
|
||||
.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
.
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the Simple Directmedia Layer (SDL) nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: BrownUn_UnCalifornia_ErikCorry
|
||||
/* This code was derived from code carrying the following copyright notices:
|
||||
* Copyright (c) 1995 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose, without fee, and without written agreement is
|
||||
* hereby granted, provided that the above copyright notice and the following
|
||||
* two paragraphs appear in all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
|
||||
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||||
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* Copyright (c) 1995 Erik Corry
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose, without fee, and without written agreement is
|
||||
* hereby granted, provided that the above copyright notice and the following
|
||||
* two paragraphs appear in all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL ERIK CORRY BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
|
||||
* SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
|
||||
* THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ERIK CORRY HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ERIK CORRY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
|
||||
* BASIS, AND ERIK CORRY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* Portions of this software Copyright (c) 1995 Brown University.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose, without fee, and without written agreement
|
||||
* is hereby granted, provided that the above copyright notice and the
|
||||
* following two paragraphs appear in all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
|
||||
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF BROWN
|
||||
* UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* BROWN UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
|
||||
* BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
|
||||
* SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*/
|
||||
|
||||
License: Johnson_M._Hart
|
||||
Permission is granted for any and all use providing that this
|
||||
copyright is properly acknowledged.
|
||||
There are no assurances of suitability for any use whatsoever.
|
||||
|
||||
License: SunPro
|
||||
Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
software is freely granted, provided that this notice
|
||||
is preserved.
|
||||
|
||||
License: PublicDomain_Sam_Lantinga
|
||||
Placed in the public domain by Sam Lantinga 4/13/98
|
||||
|
||||
License: PublicDomain_Edgar_Simo
|
||||
Written by Edgar Simo "bobbens"
|
||||
.
|
||||
Released under Public Domain.
|
||||
|
||||
License: RSA_Data_Security
|
||||
***********************************************************************
|
||||
** utl_md5.c -- the source code for MD5 routines **
|
||||
** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
|
||||
** Created: 2/17/90 RLR **
|
||||
** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. **
|
||||
***********************************************************************
|
||||
***********************************************************************
|
||||
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
|
||||
** **
|
||||
** License to copy and use this software is granted provided that **
|
||||
** it is identified as the "RSA Data Security, Inc. MD5 Message- **
|
||||
** Digest Algorithm" in all material mentioning or referencing this **
|
||||
** software or this function. **
|
||||
** **
|
||||
** License is also granted to make and use derivative works **
|
||||
** provided that such works are identified as "derived from the RSA **
|
||||
** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
|
||||
** material mentioning or referencing the derived work. **
|
||||
** **
|
||||
** RSA Data Security, Inc. makes no representations concerning **
|
||||
** either the merchantability of this software or the suitability **
|
||||
** of this software for any particular purpose. It is provided "as **
|
||||
** is" without express or implied warranty of any kind. **
|
||||
** **
|
||||
** These notices must be retained in any copies of any part of this **
|
||||
** documentation and/or software. **
|
||||
***********************************************************************
|
||||
|
||||
License: SGI_atlantis
|
||||
(c) Copyright 1993, 1994, Silicon Graphics, Inc.
|
||||
ALL RIGHTS RESERVED
|
||||
Permission to use, copy, modify, and distribute this software for
|
||||
any purpose and without fee is hereby granted, provided that the above
|
||||
copyright notice appear in all copies and that both the copyright notice
|
||||
and this permission notice appear in supporting documentation, and that
|
||||
the name of Silicon Graphics, Inc. not be used in advertising
|
||||
or publicity pertaining to distribution of the software without specific,
|
||||
written prior permission.
|
||||
.
|
||||
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
|
||||
AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
|
||||
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
|
||||
FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
|
||||
SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
|
||||
LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
|
||||
THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.
|
||||
US Government Users Restricted Rights
|
||||
Use, duplication, or disclosure by the Government is subject to
|
||||
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
|
||||
(c)(1)(ii) of the Rights in Technical Data and Computer Software
|
||||
clause at DFARS 252.227-7013 and/or in similar or successor
|
||||
clauses in the FAR or the DOD or NASA FAR Supplement.
|
||||
Unpublished-- rights reserved under the copyright laws of the
|
||||
United States. Contractor/manufacturer is Silicon Graphics,
|
||||
Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
|
||||
.
|
||||
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
|
||||
4
debian/docs
vendored
4
debian/docs
vendored
@@ -1,4 +0,0 @@
|
||||
BUGS.txt
|
||||
CREDITS.txt
|
||||
README.md
|
||||
README-SDL.txt
|
||||
1
debian/libsdl2-2.0-0-udeb.install
vendored
1
debian/libsdl2-2.0-0-udeb.install
vendored
@@ -1 +0,0 @@
|
||||
usr/lib/*/libSDL2-2.0.so.0*
|
||||
1
debian/libsdl2-2.0-0.install
vendored
1
debian/libsdl2-2.0-0.install
vendored
@@ -1 +0,0 @@
|
||||
usr/lib/*/libSDL2-2.0.so.0*
|
||||
9
debian/libsdl2-dev.install
vendored
9
debian/libsdl2-dev.install
vendored
@@ -1,9 +0,0 @@
|
||||
usr/bin/sdl2-config
|
||||
usr/include/SDL2
|
||||
usr/lib/*/*.a
|
||||
usr/lib/*/*.la
|
||||
usr/lib/*/*.so
|
||||
usr/lib/*/pkgconfig/sdl2.pc
|
||||
usr/lib/*/cmake/SDL2/sdl2-config.cmake
|
||||
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
|
||||
usr/share/aclocal/sdl2.m4
|
||||
1
debian/libsdl2-dev.manpages
vendored
1
debian/libsdl2-dev.manpages
vendored
@@ -1 +0,0 @@
|
||||
debian/sdl2-config.1
|
||||
54
debian/rules
vendored
54
debian/rules
vendored
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
confflags = --disable-rpath --disable-video-directfb \
|
||||
--disable-nas --disable-esd --disable-arts
|
||||
|
||||
# These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
|
||||
#confflags += --disable-alsa-shared
|
||||
#confflags += --disable-arts-shared
|
||||
#confflags += --disable-directfb-shared
|
||||
#confflags += --disable-esd-shared
|
||||
#confflags += --disable-fusionsound-shared
|
||||
#confflags += --disable-jack-shared
|
||||
#confflags += --disable-kmsdrm-shared
|
||||
#confflags += --disable-libsamplerate-shared
|
||||
#confflags += --disable-nas-shared
|
||||
#confflags += --disable-pulseaudio-shared
|
||||
#confflags += --disable-sndio-shared
|
||||
#confflags += --disable-wayland-shared
|
||||
#confflags += --disable-x11-shared
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -Bbuilddir/all -- $(confflags)
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -Bbuilddir/all
|
||||
tar czf debian/examples.tar.gz test
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -Bbuilddir/all
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean -Bbuilddir/all
|
||||
rm -f debian/examples.tar.gz
|
||||
|
||||
override_dh_install:
|
||||
dh_install --remaining-packages --fail-missing -XlibSDL2.la
|
||||
|
||||
override_dh_installexamples:
|
||||
dh_installexamples -plibsdl2-dev debian/examples.tar.gz
|
||||
dh_installexamples --remaining-packages
|
||||
|
||||
override_dh_link:
|
||||
# to address lintian warning
|
||||
# W: libsdl2-2.0-0: dev-pkg-without-shlib-symlink usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0 usr/lib/x86_64-linux-gnu/libSDL2-2.0.so
|
||||
dh_link -plibsdl2-dev usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=libsdl2-dbg
|
||||
86
debian/sdl2-config.1
vendored
86
debian/sdl2-config.1
vendored
@@ -1,86 +0,0 @@
|
||||
.TH sdl2-config 1 "2012-02-20" "SDL 2.0"
|
||||
.SH NAME
|
||||
sdl2-config \- script to get information about the installed version of SDL
|
||||
.SH SYNOPSIS
|
||||
.B sdl2-config
|
||||
[ --prefix=
|
||||
.IR DIR ]
|
||||
[ --exec-prefix=
|
||||
.IR DIR ]
|
||||
[ --version ] [ --libs | --library-libs | --plugin-libs ] [ --cflags ]
|
||||
.SH DESCRIPTION
|
||||
.B sdl2-config
|
||||
is a tool that is used to configure and determine the compiler and linker
|
||||
flags that should be used to compile and link programs, libraries, and
|
||||
plugins that use SDL. It is also used internally by the m4 macros that are
|
||||
included with SDL.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B --cflags
|
||||
Print the compiler flags that are necessary to compile a program or library
|
||||
that uses SDL.
|
||||
.TP
|
||||
.BI --exec-prefix= DIR
|
||||
If specified, use
|
||||
.I DIR
|
||||
instead of the installation exec prefix that SDL was build with when
|
||||
computing the output for the --cflags, --libs, --library-libs, and
|
||||
--plugin-libs options. This option must be specified before any of the
|
||||
--cflags, --libs, --library-libs, and --plugin-libs options.
|
||||
.TP
|
||||
.B --libs
|
||||
Print the linker flags that are necessary to link a program that uses SDL.
|
||||
.TP
|
||||
.B --static-libs
|
||||
Print the linker flags that are necessary to statically link a program that uses SDL.
|
||||
.TP
|
||||
.B --library-libs
|
||||
Print the linker flags that are necessary to link a library that uses SDL.
|
||||
(This excludes any static objects required for linking, since these must be
|
||||
linked only by executable programs.)
|
||||
.TP
|
||||
.B --plugin-libs
|
||||
Print the linker flags that are necessary to link an SDL-using object that
|
||||
is to be accessed via
|
||||
.IR dlopen (3).
|
||||
This may include static objects with PIC symbol information. This option
|
||||
should
|
||||
.B not
|
||||
be used for ordinary shared libraries or standalone applications.
|
||||
.TP
|
||||
.BI --prefix= DIR
|
||||
If specified, use PREFIX instead of the installation prefix that SDL was
|
||||
built with when computing the output for the --cflags, --libs,
|
||||
--library-libs, and --plugin-libs options. This option is also used for
|
||||
the exec prefix if --exec-prefix was not specified. This option must be
|
||||
specified before any of the --cflags, --libs, --library-libs, and
|
||||
--plugin-libs options.
|
||||
.TP
|
||||
.B --version
|
||||
Prints the currently installed version of SDL on standard output.
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
gcc -o main.o $(sdl2-config --cflags) main.c
|
||||
is how you might use
|
||||
.B sdl2-config
|
||||
to compile a C source file for an executable program.
|
||||
.TP
|
||||
gcc -o my_app $(sdl2-config --libs) main.o util.o
|
||||
is how you might use
|
||||
.B sdl2-config
|
||||
to link compiled objects into an executable program.
|
||||
.TP
|
||||
gcc -o libSDL_nifty-2.0.so.0.0.1 $(sdl --library-libs) read.o write.o munge.o
|
||||
is how you might use
|
||||
.B sdl2-config
|
||||
to link compiled objects into a shared library.
|
||||
.TP
|
||||
gcc -o libnifty_xmms.so $(sdl --plugin-libs) stream.o blit.o deinterlace.o
|
||||
is how you might use
|
||||
.B sdl2-config
|
||||
to link compiled objects into a plugin for use by another program.
|
||||
.SH AUTHOR
|
||||
The Simple DirectMedia Layer (SDL) library was written by Sam Lantinga.
|
||||
.PP
|
||||
This manual page was written by Branden Robinson, originally for Progeny
|
||||
Linux Systems, Inc., and the Debian Project.
|
||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
||||
3.0 (native)
|
||||
2
debian/watch
vendored
2
debian/watch
vendored
@@ -1,2 +0,0 @@
|
||||
version=3
|
||||
http://www.libsdl.org/release/SDL-([\d.]+)\.tar\.gz
|
||||
@@ -206,6 +206,9 @@ You should not use the SDL renderer API while the app going in background:
|
||||
after you read this message, GL context gets backed-up and you should not
|
||||
use the SDL renderer API.
|
||||
|
||||
When this event is received, you have to set the render target to NULL, if you're using it.
|
||||
(eg call SDL_SetRenderTarget(renderer, NULL))
|
||||
|
||||
- SDL_APP_DIDENTERFOREGROUND:
|
||||
GL context is restored, and the SDL renderer API is available (unless you
|
||||
receive SDL_RENDER_DEVICE_RESET).
|
||||
|
||||
@@ -15,29 +15,34 @@ What you need:
|
||||
* Kernel-Framebuffer support: required: vesafb, radeonfb ....
|
||||
* Mesa 7.0.x - optional for OpenGL
|
||||
|
||||
/etc/directfbrc
|
||||
|
||||
This file should contain the following lines to make
|
||||
The `/etc/directfbrc` file should contain the following lines to make
|
||||
your joystick work and avoid crashes:
|
||||
------------------------
|
||||
|
||||
```
|
||||
disable-module=joystick
|
||||
disable-module=cle266
|
||||
disable-module=cyber5k
|
||||
no-linux-input-grab
|
||||
------------------------
|
||||
```
|
||||
|
||||
To disable to use x11 backend when DISPLAY variable is found use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_X11_CHECK=0
|
||||
```
|
||||
|
||||
To disable the use of linux input devices, i.e. multimice/multikeyboard support,
|
||||
use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_LINUX_INPUT=0
|
||||
```
|
||||
|
||||
To use hardware accelerated YUV-overlays for YUV-textures, use:
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_YUV_DIRECT=1
|
||||
```
|
||||
|
||||
This is disabled by default. It will only support one
|
||||
YUV texture, namely the first. Every other YUV texture will be
|
||||
@@ -45,7 +50,9 @@ rendered in software.
|
||||
|
||||
In addition, you may use (directfb-1.2.x)
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_YUV_UNDERLAY=1
|
||||
```
|
||||
|
||||
to make the YUV texture an underlay. This will make the cursor to
|
||||
be shown.
|
||||
@@ -54,14 +61,18 @@ Simple Window Manager
|
||||
=====================
|
||||
|
||||
The driver has support for a very, very basic window manager you may
|
||||
want to use when running with "wm=default". Use
|
||||
want to use when running with `wm=default`. Use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_WM=1
|
||||
```
|
||||
|
||||
to enable basic window borders. In order to have the window title rendered,
|
||||
you need to have the following font installed:
|
||||
|
||||
```
|
||||
/usr/share/fonts/truetype/freefont/FreeSans.ttf
|
||||
```
|
||||
|
||||
OpenGL Support
|
||||
==============
|
||||
@@ -71,21 +82,25 @@ works at least on all directfb supported platforms.
|
||||
|
||||
As of this writing 20100802 you need to pull Mesa from git and do the following:
|
||||
|
||||
------------------------
|
||||
```
|
||||
git clone git://anongit.freedesktop.org/git/mesa/mesa
|
||||
cd mesa
|
||||
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
|
||||
------------------------
|
||||
```
|
||||
|
||||
Edit configs/linux-directfb so that the Directories-section looks like
|
||||
------------------------
|
||||
Edit `configs/linux-directfb` so that the Directories-section looks like this:
|
||||
|
||||
```
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = directfb
|
||||
PROGRAM_DIRS =
|
||||
------------------------
|
||||
```
|
||||
|
||||
Then do the following:
|
||||
|
||||
```
|
||||
make linux-directfb
|
||||
make
|
||||
|
||||
@@ -95,13 +110,14 @@ sudo make install INSTALL_DIR=/usr/local/dfb_GL
|
||||
cd src/mesa/drivers/directfb
|
||||
make
|
||||
sudo make install INSTALL_DIR=/usr/local/dfb_GL
|
||||
------------------------
|
||||
```
|
||||
|
||||
To run the SDL - testprograms:
|
||||
|
||||
```
|
||||
export SDL_VIDEODRIVER=directfb
|
||||
export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
|
||||
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
|
||||
|
||||
./testgl
|
||||
|
||||
```
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
PSP
|
||||
======
|
||||
SDL port for the Sony PSP contributed by
|
||||
Captian Lex
|
||||
SDL2 port for the Sony PSP contributed by:
|
||||
- Captian Lex
|
||||
- Francisco Javier Trujillo Mata
|
||||
- Wouter Wijsman
|
||||
|
||||
|
||||
Credit to
|
||||
Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP
|
||||
Geecko for his PSP GU lib "Glib2d"
|
||||
|
||||
Building
|
||||
--------
|
||||
To build SDL2 library for the PSP, make sure psp-config is in the path and run:
|
||||
make -f Makefile.psp
|
||||
## Building
|
||||
To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
|
||||
Getting PSP toolchain
|
||||
---------------------
|
||||
https://github.com/pspdev/psptoolchain
|
||||
## Getting PSP Dev
|
||||
[Installing PSP Dev](https://github.com/pspdev/pspdev)
|
||||
|
||||
Running on PPSSPP Emulator
|
||||
--------------------------
|
||||
https://github.com/hrydgard/ppsspp
|
||||
( https://github.com/hrydgard/ppsspp/wiki/Build-instructions )
|
||||
## Running on PPSSPP Emulator
|
||||
[PPSSPP](https://github.com/hrydgard/ppsspp)
|
||||
|
||||
Compiling an HelloWorld
|
||||
-----------------------
|
||||
https://psp-dev.org/doku.php?id=tutorial:hello_world
|
||||
[Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions)
|
||||
|
||||
To Do
|
||||
------
|
||||
PSP Screen Keyboard
|
||||
|
||||
## Compiling a HelloWorld
|
||||
[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
|
||||
|
||||
## To Do
|
||||
- PSP Screen Keyboard
|
||||
- Dialogs
|
||||
@@ -1,7 +1,7 @@
|
||||
Using SDL with Microsoft Visual C++
|
||||
===================================
|
||||
|
||||
### by [Lion Kimbro](mailto:snowlion@sprynet.com) with additions by [James Turk](mailto:james@conceptofzero.net)
|
||||
### by Lion Kimbro with additions by James Turk
|
||||
|
||||
You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
|
||||
yourself.
|
||||
|
||||
@@ -3,7 +3,7 @@ PS Vita
|
||||
SDL port for the Sony Playstation Vita and Sony Playstation TV
|
||||
|
||||
Credit to
|
||||
* xerpi and rsn8887 for initial (vita2d) port
|
||||
* xerpi, cpasjuste and rsn8887 for initial (vita2d) port
|
||||
* vitasdk/dolcesdk devs
|
||||
* CBPS discord (Namely Graphene and SonicMastr)
|
||||
|
||||
@@ -22,6 +22,9 @@ Notes
|
||||
* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
|
||||
These renderers support 720p and 1080i resolutions. These can be specified with:
|
||||
`SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
|
||||
* Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK.
|
||||
They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);`
|
||||
anytime before video subsystem initialization.
|
||||
* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
|
||||
* By default SDL emits mouse events for touch events on every touchscreen.
|
||||
Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.
|
||||
|
||||
@@ -1,45 +1,58 @@
|
||||
Windows
|
||||
================================================================================
|
||||
# Windows
|
||||
|
||||
================================================================================
|
||||
OpenGL ES 2.x support
|
||||
================================================================================
|
||||
## LLVM and Intel C++ compiler support
|
||||
|
||||
SDL has support for OpenGL ES 2.x under Windows via two alternative
|
||||
implementations.
|
||||
The most straightforward method consists in running your app in a system with
|
||||
a graphic card paired with a relatively recent (as of November of 2013) driver
|
||||
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
|
||||
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
|
||||
compiler, but you'll have to manually add the "-msse3" command line option
|
||||
to at least the SDL_audiocvt.c source file, and possibly others. This may
|
||||
not be necessary if you build SDL with CMake instead of the included Visual
|
||||
Studio solution.
|
||||
|
||||
Details are here: https://github.com/libsdl-org/SDL/issues/5186
|
||||
|
||||
|
||||
## OpenGL ES 2.x support
|
||||
|
||||
SDL has support for OpenGL ES 2.x under Windows via two alternative
|
||||
implementations.
|
||||
|
||||
The most straightforward method consists in running your app in a system with
|
||||
a graphic card paired with a relatively recent (as of November of 2013) driver
|
||||
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
|
||||
to ship said extension on Windows currently include nVidia and Intel.
|
||||
|
||||
The other method involves using the ANGLE library (https://code.google.com/p/angleproject/)
|
||||
If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile
|
||||
extension is found, SDL will try to load the libEGL.dll library provided by
|
||||
ANGLE.
|
||||
The other method involves using the
|
||||
[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
|
||||
context is requested and no WGL_EXT_create_context_es2_profile extension is
|
||||
found, SDL will try to load the libEGL.dll library provided by ANGLE.
|
||||
|
||||
To obtain the ANGLE binaries, you can either compile from source from
|
||||
https://chromium.googlesource.com/angle/angle or copy the relevant binaries from
|
||||
a recent Chrome/Chromium install for Windows. The files you need are:
|
||||
|
||||
* libEGL.dll
|
||||
* libGLESv2.dll
|
||||
* d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)
|
||||
or...
|
||||
* d3dcompiler_43.dll (supports Windows XP or later)
|
||||
https://chromium.googlesource.com/angle/angle or copy the relevant binaries
|
||||
from a recent Chrome/Chromium install for Windows. The files you need are:
|
||||
|
||||
- libEGL.dll
|
||||
- libGLESv2.dll
|
||||
- d3dcompiler_46.dll (supports Windows Vista or later, better shader
|
||||
compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
|
||||
|
||||
If you compile ANGLE from source, you can configure it so it does not need the
|
||||
d3dcompiler_* DLL at all (for details on this, see their documentation).
|
||||
d3dcompiler_* DLL at all (for details on this, see their documentation).
|
||||
However, by default SDL will try to preload the d3dcompiler_46.dll to
|
||||
comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to
|
||||
support Windows XP) or to skip this step at all, you can use the
|
||||
SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).
|
||||
comply with ANGLE's requirements. If you wish SDL to preload
|
||||
d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
|
||||
can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
|
||||
details).
|
||||
|
||||
Known Bugs:
|
||||
|
||||
* SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
|
||||
that there's a bug in the library which prevents the window contents from
|
||||
refreshing if this is set to anything other than the default value.
|
||||
|
||||
Vulkan Surface Support
|
||||
==============
|
||||
|
||||
Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application.
|
||||
- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
|
||||
that there's a bug in the library which prevents the window contents from
|
||||
refreshing if this is set to anything other than the default value.
|
||||
|
||||
## Vulkan Surface Support
|
||||
|
||||
Support for creating Vulkan surfaces is configured on by default. To disable
|
||||
it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
|
||||
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
|
||||
use Vulkan graphics in your application.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ hardware via OpenGL and Direct3D. It is used by video playback software,
|
||||
emulators, and popular games including Valve's award winning catalog
|
||||
and many Humble Bundle games.
|
||||
|
||||
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
||||
SDL officially supports Windows, macOS, Linux, iOS, and Android.
|
||||
Support for other platforms may be found in the source code.
|
||||
|
||||
SDL is written in C, works natively with C++, and there are bindings
|
||||
@@ -38,7 +38,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
|
||||
- [Git](README-git.md)
|
||||
- [iOS](README-ios.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [OS X](README-macosx.md)
|
||||
- [macOS](README-macos.md)
|
||||
- [OS/2](README-os2.md)
|
||||
- [Native Client](README-nacl.md)
|
||||
- [Pandora](README-pandora.md)
|
||||
|
||||
@@ -500,9 +500,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
||||
* hardware.
|
||||
*
|
||||
* `spec` will be filled with the sample rate, sample format, and channel
|
||||
* count. All other values in the structure are filled with 0. When the
|
||||
* supported struct members are 0, SDL was unable to get the property from the
|
||||
* backend.
|
||||
* count.
|
||||
*
|
||||
* \param index the index of the audio device; valid values range from 0 to
|
||||
* SDL_GetNumAudioDevices() - 1
|
||||
|
||||
@@ -67,9 +67,8 @@ typedef enum
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
|
||||
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
/**
|
||||
@@ -87,7 +86,6 @@ typedef enum
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||
|
||||
} SDL_BlendFactor;
|
||||
|
||||
/**
|
||||
@@ -135,10 +133,10 @@ typedef enum
|
||||
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||
* SDL_BlendMode enumeration.
|
||||
*
|
||||
* - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors.
|
||||
* - **direct3d11**: Supports all operations with all factors. However, some
|
||||
* - **direct3d**: Supports all operations with all factors. However, some
|
||||
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||
* - **direct3d11**: Same as Direct3D 9.
|
||||
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||
* 2.0.6.
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "SDL_config_iphoneos.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__PSP__)
|
||||
#include "SDL_config_psp.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
|
||||
@@ -253,6 +253,7 @@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
#cmakedefine HAVE_TPCSHRD_H @HAVE_TPCSHRD_H@
|
||||
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
|
||||
#cmakedefine HAVE_ROAPI_H @HAVE_ROAPI_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
@@ -277,6 +278,8 @@
|
||||
#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@
|
||||
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
#cmakedefine SDL_LOCALE_DISABLED @SDL_LOCALE_DISABLED@
|
||||
#cmakedefine SDL_MISC_DISABLED @SDL_MISC_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
@@ -491,6 +494,12 @@
|
||||
#cmakedefine SDL_FILESYSTEM_VITA @SDL_FILESYSTEM_VITA@
|
||||
#cmakedefine SDL_FILESYSTEM_PSP @SDL_FILESYSTEM_PSP@
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#cmakedefine SDL_MISC_DUMMY @SDL_MISC_DUMMY@
|
||||
|
||||
/* Enable locale subsystem */
|
||||
#cmakedefine SDL_LOCALE_DUMMY @SDL_LOCALE_DUMMY@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
@@ -512,6 +521,7 @@
|
||||
|
||||
#cmakedefine SDL_VIDEO_VITA_PIB @SDL_VIDEO_VITA_PIB@
|
||||
#cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@
|
||||
#cmakedefine SDL_VIDEO_VITA_PVR_OGL @SDL_VIDEO_VITA_PVR_OGL@
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
|
||||
@@ -242,6 +242,7 @@
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_TPCSHRD_H
|
||||
#undef HAVE_SENSORSAPI_H
|
||||
#undef HAVE_ROAPI_H
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
@@ -263,6 +264,8 @@
|
||||
#undef SDL_VIDEO_DISABLED
|
||||
#undef SDL_POWER_DISABLED
|
||||
#undef SDL_FILESYSTEM_DISABLED
|
||||
#undef SDL_LOCALE_DISABLED
|
||||
#undef SDL_MISC_DISABLED
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_AAUDIO
|
||||
@@ -445,16 +448,24 @@
|
||||
#undef SDL_POWER_HARDWIRED
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_HAIKU
|
||||
#undef SDL_FILESYSTEM_COCOA
|
||||
#undef SDL_FILESYSTEM_DUMMY
|
||||
#undef SDL_FILESYSTEM_RISCOS
|
||||
#undef SDL_FILESYSTEM_UNIX
|
||||
#undef SDL_FILESYSTEM_WINDOWS
|
||||
#undef SDL_FILESYSTEM_NACL
|
||||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
#undef SDL_FILESYSTEM_OS2
|
||||
#undef SDL_FILESYSTEM_RISCOS
|
||||
#undef SDL_FILESYSTEM_VITA
|
||||
#undef SDL_FILESYSTEM_PSP
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#undef SDL_MISC_DUMMY
|
||||
|
||||
/* Enable locale subsystem */
|
||||
#undef SDL_LOCALE_DUMMY
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
/* Enable various threading systems */
|
||||
#ifdef __EMSCRIPTEN_PTHREADS__
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
/*
|
||||
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_psp_h_
|
||||
#define SDL_config_psp_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 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_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 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_SCALBN 1
|
||||
#define HAVE_SCALBNF 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
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
/* #define HAVE_SYSCONF 1 */
|
||||
/* #define HAVE_SIGACTION 1 */
|
||||
|
||||
|
||||
/* PSP isn't that sophisticated */
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the PSP thread support (src/thread/psp/\*.c) */
|
||||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the PSP timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMER_PSP 1
|
||||
|
||||
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable the PSP audio driver (src/audio/psp/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_PSP 1
|
||||
|
||||
/* PSP video driver */
|
||||
#define SDL_VIDEO_DRIVER_PSP 1
|
||||
|
||||
/* PSP render driver */
|
||||
#define SDL_VIDEO_RENDER_PSP 1
|
||||
|
||||
#define SDL_POWER_PSP 1
|
||||
|
||||
/* Enable the PSP filesystem support (src/filesystem/psp/\*.c) */
|
||||
#define SDL_FILESYSTEM_PSP 1
|
||||
|
||||
/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* PSP doesn't have HIDAPI available */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* PSP can't load shared object (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
#endif /* SDL_config_psp_h_ */
|
||||
@@ -90,6 +90,10 @@ typedef unsigned int uintptr_t;
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define HAVE_GCC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
@@ -100,6 +104,7 @@ typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
|
||||
@@ -92,6 +92,10 @@ typedef unsigned int uintptr_t;
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define HAVE_GCC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_DXGI_H 1
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
@@ -191,6 +195,8 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
#define HAVE_ROAPI_H 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
/*
|
||||
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_wiz_h_
|
||||
#define SDL_config_wiz_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 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_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 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_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 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
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_POW 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* SDL_config_wiz_h_ */
|
||||
@@ -65,6 +65,15 @@ _m_prefetch(void *__P)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
/* predefs from newer gcc and clang versions: */
|
||||
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
|
||||
@@ -102,6 +102,7 @@ typedef enum
|
||||
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
|
||||
input language or keyboard layout change.
|
||||
*/
|
||||
SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
|
||||
|
||||
/* Mouse events */
|
||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||
@@ -243,6 +244,19 @@ typedef struct SDL_TextEditingEvent
|
||||
Sint32 length; /**< The length of selected editing text */
|
||||
} SDL_TextEditingEvent;
|
||||
|
||||
/**
|
||||
* \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
|
||||
* truncated if stored in the text buffer SDL_TextEditingEvent
|
||||
*/
|
||||
typedef struct SDL_TextEditingExtEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
|
||||
Sint32 start; /**< The start cursor of selected editing text */
|
||||
Sint32 length; /**< The length of selected editing text */
|
||||
} SDL_TextEditingExtEvent;
|
||||
|
||||
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
|
||||
/**
|
||||
@@ -601,6 +615,7 @@ typedef union SDL_Event
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
|
||||
@@ -869,8 +869,9 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon
|
||||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. The first controller to offer this feature was the PlayStation 5's
|
||||
* DualShock 5.
|
||||
* a whole. This is currently only supported on Xbox One controllers. If you
|
||||
* want the (more common) whole-controller rumble, use
|
||||
* SDL_GameControllerRumble() instead.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0
|
||||
|
||||
@@ -412,6 +412,19 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether raising the window should be done more forcefully
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - No forcing (the default)
|
||||
* "1" - Extra level of forcing
|
||||
*
|
||||
* At present, this is only an issue under MS Windows, which makes it nearly impossible to
|
||||
* programmatically move a window to the foreground, for "security" reasons. See
|
||||
* http://stackoverflow.com/a/34414846 for a discussion.
|
||||
*/
|
||||
#define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
|
||||
*
|
||||
@@ -566,6 +579,17 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
|
||||
|
||||
/**
|
||||
* \brief A variable to control if extended IME text support is enabled.
|
||||
* If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
|
||||
* Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
|
||||
* "1" - Modern behavior.
|
||||
*/
|
||||
#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||
* should be hidden.
|
||||
@@ -612,6 +636,21 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
|
||||
* the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
|
||||
* this is useful for applications that need full compatibility for things like ADSR envelopes.
|
||||
* Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
|
||||
* Rumble is both at any arbitrary value,
|
||||
* StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Normal rumble behavior is behavior is used (default)
|
||||
* "1" - Proper GameCube controller rumble behavior is used
|
||||
*
|
||||
*/
|
||||
#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.
|
||||
*
|
||||
@@ -766,7 +805,6 @@ extern "C" {
|
||||
* This variable can be set to the following values:
|
||||
* "0" - RAWINPUT drivers are not used
|
||||
* "1" - RAWINPUT drivers are used (the default)
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
|
||||
|
||||
@@ -783,6 +821,15 @@ 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:
|
||||
* "0" - ROG Chakram mice do not show up as joysticks (the default)
|
||||
* "1" - ROG Chakram mice show up as joysticks
|
||||
*/
|
||||
#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
|
||||
@@ -886,6 +933,22 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative mouse mode constrains the mouse to the window
|
||||
* "1" - Relative mouse mode constrains the mouse to the center of the window
|
||||
*
|
||||
* Constraining to the center of the window works better for FPS games and when the
|
||||
* application is running over RDP. Constraining to the whole window works better
|
||||
* for 2D games and increases the chance that the mouse will be in the correct
|
||||
* position when using high DPI mice.
|
||||
*
|
||||
* By default SDL will constrain the mouse to the center of the window
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
@@ -922,6 +985,19 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - The mouse is not captured while mouse buttons are pressed
|
||||
* "1" - The mouse is captured while mouse buttons are pressed
|
||||
*
|
||||
* By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
|
||||
* outside the window, the application continues to receive mouse events until the button is
|
||||
* released.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
|
||||
*
|
||||
@@ -1278,6 +1354,18 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling which touchpad should generate synthetic mouse events
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Only front touchpad should generate mouse events. Default
|
||||
* "1" - Only back touchpad should generate mouse events.
|
||||
* "2" - Both touchpads should generate mouse events.
|
||||
*
|
||||
* By default SDL will generate mouse events for all touch devices
|
||||
*/
|
||||
#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / tvOS remotes
|
||||
* should be listed as joystick devices, instead of sending keyboard events.
|
||||
@@ -1387,6 +1475,20 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
|
||||
*
|
||||
* When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
|
||||
* available. (Note that, by default, libdecor will use xdg-decoration itself if available).
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - libdecor is enabled only if server-side decorations are unavailable.
|
||||
* "1" - libdecor is always enabled if available.
|
||||
*
|
||||
* libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
|
||||
|
||||
/**
|
||||
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
|
||||
*
|
||||
@@ -1406,6 +1508,28 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
||||
|
||||
/**
|
||||
* \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Don't add any graphics flags to the SDL_WindowFlags
|
||||
* "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
|
||||
*
|
||||
* By default SDL will not make the foreign window compatible with OpenGL.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
|
||||
|
||||
/**
|
||||
* \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Don't add any graphics flags to the SDL_WindowFlags
|
||||
* "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
|
||||
*
|
||||
* By default SDL will not make the foreign window compatible with Vulkan.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
|
||||
|
||||
/**
|
||||
* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
|
||||
*
|
||||
@@ -1824,6 +1948,97 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
|
||||
|
||||
/**
|
||||
* \brief A variable that forces X11 windows to create as a custom type.
|
||||
*
|
||||
* This is currently only used for X11 and ignored elsewhere.
|
||||
*
|
||||
* During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
|
||||
* to report to the window manager the type of window it wants to create.
|
||||
* This might be set to various things if SDL_WINDOW_TOOLTIP or
|
||||
* SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
|
||||
* haven't set a specific type, this hint can be used to specify a custom
|
||||
* type. For example, a dock window might set this to
|
||||
* "_NET_WM_WINDOW_TYPE_DOCK".
|
||||
*
|
||||
* If not set or set to "", this hint is ignored. This hint must be set
|
||||
* before the SDL_CreateWindow() call that it is intended to affect.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22.
|
||||
*/
|
||||
#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides whether to send SDL_QUIT when closing the final window.
|
||||
*
|
||||
* By default, SDL sends an SDL_QUIT event when there is only one window
|
||||
* and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
|
||||
* apps would also take the loss of this window as a signal to terminate the
|
||||
* program.
|
||||
*
|
||||
* However, it's not unreasonable in some cases to have the program continue
|
||||
* to live on, perhaps to create new windows later.
|
||||
*
|
||||
* Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
|
||||
* when the final window is requesting to close. Note that in this case,
|
||||
* there are still other legitimate reasons one might get an SDL_QUIT
|
||||
* event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
|
||||
* on Unix, etc.
|
||||
*
|
||||
* The default value is "1". This hint can be changed at any time.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you always get
|
||||
* an SDL_QUIT event when closing the final window.
|
||||
*/
|
||||
#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what video backend to use.
|
||||
*
|
||||
* By default, SDL will try all available video backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "x11" if, say, you are
|
||||
* on Wayland but want to try talking to the X server instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best video backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what audio backend to use.
|
||||
*
|
||||
* By default, SDL will try all available audio backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "alsa" if, say, you are
|
||||
* on PulseAudio but want to try talking to the lower level instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best audio backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
|
||||
@@ -829,9 +829,9 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo
|
||||
* Each call to this function cancels any previous trigger rumble effect, and
|
||||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this function is for _trigger_ rumble; the first joystick to
|
||||
* support this was the PlayStation 5's DualShock 5 controller. If you want
|
||||
* the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. This is currently only supported on Xbox One controllers. If you
|
||||
* want the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* instead.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
|
||||
@@ -268,9 +268,30 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
||||
|
||||
/**
|
||||
* Dismiss the composition window/IME without disabling the subsystem.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*
|
||||
* \sa SDL_StartTextInput
|
||||
* \sa SDL_StopTextInput
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
|
||||
|
||||
/**
|
||||
* Returns if an IME Composite or Candidate window is currently shown.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
|
||||
|
||||
/**
|
||||
* Set the rectangle used to type Unicode text inputs.
|
||||
*
|
||||
* Note: If you want use system native IME window, try to set hint
|
||||
* **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
|
||||
* any feedback.
|
||||
*
|
||||
* \param rect the SDL_Rect structure representing the rectangle to receive
|
||||
* text (ignored if NULL)
|
||||
*
|
||||
|
||||
@@ -92,6 +92,7 @@ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||
*
|
||||
* \param window SDL_Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width in pixels, may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels, may be NULL
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
|
||||
@@ -54,8 +54,8 @@ typedef struct SDL_Point
|
||||
/**
|
||||
* The structure that defines a point (floating point)
|
||||
*
|
||||
* \sa SDL_EnclosePoints
|
||||
* \sa SDL_PointInRect
|
||||
* \sa SDL_EncloseFPoints
|
||||
* \sa SDL_PointInFRect
|
||||
*/
|
||||
typedef struct SDL_FPoint
|
||||
{
|
||||
@@ -71,6 +71,7 @@ typedef struct SDL_FPoint
|
||||
* \sa SDL_RectEquals
|
||||
* \sa SDL_HasIntersection
|
||||
* \sa SDL_IntersectRect
|
||||
* \sa SDL_IntersectRectAndLine
|
||||
* \sa SDL_UnionRect
|
||||
* \sa SDL_EnclosePoints
|
||||
*/
|
||||
@@ -83,6 +84,16 @@ typedef struct SDL_Rect
|
||||
|
||||
/**
|
||||
* A rectangle, with the origin at the upper left (floating point).
|
||||
*
|
||||
* \sa SDL_FRectEmpty
|
||||
* \sa SDL_FRectEquals
|
||||
* \sa SDL_FRectEqualsEpsilon
|
||||
* \sa SDL_HasIntersectionF
|
||||
* \sa SDL_IntersectFRect
|
||||
* \sa SDL_IntersectFRectAndLine
|
||||
* \sa SDL_UnionFRect
|
||||
* \sa SDL_EncloseFPoints
|
||||
* \sa SDL_PointInFRect
|
||||
*/
|
||||
typedef struct SDL_FRect
|
||||
{
|
||||
@@ -213,6 +224,147 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
||||
int *Y1, int *X2,
|
||||
int *Y2);
|
||||
|
||||
|
||||
/* SDL_FRect versions... */
|
||||
|
||||
/**
|
||||
* Returns true if point resides inside a rectangle.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
|
||||
{
|
||||
return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
|
||||
(p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the rectangle has no area.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
|
||||
{
|
||||
return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the two rectangles are equal, within some given epsilon.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
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_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the two rectangles are equal, using a default epsilon.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
|
||||
{
|
||||
return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether two rectangles intersect with float precision.
|
||||
*
|
||||
* If either pointer is NULL the function will return SDL_FALSE.
|
||||
*
|
||||
* \param A an SDL_FRect structure representing the first rectangle
|
||||
* \param B an SDL_FRect structure representing the second rectangle
|
||||
* \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*
|
||||
* \sa SDL_IntersectRect
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
|
||||
const SDL_FRect * B);
|
||||
|
||||
/**
|
||||
* Calculate the intersection of two rectangles with float precision.
|
||||
*
|
||||
* If `result` is NULL then this function will return SDL_FALSE.
|
||||
*
|
||||
* \param A an SDL_FRect structure representing the first rectangle
|
||||
* \param B an SDL_FRect structure representing the second rectangle
|
||||
* \param result an SDL_FRect structure filled in with the intersection of
|
||||
* rectangles `A` and `B`
|
||||
* \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*
|
||||
* \sa SDL_HasIntersectionF
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
|
||||
const SDL_FRect * B,
|
||||
SDL_FRect * result);
|
||||
|
||||
/**
|
||||
* Calculate the union of two rectangles with float precision.
|
||||
*
|
||||
* \param A an SDL_FRect structure representing the first rectangle
|
||||
* \param B an SDL_FRect structure representing the second rectangle
|
||||
* \param result an SDL_FRect structure filled in with the union of rectangles
|
||||
* `A` and `B`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
|
||||
const SDL_FRect * B,
|
||||
SDL_FRect * result);
|
||||
|
||||
/**
|
||||
* Calculate a minimal rectangle enclosing a set of points with float
|
||||
* precision.
|
||||
*
|
||||
* If `clip` is not NULL then only points inside of the clipping rectangle are
|
||||
* considered.
|
||||
*
|
||||
* \param points an array of SDL_FPoint structures representing points to be
|
||||
* enclosed
|
||||
* \param count the number of structures in the `points` array
|
||||
* \param clip an SDL_FRect used for clipping or NULL to enclose all points
|
||||
* \param result an SDL_FRect structure filled in with the minimal enclosing
|
||||
* rectangle
|
||||
* \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
|
||||
* points were outside of the clipping rectangle.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
|
||||
int count,
|
||||
const SDL_FRect * clip,
|
||||
SDL_FRect * result);
|
||||
|
||||
/**
|
||||
* Calculate the intersection of a rectangle and line segment with float
|
||||
* precision.
|
||||
*
|
||||
* This function is used to clip a line segment to a rectangle. A line segment
|
||||
* contained entirely within the rectangle or that does not intersect will
|
||||
* remain unchanged. A line segment that crosses the rectangle at either or
|
||||
* both ends will be clipped to the boundary of the rectangle and the new
|
||||
* coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
|
||||
*
|
||||
* \param rect an SDL_FRect structure representing the rectangle to intersect
|
||||
* \param X1 a pointer to the starting X-coordinate of the line
|
||||
* \param Y1 a pointer to the starting Y-coordinate of the line
|
||||
* \param X2 a pointer to the ending X-coordinate of the line
|
||||
* \param Y2 a pointer to the ending Y-coordinate of the line
|
||||
* \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
|
||||
rect, float *X1,
|
||||
float *Y1, float *X2,
|
||||
float *Y2);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -261,6 +261,17 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface *
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* Get the window associated with a renderer.
|
||||
*
|
||||
* \param renderer the renderer to query
|
||||
* \returns the window on success or NULL on failure; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* Get information about a rendering context.
|
||||
*
|
||||
@@ -356,11 +367,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer
|
||||
* \param texture the texture to query
|
||||
* \param format a pointer filled in with the raw format of the texture; the
|
||||
* actual format may differ, but pixel transfers will use this
|
||||
* format (one of the SDL_PixelFormatEnum values)
|
||||
* format (one of the SDL_PixelFormatEnum values). This argument
|
||||
* can be NULL if you don't need this information.
|
||||
* \param access a pointer filled in with the actual access to the texture
|
||||
* (one of the SDL_TextureAccess values)
|
||||
* \param w a pointer filled in with the width of the texture in pixels
|
||||
* \param h a pointer filled in with the height of the texture in pixels
|
||||
* (one of the SDL_TextureAccess values). This argument can be
|
||||
* NULL if you don't need this information.
|
||||
* \param w a pointer filled in with the width of the texture in pixels. This
|
||||
* argument can be NULL if you don't need this information.
|
||||
* \param h a pointer filled in with the height of the texture in pixels. This
|
||||
* argument can be NULL if you don't need this information.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
@@ -1603,6 +1618,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
|
||||
* vertex array Color and alpha modulation is done per vertex
|
||||
* (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
|
||||
*
|
||||
* \param renderer The rendering context.
|
||||
* \param texture (optional) The SDL texture to use.
|
||||
* \param vertices Vertices.
|
||||
* \param num_vertices Number of vertices.
|
||||
@@ -1627,6 +1643,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
|
||||
* vertex arrays Color and alpha modulation is done per vertex
|
||||
* (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
|
||||
*
|
||||
* \param renderer The rendering context.
|
||||
* \param texture (optional) The SDL texture to use.
|
||||
* \param xy Vertex positions
|
||||
* \param xy_stride Byte size to move from one element to the next element
|
||||
@@ -1658,7 +1675,8 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||
* Read pixels from the current rendering target to an array of pixels.
|
||||
*
|
||||
* **WARNING**: This is a very slow operation, and should not be used
|
||||
* frequently.
|
||||
* frequently. If you're using this on the main rendering target, it should be
|
||||
* called after rendering and before SDL_RenderPresent().
|
||||
*
|
||||
* `pitch` specifies the number of bytes between rows in the destination
|
||||
* `pixels` data. This allows you to write to a subrectangle or have padded
|
||||
|
||||
@@ -234,6 +234,19 @@ typedef uint64_t Uint64;
|
||||
|
||||
/* @} *//* Basic data types */
|
||||
|
||||
/**
|
||||
* \name Floating-point constants
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
#ifdef FLT_EPSILON
|
||||
#define SDL_FLT_EPSILON FLT_EPSILON
|
||||
#else
|
||||
#define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
|
||||
#endif
|
||||
|
||||
/* @} *//* Floating-point constants */
|
||||
|
||||
/* Make sure we have macros for printing width-based integers.
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
@@ -354,8 +367,14 @@ typedef uint64_t Uint64;
|
||||
#endif
|
||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
|
||||
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
|
||||
#else /* universal, but may trigger -Wunused-local-typedefs */
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
#endif
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
|
||||
|
||||
@@ -425,6 +425,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permis
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
|
||||
|
||||
/**
|
||||
* Send a user command to SDLActivity.
|
||||
*
|
||||
* Override "boolean onUnhandledMessage(Message msg)" to handle the message.
|
||||
*
|
||||
* \param command user command that must be greater or equal to 0x8000
|
||||
* \param param user parameter
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
/* Platform specific functions for WinRT */
|
||||
|
||||
@@ -298,6 +298,8 @@ struct SDL_SysWMinfo
|
||||
struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
|
||||
struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
|
||||
struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */
|
||||
struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */
|
||||
struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */
|
||||
} wl;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
|
||||
|
||||
@@ -95,6 +95,14 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
|
||||
*/
|
||||
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
|
||||
|
||||
/**
|
||||
* Get the touch device name as reported from the driver or NULL if the index
|
||||
* is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index);
|
||||
|
||||
/**
|
||||
* Get the type of the given touch device.
|
||||
*
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 20
|
||||
#define SDL_PATCHLEVEL 22
|
||||
|
||||
/**
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
|
||||
@@ -1337,6 +1337,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
|
||||
* Mouse grab confines the mouse cursor to the window.
|
||||
*
|
||||
* \param window The window for which the mouse grab mode should be set.
|
||||
* \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
#ifdef __BORLANDC__
|
||||
#pragma nopackwarning
|
||||
#endif
|
||||
#ifdef _M_X64
|
||||
#ifdef _WIN64
|
||||
/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
|
||||
#pragma pack(push,8)
|
||||
#else
|
||||
|
||||
@@ -153,8 +153,7 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
Uint32 flags_initialized = 0;
|
||||
|
||||
if (!SDL_MainIsReady) {
|
||||
SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
|
||||
return -1;
|
||||
return SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
|
||||
}
|
||||
|
||||
/* Clear the error message */
|
||||
@@ -208,7 +207,7 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
|
||||
/* Initialize the timer subsystem */
|
||||
if ((flags & SDL_INIT_TIMER)){
|
||||
#if !SDL_TIMERS_DISABLED
|
||||
#if !SDL_TIMERS_DISABLED && !SDL_TIMER_DUMMY
|
||||
if (SDL_PrivateShouldInitSubsystem(SDL_INIT_TIMER)) {
|
||||
if (SDL_TimerInit() < 0) {
|
||||
goto quit_and_error;
|
||||
@@ -317,6 +316,8 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
#endif
|
||||
}
|
||||
|
||||
(void) flags_initialized; /* make static analysis happy, since this only gets used in error cases. */
|
||||
|
||||
return (0);
|
||||
|
||||
quit_and_error:
|
||||
@@ -402,7 +403,7 @@ SDL_QuitSubSystem(Uint32 flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !SDL_TIMERS_DISABLED
|
||||
#if !SDL_TIMERS_DISABLED && !SDL_TIMER_DUMMY
|
||||
if ((flags & SDL_INIT_TIMER)) {
|
||||
if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_TIMER)) {
|
||||
SDL_TimerQuit();
|
||||
|
||||
@@ -178,6 +178,11 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
|
||||
return;
|
||||
}
|
||||
hint->name = SDL_strdup(name);
|
||||
if (!hint->name) {
|
||||
SDL_free(hint);
|
||||
SDL_OutOfMemory();
|
||||
return;
|
||||
}
|
||||
hint->value = NULL;
|
||||
hint->priority = SDL_HINT_DEFAULT;
|
||||
hint->callbacks = NULL;
|
||||
|
||||
93
src/SDL_list.c
Normal file
93
src/SDL_list.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include "./SDL_list.h"
|
||||
|
||||
/* Push */
|
||||
int
|
||||
SDL_ListAdd(SDL_ListNode **head, void *ent)
|
||||
{
|
||||
SDL_ListNode *node = SDL_malloc(sizeof (*node));
|
||||
|
||||
if (node == NULL) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
node->entry = ent;
|
||||
node->next = *head;
|
||||
*head = node;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Pop from end as a FIFO (if add with SDL_ListAdd) */
|
||||
void
|
||||
SDL_ListPop(SDL_ListNode **head, void **ent)
|
||||
{
|
||||
SDL_ListNode **ptr = head;
|
||||
|
||||
/* Invalid or empty */
|
||||
if (head == NULL || *head == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
while ((*ptr)->next) {
|
||||
ptr = &(*ptr)->next;
|
||||
}
|
||||
|
||||
if (ent) {
|
||||
*ent = (*ptr)->entry;
|
||||
}
|
||||
|
||||
SDL_free(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
SDL_ListRemove(SDL_ListNode **head, void *ent)
|
||||
{
|
||||
SDL_ListNode **ptr = head;
|
||||
|
||||
while (*ptr) {
|
||||
if ((*ptr)->entry == ent) {
|
||||
SDL_ListNode *tmp = *ptr;
|
||||
*ptr = (*ptr)->next;
|
||||
SDL_free(tmp);
|
||||
return;
|
||||
}
|
||||
ptr = &(*ptr)->next;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SDL_ListClear(SDL_ListNode **head)
|
||||
{
|
||||
SDL_ListNode *l = *head;
|
||||
*head = NULL;
|
||||
while (l) {
|
||||
SDL_ListNode *tmp = l;
|
||||
l = l->next;
|
||||
SDL_free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
39
src/SDL_list.h
Normal file
39
src/SDL_list.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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_list_h_
|
||||
#define SDL_list_h_
|
||||
|
||||
typedef struct SDL_ListNode
|
||||
{
|
||||
void *entry;
|
||||
struct SDL_ListNode *next;
|
||||
} SDL_ListNode;
|
||||
|
||||
|
||||
int SDL_ListAdd(SDL_ListNode **head, void *ent);
|
||||
void SDL_ListPop(SDL_ListNode **head, void **ent);
|
||||
void SDL_ListRemove(SDL_ListNode **head, void *ent);
|
||||
void SDL_ListClear(SDL_ListNode **head);
|
||||
|
||||
#endif /* SDL_list_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -245,11 +245,6 @@ SDL_AudioThreadDeinit_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_AudioBeginLoopIteration_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_AudioWaitDevice_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
@@ -277,11 +272,6 @@ SDL_AudioFlushCapture_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_AudioPrepareToClose_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_AudioCloseDevice_Default(_THIS)
|
||||
{ /* no-op. */
|
||||
@@ -299,7 +289,7 @@ SDL_AudioFreeDeviceHandle_Default(void *handle)
|
||||
|
||||
|
||||
static int
|
||||
SDL_AudioOpenDevice_Default(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_AudioOpenDevice_Default(_THIS, const char *devname)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
@@ -334,11 +324,6 @@ SDL_AudioUnlockDevice_Default(SDL_AudioDevice * device)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_AudioLockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice * device)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
finish_audio_entry_points_init(void)
|
||||
{
|
||||
@@ -347,14 +332,6 @@ finish_audio_entry_points_init(void)
|
||||
* blindly call them without having to check for validity first.
|
||||
*/
|
||||
|
||||
if (current_audio.impl.SkipMixerLock) {
|
||||
if (current_audio.impl.LockDevice == NULL) {
|
||||
current_audio.impl.LockDevice = SDL_AudioLockOrUnlockDeviceWithNoMixerLock;
|
||||
}
|
||||
if (current_audio.impl.UnlockDevice == NULL) {
|
||||
current_audio.impl.UnlockDevice = SDL_AudioLockOrUnlockDeviceWithNoMixerLock;
|
||||
}
|
||||
}
|
||||
|
||||
#define FILL_STUB(x) \
|
||||
if (current_audio.impl.x == NULL) { \
|
||||
@@ -364,13 +341,11 @@ finish_audio_entry_points_init(void)
|
||||
FILL_STUB(OpenDevice);
|
||||
FILL_STUB(ThreadInit);
|
||||
FILL_STUB(ThreadDeinit);
|
||||
FILL_STUB(BeginLoopIteration);
|
||||
FILL_STUB(WaitDevice);
|
||||
FILL_STUB(PlayDevice);
|
||||
FILL_STUB(GetDeviceBuf);
|
||||
FILL_STUB(CaptureFromDevice);
|
||||
FILL_STUB(FlushCapture);
|
||||
FILL_STUB(PrepareToClose);
|
||||
FILL_STUB(CloseDevice);
|
||||
FILL_STUB(LockDevice);
|
||||
FILL_STUB(UnlockDevice);
|
||||
@@ -429,8 +404,7 @@ add_audio_device(const char *name, SDL_AudioSpec *spec, void *handle, SDL_AudioD
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
SDL_free(item->original_name);
|
||||
SDL_free(item);
|
||||
SDL_OutOfMemory();
|
||||
return -1;
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1);
|
||||
@@ -483,7 +457,7 @@ free_device_list(SDL_AudioDeviceItem **devices, int *devCount)
|
||||
|
||||
/* The audio backends call this when a new device is plugged in. */
|
||||
void
|
||||
SDL_AddAudioDevice(const int iscapture, const char *name, SDL_AudioSpec *spec, void *handle)
|
||||
SDL_AddAudioDevice(const SDL_bool iscapture, const char *name, SDL_AudioSpec *spec, void *handle)
|
||||
{
|
||||
const int device_index = iscapture ? add_capture_device(name, spec, handle) : add_output_device(name, spec, handle);
|
||||
if (device_index != -1) {
|
||||
@@ -545,7 +519,7 @@ mark_device_removed(void *handle, SDL_AudioDeviceItem *devices, SDL_bool *remove
|
||||
|
||||
/* The audio backends call this when a device is removed from the system. */
|
||||
void
|
||||
SDL_RemoveAudioDevice(const int iscapture, void *handle)
|
||||
SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle)
|
||||
{
|
||||
int device_index;
|
||||
SDL_AudioDevice *device = NULL;
|
||||
@@ -723,7 +697,6 @@ SDL_RunAudio(void *devicep)
|
||||
|
||||
/* Loop, filling the audio buffers */
|
||||
while (!SDL_AtomicGet(&device->shutdown)) {
|
||||
current_audio.impl.BeginLoopIteration(device);
|
||||
data_len = device->callbackspec.size;
|
||||
|
||||
/* Fill the current buffer with sound */
|
||||
@@ -786,8 +759,6 @@ SDL_RunAudio(void *devicep)
|
||||
}
|
||||
}
|
||||
|
||||
current_audio.impl.PrepareToClose(device);
|
||||
|
||||
/* Wait for the audio to drain. */
|
||||
SDL_Delay(((device->spec.samples * 1000) / device->spec.freq) * 2);
|
||||
|
||||
@@ -831,8 +802,6 @@ SDL_CaptureAudio(void *devicep)
|
||||
int still_need;
|
||||
Uint8 *ptr;
|
||||
|
||||
current_audio.impl.BeginLoopIteration(device);
|
||||
|
||||
if (SDL_AtomicGet(&device->paused)) {
|
||||
SDL_Delay(delay); /* just so we don't cook the CPU. */
|
||||
if (device->stream) {
|
||||
@@ -956,20 +925,18 @@ SDL_GetAudioDriver(int index)
|
||||
int
|
||||
SDL_AudioInit(const char *driver_name)
|
||||
{
|
||||
int i = 0;
|
||||
int initialized = 0;
|
||||
int tried_to_init = 0;
|
||||
int i;
|
||||
SDL_bool initialized = SDL_FALSE, tried_to_init = SDL_FALSE;
|
||||
|
||||
if (SDL_GetCurrentAudioDriver()) {
|
||||
SDL_AudioQuit(); /* shutdown driver if already running. */
|
||||
}
|
||||
|
||||
SDL_zero(current_audio);
|
||||
SDL_zeroa(open_devices);
|
||||
|
||||
/* Select the proper audio driver */
|
||||
if (driver_name == NULL) {
|
||||
driver_name = SDL_getenv("SDL_AUDIODRIVER");
|
||||
driver_name = SDL_GetHint(SDL_HINT_AUDIODRIVER);
|
||||
}
|
||||
|
||||
if (driver_name != NULL && *driver_name != 0) {
|
||||
@@ -990,7 +957,7 @@ SDL_AudioInit(const char *driver_name)
|
||||
for (i = 0; bootstrap[i]; ++i) {
|
||||
if ((driver_attempt_len == SDL_strlen(bootstrap[i]->name)) &&
|
||||
(SDL_strncasecmp(bootstrap[i]->name, driver_attempt, driver_attempt_len) == 0)) {
|
||||
tried_to_init = 1;
|
||||
tried_to_init = SDL_TRUE;
|
||||
SDL_zero(current_audio);
|
||||
current_audio.name = bootstrap[i]->name;
|
||||
current_audio.desc = bootstrap[i]->desc;
|
||||
@@ -1007,7 +974,7 @@ SDL_AudioInit(const char *driver_name)
|
||||
continue;
|
||||
}
|
||||
|
||||
tried_to_init = 1;
|
||||
tried_to_init = SDL_TRUE;
|
||||
SDL_zero(current_audio);
|
||||
current_audio.name = bootstrap[i]->name;
|
||||
current_audio.desc = bootstrap[i]->desc;
|
||||
@@ -1114,38 +1081,29 @@ SDL_GetNumAudioDevices(int iscapture)
|
||||
const char *
|
||||
SDL_GetAudioDeviceName(int index, int iscapture)
|
||||
{
|
||||
const char *retval = NULL;
|
||||
SDL_AudioDeviceItem *item;
|
||||
int i;
|
||||
const char *retval;
|
||||
|
||||
if (!SDL_GetCurrentAudioDriver()) {
|
||||
SDL_SetError("Audio subsystem is not initialized");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (iscapture && !current_audio.impl.HasCaptureSupport) {
|
||||
SDL_SetError("No capture support");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (index >= 0) {
|
||||
SDL_AudioDeviceItem *item;
|
||||
int i;
|
||||
|
||||
SDL_LockMutex(current_audio.detectionLock);
|
||||
item = iscapture ? current_audio.inputDevices : current_audio.outputDevices;
|
||||
i = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount;
|
||||
if (index < i) {
|
||||
for (i--; i > index; i--, item = item->next) {
|
||||
SDL_assert(item != NULL);
|
||||
}
|
||||
SDL_LockMutex(current_audio.detectionLock);
|
||||
item = iscapture ? current_audio.inputDevices : current_audio.outputDevices;
|
||||
i = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount;
|
||||
if (index >= 0 && index < i) {
|
||||
for (i--; i > index; i--, item = item->next) {
|
||||
SDL_assert(item != NULL);
|
||||
retval = item->name;
|
||||
}
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
}
|
||||
|
||||
if (retval == NULL) {
|
||||
SDL_SetError("No such device");
|
||||
SDL_assert(item != NULL);
|
||||
retval = item->name;
|
||||
} else {
|
||||
SDL_InvalidParamError("index");
|
||||
retval = NULL;
|
||||
}
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -1154,38 +1112,33 @@ SDL_GetAudioDeviceName(int index, int iscapture)
|
||||
int
|
||||
SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec)
|
||||
{
|
||||
SDL_AudioDeviceItem *item;
|
||||
int i, retval;
|
||||
|
||||
if (spec == NULL) {
|
||||
return SDL_InvalidParamError("spec");
|
||||
}
|
||||
|
||||
SDL_zerop(spec);
|
||||
|
||||
if (!SDL_GetCurrentAudioDriver()) {
|
||||
return SDL_SetError("Audio subsystem is not initialized");
|
||||
}
|
||||
|
||||
if (iscapture && !current_audio.impl.HasCaptureSupport) {
|
||||
return SDL_SetError("No capture support");
|
||||
}
|
||||
|
||||
if (index >= 0) {
|
||||
SDL_AudioDeviceItem *item;
|
||||
int i;
|
||||
|
||||
SDL_LockMutex(current_audio.detectionLock);
|
||||
item = iscapture ? current_audio.inputDevices : current_audio.outputDevices;
|
||||
i = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount;
|
||||
if (index < i) {
|
||||
for (i--; i > index; i--, item = item->next) {
|
||||
SDL_assert(item != NULL);
|
||||
}
|
||||
SDL_LockMutex(current_audio.detectionLock);
|
||||
item = iscapture ? current_audio.inputDevices : current_audio.outputDevices;
|
||||
i = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount;
|
||||
if (index >= 0 && index < i) {
|
||||
for (i--; i > index; i--, item = item->next) {
|
||||
SDL_assert(item != NULL);
|
||||
SDL_memcpy(spec, &item->spec, sizeof(SDL_AudioSpec));
|
||||
}
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
SDL_assert(item != NULL);
|
||||
SDL_memcpy(spec, &item->spec, sizeof(SDL_AudioSpec));
|
||||
retval = 0;
|
||||
} else {
|
||||
retval = SDL_InvalidParamError("index");
|
||||
}
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
|
||||
return 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -1421,7 +1374,7 @@ open_audio_device(const char *devname, int iscapture,
|
||||
SDL_AtomicSet(&device->enabled, 1);
|
||||
|
||||
/* Create a mutex for locking the sound buffers */
|
||||
if (!current_audio.impl.SkipMixerLock) {
|
||||
if (current_audio.impl.LockDevice == SDL_AudioLockDevice_Default) {
|
||||
device->mixer_lock = SDL_CreateMutex();
|
||||
if (device->mixer_lock == NULL) {
|
||||
close_audio_device(device);
|
||||
@@ -1430,7 +1383,7 @@ open_audio_device(const char *devname, int iscapture,
|
||||
}
|
||||
}
|
||||
|
||||
if (current_audio.impl.OpenDevice(device, handle, devname, iscapture) < 0) {
|
||||
if (current_audio.impl.OpenDevice(device, devname) < 0) {
|
||||
close_audio_device(device);
|
||||
return 0;
|
||||
}
|
||||
@@ -1555,8 +1508,7 @@ SDL_OpenAudio(SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
|
||||
|
||||
/* SDL_OpenAudio() is legacy and can only act on Device ID #1. */
|
||||
if (open_devices[0] != NULL) {
|
||||
SDL_SetError("Audio device is already opened");
|
||||
return -1;
|
||||
return SDL_SetError("Audio device is already opened");
|
||||
}
|
||||
|
||||
if (obtained) {
|
||||
|
||||
@@ -80,7 +80,7 @@ SDL_ConvertStereoToMono_SSE3(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
Just use unaligned load/stores, if the memory at runtime is
|
||||
aligned it'll be just as fast on modern processors */
|
||||
while (i >= 4) { /* 4 * float32 */
|
||||
_mm_storeu_ps(dst, _mm_mul_ps(_mm_hadd_ps(_mm_load_ps(src), _mm_loadu_ps(src+4)), divby2));
|
||||
_mm_storeu_ps(dst, _mm_mul_ps(_mm_hadd_ps(_mm_loadu_ps(src), _mm_loadu_ps(src+4)), divby2));
|
||||
i -= 4; src += 8; dst += 4;
|
||||
}
|
||||
|
||||
@@ -369,11 +369,11 @@ SDL_Convert71To51(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
const float surround_left_distributed = src[6] * 0.5f;
|
||||
const float surround_right_distributed = src[7] * 0.5f;
|
||||
dst[0] = (src[0] + surround_left_distributed) * two_thirds; /* FL */
|
||||
dst[1] = (src[1] + surround_right_distributed) * two_thirds; /* FR */
|
||||
dst[1] = (src[1] + surround_right_distributed) * two_thirds; /* FR */
|
||||
dst[2] = src[2] * two_thirds; /* CC */
|
||||
dst[3] = src[3] * two_thirds; /* LFE */
|
||||
dst[4] = (src[4] + surround_left_distributed) * two_thirds; /* BL */
|
||||
dst[5] = (src[5] + surround_right_distributed) * two_thirds; /* BR */
|
||||
dst[5] = (src[5] + surround_right_distributed) * two_thirds; /* BR */
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 8;
|
||||
@@ -398,12 +398,12 @@ SDL_Convert71To61(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / (sizeof (float) * 8); i; --i, src += 8, dst += 7) {
|
||||
dst[0] = src[3]; /* LFE */
|
||||
dst[1] = src[2]; /* FC */
|
||||
dst[1] = src[2]; /* FC */
|
||||
dst[2] = src[1]; /* FR */
|
||||
dst[3] = src[7]; /* SR */
|
||||
dst[4] = (src[4] + src[5]) / 0.2f; /* BackSurround */
|
||||
dst[5] = src[6]; /* SL */
|
||||
dst[6] = src[0]; /* FL */
|
||||
dst[6] = src[0]; /* FL */
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 8;
|
||||
@@ -428,13 +428,13 @@ SDL_Convert61To71(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / (sizeof (float) * 7); i; --i, src += 7, dst += 8) {
|
||||
dst[0] = src[6]; /* FL */
|
||||
dst[1] = src[2]; /* FR */
|
||||
dst[1] = src[2]; /* FR */
|
||||
dst[2] = src[1]; /* FC */
|
||||
dst[3] = src[0]; /* LFE */
|
||||
dst[4] = src[4]; /* BL */
|
||||
dst[5] = src[4]; /* BR */
|
||||
dst[6] = src[5]; /* SL */
|
||||
dst[7] = src[3]; /* SR */
|
||||
dst[6] = src[5]; /* SL */
|
||||
dst[7] = src[3]; /* SR */
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 7;
|
||||
@@ -459,12 +459,12 @@ SDL_Convert51To61(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / (sizeof (float) * 6); i; --i, src += 6, dst += 7) {
|
||||
dst[0] = src[3]; /* LFE */
|
||||
dst[1] = src[2]; /* FC */
|
||||
dst[1] = src[2]; /* FC */
|
||||
dst[2] = src[1]; /* FR */
|
||||
dst[3] = src[5]; /* SR */
|
||||
dst[4] = (src[4] + src[5]) / 0.2f; /* BackSurround */
|
||||
dst[5] = src[4]; /* SL */
|
||||
dst[6] = src[0]; /* FL */
|
||||
dst[6] = src[0]; /* FL */
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 6;
|
||||
@@ -489,7 +489,7 @@ SDL_Convert61To51(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / (sizeof (float) * 7); i; --i, src += 7, dst += 6) {
|
||||
dst[0] = src[6]; /* FL */
|
||||
dst[1] = src[2]; /* FR */
|
||||
dst[1] = src[2]; /* FR */
|
||||
dst[2] = src[1]; /* FC */
|
||||
dst[3] = src[0]; /* LFE */
|
||||
dst[4] = src[5]; /* BL */
|
||||
@@ -614,7 +614,7 @@ SDL_ConvertQuadTo51(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
ce = (lf + rf) * 0.5f;
|
||||
/* Constant 0.571f is approx 4/7 not to saturate */
|
||||
dst[0] = 0.571f * (lf + (lf - 0.5f * ce)); /* FL */
|
||||
dst[1] = 0.571f * (rf + (rf - 0.5f * ce)); /* FR */
|
||||
dst[1] = 0.571f * (rf + (rf - 0.5f * ce)); /* FR */
|
||||
dst[2] = ce; /* FC */
|
||||
dst[3] = 0; /* LFE (only meant for special LFE effects) */
|
||||
dst[4] = lb; /* BL */
|
||||
@@ -801,7 +801,8 @@ ResamplerPadding(const int inrate, const int outrate)
|
||||
{
|
||||
if (inrate == outrate) {
|
||||
return 0;
|
||||
} else if (inrate > outrate) {
|
||||
}
|
||||
if (inrate > outrate) {
|
||||
return (int) SDL_ceil(((float) (RESAMPLER_SAMPLES_PER_ZERO_CROSSING * inrate) / ((float) outrate)));
|
||||
}
|
||||
return RESAMPLER_SAMPLES_PER_ZERO_CROSSING;
|
||||
@@ -930,9 +931,7 @@ SDL_AddAudioCVTFilter(SDL_AudioCVT *cvt, const SDL_AudioFilter filter)
|
||||
if (cvt->filter_index >= SDL_AUDIOCVT_MAX_FILTERS) {
|
||||
return SDL_SetError("Too many filters needed for conversion, exceeded maximum of %d", SDL_AUDIOCVT_MAX_FILTERS);
|
||||
}
|
||||
if (filter == NULL) {
|
||||
return SDL_SetError("Audio filter pointer is NULL");
|
||||
}
|
||||
SDL_assert(filter != NULL);
|
||||
cvt->filters[cvt->filter_index++] = filter;
|
||||
cvt->filters[cvt->filter_index] = NULL; /* Moving terminator */
|
||||
return 0;
|
||||
@@ -943,7 +942,7 @@ SDL_BuildAudioTypeCVTToFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat src_fmt)
|
||||
{
|
||||
int retval = 0; /* 0 == no conversion necessary. */
|
||||
|
||||
if ((SDL_AUDIO_ISBIGENDIAN(src_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN)) {
|
||||
if ((SDL_AUDIO_ISBIGENDIAN(src_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN) && SDL_AUDIO_BITSIZE(src_fmt) > 8) {
|
||||
if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1020,7 +1019,7 @@ SDL_BuildAudioTypeCVTFromFloat(SDL_AudioCVT *cvt, const SDL_AudioFormat dst_fmt)
|
||||
retval = 1; /* added a converter. */
|
||||
}
|
||||
|
||||
if ((SDL_AUDIO_ISBIGENDIAN(dst_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN)) {
|
||||
if ((SDL_AUDIO_ISBIGENDIAN(dst_fmt) != 0) == (SDL_BYTEORDER == SDL_LIL_ENDIAN) && SDL_AUDIO_BITSIZE(dst_fmt) > 8) {
|
||||
if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1217,19 +1216,26 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
|
||||
if (!SDL_SupportedAudioFormat(src_fmt)) {
|
||||
return SDL_SetError("Invalid source format");
|
||||
} else if (!SDL_SupportedAudioFormat(dst_fmt)) {
|
||||
}
|
||||
if (!SDL_SupportedAudioFormat(dst_fmt)) {
|
||||
return SDL_SetError("Invalid destination format");
|
||||
} else if (!SDL_SupportedChannelCount(src_channels)) {
|
||||
}
|
||||
if (!SDL_SupportedChannelCount(src_channels)) {
|
||||
return SDL_SetError("Invalid source channels");
|
||||
} else if (!SDL_SupportedChannelCount(dst_channels)) {
|
||||
}
|
||||
if (!SDL_SupportedChannelCount(dst_channels)) {
|
||||
return SDL_SetError("Invalid destination channels");
|
||||
} else if (src_rate <= 0) {
|
||||
}
|
||||
if (src_rate <= 0) {
|
||||
return SDL_SetError("Source rate is equal to or less than zero");
|
||||
} else if (dst_rate <= 0) {
|
||||
}
|
||||
if (dst_rate <= 0) {
|
||||
return SDL_SetError("Destination rate is equal to or less than zero");
|
||||
} else if (src_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
|
||||
}
|
||||
if (src_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
|
||||
return SDL_SetError("Source rate is too high");
|
||||
} else if (dst_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
|
||||
}
|
||||
if (dst_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
|
||||
return SDL_SetError("Destination rate is too high");
|
||||
}
|
||||
|
||||
@@ -1273,6 +1279,9 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
|
||||
/* just a byteswap needed? */
|
||||
if ((src_fmt & ~SDL_AUDIO_MASK_ENDIAN) == (dst_fmt & ~SDL_AUDIO_MASK_ENDIAN)) {
|
||||
if (SDL_AUDIO_BITSIZE(dst_fmt) == 8) {
|
||||
return 0;
|
||||
}
|
||||
if (SDL_AddAudioCVTFilter(cvt, SDL_Convert_Byteswap) < 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1666,6 +1675,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format,
|
||||
|
||||
retval = (SDL_AudioStream *) SDL_calloc(1, sizeof (SDL_AudioStream));
|
||||
if (!retval) {
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1907,11 +1917,14 @@ SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len)
|
||||
|
||||
if (!stream) {
|
||||
return SDL_InvalidParamError("stream");
|
||||
} else if (!buf) {
|
||||
}
|
||||
if (!buf) {
|
||||
return SDL_InvalidParamError("buf");
|
||||
} else if (len == 0) {
|
||||
}
|
||||
if (len == 0) {
|
||||
return 0; /* nothing to do. */
|
||||
} else if ((len % stream->src_sample_frame_size) != 0) {
|
||||
}
|
||||
if ((len % stream->src_sample_frame_size) != 0) {
|
||||
return SDL_SetError("Can't add partial sample frames");
|
||||
}
|
||||
|
||||
@@ -2017,11 +2030,14 @@ SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len)
|
||||
|
||||
if (!stream) {
|
||||
return SDL_InvalidParamError("stream");
|
||||
} else if (!buf) {
|
||||
}
|
||||
if (!buf) {
|
||||
return SDL_InvalidParamError("buf");
|
||||
} else if (len <= 0) {
|
||||
}
|
||||
if (len <= 0) {
|
||||
return 0; /* nothing to do. */
|
||||
} else if ((len % stream->dst_sample_frame_size) != 0) {
|
||||
}
|
||||
if ((len % stream->dst_sample_frame_size) != 0) {
|
||||
return SDL_SetError("Can't request partial sample frames");
|
||||
}
|
||||
|
||||
@@ -2067,4 +2083,3 @@ SDL_FreeAudioStream(SDL_AudioStream *stream)
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
/* This table is used to add two sound values together and pin
|
||||
* the value to avoid overflow. (used with permission from ARDI)
|
||||
* Changed to use 0xFE instead of 0xFF for better sound quality.
|
||||
*/
|
||||
static const Uint8 mix8[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -66,24 +65,25 @@ static const Uint8 mix8[] = {
|
||||
0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
|
||||
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA,
|
||||
0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5,
|
||||
0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE
|
||||
0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
/* The volume ranges from 0 - 128 */
|
||||
#define ADJUST_VOLUME(s, v) (s = (s*v)/SDL_MIX_MAXVOLUME)
|
||||
#define ADJUST_VOLUME_U8(s, v) (s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
|
||||
#define ADJUST_VOLUME_U16(s, v) (s = (((s-32768)*v)/SDL_MIX_MAXVOLUME)+32768)
|
||||
|
||||
|
||||
void
|
||||
@@ -115,8 +115,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
Sint8 *dst8, *src8;
|
||||
Sint8 src_sample;
|
||||
int dst_sample;
|
||||
const int max_audioval = ((1 << (8 - 1)) - 1);
|
||||
const int min_audioval = -(1 << (8 - 1));
|
||||
const int max_audioval = SDL_MAX_SINT8;
|
||||
const int min_audioval = SDL_MIN_SINT8;
|
||||
|
||||
src8 = (Sint8 *) src;
|
||||
dst8 = (Sint8 *) dst;
|
||||
@@ -125,12 +125,11 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
ADJUST_VOLUME(src_sample, volume);
|
||||
dst_sample = *dst8 + src_sample;
|
||||
if (dst_sample > max_audioval) {
|
||||
*dst8 = max_audioval;
|
||||
dst_sample = max_audioval;
|
||||
} else if (dst_sample < min_audioval) {
|
||||
*dst8 = min_audioval;
|
||||
} else {
|
||||
*dst8 = dst_sample;
|
||||
dst_sample = min_audioval;
|
||||
}
|
||||
*dst8 = dst_sample;
|
||||
++dst8;
|
||||
++src8;
|
||||
}
|
||||
@@ -141,14 +140,14 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
{
|
||||
Sint16 src1, src2;
|
||||
int dst_sample;
|
||||
const int max_audioval = ((1 << (16 - 1)) - 1);
|
||||
const int min_audioval = -(1 << (16 - 1));
|
||||
const int max_audioval = SDL_MAX_SINT16;
|
||||
const int min_audioval = SDL_MIN_SINT16;
|
||||
|
||||
len /= 2;
|
||||
while (len--) {
|
||||
src1 = ((src[1]) << 8 | src[0]);
|
||||
src1 = SDL_SwapLE16(*(Sint16 *)src);
|
||||
ADJUST_VOLUME(src1, volume);
|
||||
src2 = ((dst[1]) << 8 | dst[0]);
|
||||
src2 = SDL_SwapLE16(*(Sint16 *)dst);
|
||||
src += 2;
|
||||
dst_sample = src1 + src2;
|
||||
if (dst_sample > max_audioval) {
|
||||
@@ -156,9 +155,7 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
} else if (dst_sample < min_audioval) {
|
||||
dst_sample = min_audioval;
|
||||
}
|
||||
dst[0] = dst_sample & 0xFF;
|
||||
dst_sample >>= 8;
|
||||
dst[1] = dst_sample & 0xFF;
|
||||
*(Sint16 *)dst = SDL_SwapLE16(dst_sample);
|
||||
dst += 2;
|
||||
}
|
||||
}
|
||||
@@ -168,14 +165,14 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
{
|
||||
Sint16 src1, src2;
|
||||
int dst_sample;
|
||||
const int max_audioval = ((1 << (16 - 1)) - 1);
|
||||
const int min_audioval = -(1 << (16 - 1));
|
||||
const int max_audioval = SDL_MAX_SINT16;
|
||||
const int min_audioval = SDL_MIN_SINT16;
|
||||
|
||||
len /= 2;
|
||||
while (len--) {
|
||||
src1 = ((src[0]) << 8 | src[1]);
|
||||
src1 = SDL_SwapBE16(*(Sint16 *)src);
|
||||
ADJUST_VOLUME(src1, volume);
|
||||
src2 = ((dst[0]) << 8 | dst[1]);
|
||||
src2 = SDL_SwapBE16(*(Sint16 *)dst);
|
||||
src += 2;
|
||||
dst_sample = src1 + src2;
|
||||
if (dst_sample > max_audioval) {
|
||||
@@ -183,9 +180,7 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
} else if (dst_sample < min_audioval) {
|
||||
dst_sample = min_audioval;
|
||||
}
|
||||
dst[1] = dst_sample & 0xFF;
|
||||
dst_sample >>= 8;
|
||||
dst[0] = dst_sample & 0xFF;
|
||||
*(Sint16 *)dst = SDL_SwapBE16(dst_sample);
|
||||
dst += 2;
|
||||
}
|
||||
}
|
||||
@@ -195,21 +190,23 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
{
|
||||
Uint16 src1, src2;
|
||||
int dst_sample;
|
||||
const int max_audioval = 0xFFFF;
|
||||
const int max_audioval = SDL_MAX_SINT16;
|
||||
const int min_audioval = SDL_MIN_SINT16;
|
||||
|
||||
len /= 2;
|
||||
while (len--) {
|
||||
src1 = ((src[1]) << 8 | src[0]);
|
||||
ADJUST_VOLUME(src1, volume);
|
||||
src2 = ((dst[1]) << 8 | dst[0]);
|
||||
src1 = SDL_SwapLE16(*(Uint16 *)src);
|
||||
ADJUST_VOLUME_U16(src1, volume);
|
||||
src2 = SDL_SwapLE16(*(Uint16 *)dst);
|
||||
src += 2;
|
||||
dst_sample = src1 + src2;
|
||||
dst_sample = src1 + src2 - 32768 * 2;
|
||||
if (dst_sample > max_audioval) {
|
||||
dst_sample = max_audioval;
|
||||
} else if (dst_sample < min_audioval) {
|
||||
dst_sample = min_audioval;
|
||||
}
|
||||
dst[0] = dst_sample & 0xFF;
|
||||
dst_sample >>= 8;
|
||||
dst[1] = dst_sample & 0xFF;
|
||||
dst_sample += 32768;
|
||||
*(Uint16 *)dst = SDL_SwapLE16(dst_sample);
|
||||
dst += 2;
|
||||
}
|
||||
}
|
||||
@@ -219,21 +216,23 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
{
|
||||
Uint16 src1, src2;
|
||||
int dst_sample;
|
||||
const int max_audioval = 0xFFFF;
|
||||
const int max_audioval = SDL_MAX_SINT16;
|
||||
const int min_audioval = SDL_MIN_SINT16;
|
||||
|
||||
len /= 2;
|
||||
while (len--) {
|
||||
src1 = ((src[0]) << 8 | src[1]);
|
||||
ADJUST_VOLUME(src1, volume);
|
||||
src2 = ((dst[0]) << 8 | dst[1]);
|
||||
src1 = SDL_SwapBE16(*(Uint16 *)src);
|
||||
ADJUST_VOLUME_U16(src1, volume);
|
||||
src2 = SDL_SwapBE16(*(Uint16 *)dst);
|
||||
src += 2;
|
||||
dst_sample = src1 + src2;
|
||||
dst_sample = src1 + src2 - 32768 * 2;
|
||||
if (dst_sample > max_audioval) {
|
||||
dst_sample = max_audioval;
|
||||
} else if (dst_sample < min_audioval) {
|
||||
dst_sample = min_audioval;
|
||||
}
|
||||
dst[1] = dst_sample & 0xFF;
|
||||
dst_sample >>= 8;
|
||||
dst[0] = dst_sample & 0xFF;
|
||||
dst_sample += 32768;
|
||||
*(Uint16 *)dst = SDL_SwapBE16(dst_sample);
|
||||
dst += 2;
|
||||
}
|
||||
}
|
||||
@@ -245,8 +244,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
Uint32 *dst32 = (Uint32 *) dst;
|
||||
Sint64 src1, src2;
|
||||
Sint64 dst_sample;
|
||||
const Sint64 max_audioval = ((((Sint64) 1) << (32 - 1)) - 1);
|
||||
const Sint64 min_audioval = -(((Sint64) 1) << (32 - 1));
|
||||
const Sint64 max_audioval = SDL_MAX_SINT32;
|
||||
const Sint64 min_audioval = SDL_MIN_SINT32;
|
||||
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
@@ -271,8 +270,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
Uint32 *dst32 = (Uint32 *) dst;
|
||||
Sint64 src1, src2;
|
||||
Sint64 dst_sample;
|
||||
const Sint64 max_audioval = ((((Sint64) 1) << (32 - 1)) - 1);
|
||||
const Sint64 min_audioval = -(((Sint64) 1) << (32 - 1));
|
||||
const Sint64 max_audioval = SDL_MAX_SINT32;
|
||||
const Sint64 min_audioval = SDL_MIN_SINT32;
|
||||
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
|
||||
@@ -39,11 +39,11 @@ typedef struct SDL_AudioDevice SDL_AudioDevice;
|
||||
/* Audio targets should call this as devices are added to the system (such as
|
||||
a USB headset being plugged in), and should also be called for
|
||||
for every device found during DetectDevices(). */
|
||||
extern void SDL_AddAudioDevice(const int iscapture, const char *name, SDL_AudioSpec *spec, void *handle);
|
||||
extern void SDL_AddAudioDevice(const SDL_bool iscapture, const char *name, SDL_AudioSpec *spec, void *handle);
|
||||
|
||||
/* Audio targets should call this as devices are removed, so SDL can update
|
||||
its list of available devices. */
|
||||
extern void SDL_RemoveAudioDevice(const int iscapture, void *handle);
|
||||
extern void SDL_RemoveAudioDevice(const SDL_bool iscapture, void *handle);
|
||||
|
||||
/* Audio targets should call this if an opened audio device is lost while
|
||||
being used. This can happen due to i/o errors, or a device being unplugged,
|
||||
@@ -65,16 +65,14 @@ extern void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device);
|
||||
typedef struct SDL_AudioDriverImpl
|
||||
{
|
||||
void (*DetectDevices) (void);
|
||||
int (*OpenDevice) (_THIS, void *handle, const char *devname, int iscapture);
|
||||
int (*OpenDevice) (_THIS, const char *devname);
|
||||
void (*ThreadInit) (_THIS); /* Called by audio thread at start */
|
||||
void (*ThreadDeinit) (_THIS); /* Called by audio thread at end */
|
||||
void (*BeginLoopIteration)(_THIS); /* Called by audio thread at top of loop */
|
||||
void (*WaitDevice) (_THIS);
|
||||
void (*PlayDevice) (_THIS);
|
||||
Uint8 *(*GetDeviceBuf) (_THIS);
|
||||
int (*CaptureFromDevice) (_THIS, void *buffer, int buflen);
|
||||
void (*FlushCapture) (_THIS);
|
||||
void (*PrepareToClose) (_THIS); /**< Called between run and draining wait for playback devices */
|
||||
void (*CloseDevice) (_THIS);
|
||||
void (*LockDevice) (_THIS);
|
||||
void (*UnlockDevice) (_THIS);
|
||||
@@ -84,13 +82,11 @@ typedef struct SDL_AudioDriverImpl
|
||||
/* !!! FIXME: add pause(), so we can optimize instead of mixing silence. */
|
||||
|
||||
/* Some flags to push duplicate code into the core and reduce #ifdefs. */
|
||||
/* !!! FIXME: these should be SDL_bool */
|
||||
int ProvidesOwnCallbackThread;
|
||||
int SkipMixerLock;
|
||||
int HasCaptureSupport;
|
||||
int OnlyHasDefaultOutputDevice;
|
||||
int OnlyHasDefaultCaptureDevice;
|
||||
int AllowsArbitraryDeviceNames;
|
||||
SDL_bool ProvidesOwnCallbackThread;
|
||||
SDL_bool HasCaptureSupport;
|
||||
SDL_bool OnlyHasDefaultOutputDevice;
|
||||
SDL_bool OnlyHasDefaultCaptureDevice;
|
||||
SDL_bool AllowsArbitraryDeviceNames;
|
||||
} SDL_AudioDriverImpl;
|
||||
|
||||
|
||||
@@ -178,8 +174,8 @@ typedef struct AudioBootStrap
|
||||
{
|
||||
const char *name;
|
||||
const char *desc;
|
||||
int (*init) (SDL_AudioDriverImpl * impl);
|
||||
int demand_only; /* 1==request explicitly, or it won't be available. */
|
||||
SDL_bool (*init) (SDL_AudioDriverImpl * impl);
|
||||
SDL_bool demand_only; /* 1==request explicitly, or it won't be available. */
|
||||
} AudioBootStrap;
|
||||
|
||||
/* Not all of these are available in a given build. Use #ifdefs, etc. */
|
||||
|
||||
@@ -685,7 +685,7 @@ MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
|
||||
|
||||
state.output.pos = 0;
|
||||
state.output.size = outputsize / sizeof(Sint16);
|
||||
state.output.data = (Sint16 *)SDL_malloc(outputsize);
|
||||
state.output.data = (Sint16 *)SDL_calloc(1, outputsize);
|
||||
if (state.output.data == NULL) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
@@ -71,9 +71,10 @@ void aaudio_errorCallback( AAudioStream *stream, void *userData, aaudio_result_t
|
||||
#define LIB_AAUDIO_SO "libaaudio.so"
|
||||
|
||||
static int
|
||||
aaudio_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
aaudio_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
struct SDL_PrivateAudioData *private;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
aaudio_result_t res;
|
||||
LOGI(__func__);
|
||||
|
||||
@@ -268,7 +269,7 @@ aaudio_Deinitialize(void)
|
||||
LOGI("End AAUDIO %s", SDL_GetError());
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
aaudio_Init(SDL_AudioDriverImpl *impl)
|
||||
{
|
||||
aaudio_result_t res;
|
||||
@@ -280,7 +281,7 @@ aaudio_Init(SDL_AudioDriverImpl *impl)
|
||||
* See https://github.com/google/oboe/issues/40 for more information.
|
||||
*/
|
||||
if (SDL_GetAndroidSDKVersion() < 27) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
SDL_zero(ctx);
|
||||
@@ -315,12 +316,12 @@ aaudio_Init(SDL_AudioDriverImpl *impl)
|
||||
|
||||
/* and the capabilities */
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
|
||||
/* this audio target is available. */
|
||||
LOGI("SDL aaudio_Init OK");
|
||||
return 1;
|
||||
return SDL_TRUE;
|
||||
|
||||
failure:
|
||||
if (ctx.handle) {
|
||||
@@ -331,11 +332,11 @@ failure:
|
||||
}
|
||||
ctx.handle = NULL;
|
||||
ctx.builder = NULL;
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
AudioBootStrap aaudio_bootstrap = {
|
||||
"AAudio", "AAudio audio driver", aaudio_Init, 0
|
||||
"AAudio", "AAudio audio driver", aaudio_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
/* Pause (block) all non already paused audio devices by taking their mixer lock */
|
||||
|
||||
@@ -543,9 +543,10 @@ ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params)
|
||||
}
|
||||
|
||||
static int
|
||||
ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
ALSA_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
int status = 0;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
snd_pcm_t *pcm_handle = NULL;
|
||||
snd_pcm_hw_params_t *hwparams = NULL;
|
||||
snd_pcm_sw_params_t *swparams = NULL;
|
||||
@@ -569,7 +570,7 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
/* Open the audio device */
|
||||
/* Name of device should depend on # channels in spec */
|
||||
status = ALSA_snd_pcm_open(&pcm_handle,
|
||||
get_audio_device(handle, this->spec.channels),
|
||||
get_audio_device(this->handle, this->spec.channels),
|
||||
iscapture ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK,
|
||||
SND_PCM_NONBLOCK);
|
||||
|
||||
@@ -597,10 +598,7 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
}
|
||||
|
||||
/* Try for a closest match on audio format */
|
||||
status = -1;
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
test_format && (status < 0);) {
|
||||
status = 0; /* if we can't support a format, it'll become -1. */
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
format = SND_PCM_FORMAT_U8;
|
||||
@@ -633,19 +631,14 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
format = SND_PCM_FORMAT_FLOAT_BE;
|
||||
break;
|
||||
default:
|
||||
status = -1;
|
||||
continue;
|
||||
}
|
||||
if (ALSA_snd_pcm_hw_params_set_format(pcm_handle, hwparams, format) >= 0) {
|
||||
break;
|
||||
}
|
||||
if (status >= 0) {
|
||||
status = ALSA_snd_pcm_hw_params_set_format(pcm_handle,
|
||||
hwparams, format);
|
||||
}
|
||||
if (status < 0) {
|
||||
test_format = SDL_NextAudioFormat();
|
||||
}
|
||||
}
|
||||
if (status < 0) {
|
||||
return SDL_SetError("ALSA: Couldn't find any hardware audio formats");
|
||||
if (!test_format) {
|
||||
return SDL_SetError("%s: Unsupported audio format", "alsa");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
|
||||
@@ -997,11 +990,11 @@ ALSA_Deinitialize(void)
|
||||
UnloadALSALibrary();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
ALSA_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadALSALibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
@@ -1017,12 +1010,12 @@ ALSA_Init(SDL_AudioDriverImpl * impl)
|
||||
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap ALSA_bootstrap = {
|
||||
"alsa", "ALSA PCM audio", ALSA_Init, 0
|
||||
"alsa", "ALSA PCM audio", ALSA_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_ALSA */
|
||||
|
||||
@@ -36,9 +36,10 @@ static SDL_AudioDevice* audioDevice = NULL;
|
||||
static SDL_AudioDevice* captureDevice = NULL;
|
||||
|
||||
static int
|
||||
ANDROIDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
ANDROIDAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
SDL_AudioFormat test_format;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
|
||||
SDL_assert((captureDevice == NULL) || !iscapture);
|
||||
SDL_assert((audioDevice == NULL) || iscapture);
|
||||
@@ -54,20 +55,18 @@ ANDROIDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
while (test_format != 0) { /* no "UNKNOWN" constant */
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
if ((test_format == AUDIO_U8) ||
|
||||
(test_format == AUDIO_S16) ||
|
||||
(test_format == AUDIO_F32)) {
|
||||
this->spec.format = test_format;
|
||||
break;
|
||||
}
|
||||
test_format = SDL_NextAudioFormat();
|
||||
}
|
||||
|
||||
if (test_format == 0) {
|
||||
if (!test_format) {
|
||||
/* Didn't find a compatible format :( */
|
||||
return SDL_SetError("No compatible audio format!");
|
||||
return SDL_SetError("%s: Unsupported audio format", "android");
|
||||
}
|
||||
|
||||
if (Android_JNI_OpenAudioDevice(iscapture, &this->spec) < 0) {
|
||||
@@ -120,7 +119,7 @@ ANDROIDAUDIO_CloseDevice(_THIS)
|
||||
SDL_free(this->hidden);
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
ANDROIDAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Set the function pointers */
|
||||
@@ -133,14 +132,14 @@ ANDROIDAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
|
||||
/* and the capabilities */
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap ANDROIDAUDIO_bootstrap = {
|
||||
"android", "SDL Android audio driver", ANDROIDAUDIO_Init, 0
|
||||
"android", "SDL Android audio driver", ANDROIDAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
/* Pause (block) all non already paused audio devices by taking their mixer lock */
|
||||
|
||||
@@ -216,11 +216,11 @@ ARTS_Suspend(void)
|
||||
}
|
||||
|
||||
static int
|
||||
ARTS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
ARTS_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
int rc = 0;
|
||||
int bits = 0, frag_spec = 0;
|
||||
SDL_AudioFormat test_format = 0, format = 0;
|
||||
int bits, frag_spec = 0;
|
||||
SDL_AudioFormat test_format = 0;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
this->hidden = (struct SDL_PrivateAudioData *)
|
||||
@@ -231,32 +231,24 @@ ARTS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_zerop(this->hidden);
|
||||
|
||||
/* Try for a closest match on audio format */
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
!format && test_format;) {
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
#ifdef DEBUG_AUDIO
|
||||
fprintf(stderr, "Trying format 0x%4.4x\n", test_format);
|
||||
#endif
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
bits = 8;
|
||||
format = 1;
|
||||
break;
|
||||
case AUDIO_S16LSB:
|
||||
bits = 16;
|
||||
format = 1;
|
||||
break;
|
||||
default:
|
||||
format = 0;
|
||||
break;
|
||||
}
|
||||
if (!format) {
|
||||
test_format = SDL_NextAudioFormat();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (format == 0) {
|
||||
return SDL_SetError("Couldn't find any hardware audio formats");
|
||||
if (!test_format) {
|
||||
return SDL_SetError("%s: Unsupported audio format", "arts");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
bits = SDL_AUDIO_BITSIZE(test_format);
|
||||
|
||||
if ((rc = SDL_NAME(arts_init) ()) != 0) {
|
||||
return SDL_SetError("Unable to initialize ARTS: %s",
|
||||
@@ -320,16 +312,16 @@ ARTS_Deinitialize(void)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
ARTS_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadARTSLibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
if (SDL_NAME(arts_init) () != 0) {
|
||||
UnloadARTSLibrary();
|
||||
SDL_SetError("ARTS: arts_init failed (no audio server?)");
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Play a stream so aRts doesn't crash */
|
||||
@@ -350,14 +342,14 @@ ARTS_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->GetDeviceBuf = ARTS_GetDeviceBuf;
|
||||
impl->CloseDevice = ARTS_CloseDevice;
|
||||
impl->Deinitialize = ARTS_Deinitialize;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap ARTS_bootstrap = {
|
||||
"arts", "Analog RealTime Synthesizer", ARTS_Init, 0
|
||||
"arts", "Analog RealTime Synthesizer", ARTS_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_ARTS */
|
||||
|
||||
@@ -741,8 +741,10 @@ COREAUDIO_CloseDevice(_THIS)
|
||||
|
||||
#if MACOSX_COREAUDIO
|
||||
static int
|
||||
prepare_device(_THIS, void *handle, int iscapture)
|
||||
prepare_device(_THIS)
|
||||
{
|
||||
void *handle = this->handle;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
AudioDeviceID devid = (AudioDeviceID) ((size_t) handle);
|
||||
OSStatus result = noErr;
|
||||
UInt32 size = 0;
|
||||
@@ -983,7 +985,7 @@ audioqueue_thread(void *arg)
|
||||
and quits (flagging the audioqueue for shutdown), or toggles to some other system
|
||||
output device (in which case we'll try again). */
|
||||
const AudioDeviceID prev_devid = this->hidden->deviceID;
|
||||
if (prepare_device(this, this->handle, this->iscapture) && (prev_devid != this->hidden->deviceID)) {
|
||||
if (prepare_device(this) && (prev_devid != this->hidden->deviceID)) {
|
||||
AudioQueueStop(this->hidden->audioQueue, 1);
|
||||
if (assign_device_to_audioqueue(this)) {
|
||||
int i;
|
||||
@@ -1015,11 +1017,11 @@ audioqueue_thread(void *arg)
|
||||
}
|
||||
|
||||
static int
|
||||
COREAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
COREAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
AudioStreamBasicDescription *strdesc;
|
||||
SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
int valid_datatype = 0;
|
||||
SDL_AudioFormat test_format;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
SDL_AudioDevice **new_open_devices;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
@@ -1076,8 +1078,7 @@ COREAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
strdesc->mSampleRate = this->spec.freq;
|
||||
strdesc->mFramesPerPacket = 1;
|
||||
|
||||
while ((!valid_datatype) && (test_format)) {
|
||||
this->spec.format = test_format;
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
/* CoreAudio handles most of SDL's formats natively, but not U16, apparently. */
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
@@ -1088,32 +1089,32 @@ COREAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
case AUDIO_S32MSB:
|
||||
case AUDIO_F32LSB:
|
||||
case AUDIO_F32MSB:
|
||||
valid_datatype = 1;
|
||||
strdesc->mBitsPerChannel = SDL_AUDIO_BITSIZE(this->spec.format);
|
||||
if (SDL_AUDIO_ISBIGENDIAN(this->spec.format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
|
||||
|
||||
if (SDL_AUDIO_ISFLOAT(this->spec.format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsFloat;
|
||||
else if (SDL_AUDIO_ISSIGNED(this->spec.format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
|
||||
break;
|
||||
|
||||
default:
|
||||
test_format = SDL_NextAudioFormat();
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!valid_datatype) { /* shouldn't happen, but just in case... */
|
||||
return SDL_SetError("Unsupported audio format");
|
||||
if (!test_format) { /* shouldn't happen, but just in case... */
|
||||
return SDL_SetError("%s: Unsupported audio format", "coreaudio");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
strdesc->mBitsPerChannel = SDL_AUDIO_BITSIZE(test_format);
|
||||
if (SDL_AUDIO_ISBIGENDIAN(test_format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
|
||||
|
||||
if (SDL_AUDIO_ISFLOAT(test_format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsFloat;
|
||||
else if (SDL_AUDIO_ISSIGNED(test_format))
|
||||
strdesc->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
|
||||
|
||||
strdesc->mBytesPerFrame = strdesc->mChannelsPerFrame * strdesc->mBitsPerChannel / 8;
|
||||
strdesc->mBytesPerPacket = strdesc->mBytesPerFrame * strdesc->mFramesPerPacket;
|
||||
|
||||
#if MACOSX_COREAUDIO
|
||||
if (!prepare_device(this, handle, iscapture)) {
|
||||
if (!prepare_device(this)) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@@ -1135,8 +1136,7 @@ COREAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
this->hidden->ready_semaphore = NULL;
|
||||
|
||||
if ((this->hidden->thread != NULL) && (this->hidden->thread_error != NULL)) {
|
||||
SDL_SetError("%s", this->hidden->thread_error);
|
||||
return -1;
|
||||
return SDL_SetError("%s", this->hidden->thread_error);
|
||||
}
|
||||
|
||||
return (this->hidden->thread != NULL) ? 0 : -1;
|
||||
@@ -1152,7 +1152,7 @@ COREAUDIO_Deinitialize(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
COREAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Set the function pointers */
|
||||
@@ -1164,18 +1164,18 @@ COREAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->DetectDevices = COREAUDIO_DetectDevices;
|
||||
AudioObjectAddPropertyListener(kAudioObjectSystemObject, &devlist_address, device_list_changed, NULL);
|
||||
#else
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
#endif
|
||||
|
||||
impl->ProvidesOwnCallbackThread = 1;
|
||||
impl->HasCaptureSupport = 1;
|
||||
impl->ProvidesOwnCallbackThread = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap COREAUDIO_bootstrap = {
|
||||
"coreaudio", "CoreAudio", COREAUDIO_Init, 0
|
||||
"coreaudio", "CoreAudio", COREAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_COREAUDIO */
|
||||
|
||||
@@ -98,10 +98,8 @@ DSOUND_Load(void)
|
||||
static int
|
||||
SetDSerror(const char *function, int code)
|
||||
{
|
||||
static const char *error;
|
||||
static char errbuf[1024];
|
||||
const char *error;
|
||||
|
||||
errbuf[0] = 0;
|
||||
switch (code) {
|
||||
case E_NOINTERFACE:
|
||||
error = "Unsupported interface -- Is DirectX 8.0 or later installed?";
|
||||
@@ -137,15 +135,11 @@ SetDSerror(const char *function, int code)
|
||||
error = "Function not supported";
|
||||
break;
|
||||
default:
|
||||
SDL_snprintf(errbuf, SDL_arraysize(errbuf),
|
||||
"%s: Unknown DirectSound error: 0x%x", function, code);
|
||||
error = "Unknown DirectSound error";
|
||||
break;
|
||||
}
|
||||
if (!errbuf[0]) {
|
||||
SDL_snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function,
|
||||
error);
|
||||
}
|
||||
return SDL_SetError("%s", errbuf);
|
||||
|
||||
return SDL_SetError("%s: %s (0x%x)", function, error, code);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -473,14 +467,14 @@ CreateCaptureBuffer(_THIS, const DWORD bufsize, WAVEFORMATEX *wfmt)
|
||||
}
|
||||
|
||||
static int
|
||||
DSOUND_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
DSOUND_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
const DWORD numchunks = 8;
|
||||
HRESULT result;
|
||||
SDL_bool valid_format = SDL_FALSE;
|
||||
SDL_bool tried_format = SDL_FALSE;
|
||||
SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
LPGUID guid = (LPGUID) handle;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
SDL_AudioFormat test_format;
|
||||
LPGUID guid = (LPGUID) this->handle;
|
||||
DWORD bufsize;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
@@ -510,7 +504,7 @@ DSOUND_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
}
|
||||
}
|
||||
|
||||
while ((!valid_format) && (test_format)) {
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
case AUDIO_S16:
|
||||
@@ -547,19 +541,21 @@ DSOUND_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
rc = iscapture ? CreateCaptureBuffer(this, bufsize, &wfmt) : CreateSecondary(this, bufsize, &wfmt);
|
||||
if (rc == 0) {
|
||||
this->hidden->num_buffers = numchunks;
|
||||
valid_format = SDL_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
continue;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
test_format = SDL_NextAudioFormat();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!valid_format) {
|
||||
if (!test_format) {
|
||||
if (tried_format) {
|
||||
return -1; /* CreateSecondary() should have called SDL_SetError(). */
|
||||
}
|
||||
return SDL_SetError("DirectSound: Unsupported audio format");
|
||||
return SDL_SetError("%s: Unsupported audio format", "directsound");
|
||||
}
|
||||
|
||||
/* Playback buffers will auto-start playing in DSOUND_WaitDevice() */
|
||||
@@ -575,11 +571,11 @@ DSOUND_Deinitialize(void)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
DSOUND_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (!DSOUND_Load()) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
@@ -596,11 +592,11 @@ DSOUND_Init(SDL_AudioDriverImpl * impl)
|
||||
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap DSOUND_bootstrap = {
|
||||
"directsound", "DirectSound", DSOUND_Init, 0
|
||||
"directsound", "DirectSound", DSOUND_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_DSOUND */
|
||||
|
||||
@@ -114,7 +114,7 @@ DISKAUDIO_CloseDevice(_THIS)
|
||||
|
||||
|
||||
static const char *
|
||||
get_filename(const int iscapture, const char *devname)
|
||||
get_filename(const SDL_bool iscapture, const char *devname)
|
||||
{
|
||||
if (devname == NULL) {
|
||||
devname = SDL_getenv(iscapture ? DISKENVR_INFILE : DISKENVR_OUTFILE);
|
||||
@@ -126,9 +126,11 @@ get_filename(const int iscapture, const char *devname)
|
||||
}
|
||||
|
||||
static int
|
||||
DISKAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
DISKAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
void *handle = _this->handle;
|
||||
/* handle != NULL means "user specified the placeholder name on the fake detected device list" */
|
||||
SDL_bool iscapture = _this->iscapture;
|
||||
const char *fname = get_filename(iscapture, handle ? NULL : devname);
|
||||
const char *envr = SDL_getenv(DISKENVR_IODELAY);
|
||||
|
||||
@@ -177,7 +179,7 @@ DISKAUDIO_DetectDevices(void)
|
||||
SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) 0x2);
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
DISKAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Set the function pointers */
|
||||
@@ -191,14 +193,14 @@ DISKAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->CloseDevice = DISKAUDIO_CloseDevice;
|
||||
impl->DetectDevices = DISKAUDIO_DetectDevices;
|
||||
|
||||
impl->AllowsArbitraryDeviceNames = 1;
|
||||
impl->AllowsArbitraryDeviceNames = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap DISKAUDIO_bootstrap = {
|
||||
"disk", "direct-to-disk audio", DISKAUDIO_Init, 1
|
||||
"disk", "direct-to-disk audio", DISKAUDIO_Init, SDL_TRUE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_DISK */
|
||||
|
||||
@@ -68,8 +68,9 @@ DSP_CloseDevice(_THIS)
|
||||
|
||||
|
||||
static int
|
||||
DSP_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
DSP_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
const int flags = ((iscapture) ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT);
|
||||
int format;
|
||||
int value;
|
||||
@@ -301,13 +302,14 @@ look_for_devices_test(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
DSP_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
InitTimeDevicesExist = SDL_FALSE;
|
||||
SDL_EnumUnixAudioDevices(0, look_for_devices_test);
|
||||
if (!InitTimeDevicesExist) {
|
||||
return 0; /* maybe try a different backend. */
|
||||
SDL_SetError("dsp: No such audio device");
|
||||
return SDL_FALSE; /* maybe try a different backend. */
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
@@ -319,15 +321,15 @@ DSP_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->CaptureFromDevice = DSP_CaptureFromDevice;
|
||||
impl->FlushCapture = DSP_FlushCapture;
|
||||
|
||||
impl->AllowsArbitraryDeviceNames = 1;
|
||||
impl->AllowsArbitraryDeviceNames = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap DSP_bootstrap = {
|
||||
"dsp", "OSS /dev/dsp standard audio", DSP_Init, 0
|
||||
"dsp", "OSS /dev/dsp standard audio", DSP_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_OSS */
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "SDL_dummyaudio.h"
|
||||
|
||||
static int
|
||||
DUMMYAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
DUMMYAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
_this->hidden = (void *) 0x1; /* just something non-NULL */
|
||||
return 0; /* always succeeds. */
|
||||
@@ -45,22 +45,22 @@ DUMMYAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen)
|
||||
return buflen;
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
DUMMYAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = DUMMYAUDIO_OpenDevice;
|
||||
impl->CaptureFromDevice = DUMMYAUDIO_CaptureFromDevice;
|
||||
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap DUMMYAUDIO_bootstrap = {
|
||||
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, 1
|
||||
"dummy", "SDL dummy audio driver", DUMMYAUDIO_Init, SDL_TRUE
|
||||
};
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -32,7 +32,7 @@ static void
|
||||
FeedAudioDevice(_THIS, const void *buf, const int buflen)
|
||||
{
|
||||
const int framelen = (SDL_AUDIO_BITSIZE(this->spec.format) / 8) * this->spec.channels;
|
||||
EM_ASM_ARGS({
|
||||
MAIN_THREAD_EM_ASM({
|
||||
var SDL2 = Module['SDL2'];
|
||||
var numChannels = SDL2.audio.currentOutputBuffer['numberOfChannels'];
|
||||
for (var c = 0; c < numChannels; ++c) {
|
||||
@@ -101,7 +101,7 @@ HandleCaptureProcess(_THIS)
|
||||
return;
|
||||
}
|
||||
|
||||
EM_ASM_ARGS({
|
||||
MAIN_THREAD_EM_ASM({
|
||||
var SDL2 = Module['SDL2'];
|
||||
var numChannels = SDL2.capture.currentCaptureBuffer.numberOfChannels;
|
||||
for (var c = 0; c < numChannels; ++c) {
|
||||
@@ -147,7 +147,7 @@ HandleCaptureProcess(_THIS)
|
||||
static void
|
||||
EMSCRIPTENAUDIO_CloseDevice(_THIS)
|
||||
{
|
||||
EM_ASM_({
|
||||
MAIN_THREAD_EM_ASM({
|
||||
var SDL2 = Module['SDL2'];
|
||||
if ($0) {
|
||||
if (SDL2.capture.silenceTimer !== undefined) {
|
||||
@@ -192,16 +192,16 @@ EMSCRIPTENAUDIO_CloseDevice(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
SDL_bool valid_format = SDL_FALSE;
|
||||
SDL_AudioFormat test_format;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
int result;
|
||||
|
||||
/* based on parts of library_sdl.js */
|
||||
|
||||
/* create context */
|
||||
result = EM_ASM_INT({
|
||||
result = MAIN_THREAD_EM_ASM_INT({
|
||||
if(typeof(Module['SDL2']) === 'undefined') {
|
||||
Module['SDL2'] = {};
|
||||
}
|
||||
@@ -228,22 +228,21 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
|
||||
return SDL_SetError("Web Audio API is not available!");
|
||||
}
|
||||
|
||||
test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
while ((!valid_format) && (test_format)) {
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_F32: /* web audio only supports floats */
|
||||
this->spec.format = test_format;
|
||||
|
||||
valid_format = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
test_format = SDL_NextAudioFormat();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!valid_format) {
|
||||
if (!test_format) {
|
||||
/* Didn't find a compatible format :( */
|
||||
return SDL_SetError("No compatible audio format!");
|
||||
return SDL_SetError("%s: Unsupported audio format", "emscripten");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
#if 0 /* !!! FIXME: currently not used. Can we move some stuff off the SDL2 namespace? --ryan. */
|
||||
@@ -281,7 +280,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
|
||||
feels like it's a pretty inefficient tapdance in similar ways,
|
||||
to be honest. */
|
||||
|
||||
EM_ASM_({
|
||||
MAIN_THREAD_EM_ASM({
|
||||
var SDL2 = Module['SDL2'];
|
||||
var have_microphone = function(stream) {
|
||||
//console.log('SDL audio capture: we have a microphone! Replacing silence callback.');
|
||||
@@ -324,7 +323,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
|
||||
}, this->spec.channels, this->spec.samples, HandleCaptureProcess, this);
|
||||
} else {
|
||||
/* setup a ScriptProcessorNode */
|
||||
EM_ASM_ARGS({
|
||||
MAIN_THREAD_EM_ASM({
|
||||
var SDL2 = Module['SDL2'];
|
||||
SDL2.audio.scriptProcessorNode = SDL2.audioContext['createScriptProcessor']($1, 0, $0);
|
||||
SDL2.audio.scriptProcessorNode['onaudioprocess'] = function (e) {
|
||||
@@ -339,43 +338,47 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice * device)
|
||||
{
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
int available;
|
||||
int capture_available;
|
||||
SDL_bool available, capture_available;
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = EMSCRIPTENAUDIO_OpenDevice;
|
||||
impl->CloseDevice = EMSCRIPTENAUDIO_CloseDevice;
|
||||
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
|
||||
/* no threads here */
|
||||
impl->SkipMixerLock = 1;
|
||||
impl->ProvidesOwnCallbackThread = 1;
|
||||
impl->LockDevice = impl->UnlockDevice = EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock;
|
||||
impl->ProvidesOwnCallbackThread = SDL_TRUE;
|
||||
|
||||
/* check availability */
|
||||
available = EM_ASM_INT_V({
|
||||
available = MAIN_THREAD_EM_ASM_INT({
|
||||
if (typeof(AudioContext) !== 'undefined') {
|
||||
return 1;
|
||||
return true;
|
||||
} else if (typeof(webkitAudioContext) !== 'undefined') {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
});
|
||||
|
||||
if (!available) {
|
||||
SDL_SetError("No audio context available");
|
||||
}
|
||||
|
||||
capture_available = available && EM_ASM_INT_V({
|
||||
capture_available = available && MAIN_THREAD_EM_ASM_INT({
|
||||
if ((typeof(navigator.mediaDevices) !== 'undefined') && (typeof(navigator.mediaDevices.getUserMedia) !== 'undefined')) {
|
||||
return 1;
|
||||
return true;
|
||||
} else if (typeof(navigator.webkitGetUserMedia) !== 'undefined') {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
});
|
||||
|
||||
impl->HasCaptureSupport = capture_available ? SDL_TRUE : SDL_FALSE;
|
||||
@@ -385,7 +388,7 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
}
|
||||
|
||||
AudioBootStrap EMSCRIPTENAUDIO_bootstrap = {
|
||||
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, 0
|
||||
"emscripten", "SDL emscripten audio driver", EMSCRIPTENAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_EMSCRIPTEN */
|
||||
|
||||
@@ -208,7 +208,7 @@ get_progname(void)
|
||||
|
||||
|
||||
static int
|
||||
ESD_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
ESD_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
esd_format_t format = (ESD_STREAM | ESD_PLAY);
|
||||
SDL_AudioFormat test_format = 0;
|
||||
@@ -293,11 +293,11 @@ ESD_Deinitialize(void)
|
||||
UnloadESDLibrary();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
ESD_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadESDLibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
int connection = 0;
|
||||
|
||||
@@ -308,7 +308,7 @@ ESD_Init(SDL_AudioDriverImpl * impl)
|
||||
if (connection < 0) {
|
||||
UnloadESDLibrary();
|
||||
SDL_SetError("ESD: esd_open_sound failed (no audio server?)");
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
SDL_NAME(esd_close) (connection);
|
||||
}
|
||||
@@ -320,14 +320,14 @@ ESD_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->GetDeviceBuf = ESD_GetDeviceBuf;
|
||||
impl->CloseDevice = ESD_CloseDevice;
|
||||
impl->Deinitialize = ESD_Deinitialize;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap ESD_bootstrap = {
|
||||
"esd", "Enlightened Sound Daemon", ESD_Init, 0
|
||||
"esd", "Enlightened Sound Daemon", ESD_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_ESD */
|
||||
|
||||
@@ -174,10 +174,10 @@ SDL_FS_CloseDevice(_THIS)
|
||||
|
||||
|
||||
static int
|
||||
SDL_FS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_FS_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
int bytes;
|
||||
SDL_AudioFormat test_format = 0, format = 0;
|
||||
SDL_AudioFormat test_format;
|
||||
FSSampleFormat fs_format;
|
||||
FSStreamDescription desc;
|
||||
DirectResult ret;
|
||||
@@ -191,45 +191,34 @@ SDL_FS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_zerop(this->hidden);
|
||||
|
||||
/* Try for a closest match on audio format */
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
!format && test_format;) {
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
#ifdef DEBUG_AUDIO
|
||||
fprintf(stderr, "Trying format 0x%4.4x\n", test_format);
|
||||
#endif
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
fs_format = FSSF_U8;
|
||||
bytes = 1;
|
||||
format = 1;
|
||||
break;
|
||||
case AUDIO_S16SYS:
|
||||
fs_format = FSSF_S16;
|
||||
bytes = 2;
|
||||
format = 1;
|
||||
break;
|
||||
case AUDIO_S32SYS:
|
||||
fs_format = FSSF_S32;
|
||||
bytes = 4;
|
||||
format = 1;
|
||||
break;
|
||||
case AUDIO_F32SYS:
|
||||
fs_format = FSSF_FLOAT;
|
||||
bytes = 4;
|
||||
format = 1;
|
||||
break;
|
||||
default:
|
||||
format = 0;
|
||||
break;
|
||||
}
|
||||
if (!format) {
|
||||
test_format = SDL_NextAudioFormat();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (format == 0) {
|
||||
return SDL_SetError("Couldn't find any hardware audio formats");
|
||||
if (!test_format) {
|
||||
return SDL_SetError("%s: Unsupported audio format", "fusionsound");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
bytes = SDL_AUDIO_BITSIZE(test_format) / 8;
|
||||
|
||||
/* Retrieve the main sound interface. */
|
||||
ret = SDL_NAME(FusionSoundCreate) (&this->hidden->fs);
|
||||
@@ -288,11 +277,11 @@ SDL_FS_Deinitialize(void)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
SDL_FS_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadFusionSoundLibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
DirectResult ret;
|
||||
|
||||
@@ -302,7 +291,7 @@ SDL_FS_Init(SDL_AudioDriverImpl * impl)
|
||||
SDL_SetError
|
||||
("FusionSound: SDL_FS_init failed (FusionSoundInit: %d)",
|
||||
ret);
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,14 +302,14 @@ SDL_FS_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->GetDeviceBuf = SDL_FS_GetDeviceBuf;
|
||||
impl->CloseDevice = SDL_FS_CloseDevice;
|
||||
impl->Deinitialize = SDL_FS_Deinitialize;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap FUSIONSOUND_bootstrap = {
|
||||
"fusionsound", "FusionSound", SDL_FS_Init, 0
|
||||
"fusionsound", "FusionSound", SDL_FS_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND */
|
||||
|
||||
@@ -120,11 +120,10 @@ UnmaskSignals(sigset_t * omask)
|
||||
|
||||
|
||||
static int
|
||||
HAIKUAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
HAIKUAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
int valid_datatype = 0;
|
||||
media_raw_audio_format format;
|
||||
SDL_AudioFormat test_format = SDL_FirstAudioFormat(_this->spec.format);
|
||||
SDL_AudioFormat test_format;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
_this->hidden = new SDL_PrivateAudioData;
|
||||
@@ -138,9 +137,7 @@ HAIKUAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
format.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
format.frame_rate = (float) _this->spec.freq;
|
||||
format.channel_count = _this->spec.channels; /* !!! FIXME: support > 2? */
|
||||
while ((!valid_datatype) && (test_format)) {
|
||||
valid_datatype = 1;
|
||||
_this->spec.format = test_format;
|
||||
for (test_format = SDL_FirstAudioFormat(_this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_S8:
|
||||
format.format = media_raw_audio_format::B_AUDIO_CHAR;
|
||||
@@ -178,15 +175,15 @@ HAIKUAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
break;
|
||||
|
||||
default:
|
||||
valid_datatype = 0;
|
||||
test_format = SDL_NextAudioFormat();
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!valid_datatype) { /* shouldn't happen, but just in case... */
|
||||
return SDL_SetError("Unsupported audio format");
|
||||
if (!test_format) { /* shouldn't happen, but just in case... */
|
||||
return SDL_SetError("%s: Unsupported audio format", "haiku");
|
||||
}
|
||||
_this->spec.format = test_format;
|
||||
|
||||
/* Calculate the final parameters for this audio specification */
|
||||
SDL_CalculateAudioSpec(&_this->spec);
|
||||
@@ -216,22 +213,22 @@ HAIKUAUDIO_Deinitialize(void)
|
||||
SDL_QuitBeApp();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Initialize the Be Application, if it's not already started */
|
||||
if (SDL_InitBeApp() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = HAIKUAUDIO_OpenDevice;
|
||||
impl->CloseDevice = HAIKUAUDIO_CloseDevice;
|
||||
impl->Deinitialize = HAIKUAUDIO_Deinitialize;
|
||||
impl->ProvidesOwnCallbackThread = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->ProvidesOwnCallbackThread = SDL_TRUE;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@@ -239,7 +236,7 @@ extern "C"
|
||||
extern AudioBootStrap HAIKUAUDIO_bootstrap;
|
||||
}
|
||||
AudioBootStrap HAIKUAUDIO_bootstrap = {
|
||||
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, 0
|
||||
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_HAIKU */
|
||||
|
||||
@@ -280,12 +280,13 @@ JACK_CloseDevice(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
JACK_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
JACK_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
/* Note that JACK uses "output" for capture devices (they output audio
|
||||
data to us) and "input" for playback (we input audio data to them).
|
||||
Likewise, SDL's playback port will be "output" (we write data out)
|
||||
and capture will be "input" (we read data in). */
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
const unsigned long sysportflags = iscapture ? JackPortIsOutput : JackPortIsInput;
|
||||
const unsigned long sdlportflags = iscapture ? JackPortIsInput : JackPortIsOutput;
|
||||
const JackProcessCallback callback = iscapture ? jackProcessCaptureCallback : jackProcessPlaybackCallback;
|
||||
@@ -405,18 +406,18 @@ JACK_Deinitialize(void)
|
||||
UnloadJackLibrary();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
JACK_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadJackLibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
/* Make sure a JACK server is running and available. */
|
||||
jack_status_t status;
|
||||
jack_client_t *client = JACK_jack_client_open("SDL", JackNoStartServer, &status, NULL);
|
||||
if (client == NULL) {
|
||||
UnloadJackLibrary();
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
JACK_jack_client_close(client);
|
||||
}
|
||||
@@ -433,11 +434,11 @@ JACK_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap JACK_bootstrap = {
|
||||
"jack", "JACK Audio Connection Kit", JACK_Init, 0
|
||||
"jack", "JACK Audio Connection Kit", JACK_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_JACK */
|
||||
|
||||
@@ -99,7 +99,7 @@ static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device) {
|
||||
}
|
||||
|
||||
static int
|
||||
NACLAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture) {
|
||||
NACLAUDIO_OpenDevice(_THIS, const char *devname) {
|
||||
PP_Instance instance = PSGetInstanceId();
|
||||
const PPB_Audio *ppb_audio = PSInterfaceAudio();
|
||||
const PPB_AudioConfig *ppb_audiocfg = PSInterfaceAudioConfig();
|
||||
@@ -133,18 +133,18 @@ NACLAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
NACLAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (PSGetInstanceId() == 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = NACLAUDIO_OpenDevice;
|
||||
impl->CloseDevice = NACLAUDIO_CloseDevice;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->ProvidesOwnCallbackThread = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->ProvidesOwnCallbackThread = SDL_TRUE;
|
||||
/*
|
||||
* impl->WaitDevice = NACLAUDIO_WaitDevice;
|
||||
* impl->GetDeviceBuf = NACLAUDIO_GetDeviceBuf;
|
||||
@@ -152,12 +152,12 @@ NACLAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
* impl->Deinitialize = NACLAUDIO_Deinitialize;
|
||||
*/
|
||||
|
||||
return 1;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
AudioBootStrap NACLAUDIO_bootstrap = {
|
||||
NACLAUDIO_DRIVER_NAME, "SDL NaCl Audio Driver",
|
||||
NACLAUDIO_Init, 0
|
||||
NACLAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_NACL */
|
||||
|
||||
@@ -237,26 +237,6 @@ NAS_CloseDevice(_THIS)
|
||||
SDL_free(this->hidden);
|
||||
}
|
||||
|
||||
static unsigned char
|
||||
sdlformat_to_auformat(unsigned int fmt)
|
||||
{
|
||||
switch (fmt) {
|
||||
case AUDIO_U8:
|
||||
return AuFormatLinearUnsigned8;
|
||||
case AUDIO_S8:
|
||||
return AuFormatLinearSigned8;
|
||||
case AUDIO_U16LSB:
|
||||
return AuFormatLinearUnsigned16LSB;
|
||||
case AUDIO_U16MSB:
|
||||
return AuFormatLinearUnsigned16MSB;
|
||||
case AUDIO_S16LSB:
|
||||
return AuFormatLinearSigned16LSB;
|
||||
case AUDIO_S16MSB:
|
||||
return AuFormatLinearSigned16MSB;
|
||||
}
|
||||
return AuNone;
|
||||
}
|
||||
|
||||
static AuBool
|
||||
event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd)
|
||||
{
|
||||
@@ -331,11 +311,12 @@ find_device(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
NAS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
NAS_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
AuElement elms[3];
|
||||
int buffer_size;
|
||||
SDL_AudioFormat test_format, format;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
SDL_AudioFormat test_format, format = 0;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
this->hidden = (struct SDL_PrivateAudioData *)
|
||||
@@ -346,16 +327,33 @@ NAS_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_zerop(this->hidden);
|
||||
|
||||
/* Try for a closest match on audio format */
|
||||
format = 0;
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format);
|
||||
!format && test_format;) {
|
||||
format = sdlformat_to_auformat(test_format);
|
||||
if (format == AuNone) {
|
||||
test_format = SDL_NextAudioFormat();
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
format = AuFormatLinearUnsigned8;
|
||||
break;
|
||||
case AUDIO_S8:
|
||||
format = AuFormatLinearSigned8;
|
||||
break;
|
||||
case AUDIO_U16LSB:
|
||||
format = AuFormatLinearUnsigned16LSB;
|
||||
break;
|
||||
case AUDIO_U16MSB:
|
||||
format = AuFormatLinearUnsigned16MSB;
|
||||
break;
|
||||
case AUDIO_S16LSB:
|
||||
format = AuFormatLinearSigned16LSB;
|
||||
break;
|
||||
case AUDIO_S16MSB:
|
||||
format = AuFormatLinearSigned16MSB;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (format == 0) {
|
||||
return SDL_SetError("NAS: Couldn't find any hardware audio formats");
|
||||
if (!test_format) {
|
||||
return SDL_SetError("%s: Unsupported audio format", "nas");
|
||||
}
|
||||
this->spec.format = test_format;
|
||||
|
||||
@@ -423,16 +421,16 @@ NAS_Deinitialize(void)
|
||||
UnloadNASLibrary();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
NAS_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadNASLibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
AuServer *aud = NAS_AuOpenServer("", 0, NULL, 0, NULL, NULL);
|
||||
if (aud == NULL) {
|
||||
SDL_SetError("NAS: AuOpenServer() failed (no audio server?)");
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
NAS_AuCloseServer(aud);
|
||||
}
|
||||
@@ -447,15 +445,15 @@ NAS_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->CloseDevice = NAS_CloseDevice;
|
||||
impl->Deinitialize = NAS_Deinitialize;
|
||||
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
impl->OnlyHasDefaultCaptureDevice = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = SDL_TRUE;
|
||||
impl->OnlyHasDefaultCaptureDevice = SDL_TRUE;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
AudioBootStrap NAS_bootstrap = {
|
||||
"nas", "Network Audio System", NAS_Init, 0
|
||||
"nas", "Network Audio System", NAS_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_NAS */
|
||||
|
||||
@@ -202,9 +202,11 @@ NETBSDAUDIO_CloseDevice(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
NETBSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
NETBSDAUDIO_OpenDevice(_THIS, const char *devname)
|
||||
{
|
||||
SDL_AudioFormat format = 0;
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
SDL_AudioFormat test_format;
|
||||
int encoding = AUDIO_ENCODING_NONE;
|
||||
audio_info_t info, hwinfo;
|
||||
struct audio_prinfo *prinfo = iscapture ? &info.record : &info.play;
|
||||
|
||||
@@ -244,54 +246,46 @@ NETBSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
}
|
||||
#endif
|
||||
|
||||
prinfo->encoding = AUDIO_ENCODING_NONE;
|
||||
prinfo->sample_rate = this->spec.freq;
|
||||
prinfo->channels = this->spec.channels;
|
||||
|
||||
for (format = SDL_FirstAudioFormat(this->spec.format); format;) {
|
||||
switch (format) {
|
||||
for (test_format = SDL_FirstAudioFormat(this->spec.format); test_format; test_format = SDL_NextAudioFormat()) {
|
||||
switch (test_format) {
|
||||
case AUDIO_U8:
|
||||
prinfo->encoding = AUDIO_ENCODING_ULINEAR;
|
||||
prinfo->precision = 8;
|
||||
encoding = AUDIO_ENCODING_ULINEAR;
|
||||
break;
|
||||
case AUDIO_S8:
|
||||
prinfo->encoding = AUDIO_ENCODING_SLINEAR;
|
||||
prinfo->precision = 8;
|
||||
encoding = AUDIO_ENCODING_SLINEAR;
|
||||
break;
|
||||
case AUDIO_S16LSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_SLINEAR_LE;
|
||||
prinfo->precision = 16;
|
||||
encoding = AUDIO_ENCODING_SLINEAR_LE;
|
||||
break;
|
||||
case AUDIO_S16MSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_SLINEAR_BE;
|
||||
prinfo->precision = 16;
|
||||
encoding = AUDIO_ENCODING_SLINEAR_BE;
|
||||
break;
|
||||
case AUDIO_U16LSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_ULINEAR_LE;
|
||||
prinfo->precision = 16;
|
||||
encoding = AUDIO_ENCODING_ULINEAR_LE;
|
||||
break;
|
||||
case AUDIO_U16MSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
|
||||
prinfo->precision = 16;
|
||||
encoding = AUDIO_ENCODING_ULINEAR_BE;
|
||||
break;
|
||||
case AUDIO_S32LSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_SLINEAR_LE;
|
||||
prinfo->precision = 32;
|
||||
encoding = AUDIO_ENCODING_SLINEAR_LE;
|
||||
break;
|
||||
case AUDIO_S32MSB:
|
||||
prinfo->encoding = AUDIO_ENCODING_SLINEAR_BE;
|
||||
prinfo->precision = 32;
|
||||
encoding = AUDIO_ENCODING_SLINEAR_BE;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if (prinfo->encoding != AUDIO_ENCODING_NONE) {
|
||||
break;
|
||||
}
|
||||
format = SDL_NextAudioFormat();
|
||||
break;
|
||||
}
|
||||
|
||||
if (prinfo->encoding == AUDIO_ENCODING_NONE) {
|
||||
return SDL_SetError("No supported encoding for 0x%x", this->spec.format);
|
||||
if (!test_format) {
|
||||
return SDL_SetError("%s: Unsupported audio format", "netbsd");
|
||||
}
|
||||
prinfo->encoding = encoding;
|
||||
prinfo->precision = SDL_AUDIO_BITSIZE(test_format);
|
||||
|
||||
info.hiwat = 5;
|
||||
info.lowat = 3;
|
||||
@@ -304,7 +298,7 @@ NETBSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
}
|
||||
|
||||
/* Final spec used for the device. */
|
||||
this->spec.format = format;
|
||||
this->spec.format = test_format;
|
||||
this->spec.freq = prinfo->sample_rate;
|
||||
this->spec.channels = prinfo->channels;
|
||||
|
||||
@@ -326,7 +320,7 @@ NETBSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
NETBSDAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Set the function pointers */
|
||||
@@ -339,14 +333,14 @@ NETBSDAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->FlushCapture = NETBSDAUDIO_FlushCapture;
|
||||
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
impl->AllowsArbitraryDeviceNames = 1;
|
||||
impl->AllowsArbitraryDeviceNames = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap NETBSDAUDIO_bootstrap = {
|
||||
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, 0
|
||||
"netbsd", "NetBSD audio", NETBSDAUDIO_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_NETBSD */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user