mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 17:29:21 -10:00
Compare commits
454
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2b7c23902 | ||
|
|
4fe63e6f3f | ||
|
|
bec793b030 | ||
|
|
4a1dd3d80d | ||
|
|
c79b60ba77 | ||
|
|
22ae6f23aa | ||
|
|
758eafa686 | ||
|
|
5ec93d2493 | ||
|
|
1dc77507a8 | ||
|
|
1e1919b236 | ||
|
|
df6b1c306f | ||
|
|
514534f99b | ||
|
|
47a6df871a | ||
|
|
9a3be2ef2b | ||
|
|
6e8a3945d5 | ||
|
|
8ff07916ec | ||
|
|
edeb684712 | ||
|
|
4a834bda36 | ||
|
|
acd1ba0449 | ||
|
|
c0719e737b | ||
|
|
12a44e0365 | ||
|
|
5b4b766459 | ||
|
|
2f4cfe2a02 | ||
|
|
81c6d3809a | ||
|
|
729c219f1a | ||
|
|
7ed3ca7f97 | ||
|
|
840cca36fa | ||
|
|
b4878a8e7b | ||
|
|
320f2308f6 | ||
|
|
c1b002e454 | ||
|
|
1fca7507dc | ||
|
|
a68e5205bd | ||
|
|
038b28c5f2 | ||
|
|
64dabb0388 | ||
|
|
485d07691d | ||
|
|
591467d247 | ||
|
|
0c017a2c82 | ||
|
|
f86c28afac | ||
|
|
9184d0e114 | ||
|
|
5c6d92bb95 | ||
|
|
b200ced199 | ||
|
|
eb4ed9b2f0 | ||
|
|
9b4636ff62 | ||
|
|
527eb86655 | ||
|
|
8db4e2a862 | ||
|
|
af40baa04d | ||
|
|
5226a0659a | ||
|
|
a16df36b28 | ||
|
|
a291323467 | ||
|
|
40aa7dad10 | ||
|
|
6f7b5a3f15 | ||
|
|
70b337782d | ||
|
|
b9500ff729 | ||
|
|
5e8b2bfed1 | ||
|
|
ba19dc3140 | ||
|
|
bf2c3902d4 | ||
|
|
2b41173cd5 | ||
|
|
6d6ed11b60 | ||
|
|
eef9668263 | ||
|
|
6ccac53d89 | ||
|
|
6d13461948 | ||
|
|
a476910ca6 | ||
|
|
28cac5c5a4 | ||
|
|
40925baacd | ||
|
|
c19b04e21e | ||
|
|
b5e7957260 | ||
|
|
7f2cc93cf5 | ||
|
|
c098a321b4 | ||
|
|
a79bd56018 | ||
|
|
af0746c6d7 | ||
|
|
8bab67ea9c | ||
|
|
aa6d3542d2 | ||
|
|
78b861a8e8 | ||
|
|
70606eab1e | ||
|
|
22d70a64dd | ||
|
|
753a04c9c1 | ||
|
|
caccc410c6 | ||
|
|
68f0e50a2f | ||
|
|
0b66c81197 | ||
|
|
e72a88a98e | ||
|
|
d87e0c1744 | ||
|
|
e47e9968ed | ||
|
|
f070da6dfc | ||
|
|
99b09ce359 | ||
|
|
5f4d4fe678 | ||
|
|
0ca98195d9 | ||
|
|
9781caa20b | ||
|
|
0a888f7868 | ||
|
|
0b2c80a402 | ||
|
|
2179bc8716 | ||
|
|
f1ac1ad9f9 | ||
|
|
1ebf821da3 | ||
|
|
ac1a280665 | ||
|
|
a23a358dc9 | ||
|
|
cfb2ae7d2c | ||
|
|
849ed7fc3d | ||
|
|
290bc214e3 | ||
|
|
e9d4fcc00c | ||
|
|
a3d9201581 | ||
|
|
e7f182811a | ||
|
|
177d05144a | ||
|
|
dd6c70a083 | ||
|
|
757ba2f16d | ||
|
|
a9125fffaa | ||
|
|
bcc7581250 | ||
|
|
107d315559 | ||
|
|
39fd4677d9 | ||
|
|
a5a9393b26 | ||
|
|
58e7dd8a1a | ||
|
|
3d710db798 | ||
|
|
e39bc07e31 | ||
|
|
00a5b5411f | ||
|
|
2e4d135704 | ||
|
|
ea249b3827 | ||
|
|
3f179a5762 | ||
|
|
534f8da487 | ||
|
|
54cbeecbb7 | ||
|
|
a611469f94 | ||
|
|
01e96585a3 | ||
|
|
6739cf66ca | ||
|
|
682d45379c | ||
|
|
61ee2274e6 | ||
|
|
55bf2b0083 | ||
|
|
f81a231481 | ||
|
|
f242ef6a7c | ||
|
|
f4734d223c | ||
|
|
16b82a05e5 | ||
|
|
376b7a622c | ||
|
|
e8ec65ecf7 | ||
|
|
3e91e3fbc9 | ||
|
|
002c9a30c0 | ||
|
|
e02e345a28 | ||
|
|
b46daac334 | ||
|
|
2715b4c9c0 | ||
|
|
c832828ddb | ||
|
|
a4d8ce7753 | ||
|
|
9846ebb171 | ||
|
|
5da1cd08ff | ||
|
|
9edb449471 | ||
|
|
41a9c46846 | ||
|
|
a264cad19a | ||
|
|
e839cf8434 | ||
|
|
7e6a56dafc | ||
|
|
bc5a99ae34 | ||
|
|
52a939bc2f | ||
|
|
9f96723dd0 | ||
|
|
3bbfcf7b39 | ||
|
|
216675919b | ||
|
|
c8a46e6e69 | ||
|
|
69ab4eee7a | ||
|
|
e193f92cfd | ||
|
|
2c355419bd | ||
|
|
24484e72d2 | ||
|
|
6a4a5ae27c | ||
|
|
c38479d593 | ||
|
|
cd8396edd4 | ||
|
|
54d2ac9f43 | ||
|
|
5a40d28f8f | ||
|
|
732c38cc0b | ||
|
|
be7d6832d3 | ||
|
|
f5a5a993ff | ||
|
|
fde3406d1b | ||
|
|
8807e2957e | ||
|
|
bd76388fc5 | ||
|
|
5d71138fd8 | ||
|
|
b674b5362d | ||
|
|
e9a4e811ac | ||
|
|
2d279df6e4 | ||
|
|
b4f09f7a55 | ||
|
|
49fbed2423 | ||
|
|
878ad88e5b | ||
|
|
12c81bc073 | ||
|
|
dbe414e1e1 | ||
|
|
ddceb51f89 | ||
|
|
ef875f6102 | ||
|
|
d85919d0e3 | ||
|
|
076440987b | ||
|
|
db6af919fb | ||
|
|
689487dbee | ||
|
|
e13073c411 | ||
|
|
6a152f8917 | ||
|
|
1d2a2adb61 | ||
|
|
a0955d4fa6 | ||
|
|
b1410c72e5 | ||
|
|
d819251ffd | ||
|
|
d39ea61109 | ||
|
|
b07d80efe1 | ||
|
|
5ba8843354 | ||
|
|
0e9b2179af | ||
|
|
efe34f52af | ||
|
|
b5190b3662 | ||
|
|
cc2fea4c85 | ||
|
|
4f8ca90dd0 | ||
|
|
0364a277e4 | ||
|
|
4c419466e6 | ||
|
|
9bb2359a86 | ||
|
|
f90809d754 | ||
|
|
e886e908d5 | ||
|
|
e4bec6739c | ||
|
|
8ef9065c86 | ||
|
|
e31fbb8048 | ||
|
|
1e29ba3cd6 | ||
|
|
9e26012751 | ||
|
|
9727be4de6 | ||
|
|
6a72403f0f | ||
|
|
774dccca7c | ||
|
|
3dee62ce62 | ||
|
|
05e4aa8bfb | ||
|
|
4574a58683 | ||
|
|
0448afab96 | ||
|
|
c3afd4b1a5 | ||
|
|
e8dbcd4600 | ||
|
|
31eaeb1a03 | ||
|
|
422e940bc4 | ||
|
|
d4af68d2dd | ||
|
|
76db3e02cf | ||
|
|
4aafbf2340 | ||
|
|
4b5951bda3 | ||
|
|
6f36e0a2dd | ||
|
|
2a4862ad8d | ||
|
|
8fa1f998c5 | ||
|
|
0e21365be1 | ||
|
|
bbbc4452d7 | ||
|
|
ee97c2066a | ||
|
|
89968333a4 | ||
|
|
12540d750d | ||
|
|
e08cc6e260 | ||
|
|
fb86ca6e33 | ||
|
|
a3241aa9b2 | ||
|
|
9b2d4236ad | ||
|
|
9d25ba7ac5 | ||
|
|
714cfc581d | ||
|
|
a327fdb6fe | ||
|
|
1970786932 | ||
|
|
50bb7afa9d | ||
|
|
f52fbd32a0 | ||
|
|
7b020f4cc5 | ||
|
|
6cadd47679 | ||
|
|
931eb3221b | ||
|
|
1ff024be26 | ||
|
|
ecdf20ea49 | ||
|
|
6eeebeab25 | ||
|
|
522dd72bd0 | ||
|
|
83ce4259a0 | ||
|
|
550d3fa766 | ||
|
|
f21641d898 | ||
|
|
1b7dea7e8e | ||
|
|
c42f932c3f | ||
|
|
33f075191d | ||
|
|
a950bfbe3e | ||
|
|
f11f892076 | ||
|
|
6c5e17e5ae | ||
|
|
b87bc46064 | ||
|
|
7c8c53fb2d | ||
|
|
44012ace47 | ||
|
|
28e0b669d2 | ||
|
|
58bc88d433 | ||
|
|
30353ac8f2 | ||
|
|
d68a138250 | ||
|
|
c4b8fab0d0 | ||
|
|
beea0e2c8d | ||
|
|
f3b2e233bb | ||
|
|
abebf4a421 | ||
|
|
ec55f8188a | ||
|
|
e2e236f1bf | ||
|
|
94b5769375 | ||
|
|
d2af43d457 | ||
|
|
295aa84a9e | ||
|
|
fabdede667 | ||
|
|
c412ecf7e9 | ||
|
|
fa00455af1 | ||
|
|
cbfa8d6400 | ||
|
|
f587d28a0d | ||
|
|
9b5a60af53 | ||
|
|
238eb649a2 | ||
|
|
5eb795bf5b | ||
|
|
ebe0d89de2 | ||
|
|
a64fa9c8d7 | ||
|
|
d11ffdbb6b | ||
|
|
b71d34068b | ||
|
|
ae617c0ee6 | ||
|
|
b3d724b7a3 | ||
|
|
eb895f9947 | ||
|
|
1c546cb7fd | ||
|
|
db3f0a8468 | ||
|
|
7c74e035b0 | ||
|
|
226f5fb456 | ||
|
|
895676430f | ||
|
|
0a5bb29c43 | ||
|
|
bae6f8e097 | ||
|
|
62a66ff0e5 | ||
|
|
d8db234df0 | ||
|
|
251bfdb302 | ||
|
|
5aafe9eb0c | ||
|
|
6a59dad08c | ||
|
|
249e24fbe7 | ||
|
|
70376abe1b | ||
|
|
5b13047623 | ||
|
|
78858a9474 | ||
|
|
0e9f246b30 | ||
|
|
516dcb34d9 | ||
|
|
868a4bf3fc | ||
|
|
90775e7306 | ||
|
|
5e4ce74000 | ||
|
|
490233f3c5 | ||
|
|
fe14274b96 | ||
|
|
fc4d4c53cd | ||
|
|
3c69a941da | ||
|
|
2b08ebb677 | ||
|
|
12f787547c | ||
|
|
3c6bdfd0d8 | ||
|
|
e24440d4a9 | ||
|
|
ed6f33b173 | ||
|
|
88b15c1b1d | ||
|
|
2991e82575 | ||
|
|
ad4b51b903 | ||
|
|
b5138b6122 | ||
|
|
ad39b1d115 | ||
|
|
3d303a63df | ||
|
|
c3cd3b34b0 | ||
|
|
26b9439dbc | ||
|
|
cfcd0a7a0d | ||
|
|
1b8d68c6e4 | ||
|
|
c4cbcb2ff4 | ||
|
|
2490f6e215 | ||
|
|
f09be107c6 | ||
|
|
589c72d9a8 | ||
|
|
08f75ab195 | ||
|
|
dcf77c4d1e | ||
|
|
27bd9868d7 | ||
|
|
f34c8865ee | ||
|
|
84174598a4 | ||
|
|
c75bb549e5 | ||
|
|
4830150d22 | ||
|
|
6da778b934 | ||
|
|
8564b4f8e3 | ||
|
|
6a310ecfed | ||
|
|
14cd338b97 | ||
|
|
9b8145f05d | ||
|
|
a11b1c3b72 | ||
|
|
772282eeec | ||
|
|
28389d30e8 | ||
|
|
6c79cebc6e | ||
|
|
81e7dab159 | ||
|
|
49cce025c7 | ||
|
|
ace9267c7b | ||
|
|
303d17e2e6 | ||
|
|
f0a3ee6003 | ||
|
|
8a31b732dd | ||
|
|
51b365b5e3 | ||
|
|
8018be5c9b | ||
|
|
c9e587a5a7 | ||
|
|
ccbbf45760 | ||
|
|
276b4fd72c | ||
|
|
67defbcf26 | ||
|
|
5b1872f6be | ||
|
|
10782f9abc | ||
|
|
3a78b46862 | ||
|
|
138afafbb3 | ||
|
|
71067d8873 | ||
|
|
a0856c9847 | ||
|
|
722166cb15 | ||
|
|
7c665702a8 | ||
|
|
1151504fa9 | ||
|
|
5ae7bc2ce2 | ||
|
|
07600392df | ||
|
|
0ac542f1db | ||
|
|
36888612eb | ||
|
|
f597138827 | ||
|
|
623e09dc47 | ||
|
|
b05a0d5aed | ||
|
|
536d18778b | ||
|
|
28d1788e1e | ||
|
|
017f9f8939 | ||
|
|
916ebb98e7 | ||
|
|
85c0607696 | ||
|
|
43838dc4ea | ||
|
|
f905012376 | ||
|
|
6d1c0e96a3 | ||
|
|
9a5f4602cc | ||
|
|
19f4504943 | ||
|
|
8adc24ecbc | ||
|
|
51dcad6cb3 | ||
|
|
204834f88e | ||
|
|
e39784189e | ||
|
|
87b40b7c57 | ||
|
|
588c1305c8 | ||
|
|
508b0c2ee2 | ||
|
|
743aea1810 | ||
|
|
76f114a9fe | ||
|
|
274638b89e | ||
|
|
b900555494 | ||
|
|
a0e4d64c3b | ||
|
|
93dbd746db | ||
|
|
7b9cbc08d7 | ||
|
|
9228a6f8ab | ||
|
|
f6f7d145d2 | ||
|
|
868865c388 | ||
|
|
ad01f5d5b6 | ||
|
|
48d9df6bb7 | ||
|
|
11b88c748e | ||
|
|
547f04b894 | ||
|
|
19602d394f | ||
|
|
9ea6f15c1d | ||
|
|
d0d495edc3 | ||
|
|
a785bd8d80 | ||
|
|
256713e888 | ||
|
|
fb35460c6d | ||
|
|
5677799faf | ||
|
|
fc4081cd8f | ||
|
|
0db409d5b5 | ||
|
|
70ebc85b6c | ||
|
|
dbf3e278dd | ||
|
|
03c54a9854 | ||
|
|
8460618666 | ||
|
|
c6f2e52d62 | ||
|
|
7e61c7ab32 | ||
|
|
b68ace9e3d | ||
|
|
37aa13bb47 | ||
|
|
e384c2b099 | ||
|
|
1bafa70837 | ||
|
|
2406894329 | ||
|
|
220dfe4dbf | ||
|
|
bfc7e824fe | ||
|
|
2f14d2e4e2 | ||
|
|
cd126f0236 | ||
|
|
d2283a5237 | ||
|
|
d429ecf304 | ||
|
|
d45945cda2 | ||
|
|
943e14051c | ||
|
|
4b6a82a3b0 | ||
|
|
bf2e7b93f0 | ||
|
|
24721e6a1d | ||
|
|
0a1affba7a | ||
|
|
a9f1dd3647 | ||
|
|
540d192ecb | ||
|
|
f1f3998d28 | ||
|
|
46fb61bede | ||
|
|
cf7b30481b | ||
|
|
30db7d8cd3 | ||
|
|
2474fe3c2e | ||
|
|
5b3e5f5daa | ||
|
|
861cb2953a | ||
|
|
6dfe20e247 | ||
|
|
bb0fe6c2d1 | ||
|
|
45a16fab1b | ||
|
|
8396bd599d | ||
|
|
b8188baeaf | ||
|
|
2b3dfeb10c | ||
|
|
d87ae5b5d7 | ||
|
|
57bd538996 | ||
|
|
6bc9181bc9 | ||
|
|
b153087fa4 | ||
|
|
146804fcbc |
No files matched your search
@@ -225,3 +225,6 @@ param.sfo
|
||||
*.vpk
|
||||
/.vs
|
||||
/deps/SPIRV-Cross/out/build/x64-Debug
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
+145
-83
@@ -104,9 +104,10 @@ build-retroarch-windows-msvc10-x64:
|
||||
SDK_BIN_DIR: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
||||
RCEDIT_BIN_DIR: C:\Program Files\rcedit
|
||||
PEDEPS_BIN_DIR: C:\Program Files\pedeps-0.1.9-win64\bin
|
||||
MSVC_PLATFORM: windows_msvc2010_x64
|
||||
before_script:
|
||||
- $Env:HOME = "."
|
||||
- $Env:Path += -join(";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
- $Env:Path += -join(";", "$Env:MSYS_BIN_DIR", ";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch.exe
|
||||
@@ -114,26 +115,31 @@ build-retroarch-windows-msvc10-x64:
|
||||
expire_in: 10 min
|
||||
dependencies: []
|
||||
script:
|
||||
# Build RetroArch
|
||||
- $Script:MakeCmd = "$Env:MSYS_BIN_DIR\env.exe $Env:MSYS_BIN_DIR\bash.exe -l -c 'make -f Makefile.griffin platform=windows_msvc2010_x64'"
|
||||
- Invoke-Expression $Script:MakeCmd
|
||||
- mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
- rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
# Create .media subdirectories
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
- Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
- Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
- Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc10 build should not have any, but this
|
||||
# may change in the future)
|
||||
- copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
- Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
- |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
# Build RetroArch
|
||||
bash.exe -l -c "make -f Makefile.griffin platform=$Env:MSVC_PLATFORM"
|
||||
if ($LastExitCode -ne 0){throw "Failed to build RetroArch"}
|
||||
mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
if ($LastExitCode -ne 0){throw "Failed to add manifest to RetroArch binary"}
|
||||
rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
if ($LastExitCode -ne 0){throw "Failed to set icon of RetroArch binary"}
|
||||
# Create .media subdirectories
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc builds should not have any, but this
|
||||
# may change in the future)
|
||||
copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
if ($LastExitCode -ne 0){throw "Failed to copy RetroArch dependencies"}
|
||||
Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
|
||||
build-retroarch-windows-msvc10-i686:
|
||||
tags:
|
||||
@@ -147,9 +153,10 @@ build-retroarch-windows-msvc10-i686:
|
||||
SDK_BIN_DIR: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
||||
RCEDIT_BIN_DIR: C:\Program Files\rcedit
|
||||
PEDEPS_BIN_DIR: C:\Program Files\pedeps-0.1.9-win64\bin
|
||||
MSVC_PLATFORM: windows_msvc2010_x86
|
||||
before_script:
|
||||
- $Env:HOME = "."
|
||||
- $Env:Path += -join(";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
- $Env:Path += -join(";", "$Env:MSYS_BIN_DIR", ";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch.exe
|
||||
@@ -157,26 +164,31 @@ build-retroarch-windows-msvc10-i686:
|
||||
expire_in: 10 min
|
||||
dependencies: []
|
||||
script:
|
||||
# Build RetroArch
|
||||
- $Script:MakeCmd = "$Env:MSYS_BIN_DIR\env.exe $Env:MSYS_BIN_DIR\bash.exe -l -c 'make -f Makefile.griffin platform=windows_msvc2010_x86'"
|
||||
- Invoke-Expression $Script:MakeCmd
|
||||
- mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
- rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
# Create .media subdirectories
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
- Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
- Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
- Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc10 build should not have any, but this
|
||||
# may change in the future)
|
||||
- copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
- Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
- |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
# Build RetroArch
|
||||
bash.exe -l -c "make -f Makefile.griffin platform=$Env:MSVC_PLATFORM"
|
||||
if ($LastExitCode -ne 0){throw "Failed to build RetroArch"}
|
||||
mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
if ($LastExitCode -ne 0){throw "Failed to add manifest to RetroArch binary"}
|
||||
rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
if ($LastExitCode -ne 0){throw "Failed to set icon of RetroArch binary"}
|
||||
# Create .media subdirectories
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc builds should not have any, but this
|
||||
# may change in the future)
|
||||
copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
if ($LastExitCode -ne 0){throw "Failed to copy RetroArch dependencies"}
|
||||
Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
|
||||
build-retroarch-windows-msvc05-i686:
|
||||
tags:
|
||||
@@ -191,9 +203,10 @@ build-retroarch-windows-msvc05-i686:
|
||||
RCEDIT_BIN_DIR: C:\Program Files\rcedit
|
||||
PEDEPS_BIN_DIR: C:\Program Files\pedeps-0.1.9-win64\bin
|
||||
VS80COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
|
||||
MSVC_PLATFORM: windows_msvc2005_x86
|
||||
before_script:
|
||||
- $Env:HOME = "."
|
||||
- $Env:Path += -join(";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
- $Env:Path += -join(";", "$Env:MSYS_BIN_DIR", ";", "$Env:SDK_BIN_DIR", ";", "$Env:RCEDIT_BIN_DIR", ";", "$Env:PEDEPS_BIN_DIR")
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch.exe
|
||||
@@ -201,26 +214,31 @@ build-retroarch-windows-msvc05-i686:
|
||||
expire_in: 10 min
|
||||
dependencies: []
|
||||
script:
|
||||
# Build RetroArch
|
||||
- $Script:MakeCmd = "$Env:MSYS_BIN_DIR\env.exe $Env:MSYS_BIN_DIR\bash.exe -l -c 'make -f Makefile.griffin platform=windows_msvc2005_x86'"
|
||||
- Invoke-Expression $Script:MakeCmd
|
||||
- mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
- rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
# Create .media subdirectories
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
- New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
- Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
- Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
- Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc05 build should not have any, but this
|
||||
# may change in the future)
|
||||
- copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
- Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
- |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
# Build RetroArch
|
||||
bash.exe -l -c "make -f Makefile.griffin platform=$Env:MSVC_PLATFORM"
|
||||
if ($LastExitCode -ne 0){throw "Failed to build RetroArch"}
|
||||
mt.exe -nologo -manifest "retroarch.exe.manifest" -outputresource:"retroarch.exe;#1"
|
||||
if ($LastExitCode -ne 0){throw "Failed to add manifest to RetroArch binary"}
|
||||
rcedit-x64.exe "retroarch.exe" --set-icon "media\retroarch.ico"
|
||||
if ($LastExitCode -ne 0){throw "Failed to set icon of RetroArch binary"}
|
||||
# Create .media subdirectories
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg" -ItemType Directory
|
||||
New-Item -Path "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist" -ItemType Directory
|
||||
# Copy audio/video filters
|
||||
Get-ChildItem -Path "libretro-common/audio/dsp_filters/*" -Include *.dsp | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/audio"
|
||||
Get-ChildItem -Path "gfx/video_filters/*" -Include *.filt | Copy-Item -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/filters/video"
|
||||
# Copy default config file
|
||||
Copy-Item -Path "retroarch.cfg" -Destination "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/pkg/retroarch.default.cfg"
|
||||
# Copy dll dependencies
|
||||
# (note that msvc builds should not have any, but this
|
||||
# may change in the future)
|
||||
copypedeps.exe -r retroarch.exe "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist"
|
||||
if ($LastExitCode -ne 0){throw "Failed to copy RetroArch dependencies"}
|
||||
Remove-Item "$Env:MEDIA_PATH/$Env:CI_PROJECT_NAME/redist/retroarch.exe" -ErrorAction Ignore
|
||||
|
||||
build-retroarch-linux-x64:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:xenial-gcc9
|
||||
@@ -470,6 +488,29 @@ build-retroarch-retrofw-mips32:
|
||||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
|
||||
build-retroarch-miyoo-arm32:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-dingux:latest
|
||||
stage: build
|
||||
variables:
|
||||
MEDIA_PATH: .media
|
||||
STRIP_BIN: 1
|
||||
before_script:
|
||||
- export NUMPROC=$(($(nproc)/3))
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch
|
||||
- ${MEDIA_PATH}
|
||||
expire_in: 10 min
|
||||
dependencies: []
|
||||
script:
|
||||
- "make -j$NUMPROC -f Makefile.miyoo"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg"
|
||||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
- "cp -f pkg/miyoo/20a-retroarch ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg"
|
||||
|
||||
build-retroarch-android-normal:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
stage: build
|
||||
@@ -478,10 +519,15 @@ build-retroarch-android-normal:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 10 min
|
||||
script:
|
||||
- "cd pkg/android/phoenix && ./gradlew assembleNormalRelease && cd -"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
script:
|
||||
- |
|
||||
set -e
|
||||
cd pkg/android/phoenix
|
||||
./gradlew assembleNormalRelease
|
||||
cd -
|
||||
mkdir .retroarch-precompiled
|
||||
cp -r ./* .retroarch-precompiled/
|
||||
mv .retroarch-precompiled/ retroarch-precompiled/
|
||||
|
||||
build-retroarch-android-aarch64:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
@@ -491,10 +537,14 @@ build-retroarch-android-aarch64:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 10 min
|
||||
script:
|
||||
- "cd pkg/android/phoenix && ./gradlew assembleAarch64Release && cd -"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
- |
|
||||
set -e
|
||||
cd pkg/android/phoenix
|
||||
./gradlew assembleAarch64Release
|
||||
cd -
|
||||
mkdir .retroarch-precompiled
|
||||
cp -r ./* .retroarch-precompiled/
|
||||
mv .retroarch-precompiled/ retroarch-precompiled/
|
||||
|
||||
build-retroarch-android-ra32:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
@@ -504,10 +554,14 @@ build-retroarch-android-ra32:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 10 min
|
||||
script:
|
||||
- "cd pkg/android/phoenix && ./gradlew assembleRa32Release && cd -"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
- |
|
||||
set -e
|
||||
cd pkg/android/phoenix
|
||||
./gradlew assembleRa32Release
|
||||
cd -
|
||||
mkdir .retroarch-precompiled
|
||||
cp -r ./* .retroarch-precompiled/
|
||||
mv .retroarch-precompiled/ retroarch-precompiled/
|
||||
|
||||
build-retroarch-android-playstore-normal:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
@@ -517,10 +571,14 @@ build-retroarch-android-playstore-normal:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 10 min
|
||||
script:
|
||||
- "cd pkg/android/phoenix && ./gradlew bundlePlayStoreNormalRelease && cd -"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
- |
|
||||
set -e
|
||||
cd pkg/android/phoenix
|
||||
./gradlew bundlePlayStoreNormalRelease
|
||||
cd -
|
||||
mkdir .retroarch-precompiled
|
||||
cp -r ./* .retroarch-precompiled/
|
||||
mv .retroarch-precompiled/ retroarch-precompiled/
|
||||
|
||||
build-retroarch-android-playstore-plus:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
@@ -530,10 +588,14 @@ build-retroarch-android-playstore-plus:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 10 min
|
||||
script:
|
||||
- "cd pkg/android/phoenix && ./gradlew bundlePlayStorePlusRelease && cd -"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
- |
|
||||
set -e
|
||||
cd pkg/android/phoenix
|
||||
./gradlew bundlePlayStorePlusRelease
|
||||
cd -
|
||||
mkdir .retroarch-precompiled
|
||||
cp -r ./* .retroarch-precompiled/
|
||||
mv .retroarch-precompiled/ retroarch-precompiled/
|
||||
|
||||
build-static-retroarch-libnx-aarch64:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-libnx-devkitpro:latest
|
||||
|
||||
Vendored
+184
-148
@@ -1,155 +1,191 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "WiiU",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitPPC/powerpc-eabi/include",
|
||||
"/opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/include",
|
||||
"/opt/devkitpro/portlibs/ppc/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"WIIU",
|
||||
"WIIU_HID"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "ps2sdk-ee",
|
||||
"includePath": [
|
||||
"${env:PS2DEV}/ps2sdk/common/include",
|
||||
"${env:PS2DEV}/ps2sdk/ee/include",
|
||||
"${env:PS2DEV}/gsKit/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"PS2",
|
||||
"_EE"
|
||||
],
|
||||
"compilerPath": "${env:PS2DEV}/ee/bin/mips64r5900el-ps2-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+4
-33
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
/*"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.env.windows": {
|
||||
"PATH": "/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:$PATH",
|
||||
"MSYSTEM": "MINGW64",
|
||||
},
|
||||
},*/
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
@@ -11,20 +11,15 @@
|
||||
"editor.insertSpaces": true,
|
||||
"editor.formatOnSave": false,
|
||||
"files.associations": {
|
||||
"frontend_driver.h": "c",
|
||||
"*.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c",
|
||||
"array": "c",
|
||||
"file_stream.h": "c",
|
||||
"driver.h": "c",
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c",
|
||||
"list": "c",
|
||||
"input_driver.h": "c",
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
@@ -33,39 +28,15 @@
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c",
|
||||
"menu_input.h": "c",
|
||||
"tasks_internal.h": "c",
|
||||
"ozone.h": "c",
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c",
|
||||
"thread": "c",
|
||||
"xlocale": "c",
|
||||
"gfx_widgets.h": "c",
|
||||
"message_queue.h": "c",
|
||||
"task_queue.h": "c",
|
||||
"fifo_queue.h": "c",
|
||||
"file_list.h": "c",
|
||||
"strl.h": "c",
|
||||
"configuration.h": "c",
|
||||
"ozone_display.h": "c",
|
||||
"verbosity.h": "c",
|
||||
"retroarch.h": "c",
|
||||
"gfx_animation.h": "c",
|
||||
"netplay.h": "c",
|
||||
"scaler.h": "c",
|
||||
"deque": "c",
|
||||
"vector": "c",
|
||||
"xhash": "c",
|
||||
"xiosbase": "c",
|
||||
"xstring": "c",
|
||||
"xtree": "c",
|
||||
"xutility": "c",
|
||||
"menu_input_dialog.h": "c",
|
||||
"ozone_sidebar.h": "c",
|
||||
"menu_thumbnail_path.h": "c",
|
||||
"badges.h": "c"
|
||||
"xutility": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
@@ -3,18 +3,26 @@ RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
Aaahh Ahh (Aaahh)
|
||||
51eating (dnjstlr555)
|
||||
6lackmag3
|
||||
A Schain (aschain)
|
||||
Aaron Oneal (aarononeal)
|
||||
Adam Londero (alondero)
|
||||
Adam Mechtley (amechtley)
|
||||
AdrianoML
|
||||
Adrien Moulin (elyosh)
|
||||
Aethyrion
|
||||
ajefr
|
||||
AKuHAK
|
||||
Alberto Alonso Ruibal (albertoruibal)
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
Aleksey Samoilov (Sunderland93)
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alessio Tosto (Rinnegatamante)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alex Kornitzer (alexkornitzer)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
@@ -23,98 +31,151 @@ alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
amtz
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Andy Nguyen (TheOfficialFloW)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
AridRayne
|
||||
ArnaudFaucher
|
||||
arstn
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asavah
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre64
|
||||
Autechre (twinaphex)
|
||||
Avton1
|
||||
ayssia
|
||||
barbudreadmon
|
||||
Barry Rowe (BarryJRowe)
|
||||
Bartłomiej Burdukiewicz (dev-0x7C6)
|
||||
bearoso
|
||||
benklop
|
||||
benutzer193
|
||||
Bernhard Schelling (schellingb)
|
||||
blackgur
|
||||
bmaupin
|
||||
Bobby Smith (bslenul)
|
||||
Boris Timofeev (btimofeev)
|
||||
bparker06
|
||||
Brandon Johnson (Denu8thell)
|
||||
Brad (SpiralBrad)
|
||||
Braden Farmer (farmerbb)
|
||||
Brandon Johnson (BinaryFissionGames)
|
||||
Breno Dantas Mendonça (brenodantas10)
|
||||
Brian Hoem (ZornTaov)
|
||||
Brian Koropoff (bkoropoff)
|
||||
Brian S. Stephan (bsstephan)
|
||||
BringerethOfLight
|
||||
Brunnis
|
||||
bsmith (DogParty)
|
||||
bubuleur
|
||||
bulzipke
|
||||
C.W. Betts (MaddTheSane)
|
||||
Casey Borders (CaseyB)
|
||||
CatGreen90
|
||||
ceb33
|
||||
celerizer
|
||||
Charlène (julianaito)
|
||||
CheezeCake
|
||||
Chris Merrett (chrisfu)
|
||||
Christian Murphy (grimpunch)
|
||||
christianhaitian
|
||||
Christoffer Tibell (Brottweiler)
|
||||
chu (9chu)
|
||||
Chuck Smith (chucksmith)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
cold-brewed
|
||||
CompCom
|
||||
ComradeEcho
|
||||
confusedguy9
|
||||
Conn O'Griofa (psyke83)
|
||||
Connor McLaughlin (stenzek)
|
||||
Conrad Kreyling (konistehrad)
|
||||
CozmoP
|
||||
Cpasjuste
|
||||
cpsw
|
||||
Cray Elliott (MP2E)
|
||||
Crestwave
|
||||
CrewMdk
|
||||
Cristi Mitrana (cmitu)
|
||||
Cristian Sandu (crazyquark)
|
||||
ctult
|
||||
crystalct
|
||||
CTCaer
|
||||
cucholix
|
||||
cudencuden
|
||||
cxd4
|
||||
Cyan (44100hertz)
|
||||
Daehan Kim (iAmGhost)
|
||||
dalter
|
||||
Dan Weiss (Dwedit)
|
||||
danieljg
|
||||
Daniil Zhilin (LaserMoai)
|
||||
dankcushions
|
||||
Darren Thompson (DiscoStarslayer)
|
||||
Dave (freakdave)
|
||||
Dave Leaver (danzel)
|
||||
David CARLIER (devnexen)
|
||||
David Demelier (markand)
|
||||
David Erickson (daviderickson)
|
||||
David Shah (daveshah1)
|
||||
David G. F. (davidgfnet)
|
||||
David Lawson (dmrlawson)
|
||||
David Walters (hiddenasbestos)
|
||||
DEX357
|
||||
diablodiab
|
||||
dibas
|
||||
Diego A. (SuperrSonic)
|
||||
Diego Viola (diegoviola)
|
||||
digitalisland-nino
|
||||
Diogo Barros (BlueKore)
|
||||
DogParty
|
||||
Dmitry Sergeenkov (DuMOHsmol)
|
||||
dor3k
|
||||
Doug Christman (dobyrch)
|
||||
driver1998
|
||||
Dudu Akiva (duduke)
|
||||
duganchen
|
||||
dukemiller
|
||||
duskgao
|
||||
Dylan Scott (dyscott)
|
||||
eadmaster
|
||||
Eduard Strehlau (Herdinger)
|
||||
ekipan
|
||||
Elvira Khabirova (parport0)
|
||||
embercold
|
||||
Emmanuel Martin (daliaetnano)
|
||||
endrift
|
||||
erbridge
|
||||
Ethan Lee (flibitijibibo)
|
||||
Exvat
|
||||
extrowerk
|
||||
Ezio-PS
|
||||
F (erbridge)
|
||||
Fabio (Oibaf66)
|
||||
Fabio Ritrovato (Sephiroth87)
|
||||
Fayne Aldan (FayneAldan)
|
||||
fff (felinben)
|
||||
FIX94
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
FmT0
|
||||
francescotintori
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
Francisco José García García (frangarcj)
|
||||
FreeShippingParty
|
||||
fuzzydunlops732 (JKoppel93)
|
||||
Gabriel (Ghabry)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gatecat (daveshah1)
|
||||
GavinDarkglider
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
Glenn Hevey (hevey)
|
||||
Googer
|
||||
gordon-fish
|
||||
gouchi
|
||||
grant2258
|
||||
Gregor Richards (GregorR)
|
||||
Grzegorz Raciborski (graciborski)
|
||||
Gui Andrade (archshift)
|
||||
Guillaume Thiolliere (thiolliere)
|
||||
Guo Yunhe (guoyunhe)
|
||||
Gustavo Maciel Dias Vieira (gmdvieira)
|
||||
gvbr
|
||||
H. İbrahim Güngör (igungor)
|
||||
@@ -122,44 +183,61 @@ hadess
|
||||
Hans-Kristian Arntzen (Themaister)
|
||||
Henri Gomez (hgomez)
|
||||
Henri Gomez (hgomez-sonarsource)
|
||||
Higor Eurípedes (heuripedes)
|
||||
Hisman Yosika (dnjstlr555)
|
||||
Henry Castro (hcvcastro)
|
||||
Higor E. (heuripedes)
|
||||
hizzlekizzle
|
||||
Hugo B. (hug0b)
|
||||
Hugo Hromic (hhromic)
|
||||
hunterk
|
||||
hyarsan
|
||||
Hyllian
|
||||
HyperspaceMadness
|
||||
i30817
|
||||
iAmGhost
|
||||
im4potato
|
||||
ImJezze
|
||||
Jack (jakcron)
|
||||
Jacob (cubtekki)
|
||||
Jacob Patterson (jacobpa)
|
||||
jacobsson (Roet-Ivar)
|
||||
Jake Stine (jstine35)
|
||||
James Le Cuirot (chewi)
|
||||
James Sexton (Bezier89)
|
||||
Jamiras
|
||||
Jan Holthuis (Holzhaus)
|
||||
Jason Tomsic (plaidman)
|
||||
Javier Martinez Canillas (martinezjavier)
|
||||
Jay McCarthy (jeapostrophe)
|
||||
jdgleaver
|
||||
Jean-André Santoni (kivutar)
|
||||
Jean-Paul Mari (djipi)
|
||||
Jean-Sébastien Guay (Skylark13)
|
||||
Jesse Bryan (winneon)
|
||||
Jeff (jeffbdavenport)
|
||||
Jeff Sousa (LordeIlluminati)
|
||||
jess (winneon)
|
||||
Joan Coll Cerdán (johanbcn)
|
||||
Job Adrian Salinas Gonzalez (efylan)
|
||||
Joe Osborn (JoeOsborn)
|
||||
Joel (joel16)
|
||||
Joerg Sonnenberger (jsonn)
|
||||
Johannes Schickel (lordhoto)
|
||||
John Parton (john-parton)
|
||||
John Regan (jprjr)
|
||||
Jon Maddox (maddox)
|
||||
Jonathan (JonnyMe)
|
||||
Jonathan Relf (jonathanrelf)
|
||||
Joohan Lee (losernator)
|
||||
Jools Wills (joolswills)
|
||||
Jose Lage Miguez (Joselagem)
|
||||
Joseph Carter (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
Josh Palmer (ShiftyAxel)
|
||||
jsd1982 (JamesDunne)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
JustMeDaFaq
|
||||
Karl Forshaw (karlforshaw)
|
||||
Keith Bowes (keithbowes)
|
||||
Ken Rossato (rossato)
|
||||
Kopert
|
||||
krzys_h (krzys-h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
@@ -167,10 +245,12 @@ l3iggs
|
||||
lambolighting
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
lifajucejo
|
||||
liffy (lifning)
|
||||
LazyBumHorse
|
||||
LazyFunker
|
||||
Lennard Kittner (Lennard599)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
liushuyu
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
@@ -178,51 +258,63 @@ Lubosz Sarnecki (lubosz)
|
||||
lucianposton
|
||||
lxerandrew
|
||||
m4xw
|
||||
mahoneyt944
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Mai M. (lioncash)
|
||||
maksun
|
||||
Manuel Alfayate Corchete (vanfanel)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
Marcus Crisostomo (mcrisostomo)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mat M. (lioncash)
|
||||
Mats A. (Datamats)
|
||||
Mats (m4tsa)
|
||||
Matt Sephton (gingerbeardman)
|
||||
Matthew Bauer (matthewbauer)
|
||||
Matthew Wang (asakous)
|
||||
Max K. (langerhans)
|
||||
Maxime Gauduin (alucryd)
|
||||
mcrisostomo
|
||||
meancoot
|
||||
meepingsnesroms
|
||||
meleu
|
||||
Merry Mello (merryMellody)
|
||||
micechal
|
||||
Michael Burgardt (DisasterMo)
|
||||
Michael K. (kuxii2016)
|
||||
Michael Lelli (ToadKing)
|
||||
Michał Durak (micechal)
|
||||
mickski56
|
||||
Mico Chopitea (micochops)
|
||||
miguelpinheiro
|
||||
Mike Swanson (chungy)
|
||||
miqlas (extrowerk)
|
||||
mikeOSX
|
||||
minucce
|
||||
misson20000
|
||||
Monroe88
|
||||
Morgane (Niouby)
|
||||
mprobinson
|
||||
MrHuu
|
||||
MrJs (mrjschulte)
|
||||
mudlord
|
||||
Muhamed Hobi (mmhobi7)
|
||||
muzuiget
|
||||
mwtremblay
|
||||
myfreeweb
|
||||
Nargash
|
||||
Nathan S. (natinusala)
|
||||
NathanStrong-Tripwire
|
||||
nattycleopatra
|
||||
nayslayer
|
||||
Nephilim
|
||||
negativeExponent
|
||||
Neil Barkhina (nbarkhina)
|
||||
Nephilim (Nephil1m)
|
||||
netux79
|
||||
nfnty
|
||||
nia (ensra)
|
||||
nia (alarixnia)
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Lopez Fernandez (pyroesp)
|
||||
Nikita Vakhrushev (SwooodGa)
|
||||
Nicolas Roehm (NicolasRoehm)
|
||||
Nikita Vakhrushev (XF10C)
|
||||
Nikola Kocić (nikola-kocic)
|
||||
Niouby
|
||||
Nikos Chantziaras (realnc)
|
||||
Nils Hasenbanck (hasenbanck)
|
||||
njordan64
|
||||
nosh01
|
||||
not6 (r-type)
|
||||
notaz
|
||||
@@ -231,51 +323,77 @@ nurupo
|
||||
Oggom
|
||||
Oleg Shevchenko (olsh)
|
||||
opendata26
|
||||
Ophidon
|
||||
orbea
|
||||
Oschowa
|
||||
OsirizX
|
||||
OV2
|
||||
Palmic (mpalomas)
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (notabeatle)
|
||||
pcjco
|
||||
Pedro Ferraz (ferrazpedro)
|
||||
Pedro Ribeiro (pedrib)
|
||||
pinumbernumber
|
||||
pjft
|
||||
pponso1
|
||||
pyroesp
|
||||
R-YaTian
|
||||
Ramiro Morales (ramiro)
|
||||
Raphaël Zumer (rzumer)
|
||||
retro-wertz
|
||||
Reid Kleckner (rnk)
|
||||
repojohnray
|
||||
retrotails
|
||||
revvv
|
||||
reztek
|
||||
Richard Howell (rmaz)
|
||||
rlnilsen
|
||||
Rob Loach (RobLoach)
|
||||
Robin de Rooij (rrooij)
|
||||
Romain Gay (vikbez)
|
||||
Romain Graillot (notnotme)
|
||||
Romain TISSERAND (rtissera)
|
||||
Roman Fomin (rfomin)
|
||||
Roman Kalashnikov (lunixoid)
|
||||
Royerson
|
||||
rrooij
|
||||
rsn8887
|
||||
Ryan C. Gordon (icculus)
|
||||
Ryunam
|
||||
rz5
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Lantinga (slouken)
|
||||
Sam Stenvall (Jalle19)
|
||||
Samuel P. (p-sam)
|
||||
Sanaki
|
||||
Scheiker
|
||||
Sebastien Ronsse (sronsse)
|
||||
SecularSteve
|
||||
Sefa Eyeoglu (Scrumplex)
|
||||
Sergei Nikitin (Kert)
|
||||
Sergi Granell (xerpi)
|
||||
Sergio Padrino (sergiou87)
|
||||
sergio-br2 (sergiobenrocha2)
|
||||
Seth Kingsley (sethk)
|
||||
Shadow (ShadowOne333)
|
||||
Shane Mouton (ismouton)
|
||||
shantigilbert
|
||||
Shfty
|
||||
Shizeeg Unadequatov (shizeeg)
|
||||
SimpleTease
|
||||
SindenLightgun
|
||||
Sirrempat
|
||||
slotek
|
||||
Soar Qin (soarqin)
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
stellarporter
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stephanie Gawroriski (XerTheSquirrel)
|
||||
Stevoisiak
|
||||
stoofin
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
@@ -283,39 +401,56 @@ Sven (RetroSven)
|
||||
Swingflip
|
||||
Swizzy
|
||||
Sylvain Colinet (Skarsnik)
|
||||
Szunti
|
||||
Tadek Kijkowski (monkeyman79)
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheMrIron2
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
ThePhxRises
|
||||
Thomas Lorblanchès (Zlika)
|
||||
Tim Van den Langenbergh (tmtvl)
|
||||
Tobias Gruetzmacher (TobiX)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Todd Laney (ToddLa)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Tony (sonninnos)
|
||||
Tor Arne Vestbø (torarnv)
|
||||
Torsten Paul (t-paul)
|
||||
toshixm
|
||||
TotalCaesar659
|
||||
TroggleMonkey
|
||||
Twinaphex
|
||||
tunip3
|
||||
Tyler Loch (TylerLoch)
|
||||
unrelentingtech
|
||||
URBANsUNITED
|
||||
Valerio Proietti (kamicane)
|
||||
vgmoose
|
||||
Vicki Pfau (endrift)
|
||||
Vicky C Lau (vickychenglau)
|
||||
vin (suseme)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Vladimir Serbinenko (phcoder)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
waitingmoon
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Weedy Weed Smoker (WeedyWeedSmoker)
|
||||
WerWolv
|
||||
whorsemaster
|
||||
Wiimpathy
|
||||
Wiktor Strzębała (wiktorek140)
|
||||
Woohyun Shin (sinusinu)
|
||||
xenomorph-us
|
||||
xhp-creations
|
||||
Yari (hyarsan)
|
||||
yesfish (huwpascoe)
|
||||
Yongwoon Cho (ssangkong)
|
||||
yoshisuga
|
||||
Zer0xFF
|
||||
zeromus
|
||||
zlice
|
||||
Zoran Vuckovic (casdevel)
|
||||
Érico Nogueira Rolim (ericonr)
|
||||
Ömercan Kömür (fpscan)
|
||||
シーはディー四を取る (cxd4)
|
||||
)";
|
||||
+105
@@ -1,5 +1,110 @@
|
||||
# Future
|
||||
|
||||
# 1.9.12
|
||||
- 3DS: Ensure parallax barrier is disabled when '3DS Display Mode' is '2D'
|
||||
- COMMAND: Command interface should work again
|
||||
- INPUT/HID: Rewrote the HID deregistration algorithm; it should no longer cause issues when dealing with multiple pads of the same HID/VID combo
|
||||
- INPUT/HID: Fix initialization bug that caused wiimotes to fail to register without an accessory attached
|
||||
- INPUT/HID: Fix Wiimote regression
|
||||
- INPUT/HID/MAC: Get Sony Sixaxis (DualShock 3) working on MacOS
|
||||
- INPUT/UDEV: Add extra abs check for dolphinbar
|
||||
- INPUT/UDEV: Add relative left mouse button when pointer device is not abs
|
||||
- INPUT/WAYLAND: Fix keyboard input on Wayland - fixes 'Certain cores ignore user input'
|
||||
- NETPLAY: Improvements from Cthulhu
|
||||
- OPENDINGUX: Fix HAS_ANALOG/HAS_MENU_TOGGLE defines in sdl_dingux joypad driver
|
||||
- LIBRETRO: Enable SRAM for contentless cores
|
||||
- LIBRETRO: Add environment callback to get the rate retro_run is called - GET_THROTTLE_STATE and RETRO_THROTTLE_UNBLOCKED environment callback
|
||||
- LINUX: Update metadata manifest
|
||||
- MENU/OZONE: New themes - Solarized Light, Solarized Dark
|
||||
- WINDOWS/WIN9X: Fix non-ASCII text display in window title
|
||||
|
||||
# 1.9.11
|
||||
- ANDROID: New launcher logo - will fill the corners on the homescreen
|
||||
- D3D9: Driver works again (RGUI only and software rendered cores work, no shader support yet)
|
||||
- HID/MAC: WiiU GameCube Adapter now works
|
||||
- HID/WIIU: WiiU and general HID subsystem unified/merged
|
||||
- INPUT: Refactor menu toggle combo button logic to allow quit combo button
|
||||
- INPUT/UDEV: Add mouse relative check and set appropriately to fix issue
|
||||
- LIBNX/SWITCH: Splitted Joycon button mapping
|
||||
- LIBRETRO: Add environment callback to enable cores to notify the frontend that a core otion value has changed
|
||||
- MIYOO: Add initial port
|
||||
- OPENDINGUX/RG350: Enable tinyalsa for the RG350
|
||||
- PS2: Add 'Change Resolution' option
|
||||
- PS2: Add option to change video windows offsets
|
||||
- STEAM/LINUX: Move to new 'soldier' runtime
|
||||
- WAYLAND: Remove xdg-shell-v6 protocol
|
||||
- WINDOWS: Fix non-ASCII text display in window title
|
||||
- WINDOWS 11: Shows Windows 11 version name now (Information -> System Information)
|
||||
- UWP: Further improvements to WinRT VFS layer
|
||||
|
||||
# 1.9.10
|
||||
- 3DS: Add bottom screen idle state
|
||||
- 3DS: Add unique IDs for Gearboy/Gearcoleco/Gearsystem, correct CAP32 code
|
||||
- 3DS/SAVESTATES: Fix RAM states to file when core deinits
|
||||
- AUDIO/MIXER: Pad sample buffers to prevent potential heap-buffer-overflows when resampling (fixes crash when using 30 kHz menu audio files)
|
||||
- AUDIO/LINUX/SNAP: Add JACK support
|
||||
- CHEEVOS: Don't write achievement credentials to overrides
|
||||
- CHEEVOS: Disable slowmotion when enabling hardcore mode
|
||||
- D3D9: Fixed MVP matrix issue for RGUI texture (main game frame still won't show up though)
|
||||
- D3D11/D3D12/HDR: Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
|
||||
- D3D11/HDR: Fixed D3D11's blend, rasterizer and topology states not being set to the sames when using HDR and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
|
||||
- D3D11/D3D12/HDR: Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
|
||||
- D3D11/D3D12/HDR: Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
|
||||
- D3D11/D3D12/HDR: Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons
|
||||
- BUGFIX/ANDROID: Fix crash that could happen on Android with Sameboy core - would crash on rumble function
|
||||
- GFX/WIDGETS: New regular widget message appearance
|
||||
- INPUT/MOUSE: Add distinct mouse zero index label for drivers that do not support multimouse
|
||||
- INPUT/RUMBLE: Add generic rumble gain to input settings
|
||||
- INPUT/UDEV/X11: Add workaround to fix keyboard input when using X11 + Udev
|
||||
- LIBNX/SWITCH: Add Video Filters support
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- OPENDINGUX/BETA: Disable OpenAL
|
||||
- PLAYLISTS: Add 'Refresh Playlist' option
|
||||
- STEAM: Initial release on Steam
|
||||
- UWP/VFS/XBOX: Improvements and bugfixes to UWP VFS driver
|
||||
- VIDEO/REFRESH RATE: Automatic PAL/NTSC refresh rate switch where available - as long as the platform display server allows changing refresh rates and the display has the desired refresh rate
|
||||
- VIDEO FILTERS: Add 'Picoscale_256x-320x240' video filter
|
||||
- WIIU/HID: Fix analog inputs on HID devices
|
||||
|
||||
# 1.9.9
|
||||
- 3DS: Add bottom touchscreen menu
|
||||
- 3DS/SAVESTATES: Save and load save states to and from RAM
|
||||
- AUDIO/MIXER: Ensure than menu sounds are re-enabled when calling CMD_EVENT_AUDIO_REINIT
|
||||
- AUDIO/RESAMPLER/MIXER: Fix menu sounds (audio mixing) when using the 'sinc' resampler with quality lower than 'normal'
|
||||
- AUDIO/CONVERSION/ARM NEON: Add intrinsic NEON versions for float_to_s16/s16_to_float - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- AUDIO/RESAMPLER/ARM NEON: Add intrinsic NEON version for lanczos sinc function - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- CHEEVOS: Upgrade to rcheevos 10.2
|
||||
- CHEATS: Add enhanced search functionality to the 'Cheats' menu
|
||||
- CHEATS/RUNAHEAD: Fix cheats when using second instance runahead
|
||||
- CONFIG: Add option to (force-)write current core options to disk (Quick Menu)
|
||||
- CORE INFO CACHE: Remove core path from core info cache. Should make core info caches portable now (for example: you can move RetroArch to a separate dir and they would still work).
|
||||
- D3D11: Use Shader Model 5.0 for frontend shaders if D3D11 Feature level is at least 11.0 or higher. Should fix some new shaders that require SM 5.0 (like AMD FSR)
|
||||
- D3D11: Add HDR support (disabled for UWP for now)
|
||||
- D3D12: Add HDR support (disabled for UWP for now)
|
||||
- EMSCRIPTEN: Fixed web player bug with filesystem and runtime
|
||||
- INPUT/OVERLAY: Fix overlay input when analog to digital mapping is enabled
|
||||
- INPUT/UDEV: Look for "ID_INPUT_KEY", not "ID_INPUT_KEYBOARD"
|
||||
- INPUT/WINRAW: Fix crash when overlay is enabled
|
||||
- MAC/METAL: Add Discord RPC support
|
||||
- MENU: Allow 'Custom Aspect Ratio (X Position)/(Y Position)/(Width)/(Height)' to be entered manually via keyboard
|
||||
- MENU: Allow 'Vertical Refresh Rate' to be entered manually via keyboard
|
||||
- MENU/SHADERS: Highlight currently selected value in Shader Parameter drop-down lists
|
||||
- STABILITY: Safer way of avoiding the race condition in
|
||||
audio_driver_sample/audio_driver_sample_batch - we can check
|
||||
audio-suspended to see if we're doing a fs/windowed toggle - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: When audio driver write callback function fails, don't
|
||||
turn audio off completely - look if audio_driver_output_samples_conv_buf
|
||||
is non-NULL first before we attempt to write audio - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: Input robustness for cores that use internal threading
|
||||
(full teardown/setup), no audio should be processed at this point in
|
||||
time
|
||||
- VIDEO: Screen resolution list sanitizing
|
||||
- VULKAN: Fix some Vulkan validation layer errors
|
||||
- UWP: Updated icons courtesy of Danp142
|
||||
- UWP/XBOX: Disable CPU model check on Xbox as it doesn't work and can even crash
|
||||
- UWP/VFS/XBOX: Code cleanup and simplification of UWP VFS driver
|
||||
|
||||
|
||||
# 1.9.8
|
||||
- AUDIO/WINDOWS/WASAPI: Stop deactivating audio on fast forward
|
||||
- CHEEVOS: Hide challenge indicators when resetting
|
||||
|
||||
+86
-43
@@ -3,64 +3,107 @@ Struct ordering
|
||||
|
||||
For POD-types, try to order structs as follows (first to last):
|
||||
|
||||
* long double (8 bytes, 16 bytes [64bit x86], 12 bytes [32bit x86])
|
||||
* double (8 bytes)
|
||||
* int64_t (8 bytes, 8 bytes [32bit ARM], 4 bytes [32bit x86])
|
||||
* uint64_t (4 bytes [32bit], 8 bytes [32bit ARM], 8 bytes [64bit])
|
||||
* pointer (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* intptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* uintptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ptrdiff_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ssize_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* size_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* jmp_buf (4 bytes)
|
||||
* long (4 bytes [64bit Win], 8 bytes [64bit non-Win], 4 bytes [32bit])
|
||||
* int32_t (4 bytes)
|
||||
* unsigned (4 bytes)
|
||||
* float (4 bytes)
|
||||
* int (4 bytes)
|
||||
* enum (4 bytes)
|
||||
* int16_t (2 bytes)
|
||||
* char (1 byte)
|
||||
* long double (8 bytes, 16 bytes [64bit x86], 12 bytes [32bit x86])
|
||||
* double (8 bytes)
|
||||
* int64_t (8 bytes, 8 bytes [32bit ARM],
|
||||
4 bytes [32bit x86])
|
||||
* uint64_t (4 bytes [32bit], 8 bytes [32bit ARM], 8 bytes [64bit])
|
||||
* pointer (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* intptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* uintptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ptrdiff_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ssize_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* size_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* jmp_buf (4 bytes)
|
||||
* long (4 bytes [64bit Win], 8 bytes [64bit non-Win],
|
||||
4 bytes [32bit])
|
||||
* int32_t (4 bytes)
|
||||
* unsigned (4 bytes)
|
||||
* float (4 bytes)
|
||||
* int (4 bytes)
|
||||
* enum (4 bytes)
|
||||
* int16_t (2 bytes)
|
||||
* char (1 byte)
|
||||
* bool (1 byte)
|
||||
|
||||
[1] PS3 uses 4 byte pointers despite having a 64bit processor
|
||||
[1] PS3 uses 4 byte pointers despite having a 64bit processor
|
||||
|
||||
Struct members should be sorted by alignment. Therefore, structs
|
||||
should be sorted by the largest type inside them.
|
||||
Struct members should be sorted by alignment. Therefore, structs
|
||||
should be sorted by the largest type inside them.
|
||||
|
||||
For example, take a struct like this:
|
||||
For example, take a struct like this:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t capacity;
|
||||
bool old_format;
|
||||
bool compress;
|
||||
bool fuzzy_archive_match;
|
||||
bool autofix_paths;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char base_content_directory[PATH_MAX_LENGTH];
|
||||
} playlist_config_t;
|
||||
typedef struct
|
||||
{
|
||||
size_t capacity;
|
||||
bool old_format;
|
||||
bool compress;
|
||||
bool fuzzy_archive_match;
|
||||
bool autofix_paths;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char base_content_directory[PATH_MAX_LENGTH];
|
||||
} playlist_config_t;
|
||||
|
||||
size_t has the biggest alignment here, so 'struct playlist_config_t' inside a struct should come before or after size_t.
|
||||
size_t has the biggest alignment here, so 'struct playlist_config_t'
|
||||
inside a struct should come before or after size_t.
|
||||
|
||||
*** BEST PRACTICES ***
|
||||
|
||||
* If we have pointers and size variable pairs, it's best to interleave them to increase the probability they go in the same cacheline. It also makes the code more readable, that these two variables are connected.
|
||||
* If we have pointers and size variable pairs, it's best to
|
||||
interleave them to increase the probability they go in the
|
||||
same cacheline. It also makes the code more readable, that
|
||||
these two variables are connected.
|
||||
|
||||
Example:
|
||||
|
||||
struct a
|
||||
{
|
||||
char* b;
|
||||
size_t b_len;
|
||||
char* c;
|
||||
size_t c_len;
|
||||
};
|
||||
struct a
|
||||
{
|
||||
char* b;
|
||||
size_t b_len;
|
||||
char* c;
|
||||
size_t c_len;
|
||||
};
|
||||
|
||||
Stack size
|
||||
----------
|
||||
|
||||
You have to assume that stack size is going to be limited in RetroArch. Some game consoles (and other embedded systems) might have a default stack size as low as 128Kb or less. Be conservative with stack size but don't try to put very small structs on heap either [to avoid memory fragmentation among other things].
|
||||
You have to assume that stack size is going to be limited in
|
||||
RetroArch. Some game consoles (and other embedded systems)
|
||||
might have a default stack size as low as 128Kb or less.
|
||||
Be conservative with stack size but don't try to put very
|
||||
small structs on heap either [to avoid memory fragmentation
|
||||
among other things]. A balancing act here is necessary.
|
||||
|
||||
Be mindful that heap allocations are slow compared to stack.
|
||||
|
||||
Functions
|
||||
---------
|
||||
- Avoid doing small getter/setter functions. We want a function
|
||||
to justify its function call overhead by doing a significant
|
||||
body of work. Small one-line getter/setter functions for what
|
||||
is predominantly C-style structs is not useful, plus it leads
|
||||
to people thinking this function is more complex than it
|
||||
actually is, thus obfuscating the sourcecode instead of it
|
||||
being easier to read.
|
||||
|
||||
If you can find examples in the codebase that violate this
|
||||
guideline, do not hesitate to point them out to us.
|
||||
|
||||
Variable declaration
|
||||
--------------------
|
||||
For C source files, we have to insist you stick to the following:
|
||||
|
||||
- Declare variables either at the start of a function or the start
|
||||
of a code block, depending on the scope they need.
|
||||
- Do not do initial for loop declarations. Refer to the bulletpoint above:
|
||||
either declare them at the start of the function, or at the start
|
||||
of the code block.
|
||||
|
||||
Not doing this would break compilation on platforms where we are compiling
|
||||
these C source files in C89 compatibility mode. If such issues occur in pull
|
||||
requests, we have to request that it be fixed.
|
||||
|
||||
VLA (Variable Length Array)
|
||||
---------------------------
|
||||
Do not use VLAs (Variable Length Array) in C source files. These are not
|
||||
C89-compliant.
|
||||
+34
-42
@@ -134,7 +134,6 @@ ifneq ($(findstring Darwin,$(OS)),)
|
||||
MINVERFLAGS=
|
||||
ifeq ($(shell uname -p),arm)
|
||||
MINVERFLAGS = -mmacosx-version-min=10.15 -stdlib=libc++ # macOS (Metal, ARM 64bit)
|
||||
MINVERFLAGS += -DDONT_WANT_ARM_ASM_OPTIMIZATIONS
|
||||
else ifeq ($(HAVE_METAL),1)
|
||||
MINVERFLAGS = -mmacosx-version-min=10.13 -stdlib=libc++ # macOS (Metal, x86 64bit)
|
||||
else ifeq ($(shell uname -p),powerpc)
|
||||
@@ -148,7 +147,6 @@ ifneq ($(findstring Darwin,$(OS)),)
|
||||
# Build for a specific architecture when ARCH is defined as a switch
|
||||
ifeq ($(ARCH),arm64)
|
||||
MINVERFLAGS = -mmacosx-version-min=10.15 -stdlib=libc++ # macOS (Metal, ARM 64bit)
|
||||
MINVERFLAGS += -DDONT_WANT_ARM_ASM_OPTIMIZATIONS
|
||||
ARCHFLAGS = -arch arm64
|
||||
else ifeq ($(ARCH),x86_64)
|
||||
ifeq ($(HAVE_METAL),1)
|
||||
@@ -190,6 +188,10 @@ endif
|
||||
|
||||
ifeq ($(HAVE_UNIX), 1)
|
||||
OBJ += frontend/drivers/platform_unix.o
|
||||
|
||||
ifeq ($(UNIX_CWD_ENV), 1)
|
||||
DEF_FLAGS += -DRARCH_UNIX_CWD_ENV
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_3ds)
|
||||
@@ -234,6 +236,8 @@ OBJ += frontend/frontend_driver.o \
|
||||
retroarch.o \
|
||||
command.o \
|
||||
msg_hash.o \
|
||||
midi_driver.o \
|
||||
location_driver.o \
|
||||
intl/msg_hash_us.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
|
||||
tasks/task_content.o
|
||||
@@ -302,14 +306,16 @@ OBJ += \
|
||||
$(LIBRETRO_COMM_DIR)/file/file_path_io.o \
|
||||
file_path_special.o \
|
||||
$(LIBRETRO_COMM_DIR)/hash/lrc_hash.o \
|
||||
audio/audio_driver.o \
|
||||
input/input_driver.o \
|
||||
input/common/input_hid_common.o \
|
||||
led/led_driver.o \
|
||||
gfx/video_coord_array.o \
|
||||
gfx/gfx_display.o \
|
||||
gfx/video_driver.o \
|
||||
gfx/gfx_display.o \
|
||||
gfx/gfx_animation.o \
|
||||
gfx/gfx_thumbnail_path.o \
|
||||
gfx/gfx_thumbnail.o \
|
||||
gfx/gfx_thumbnail_path.o \
|
||||
gfx/gfx_thumbnail.o \
|
||||
gfx/video_coord_array.o \
|
||||
configuration.o \
|
||||
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
|
||||
cores/dynamic_dummy.o \
|
||||
@@ -335,6 +341,10 @@ ifeq ($(HAVE_CHEATS), 1)
|
||||
OBJ += cheat_manager.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
OBJ += \
|
||||
core_info.o \
|
||||
core_backup.o \
|
||||
@@ -970,10 +980,6 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
|
||||
HAVE_XMB = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STRIPES),)
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OZONE),)
|
||||
HAVE_OZONE = 1
|
||||
endif
|
||||
@@ -981,7 +987,6 @@ else
|
||||
HAVE_RGUI ?= 0
|
||||
HAVE_MATERIALUI ?= 0
|
||||
HAVE_XMB ?= 0
|
||||
HAVE_STRIPES ?= 0
|
||||
HAVE_OZONE ?= 0
|
||||
endif
|
||||
|
||||
@@ -1013,22 +1018,12 @@ ifeq ($(HAVE_MENU), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OZONE), 1)
|
||||
OBJ += menu/drivers/ozone/ozone.o \
|
||||
menu/drivers/ozone/ozone_entries.o \
|
||||
menu/drivers/ozone/ozone_display.o \
|
||||
menu/drivers/ozone/ozone_texture.o \
|
||||
menu/drivers/ozone/ozone_theme.o \
|
||||
menu/drivers/ozone/ozone_sidebar.o
|
||||
OBJ += menu/drivers/ozone.o
|
||||
DEFINES += -DHAVE_OZONE
|
||||
HAVE_ASSETS = 1
|
||||
HAVE_MENU_SCREENSAVER = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STRIPES), 1)
|
||||
OBJ += menu/drivers/stripes.o
|
||||
DEFINES += -DHAVE_STRIPES
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_SCREENSAVER), 1)
|
||||
OBJ += menu/menu_screensaver.o
|
||||
endif
|
||||
@@ -1048,6 +1043,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/menu_setting.o \
|
||||
menu/menu_driver.o \
|
||||
menu/cbs/menu_cbs_ok.o \
|
||||
menu/cbs/menu_cbs_cancel.o \
|
||||
menu/cbs/menu_cbs_select.o \
|
||||
@@ -1191,12 +1187,6 @@ ifeq ($(TARGET), retroarch_wiiu)
|
||||
INCLUDE_DIRS += -Iinput/include
|
||||
OBJ += input/drivers_joypad/wiiu/hidpad_driver.o
|
||||
OBJ += input/drivers_hid/wiiu_hid.o
|
||||
OBJ += input/connect/joypad_connection.o \
|
||||
input/common/hid/hid_device_driver.o \
|
||||
input/common/hid/device_wiiu_gca.o \
|
||||
input/common/hid/device_ds3.o \
|
||||
input/common/hid/device_ds4.o \
|
||||
input/common/hid/device_null.o
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1233,7 +1223,6 @@ ifeq ($(HAVE_WAYLAND), 1)
|
||||
input/common/wayland_common.o \
|
||||
input/drivers/wayland_input.o \
|
||||
gfx/common/wayland/xdg-shell.o \
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.o \
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.o
|
||||
|
||||
@@ -1454,12 +1443,13 @@ ifeq ($(HAVE_VITAGLES), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
OBJ += gfx/common/gl_common.o
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
DEFINES += -DHAVE_OPENGL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
OBJ += gfx/drivers/gl2.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
|
||||
gfx/drivers_font/gl_raster_font.o \
|
||||
gfx/drivers_display/gfx_display_gl.o
|
||||
gfx/drivers_font/gl2_raster_font.o \
|
||||
gfx/drivers_display/gfx_display_gl2.o
|
||||
endif
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/glsym/rglgen.o
|
||||
@@ -1468,7 +1458,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
DEFINES += -DHAVE_OPENGL1
|
||||
OBJ += gfx/drivers/gl1.o \
|
||||
gfx/drivers_font/gl1_raster_font.o \
|
||||
gfx/drivers_display/gfx_display_gl1.o
|
||||
gfx/drivers_display/gfx_display_gl1.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEOCORE), 1)
|
||||
@@ -1582,6 +1572,8 @@ else ifeq ($(HAVE_SDL_DINGUX), 1)
|
||||
|
||||
ifeq ($(RS90), 1)
|
||||
OBJ += gfx/drivers/sdl_rs90_gfx.o
|
||||
else ifeq ($(MIYOO), 1)
|
||||
OBJ += gfx/drivers/sdl_rs90_gfx.o
|
||||
else
|
||||
OBJ += gfx/drivers/sdl_dingux_gfx.o
|
||||
endif
|
||||
@@ -1636,10 +1628,10 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGL_CORE), 1)
|
||||
OBJ += gfx/drivers/gl_core.o \
|
||||
gfx/drivers_font/gl_core_raster_font.o \
|
||||
gfx/drivers_shader/shader_gl_core.o \
|
||||
gfx/drivers_display/gfx_display_gl_core.o
|
||||
OBJ += gfx/drivers/gl3.o \
|
||||
gfx/drivers_font/gl3_raster_font.o \
|
||||
gfx/drivers_shader/shader_gl3.o \
|
||||
gfx/drivers_display/gfx_display_gl3.o
|
||||
|
||||
DEFINES += -DHAVE_OPENGL_CORE
|
||||
NEED_CXX_LINKER = 1
|
||||
@@ -2111,10 +2103,9 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
|
||||
# Netplay
|
||||
DEFINES += -DHAVE_NETWORK_CMD
|
||||
OBJ += network/netplay/netplay_handshake.o \
|
||||
network/netplay/netplay_io.o \
|
||||
network/netplay/netplay_discovery.o \
|
||||
network/netplay/netplay_room_parse.o
|
||||
OBJ += \
|
||||
network/netplay/netplay_frontend.o \
|
||||
network/netplay/netplay_room_parse.o
|
||||
|
||||
# RetroAchievements
|
||||
ifeq ($(HAVE_CHEEVOS), 1)
|
||||
@@ -2379,7 +2370,8 @@ ifeq ($(HAVE_STATIC_VIDEO_FILTERS), 1)
|
||||
gfx/video_filters/dot_matrix_3x.o \
|
||||
gfx/video_filters/dot_matrix_4x.o \
|
||||
gfx/video_filters/upscale_1_5x.o \
|
||||
gfx/video_filters/upscale_256x_320x240.o
|
||||
gfx/video_filters/upscale_256x_320x240.o \
|
||||
gfx/video_filters/picoscale_256x_320x240.o
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_IOSUHAX), 1)
|
||||
|
||||
@@ -2,6 +2,7 @@ TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
@@ -60,6 +61,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
DEFINES += -DHAVE_THREADS
|
||||
DEFINES += -DHAVE_GFX_WIDGETS
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
#DEFINES += -DHAVE_SOCKET_LEGACY
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
@@ -91,6 +93,7 @@ else
|
||||
HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
@@ -154,6 +157,10 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
ifeq ($(LIBCTRU_NO_DEPRECATION), 1)
|
||||
CFLAGS += -DLIBCTRU_NO_DEPRECATION
|
||||
endif
|
||||
|
||||
@@ -2,6 +2,7 @@ TARGET := retroarch_3ds_salamander
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
@@ -95,6 +96,10 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/7zip -Ideps/stb -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
|
||||
@@ -99,6 +99,7 @@ HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
@@ -42,6 +42,7 @@ HAVE_STB_FONT = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
ASYNC ?= 0
|
||||
ifeq ($(LIBRETRO), mupen64plus)
|
||||
|
||||
@@ -219,6 +219,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
#HAVE_LANGEXTRA := 1
|
||||
@@ -286,6 +287,7 @@ else ifeq ($(platform), psp1)
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||
@@ -348,6 +350,7 @@ else ifeq ($(platform), vita)
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
@@ -374,6 +377,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -421,6 +425,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -483,6 +488,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -563,6 +569,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -649,6 +656,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -733,6 +741,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -817,6 +826,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -915,6 +925,7 @@ else ifeq (qnx,$(platform))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
CC=qcc -Vgcc_ntoarmv7le
|
||||
CXX=QCC -Vgcc_ntoarmv7le
|
||||
@@ -959,6 +970,7 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_BSV_MOVIE -DHAVE_PULSE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
@@ -992,6 +1004,7 @@ else ifeq (dos,$(platform))
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 0
|
||||
HAVE_CHEATS := 0
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
CC=i586-pc-msdosdjgpp-gcc
|
||||
CXX=i586-pc-msdosdjgpp-g++
|
||||
|
||||
@@ -1141,6 +1154,10 @@ ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
CFLAGS += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
+6
-1
@@ -40,6 +40,7 @@ HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
@@ -52,6 +53,7 @@ HAVE_CHEEVOS = 1
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_THREADS = 1
|
||||
@@ -78,7 +80,6 @@ else
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -129,6 +130,10 @@ CFLAGS := -g -Wall -O3 -fcommon -ffast-math -ffunction-sections \
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/miyoo
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
#HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
@@ -67,6 +67,7 @@ HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_BSV_MOVIE := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
D3D8_LIBS := -ld3d8
|
||||
|
||||
@@ -126,6 +126,7 @@ HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
@@ -322,6 +323,10 @@ ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
CFLAGS += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
|
||||
+35
-14
@@ -1,25 +1,46 @@
|
||||
include version.all
|
||||
|
||||
DEBUG = 0
|
||||
DEBUG = 0
|
||||
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
|
||||
TARGET := retroarch-pandora
|
||||
TARGET := retroarch-pandora
|
||||
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_REWIND -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += -DHAVE_DSP_FILTER
|
||||
DEFINES += -DHAVE_VIDEO_FILTER
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99
|
||||
DEFINES += -DHAVE_THREADS \
|
||||
-DHAVE_GETOPT_LONG=1 \
|
||||
-DHAVE_GRIFFIN \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-D__ARM_ARCH_6__ \
|
||||
-DHAVE_OPENGL \
|
||||
-DHAVE_OPENGLES \
|
||||
-DHAVE_OPENGLES2 \
|
||||
-DHAVE_GLSL \
|
||||
-DHAVE_DYNAMIC \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_VIDEO_LAYOUT \
|
||||
-DHAVE_ALSA \
|
||||
-DHAVE_ZLIB \
|
||||
-D__linux__ \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-D__OPENPANDORA__ \
|
||||
-DPANDORA
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -19,6 +19,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
@@ -59,6 +60,7 @@ else
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
|
||||
+25
-5
@@ -28,10 +28,30 @@ INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
RARCH_DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_CC_RESAMPLER -DHAVE_AUDIOMIXER
|
||||
RARCH_DEFINES += -DHAVE_VIDEO_FILTER -DHAVE_RGUI
|
||||
RARCH_DEFINES += -DHAVE_DSP_FILTER
|
||||
RARCH_DEFINES += -DPS2 \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_NO_BUILTINZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_7ZIP \
|
||||
-D_7ZIP_ST \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_AUDIOMIXER \
|
||||
-DHAVE_WINDOW_OFFSET \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
@@ -58,7 +78,7 @@ EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/libsd_irx.o $(IRX_DIR)/audsrv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/ps2dev9_irx.o $(IRX_DIR)/ps2atad_irx.o $(IRX_DIR)/ps2hdd_irx.o $(IRX_DIR)/ps2fs_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/ps2dev9_irx.o $(IRX_DIR)/ps2atad_irx.o $(IRX_DIR)/ps2hdd_irx.o $(IRX_DIR)/ps2fs_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mtapman_irx.o $(IRX_DIR)/padman_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
|
||||
+28
-1
@@ -66,7 +66,34 @@ endif
|
||||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
SHARED_FLAGS += -DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_HEADSET \
|
||||
-DHAVE_CG \
|
||||
-DHAVE_CG_RUNTIME_COMPILER \
|
||||
-DHAVE_SYSMODULES \
|
||||
-DHAVE_SYSUTILS \
|
||||
-DHAVE_RARCH_EXEC \
|
||||
-DHAVE_MOUSE \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_NETWORKING=1 \
|
||||
-DHAVE_SOCKET_LEGACY=1 \
|
||||
-DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" \
|
||||
-DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) \
|
||||
-Wno-char-subscripts \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_MULTIMAN \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
||||
+25
-1
@@ -23,7 +23,31 @@ INCDIR = deps deps/stb deps/7zip libretro-common/include libretro-common/include
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RWAV -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_DSP_FILTER -DHAVE_VIDEO_FILTER -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_CC_RESAMPLER
|
||||
RARCH_DEFINES = -DPSP \
|
||||
-D_MIPS_ARCH_ALLEGREX \
|
||||
-DHAVE_LANGEXTRA \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_AUDIOMIXER \
|
||||
-DHAVE_RWAV \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-DHAVE_7ZIP \
|
||||
-D_7ZIP_ST \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
|
||||
@@ -110,6 +110,7 @@ HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
#comment out for now not working
|
||||
#HAVE_OSS =1
|
||||
|
||||
@@ -108,6 +108,7 @@ HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
@@ -44,7 +44,7 @@ DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
@@ -108,6 +108,8 @@ HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
@@ -117,6 +119,7 @@ OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -ffast-math
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
@@ -131,7 +134,6 @@ LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_AL=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
|
||||
@@ -112,6 +112,7 @@ HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
+4
-3
@@ -15,7 +15,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
|
||||
DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
else
|
||||
HAVE_REWIND = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
@@ -26,8 +26,8 @@ else
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MATERIALUI = 0 # enable later?
|
||||
@@ -41,6 +41,7 @@ else
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
+51
-32
@@ -18,22 +18,40 @@ INCDIRS :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_NEON \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_XMB \
|
||||
-DHAVE_MATERIALUI \
|
||||
-DHAVE_LIBRETRODB \
|
||||
-DHAVE_KEYMAPPER \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_RBMP \
|
||||
-DHAVE_RTGA \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
INCDIRS += -I. -Ideps/7zip -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb
|
||||
INCDIRS += -I. \
|
||||
-Ideps/7zip \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib \
|
||||
-Ideps/stb
|
||||
else
|
||||
HAVE_REWIND := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_NEON := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -43,29 +61,29 @@ else
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
HAVE_VITA2D := 0
|
||||
HAVE_VITAGL := 0
|
||||
HAVE_VITAGLES := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_VITA2D := 0
|
||||
HAVE_VITAGL := 0
|
||||
HAVE_VITAGLES := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
else
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_VITAGL := 0
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_VITAGL := 0
|
||||
endif
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_RGUI := 1
|
||||
@@ -80,16 +98,17 @@ else
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
HAVE_NETLOGGER = 1
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
|
||||
@@ -113,6 +113,7 @@ HAVE_CHEEVOS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_UPDATE_ASSETS = 1
|
||||
HAVE_UPDATE_CORES = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
@@ -131,6 +131,7 @@ RARCH_CONSOLE = 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_RSOUND := 0
|
||||
|
||||
APP_BOOTER_DIR = wii/app_booter
|
||||
|
||||
@@ -7,6 +7,7 @@ GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 1
|
||||
HAVE_HID = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
@@ -123,6 +124,7 @@ endif
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
DEFINES += -DHAVE_HID
|
||||
DEFINES += -DWANT_LIBFAT -DHAVE_LIBFAT -DWANT_IOSUHAX -DHAVE_IOSUHAX
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
|
||||
# $(GRIFFIN_BUILD),0
|
||||
@@ -166,6 +168,7 @@ endif
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
WANT_IOSUHAX = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
DEFINES += $(DEF_FLAGS)
|
||||
|
||||
@@ -27,6 +27,7 @@ HAVE_VIDEO_FILTER = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_PYTHON = 0
|
||||
DYNAMIC = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
HAVE_XINPUT = 1
|
||||
HAVE_WINMM = 1
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,417 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AUDIO_DRIVER__H
|
||||
#define __AUDIO_DRIVER__H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
#include <audio/dsp_filter.h>
|
||||
#endif
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
#include <audio/audio_mixer.h>
|
||||
#endif
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
#include "audio_defines.h"
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
typedef struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
void *buf;
|
||||
char *name;
|
||||
size_t bufsize;
|
||||
float volume;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
void *buf;
|
||||
char *basename;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
size_t bufsize;
|
||||
unsigned slot_selection_idx;
|
||||
float volume;
|
||||
enum audio_mixer_slot_selection_type slot_selection_type;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_params_t;
|
||||
#endif
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
/* Creates and initializes handle to audio driver.
|
||||
*
|
||||
* Returns: audio driver handle on success, otherwise NULL.
|
||||
**/
|
||||
void *(*init)(const char *device, unsigned rate,
|
||||
unsigned latency, unsigned block_frames, unsigned *new_rate);
|
||||
|
||||
/*
|
||||
* @data : Pointer to audio data handle.
|
||||
* @buf : Audio buffer data.
|
||||
* @size : Size of audio buffer.
|
||||
*
|
||||
* Write samples to audio driver.
|
||||
*
|
||||
* Write data in buffer to audio driver.
|
||||
* A frame here is defined as one combined sample of left and right
|
||||
* channels. (I.e. 44.1kHz, 16-bit stereo has 88.2k samples/s, and
|
||||
* 44.1k frames/s.)
|
||||
*
|
||||
* Samples are interleaved in format LRLRLRLRLR ...
|
||||
* If the driver returns true in use_float(), a floating point
|
||||
* format will be used, with range [-1.0, 1.0].
|
||||
* If not, signed 16-bit samples in native byte ordering will be used.
|
||||
*
|
||||
* This function returns the number of frames successfully written.
|
||||
* If an error occurs, -1 should be returned.
|
||||
* Note that non-blocking behavior that cannot write at this time
|
||||
* should return 0 as returning -1 will terminate the driver.
|
||||
*
|
||||
* Unless said otherwise with set_nonblock_state(), all writes
|
||||
* are blocking, and it should block till it has written all frames.
|
||||
*/
|
||||
ssize_t (*write)(void *data, const void *buf, size_t size);
|
||||
|
||||
/* Temporarily pauses the audio driver. */
|
||||
bool (*stop)(void *data);
|
||||
|
||||
/* Resumes audio driver from the paused state. */
|
||||
bool (*start)(void *data, bool is_shutdown);
|
||||
|
||||
/* Is the audio driver currently running? */
|
||||
bool (*alive)(void *data);
|
||||
|
||||
/* Should we care about blocking in audio thread? Fast forwarding.
|
||||
*
|
||||
* If state is true, nonblocking operation is assumed.
|
||||
* This is typically used for fast-forwarding. If driver cannot
|
||||
* implement nonblocking writes, this can be disregarded, but should
|
||||
* log a message to stderr.
|
||||
* */
|
||||
void (*set_nonblock_state)(void *data, bool toggle);
|
||||
|
||||
/* Stops and frees driver data. */
|
||||
void (*free)(void *data);
|
||||
|
||||
/* Defines if driver will take standard floating point samples,
|
||||
* or int16_t samples.
|
||||
*
|
||||
* If true is returned, the audio driver is capable of using
|
||||
* floating point data. This will likely increase performance as the
|
||||
* resampler unit uses floating point. The sample range is
|
||||
* [-1.0, 1.0].
|
||||
* */
|
||||
bool (*use_float)(void *data);
|
||||
|
||||
/* Human-readable identifier. */
|
||||
const char *ident;
|
||||
|
||||
/* Optional. Get audio device list (allocates, caller has to free this) */
|
||||
void *(*device_list_new)(void *data);
|
||||
|
||||
/* Optional. Frees audio device list */
|
||||
void (*device_list_free)(void *data, void *data2);
|
||||
|
||||
/* Optional. */
|
||||
size_t (*write_avail)(void *data);
|
||||
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double source_ratio_original;
|
||||
double source_ratio_current;
|
||||
|
||||
uint64_t free_samples_count;
|
||||
|
||||
struct string_list *devices_list;
|
||||
float *output_samples_buf;
|
||||
#ifdef HAVE_REWIND
|
||||
int16_t *rewind_buf;
|
||||
#endif
|
||||
int16_t *output_samples_conv_buf;
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
retro_dsp_filter_t *dsp;
|
||||
#endif
|
||||
const retro_resampler_t *resampler;
|
||||
|
||||
void *resampler_data;
|
||||
const audio_driver_t *current_audio;
|
||||
void *context_audio_data;
|
||||
float *input_data;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
struct audio_mixer_stream
|
||||
mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS];
|
||||
#endif
|
||||
struct retro_audio_callback callback; /* ptr alignment */
|
||||
/* ptr alignment */
|
||||
size_t chunk_size;
|
||||
size_t chunk_nonblock_size;
|
||||
size_t chunk_block_size;
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
size_t rewind_ptr;
|
||||
size_t rewind_size;
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
size_t data_ptr;
|
||||
|
||||
unsigned free_samples_buf[
|
||||
AUDIO_BUFFER_FREE_SAMPLES_COUNT];
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
float mixer_volume_gain;
|
||||
#endif
|
||||
|
||||
float rate_control_delta;
|
||||
float input;
|
||||
float volume_gain;
|
||||
|
||||
enum resampler_quality resampler_quality;
|
||||
|
||||
char resampler_ident[64];
|
||||
|
||||
bool active;
|
||||
bool control;
|
||||
bool mute_enable;
|
||||
bool use_float;
|
||||
bool suspended;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
bool mixer_mute_enable;
|
||||
bool mixer_active;
|
||||
#endif
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
bool hard_disable;
|
||||
#endif
|
||||
} audio_driver_state_t;
|
||||
|
||||
bool audio_driver_enable_callback(void);
|
||||
|
||||
bool audio_driver_disable_callback(void);
|
||||
|
||||
bool audio_driver_mixer_extension_supported(const char *ext);
|
||||
|
||||
void audio_driver_dsp_filter_free(void);
|
||||
|
||||
bool audio_driver_dsp_filter_init(const char *device);
|
||||
|
||||
void audio_driver_set_buffer_size(size_t bufsize);
|
||||
|
||||
bool audio_driver_get_devices_list(void **ptr);
|
||||
|
||||
void audio_driver_setup_rewind(void);
|
||||
|
||||
bool audio_driver_callback(void);
|
||||
|
||||
bool audio_driver_has_callback(void);
|
||||
|
||||
void audio_driver_frame_is_reverse(void);
|
||||
|
||||
void audio_set_float(enum audio_action action, float val);
|
||||
|
||||
float *audio_get_float_ptr(enum audio_action action);
|
||||
|
||||
bool *audio_get_bool_ptr(enum audio_action action);
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_stop_stream(unsigned i);
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i);
|
||||
|
||||
void audio_driver_mixer_set_stream_volume(unsigned i, float vol);
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i);
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||
|
||||
void audio_driver_load_system_sounds(void);
|
||||
|
||||
#endif
|
||||
|
||||
bool audio_driver_start(bool is_shutdown);
|
||||
|
||||
bool audio_driver_stop(void);
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
/* TODO/FIXME - Doesn't currently work. Fix this. */
|
||||
bool audio_driver_is_ai_service_speech_running(void);
|
||||
#endif
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_audioio;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
extern audio_driver_t audio_alsathread;
|
||||
extern audio_driver_t audio_tinyalsa;
|
||||
extern audio_driver_t audio_roar;
|
||||
extern audio_driver_t audio_openal;
|
||||
extern audio_driver_t audio_opensl;
|
||||
extern audio_driver_t audio_jack;
|
||||
extern audio_driver_t audio_sdl;
|
||||
extern audio_driver_t audio_xa;
|
||||
extern audio_driver_t audio_pulse;
|
||||
extern audio_driver_t audio_dsound;
|
||||
extern audio_driver_t audio_wasapi;
|
||||
extern audio_driver_t audio_coreaudio;
|
||||
extern audio_driver_t audio_coreaudio3;
|
||||
extern audio_driver_t audio_xenon360;
|
||||
extern audio_driver_t audio_ps3;
|
||||
extern audio_driver_t audio_gx;
|
||||
extern audio_driver_t audio_ax;
|
||||
extern audio_driver_t audio_psp;
|
||||
extern audio_driver_t audio_ps2;
|
||||
extern audio_driver_t audio_ctr_csnd;
|
||||
extern audio_driver_t audio_ctr_dsp;
|
||||
#ifdef HAVE_THREADS
|
||||
extern audio_driver_t audio_ctr_dsp_thread;
|
||||
#endif
|
||||
extern audio_driver_t audio_switch;
|
||||
extern audio_driver_t audio_switch_thread;
|
||||
extern audio_driver_t audio_switch_libnx_audren;
|
||||
extern audio_driver_t audio_switch_libnx_audren_thread;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
|
||||
audio_driver_state_t *audio_state_get_ptr(void);
|
||||
|
||||
extern audio_driver_t *audio_drivers[];
|
||||
|
||||
/**
|
||||
* audio_compute_buffer_statistics:
|
||||
*
|
||||
* Computes audio buffer statistics.
|
||||
*
|
||||
**/
|
||||
bool audio_compute_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
float audio_driver_monitor_adjust_system_rates(
|
||||
double input_sample_rate,
|
||||
double input_fps,
|
||||
float video_refresh_rate,
|
||||
unsigned video_swap_interval,
|
||||
float audio_max_timing_skew);
|
||||
|
||||
bool audio_driver_init_internal(
|
||||
void *settings_data,
|
||||
bool audio_cb_inited);
|
||||
|
||||
bool audio_driver_deinit(void *settings_data);
|
||||
|
||||
bool audio_driver_find_driver(
|
||||
void *settings_data,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled);
|
||||
|
||||
/**
|
||||
* audio_driver_sample:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function.
|
||||
**/
|
||||
void audio_driver_sample(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function.
|
||||
*
|
||||
* Returns: amount of frames sampled. Will be equal to @frames
|
||||
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
||||
**/
|
||||
size_t audio_driver_sample_batch(const int16_t *data, size_t frames);
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
/**
|
||||
* audio_driver_sample_rewind:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function (rewind version).
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample when rewinding is activated.
|
||||
**/
|
||||
void audio_driver_sample_rewind(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch_rewind:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function (rewind version).
|
||||
*
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample_batch when rewinding is activated.
|
||||
*
|
||||
* Returns: amount of frames sampled. Will be equal to @frames
|
||||
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
||||
**/
|
||||
size_t audio_driver_sample_batch_rewind(
|
||||
const int16_t *data, size_t frames);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void audio_driver_menu_sample(void);
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __AUDIO_DRIVER__H */
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "audio_thread_wrapper.h"
|
||||
#include "audio_driver.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
typedef struct audio_thread
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "audio_driver.h"
|
||||
|
||||
/**
|
||||
* audio_init_thread:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct alsa
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <sys/asoundlib.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#define MAX_FRAG_SIZE 3072
|
||||
#define DEFAULT_RATE 48000
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define TRY_ALSA(x) if (x < 0) \
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define DEFAULT_DEV "/dev/audio"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <retro_endianness.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct coreaudio
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#pragma mark - ringbuffer
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include <defines/gx_defines.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t write_ptr;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define FRAMES(x) (x / (sizeof(float) * 2))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
/* Helper macros, COM-style. */
|
||||
#define SLObjectItf_Realize(a, ...) ((*(a))->Realize(a, __VA_ARGS__))
|
||||
@@ -116,7 +116,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (!sl)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[OpenSL]: Requested audio latency: %u ms.", latency);
|
||||
RARCH_LOG("[OpenSL]: Requested audio latency: %u ms.\n", latency);
|
||||
|
||||
GOTO_IF_FAIL(slCreateEngine(&sl->engine_object, 0, NULL, 0, NULL, NULL));
|
||||
GOTO_IF_FAIL(SLObjectItf_Realize(sl->engine_object, SL_BOOLEAN_FALSE));
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_OSS_BSD
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <kernel.h>
|
||||
#include <audsrv.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#define AUDIO_BUFFER 128 * 1024
|
||||
#define AUDIO_CHANNELS 2
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include <defines/ps3_defines.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#define AUDIO_BLOCKS 8
|
||||
#define AUDIO_CHANNELS 2
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define SceUID uint32_t
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
typedef struct psp_audio
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "rsound.h"
|
||||
|
||||
typedef struct rsd
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <unistd.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
/* forward declarations */
|
||||
unsigned RWebAudioSampleRate(void);
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_audio.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct sdl_audio
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define BUFFER_COUNT 5
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include <switch.h>
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#endif
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
/* Implementation tinyalsa pcm */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "../common/mmdevice_common.h"
|
||||
#include "../common/mmdevice_common_inline.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "../../wiiu/wiiu_dbg.h"
|
||||
#include "../../wiiu/system/memory.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "../common/mmdevice_common.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct xaudio2 xaudio2_t;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#define SOUND_FREQUENCY 48000
|
||||
#define MAX_BUFFER 2048
|
||||
|
||||
@@ -29,12 +29,6 @@
|
||||
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
#if (defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_ASM_OPTIMIZATIONS)) || defined(HAVE_NEON)
|
||||
#ifndef HAVE_ARM_NEON_ASM_OPTIMIZATIONS
|
||||
#define HAVE_ARM_NEON_ASM_OPTIMIZATIONS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Since SSE and NEON don't provide support for trigonometric functions
|
||||
* we approximate those with polynoms
|
||||
*
|
||||
|
||||
+1
-1
@@ -776,7 +776,7 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, size_t idx, bool w
|
||||
retro_ctx_memory_info_t meminfo;
|
||||
bool refresh = false;
|
||||
bool is_search_initialization = (setting != NULL);
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
rarch_system_info_t *system = &runloop_state_get_ptr()->system;
|
||||
unsigned offset = 0;
|
||||
cheat_manager_t *cheat_st = &cheat_manager_state;
|
||||
|
||||
|
||||
+11
-10
@@ -54,6 +54,7 @@
|
||||
#include "cheevos_locals.h"
|
||||
#include "cheevos_parser.h"
|
||||
|
||||
#include "../audio/audio_driver.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../paths.h"
|
||||
#include "../command.h"
|
||||
@@ -195,14 +196,12 @@ static void rcheevos_get_core_memory_info(unsigned id, rc_libretro_core_memory_i
|
||||
|
||||
static int rcheevos_init_memory(rcheevos_locals_t* locals)
|
||||
{
|
||||
rarch_system_info_t* system = runloop_get_system_info();
|
||||
rarch_memory_map_t* mmaps = &system->mmaps;
|
||||
struct retro_memory_descriptor* descriptors;
|
||||
struct retro_memory_map mmap;
|
||||
unsigned i;
|
||||
int result;
|
||||
|
||||
descriptors = (struct retro_memory_descriptor*)malloc(mmaps->num_descriptors * sizeof(*descriptors));
|
||||
struct retro_memory_map mmap;
|
||||
rarch_system_info_t* system = &runloop_state_get_ptr()->system;
|
||||
rarch_memory_map_t* mmaps = &system->mmaps;
|
||||
struct retro_memory_descriptor *descriptors = (struct retro_memory_descriptor*)malloc(mmaps->num_descriptors * sizeof(*descriptors));
|
||||
if (!descriptors)
|
||||
return 0;
|
||||
|
||||
@@ -1009,10 +1008,12 @@ void rcheevos_hardcore_enabled_changed(void)
|
||||
|
||||
void rcheevos_validate_config_settings(void)
|
||||
{
|
||||
const rc_disallowed_setting_t* disallowed_settings;
|
||||
core_option_manager_t* coreopts = NULL;
|
||||
struct retro_system_info* system = runloop_get_libretro_system_info();
|
||||
int i;
|
||||
const rc_disallowed_setting_t
|
||||
*disallowed_settings = NULL;
|
||||
core_option_manager_t* coreopts = NULL;
|
||||
struct retro_system_info *system =
|
||||
&runloop_state_get_ptr()->system.info;
|
||||
|
||||
if (!system->library_name || !rcheevos_locals.hardcore_active)
|
||||
return;
|
||||
@@ -1020,7 +1021,7 @@ void rcheevos_validate_config_settings(void)
|
||||
if (!(disallowed_settings = rc_libretro_get_disallowed_settings(system->library_name)))
|
||||
return;
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (!retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
return;
|
||||
|
||||
for (i = 0; i < (int)coreopts->size; i++)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "../configuration.h"
|
||||
#include "../paths.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../version.h"
|
||||
|
||||
#include <string/stdstring.h>
|
||||
@@ -34,8 +35,6 @@
|
||||
|
||||
#include "../deps/rcheevos/include/rc_api_runtime.h"
|
||||
|
||||
|
||||
|
||||
/* Define this macro to log URLs. */
|
||||
#undef CHEEVOS_LOG_URLS
|
||||
|
||||
@@ -114,8 +113,8 @@ static int append_no_spaces(char* buffer, char* stop, const char* text)
|
||||
void rcheevos_get_user_agent(rcheevos_locals_t *locals,
|
||||
char *buffer, size_t len)
|
||||
{
|
||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
||||
char* ptr;
|
||||
struct retro_system_info *system = &runloop_state_get_ptr()->system.info;
|
||||
|
||||
/* if we haven't calculated the non-changing portion yet, do so now
|
||||
* [retroarch version + os version] */
|
||||
|
||||
+1395
-34
File diff suppressed because it is too large.
Load diff
@@ -22,11 +22,40 @@
|
||||
#include <net/net_compat.h>
|
||||
#include <net/net_socket.h>
|
||||
#endif
|
||||
#include <lists/dir_list.h>
|
||||
#include <file/file_path.h>
|
||||
#include <streams/stdin_stream.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "verbosity.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GFX_WIDGETS
|
||||
#include "gfx/gfx_widgets.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
#include "network/netplay/netplay.h"
|
||||
#endif
|
||||
|
||||
#include "audio/audio_driver.h"
|
||||
#include "command.h"
|
||||
#include "core_info.h"
|
||||
#include "cheat_manager.h"
|
||||
#include "content.h"
|
||||
#include "dynamic.h"
|
||||
#include "list_special.h"
|
||||
#include "paths.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
#include "version.h"
|
||||
#include "version_git.h"
|
||||
|
||||
#define CMD_BUF_SIZE 4096
|
||||
|
||||
@@ -91,10 +120,7 @@ static void command_parse_sub_msg(command_t *handle, const char *tok)
|
||||
handle->state[map[index].id] = true;
|
||||
}
|
||||
else
|
||||
RARCH_WARN("%s \"%s\" %s.\n",
|
||||
msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND),
|
||||
tok,
|
||||
msg_hash_to_str(MSG_RECEIVED));
|
||||
RARCH_WARN(msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND), tok);
|
||||
}
|
||||
|
||||
static void command_parse_msg(
|
||||
@@ -532,4 +558,718 @@ bool command_network_send(const char *cmd_)
|
||||
}
|
||||
#endif
|
||||
|
||||
bool command_show_osd_msg(command_t *cmd, const char* arg)
|
||||
{
|
||||
runloop_msg_queue_push(arg, 1, 180, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CHEEVOS)
|
||||
bool command_read_ram(command_t *cmd, const char *arg)
|
||||
{
|
||||
unsigned i;
|
||||
char *reply = NULL;
|
||||
const uint8_t *data = NULL;
|
||||
char *reply_at = NULL;
|
||||
unsigned int nbytes = 0;
|
||||
unsigned int alloc_size = 0;
|
||||
unsigned int addr = -1;
|
||||
unsigned int len = 0;
|
||||
|
||||
if (sscanf(arg, "%x %u", &addr, &nbytes) != 2)
|
||||
return true;
|
||||
/* We allocate more than needed, saving 20 bytes is not really relevant */
|
||||
alloc_size = 40 + nbytes * 3;
|
||||
reply = (char*)malloc(alloc_size);
|
||||
reply[0] = '\0';
|
||||
reply_at = reply + snprintf(
|
||||
reply, alloc_size - 1, "READ_CORE_RAM" " %x", addr);
|
||||
|
||||
if ((data = rcheevos_patch_address(addr)))
|
||||
{
|
||||
for (i = 0; i < nbytes; i++)
|
||||
snprintf(reply_at + 3 * i, 4, " %.2X", data[i]);
|
||||
reply_at[3 * nbytes] = '\n';
|
||||
len = reply_at + 3 * nbytes + 1 - reply;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply) - strlen(reply));
|
||||
len = reply_at + STRLEN_CONST(" -1\n") - reply;
|
||||
}
|
||||
cmd->replier(cmd, reply, len);
|
||||
free(reply);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool command_write_ram(command_t *cmd, const char *arg)
|
||||
{
|
||||
unsigned int addr = (unsigned int)strtoul(arg, (char**)&arg, 16);
|
||||
uint8_t *data = (uint8_t *)rcheevos_patch_address(addr);
|
||||
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
if (rcheevos_hardcore_active())
|
||||
{
|
||||
RARCH_LOG("Achievements hardcore mode disabled by WRITE_CORE_RAM\n");
|
||||
rcheevos_pause_hardcore();
|
||||
}
|
||||
|
||||
while (*arg)
|
||||
{
|
||||
*data = strtoul(arg, (char**)&arg, 16);
|
||||
data++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool command_version(command_t *cmd, const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
snprintf(reply, sizeof(reply), "%s\n", PACKAGE_VERSION);
|
||||
cmd->replier(cmd, reply, strlen(reply));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static const rarch_memory_descriptor_t* command_memory_get_descriptor(const rarch_memory_map_t* mmap, unsigned address)
|
||||
{
|
||||
const rarch_memory_descriptor_t* desc = mmap->descriptors;
|
||||
const rarch_memory_descriptor_t* end = desc + mmap->num_descriptors;
|
||||
|
||||
for (; desc < end; desc++)
|
||||
{
|
||||
if (desc->core.select == 0)
|
||||
{
|
||||
/* if select is 0, attempt to explicitly match the address */
|
||||
if (address >= desc->core.start && address < desc->core.start + desc->core.len)
|
||||
return desc;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* otherwise, attempt to match the address by matching the select bits */
|
||||
if (((desc->core.start ^ address) & desc->core.select) == 0)
|
||||
{
|
||||
/* sanity check - make sure the descriptor is large enough to hold the target address */
|
||||
if (address - desc->core.start < desc->core.len)
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint8_t *command_memory_get_pointer(
|
||||
const rarch_system_info_t* system,
|
||||
unsigned address,
|
||||
unsigned int* max_bytes,
|
||||
int for_write,
|
||||
char *reply_at,
|
||||
size_t len)
|
||||
{
|
||||
if (!system || system->mmaps.num_descriptors == 0)
|
||||
strlcpy(reply_at, " -1 no memory map defined\n", len);
|
||||
else
|
||||
{
|
||||
const rarch_memory_descriptor_t* desc = command_memory_get_descriptor(&system->mmaps, address);
|
||||
if (!desc)
|
||||
strlcpy(reply_at, " -1 no descriptor for address\n", len);
|
||||
else if (!desc->core.ptr)
|
||||
strlcpy(reply_at, " -1 no data for descriptor\n", len);
|
||||
else if (for_write && (desc->core.flags & RETRO_MEMDESC_CONST))
|
||||
strlcpy(reply_at, " -1 descriptor data is readonly\n", len);
|
||||
else
|
||||
{
|
||||
const size_t offset = address - desc->core.start;
|
||||
*max_bytes = (desc->core.len - offset);
|
||||
return (uint8_t*)desc->core.ptr + desc->core.offset + offset;
|
||||
}
|
||||
}
|
||||
|
||||
*max_bytes = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool command_get_status(command_t *cmd, const char* arg)
|
||||
{
|
||||
char reply[4096] = {0};
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (!is_inited)
|
||||
strcpy_literal(reply, "GET_STATUS CONTENTLESS");
|
||||
else
|
||||
{
|
||||
/* add some content info */
|
||||
const char *status = "PLAYING";
|
||||
const char *content_name = path_basename(path_get(RARCH_PATH_BASENAME)); /* filename only without ext */
|
||||
int content_crc32 = content_get_crc();
|
||||
const char* system_id = NULL;
|
||||
core_info_t *core_info = NULL;
|
||||
|
||||
core_info_get_current_core(&core_info);
|
||||
|
||||
if (runloop_st->paused)
|
||||
status = "PAUSED";
|
||||
if (core_info)
|
||||
system_id = core_info->system_id;
|
||||
if (!system_id)
|
||||
system_id = runloop_st->system.info.library_name;
|
||||
|
||||
snprintf(reply, sizeof(reply), "GET_STATUS %s %s,%s,crc32=%x\n", status, system_id, content_name, content_crc32);
|
||||
}
|
||||
|
||||
cmd->replier(cmd, reply, strlen(reply));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool command_read_memory(command_t *cmd, const char *arg)
|
||||
{
|
||||
unsigned i;
|
||||
char* reply = NULL;
|
||||
char* reply_at = NULL;
|
||||
const uint8_t* data = NULL;
|
||||
unsigned int nbytes = 0;
|
||||
unsigned int alloc_size = 0;
|
||||
unsigned int address = -1;
|
||||
size_t len = 0;
|
||||
unsigned int max_bytes = 0;
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
const rarch_system_info_t* system = &runloop_st->system;
|
||||
|
||||
if (sscanf(arg, "%x %u", &address, &nbytes) != 2)
|
||||
return false;
|
||||
|
||||
/* Ensure large enough to return all requested bytes or an error message */
|
||||
alloc_size = 64 + nbytes * 3;
|
||||
reply = (char*)malloc(alloc_size);
|
||||
reply_at = reply + snprintf(reply, alloc_size - 1, "READ_CORE_MEMORY %x", address);
|
||||
|
||||
data = command_memory_get_pointer(system, address, &max_bytes, 0, reply_at, alloc_size - strlen(reply));
|
||||
|
||||
if (data)
|
||||
{
|
||||
if (nbytes > max_bytes)
|
||||
nbytes = max_bytes;
|
||||
|
||||
for (i = 0; i < nbytes; i++)
|
||||
snprintf(reply_at + 3 * i, 4, " %02X", data[i]);
|
||||
|
||||
reply_at[3 * nbytes] = '\n';
|
||||
len = reply_at + 3 * nbytes + 1 - reply;
|
||||
}
|
||||
else
|
||||
len = strlen(reply);
|
||||
|
||||
cmd->replier(cmd, reply, len);
|
||||
free(reply);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool command_write_memory(command_t *cmd, const char *arg)
|
||||
{
|
||||
unsigned int address = (unsigned int)strtoul(arg, (char**)&arg, 16);
|
||||
unsigned int max_bytes = 0;
|
||||
char reply[128] = "";
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
const rarch_system_info_t
|
||||
*system = &runloop_st->system;
|
||||
char *reply_at = reply + snprintf(reply, sizeof(reply) - 1, "WRITE_CORE_MEMORY %x", address);
|
||||
uint8_t *data = command_memory_get_pointer(system, address, &max_bytes, 1, reply_at, sizeof(reply) - strlen(reply) - 1);
|
||||
|
||||
if (data)
|
||||
{
|
||||
uint8_t* start = data;
|
||||
while (*arg && max_bytes > 0)
|
||||
{
|
||||
--max_bytes;
|
||||
*data = strtoul(arg, (char**)&arg, 16);
|
||||
data++;
|
||||
}
|
||||
|
||||
snprintf(reply_at, sizeof(reply) - strlen(reply) - 1,
|
||||
" %u\n", (unsigned)(data - start));
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (rcheevos_hardcore_active())
|
||||
{
|
||||
RARCH_LOG("Achievements hardcore mode disabled by WRITE_CORE_MEMORY\n");
|
||||
rcheevos_pause_hardcore();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
cmd->replier(cmd, reply, strlen(reply));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void command_event_set_volume(
|
||||
settings_t *settings,
|
||||
float gain,
|
||||
bool widgets_active,
|
||||
bool audio_driver_mute_enable)
|
||||
{
|
||||
char msg[128];
|
||||
float new_volume = settings->floats.audio_volume + gain;
|
||||
|
||||
new_volume = MAX(new_volume, -80.0f);
|
||||
new_volume = MIN(new_volume, 12.0f);
|
||||
|
||||
configuration_set_float(settings, settings->floats.audio_volume, new_volume);
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s: %.1f dB",
|
||||
msg_hash_to_str(MSG_AUDIO_VOLUME),
|
||||
new_volume);
|
||||
|
||||
#if defined(HAVE_GFX_WIDGETS)
|
||||
if (widgets_active)
|
||||
gfx_widget_volume_update_and_show(new_volume,
|
||||
audio_driver_mute_enable);
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
RARCH_LOG("[Audio]: %s\n", msg);
|
||||
|
||||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
|
||||
}
|
||||
|
||||
/**
|
||||
* event_set_mixer_volume:
|
||||
* @gain : amount of gain to be applied to current volume level.
|
||||
*
|
||||
* Adjusts the current audio volume level.
|
||||
*
|
||||
**/
|
||||
void command_event_set_mixer_volume(
|
||||
settings_t *settings,
|
||||
float gain)
|
||||
{
|
||||
char msg[128];
|
||||
float new_volume = settings->floats.audio_mixer_volume + gain;
|
||||
|
||||
new_volume = MAX(new_volume, -80.0f);
|
||||
new_volume = MIN(new_volume, 12.0f);
|
||||
|
||||
configuration_set_float(settings, settings->floats.audio_mixer_volume, new_volume);
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s: %.1f dB",
|
||||
msg_hash_to_str(MSG_AUDIO_VOLUME),
|
||||
new_volume);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
RARCH_LOG("[Audio]: %s\n", msg);
|
||||
|
||||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
|
||||
}
|
||||
|
||||
void command_event_init_controllers(rarch_system_info_t *info,
|
||||
settings_t *settings, unsigned num_active_users)
|
||||
{
|
||||
unsigned port;
|
||||
unsigned num_core_ports = info->ports.size;
|
||||
|
||||
for (port = 0; port < num_core_ports; port++)
|
||||
{
|
||||
unsigned i;
|
||||
retro_ctx_controller_info_t pad;
|
||||
unsigned device = RETRO_DEVICE_NONE;
|
||||
const struct retro_controller_description *desc = NULL;
|
||||
|
||||
/* Check whether current core port is mapped
|
||||
* to an input device
|
||||
* > If is not, leave 'device' set to
|
||||
* 'RETRO_DEVICE_NONE'
|
||||
* > For example: if input ports 0 and 1 are
|
||||
* mapped to core port 0, core port 1 will
|
||||
* be unmapped and should be disabled */
|
||||
for (i = 0; i < num_active_users; i++)
|
||||
{
|
||||
if (i >= MAX_USERS)
|
||||
break;
|
||||
|
||||
if (port == settings->uints.input_remap_ports[i])
|
||||
{
|
||||
device = input_config_get_device(port);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
desc = libretro_find_controller_description(
|
||||
&info->ports.data[port], device);
|
||||
|
||||
if (desc && !desc->desc)
|
||||
{
|
||||
/* If we're trying to connect a completely unknown device,
|
||||
* revert back to JOYPAD. */
|
||||
if (device != RETRO_DEVICE_JOYPAD && device != RETRO_DEVICE_NONE)
|
||||
{
|
||||
/* Do not fix device,
|
||||
* because any use of dummy core will reset this,
|
||||
* which is not a good idea. */
|
||||
RARCH_WARN("[Input]: Input device ID %u is unknown to this "
|
||||
"libretro implementation. Using RETRO_DEVICE_JOYPAD.\n",
|
||||
device);
|
||||
device = RETRO_DEVICE_JOYPAD;
|
||||
}
|
||||
}
|
||||
|
||||
pad.device = device;
|
||||
pad.port = port;
|
||||
core_set_controller_port_device(&pad);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
bool command_event_save_config(
|
||||
const char *config_path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
bool path_exists = !string_is_empty(config_path);
|
||||
const char *str = path_exists ? config_path :
|
||||
path_get(RARCH_PATH_CONFIG);
|
||||
|
||||
if (path_exists && config_save_file(config_path))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
config_path);
|
||||
RARCH_LOG("[Config]: %s\n", s);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string_is_empty(str))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
|
||||
str);
|
||||
RARCH_ERR("[Config]: %s\n", s);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void command_event_undo_save_state(char *s, size_t len)
|
||||
{
|
||||
if (content_undo_save_buf_is_empty())
|
||||
{
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MSG_NO_SAVE_STATE_HAS_BEEN_OVERWRITTEN_YET), len);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!content_undo_save_state())
|
||||
{
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MSG_FAILED_TO_UNDO_SAVE_STATE), len);
|
||||
return;
|
||||
}
|
||||
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MSG_UNDOING_SAVE_STATE), len);
|
||||
}
|
||||
|
||||
void command_event_undo_load_state(char *s, size_t len)
|
||||
{
|
||||
|
||||
if (content_undo_load_buf_is_empty())
|
||||
{
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MSG_NO_STATE_HAS_BEEN_LOADED_YET),
|
||||
len);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!content_undo_load_state())
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_FAILED_TO_UNDO_LOAD_STATE),
|
||||
"RAM");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, NULL);
|
||||
#endif
|
||||
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MSG_UNDID_LOAD_STATE), len);
|
||||
}
|
||||
|
||||
bool command_event_resize_windowed_scale(settings_t *settings,
|
||||
unsigned window_scale)
|
||||
{
|
||||
unsigned idx = 0;
|
||||
bool video_fullscreen = settings->bools.video_fullscreen;
|
||||
|
||||
if (window_scale == 0)
|
||||
return false;
|
||||
|
||||
configuration_set_float(settings, settings->floats.video_scale, (float)window_scale);
|
||||
|
||||
if (!video_fullscreen)
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
|
||||
retroarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool command_event_save_auto_state(
|
||||
bool savestate_auto_save,
|
||||
global_t *global,
|
||||
const enum rarch_core_type current_core_type)
|
||||
{
|
||||
bool ret = false;
|
||||
char savestate_name_auto[PATH_MAX_LENGTH];
|
||||
|
||||
if (!global || !savestate_auto_save)
|
||||
return false;
|
||||
if (current_core_type == CORE_TYPE_DUMMY)
|
||||
return false;
|
||||
|
||||
if (string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))))
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (rcheevos_hardcore_active())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
savestate_name_auto[0] = '\0';
|
||||
|
||||
fill_pathname_noext(savestate_name_auto, global->name.savestate,
|
||||
".auto", sizeof(savestate_name_auto));
|
||||
|
||||
ret = content_save_state((const char*)savestate_name_auto, true, true);
|
||||
RARCH_LOG("%s \"%s\" %s.\n",
|
||||
msg_hash_to_str(MSG_AUTO_SAVE_STATE_TO),
|
||||
savestate_name_auto, ret ?
|
||||
"succeeded" : "failed");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHEATS
|
||||
void command_event_init_cheats(
|
||||
bool apply_cheats_after_load,
|
||||
const char *path_cheat_db,
|
||||
void *bsv_movie_data)
|
||||
{
|
||||
#ifdef HAVE_NETWORKING
|
||||
bool allow_cheats = !netplay_driver_ctl(
|
||||
RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL);
|
||||
#else
|
||||
bool allow_cheats = true;
|
||||
#endif
|
||||
#ifdef HAVE_BSV_MOVIE
|
||||
bsv_movie_t *
|
||||
bsv_movie_state_handle = (bsv_movie_t*)bsv_movie_data;
|
||||
allow_cheats &= !(bsv_movie_state_handle != NULL);
|
||||
#endif
|
||||
|
||||
if (!allow_cheats)
|
||||
return;
|
||||
|
||||
cheat_manager_alloc_if_empty();
|
||||
cheat_manager_load_game_specific_cheats(path_cheat_db);
|
||||
|
||||
if (apply_cheats_after_load)
|
||||
cheat_manager_apply_cheats();
|
||||
}
|
||||
#endif
|
||||
|
||||
void command_event_load_auto_state(global_t *global)
|
||||
{
|
||||
char savestate_name_auto[PATH_MAX_LENGTH];
|
||||
bool ret = false;
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (rcheevos_hardcore_active())
|
||||
return;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL))
|
||||
return;
|
||||
#endif
|
||||
|
||||
savestate_name_auto[0] = '\0';
|
||||
|
||||
fill_pathname_noext(savestate_name_auto, global->name.savestate,
|
||||
".auto", sizeof(savestate_name_auto));
|
||||
|
||||
if (!path_is_valid(savestate_name_auto))
|
||||
return;
|
||||
|
||||
ret = content_load_state(savestate_name_auto, false, true);
|
||||
|
||||
RARCH_LOG("%s: %s\n%s \"%s\" %s.\n",
|
||||
msg_hash_to_str(MSG_FOUND_AUTO_SAVESTATE_IN),
|
||||
savestate_name_auto,
|
||||
msg_hash_to_str(MSG_AUTOLOADING_SAVESTATE_FROM),
|
||||
savestate_name_auto, ret ? "succeeded" : "failed"
|
||||
);
|
||||
}
|
||||
|
||||
void command_event_set_savestate_auto_index(
|
||||
settings_t *settings,
|
||||
const global_t *global)
|
||||
{
|
||||
size_t i;
|
||||
char state_dir[PATH_MAX_LENGTH];
|
||||
char state_base[PATH_MAX_LENGTH];
|
||||
|
||||
struct string_list *dir_list = NULL;
|
||||
unsigned max_idx = 0;
|
||||
bool savestate_auto_index = settings->bools.savestate_auto_index;
|
||||
bool show_hidden_files = settings->bools.show_hidden_files;
|
||||
|
||||
if (!global || !savestate_auto_index)
|
||||
return;
|
||||
|
||||
state_dir[0] = state_base[0] = '\0';
|
||||
|
||||
/* Find the file in the same directory as global->savestate_name
|
||||
* with the largest numeral suffix.
|
||||
*
|
||||
* E.g. /foo/path/content.state, will try to find
|
||||
* /foo/path/content.state%d, where %d is the largest number available.
|
||||
*/
|
||||
fill_pathname_basedir(state_dir, global->name.savestate,
|
||||
sizeof(state_dir));
|
||||
|
||||
dir_list = dir_list_new_special(state_dir, DIR_LIST_PLAIN, NULL,
|
||||
show_hidden_files);
|
||||
|
||||
if (!dir_list)
|
||||
return;
|
||||
|
||||
fill_pathname_base(state_base, global->name.savestate,
|
||||
sizeof(state_base));
|
||||
|
||||
for (i = 0; i < dir_list->size; i++)
|
||||
{
|
||||
unsigned idx;
|
||||
char elem_base[128] = {0};
|
||||
const char *end = NULL;
|
||||
const char *dir_elem = dir_list->elems[i].data;
|
||||
|
||||
fill_pathname_base(elem_base, dir_elem, sizeof(elem_base));
|
||||
|
||||
if (strstr(elem_base, state_base) != elem_base)
|
||||
continue;
|
||||
|
||||
end = dir_elem + strlen(dir_elem);
|
||||
while ((end > dir_elem) && ISDIGIT((int)end[-1]))
|
||||
end--;
|
||||
|
||||
idx = (unsigned)strtoul(end, NULL, 0);
|
||||
if (idx > max_idx)
|
||||
max_idx = idx;
|
||||
}
|
||||
|
||||
dir_list_free(dir_list);
|
||||
|
||||
configuration_set_int(settings, settings->ints.state_slot, max_idx);
|
||||
|
||||
RARCH_LOG("%s: #%d\n",
|
||||
msg_hash_to_str(MSG_FOUND_LAST_STATE_SLOT),
|
||||
max_idx);
|
||||
}
|
||||
|
||||
void command_event_set_savestate_garbage_collect(
|
||||
const global_t *global,
|
||||
unsigned max_to_keep,
|
||||
bool show_hidden_files
|
||||
)
|
||||
{
|
||||
size_t i, cnt = 0;
|
||||
char state_dir[PATH_MAX_LENGTH];
|
||||
char state_base[PATH_MAX_LENGTH];
|
||||
|
||||
struct string_list *dir_list = NULL;
|
||||
unsigned min_idx = UINT_MAX;
|
||||
const char *oldest_save = NULL;
|
||||
|
||||
state_dir[0] = '\0';
|
||||
state_base[0] = '\0';
|
||||
|
||||
/* Similar to command_event_set_savestate_auto_index(),
|
||||
* this will find the lowest numbered save-state */
|
||||
fill_pathname_basedir(state_dir, global->name.savestate,
|
||||
sizeof(state_dir));
|
||||
|
||||
dir_list = dir_list_new_special(state_dir, DIR_LIST_PLAIN, NULL,
|
||||
show_hidden_files);
|
||||
|
||||
if (!dir_list)
|
||||
return;
|
||||
|
||||
fill_pathname_base(state_base, global->name.savestate,
|
||||
sizeof(state_base));
|
||||
|
||||
for (i = 0; i < dir_list->size; i++)
|
||||
{
|
||||
unsigned idx;
|
||||
char elem_base[128];
|
||||
const char *ext = NULL;
|
||||
const char *end = NULL;
|
||||
const char *dir_elem = dir_list->elems[i].data;
|
||||
|
||||
elem_base[0] = '\0';
|
||||
|
||||
if (string_is_empty(dir_elem))
|
||||
continue;
|
||||
|
||||
fill_pathname_base(elem_base, dir_elem, sizeof(elem_base));
|
||||
|
||||
/* Only consider files with a '.state' extension
|
||||
* > i.e. Ignore '.state.auto', '.state.bak', etc. */
|
||||
ext = path_get_extension(elem_base);
|
||||
if (string_is_empty(ext) ||
|
||||
!string_starts_with_size(ext, "state", STRLEN_CONST("state")))
|
||||
continue;
|
||||
|
||||
/* Check whether this file is associated with
|
||||
* the current content */
|
||||
if (!string_starts_with(elem_base, state_base))
|
||||
continue;
|
||||
|
||||
/* This looks like a valid save */
|
||||
cnt++;
|
||||
|
||||
/* > Get index */
|
||||
end = dir_elem + strlen(dir_elem);
|
||||
while ((end > dir_elem) && ISDIGIT((int)end[-1]))
|
||||
end--;
|
||||
|
||||
idx = string_to_unsigned(end);
|
||||
|
||||
/* > Check if this is the lowest index so far */
|
||||
if (idx < min_idx)
|
||||
{
|
||||
min_idx = idx;
|
||||
oldest_save = dir_elem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only delete one save state per save action
|
||||
* > Conservative behaviour, designed to minimise
|
||||
* the risk of deleting multiple incorrect files
|
||||
* in case of accident */
|
||||
if (!string_is_empty(oldest_save) && (cnt > max_to_keep))
|
||||
filestream_delete(oldest_save);
|
||||
|
||||
dir_list_free(dir_list);
|
||||
}
|
||||
@@ -23,13 +23,17 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "input/input_defines.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <streams/interface_stream.h>
|
||||
|
||||
#include "retroarch_types.h"
|
||||
#include "input/input_defines.h"
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define MAX_CMD_DRIVERS 3
|
||||
@@ -73,16 +77,22 @@ enum event_command
|
||||
/* Loads core. */
|
||||
CMD_EVENT_LOAD_CORE,
|
||||
CMD_EVENT_LOAD_CORE_PERSIST,
|
||||
#if defined(HAVE_RUNAHEAD) && (defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB))
|
||||
CMD_EVENT_LOAD_SECOND_CORE,
|
||||
#endif
|
||||
CMD_EVENT_UNLOAD_CORE,
|
||||
CMD_EVENT_CLOSE_CONTENT,
|
||||
CMD_EVENT_LOAD_STATE,
|
||||
CMD_EVENT_LOAD_STATE_FROM_RAM,
|
||||
/* Swaps the current state with what's on the undo load buffer */
|
||||
CMD_EVENT_UNDO_LOAD_STATE,
|
||||
/* Rewrites a savestate on disk */
|
||||
CMD_EVENT_UNDO_SAVE_STATE,
|
||||
CMD_EVENT_SAVE_STATE,
|
||||
CMD_EVENT_SAVE_STATE_TO_RAM,
|
||||
CMD_EVENT_SAVE_STATE_DECREMENT,
|
||||
CMD_EVENT_SAVE_STATE_INCREMENT,
|
||||
CMD_EVENT_RAM_STATE_TO_FILE,
|
||||
/* Takes screenshot. */
|
||||
CMD_EVENT_TAKE_SCREENSHOT,
|
||||
/* Quits RetroArch. */
|
||||
@@ -274,12 +284,116 @@ command_t* command_uds_new(void);
|
||||
|
||||
bool command_network_send(const char *cmd_);
|
||||
|
||||
/* These forward declarations need to be declared before
|
||||
* the global state is declared */
|
||||
#ifdef HAVE_BSV_MOVIE
|
||||
struct bsv_state
|
||||
{
|
||||
/* Movie playback/recording support. */
|
||||
char movie_path[PATH_MAX_LENGTH];
|
||||
/* Immediate playback/recording. */
|
||||
char movie_start_path[PATH_MAX_LENGTH];
|
||||
|
||||
bool movie_start_recording;
|
||||
bool movie_start_playback;
|
||||
bool movie_playback;
|
||||
bool eof_exit;
|
||||
bool movie_end;
|
||||
|
||||
};
|
||||
|
||||
struct bsv_movie
|
||||
{
|
||||
intfstream_t *file;
|
||||
uint8_t *state;
|
||||
/* A ring buffer keeping track of positions
|
||||
* in the file for each frame. */
|
||||
size_t *frame_pos;
|
||||
size_t frame_mask;
|
||||
size_t frame_ptr;
|
||||
size_t min_file_pos;
|
||||
size_t state_size;
|
||||
|
||||
bool playback;
|
||||
bool first_rewind;
|
||||
bool did_rewind;
|
||||
};
|
||||
|
||||
typedef struct bsv_movie bsv_movie_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
bool command_event_save_config(
|
||||
const char *config_path,
|
||||
char *s, size_t len);
|
||||
#endif
|
||||
|
||||
void command_event_undo_save_state(char *s, size_t len);
|
||||
|
||||
void command_event_undo_load_state(char *s, size_t len);
|
||||
|
||||
void command_event_set_mixer_volume(
|
||||
settings_t *settings,
|
||||
float gain);
|
||||
|
||||
bool command_event_resize_windowed_scale(settings_t *settings,
|
||||
unsigned window_scale);
|
||||
|
||||
bool command_event_save_auto_state(
|
||||
bool savestate_auto_save,
|
||||
global_t *global,
|
||||
const enum rarch_core_type current_core_type);
|
||||
|
||||
/**
|
||||
* event_set_volume:
|
||||
* @gain : amount of gain to be applied to current volume level.
|
||||
*
|
||||
* Adjusts the current audio volume level.
|
||||
*
|
||||
**/
|
||||
void command_event_set_volume(
|
||||
settings_t *settings,
|
||||
float gain,
|
||||
bool widgets_active,
|
||||
bool audio_driver_mute_enable);
|
||||
|
||||
/**
|
||||
* command_event_init_controllers:
|
||||
*
|
||||
* Initialize libretro controllers.
|
||||
**/
|
||||
void command_event_init_controllers(rarch_system_info_t *info,
|
||||
settings_t *settings, unsigned num_active_users);
|
||||
|
||||
void command_event_load_auto_state(global_t *global);
|
||||
|
||||
void command_event_set_savestate_auto_index(
|
||||
settings_t *settings,
|
||||
const global_t *global);
|
||||
|
||||
void command_event_set_savestate_garbage_collect(
|
||||
const global_t *global,
|
||||
unsigned max_to_keep,
|
||||
bool show_hidden_files
|
||||
);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
bool command_set_shader(command_t *cmd, const char *arg);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEATS
|
||||
void command_event_init_cheats(
|
||||
bool apply_cheats_after_load,
|
||||
const char *path_cheat_db,
|
||||
void *bsv_movie_data);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COMMAND)
|
||||
struct cmd_action_map
|
||||
{
|
||||
const char *str;
|
||||
bool (*action)(command_t* cmd, const char *arg);
|
||||
const char *arg_desc;
|
||||
};
|
||||
|
||||
bool command_version(command_t *cmd, const char* arg);
|
||||
bool command_get_status(command_t *cmd, const char* arg);
|
||||
bool command_get_config_param(command_t *cmd, const char* arg);
|
||||
@@ -290,13 +404,13 @@ bool command_write_ram(command_t *cmd, const char *arg);
|
||||
#endif
|
||||
bool command_read_memory(command_t *cmd, const char *arg);
|
||||
bool command_write_memory(command_t *cmd, const char *arg);
|
||||
|
||||
struct cmd_action_map
|
||||
{
|
||||
const char *str;
|
||||
bool (*action)(command_t* cmd, const char *arg);
|
||||
const char *arg_desc;
|
||||
};
|
||||
uint8_t *command_memory_get_pointer(
|
||||
const rarch_system_info_t* system,
|
||||
unsigned address,
|
||||
unsigned int* max_bytes,
|
||||
int for_write,
|
||||
char *reply_at,
|
||||
size_t len);
|
||||
|
||||
static const struct cmd_action_map action_map[] = {
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
@@ -368,6 +482,7 @@ static const struct cmd_map map[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+39
-14
@@ -280,6 +280,12 @@
|
||||
#define DEFAULT_FULLSCREEN_Y 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WINDOW_OFFSET)
|
||||
/* Screen offsets to center content in CTRs */
|
||||
#define DEFAULT_WINDOW_OFFSET_X 0
|
||||
#define DEFAULT_WINDOW_OFFSET_Y 0
|
||||
#endif
|
||||
|
||||
/* Number of threads to use for video recording */
|
||||
#define DEFAULT_VIDEO_RECORD_THREADS 2
|
||||
|
||||
@@ -412,6 +418,21 @@
|
||||
#define DEFAULT_SHADER_ENABLE false
|
||||
#endif
|
||||
|
||||
/* Should we enable hdr when its supported*/
|
||||
#define DEFAULT_VIDEO_HDR_ENABLE false
|
||||
|
||||
/* The maximum nunmber of nits the actual display can show - needs to be calibrated */
|
||||
#define DEFAULT_VIDEO_HDR_MAX_NITS 1000.0f
|
||||
|
||||
/* The number of nits that paper white is at */
|
||||
#define DEFAULT_VIDEO_HDR_PAPER_WHITE_NITS 200.0f
|
||||
|
||||
/* The contrast setting for hdr used to calculate the display gamma by dividing this value by gamma 2.2 */
|
||||
#define DEFAULT_VIDEO_HDR_CONTRAST 5.0f
|
||||
|
||||
/* Should we expand the colour gamut when using hdr */
|
||||
#define DEFAULT_VIDEO_HDR_EXPAND_GAMUT true
|
||||
|
||||
/* When presets are saved they will be saved using the #reference
|
||||
* directive by default */
|
||||
#define DEFAULT_VIDEO_SHADER_PRESET_SAVE_REFERENCE_ENABLE true
|
||||
@@ -458,7 +479,7 @@
|
||||
* in Dingux devices */
|
||||
#define DEFAULT_DINGUX_REFRESH_RATE DINGUX_REFRESH_RATE_60HZ
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
#if defined(RS90) || defined(MIYOO)
|
||||
/* Sets image filtering method on the RS90
|
||||
* when integer scaling is disabled */
|
||||
#define DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE DINGUX_RS90_SOFTFILTER_POINT
|
||||
@@ -785,22 +806,24 @@ static const bool default_savefiles_in_content_dir = false;
|
||||
static const bool default_systemfiles_in_content_dir = false;
|
||||
static const bool default_screenshots_in_content_dir = false;
|
||||
|
||||
#if defined(RS90) || defined(RETROFW)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_START_SELECT
|
||||
#if defined(RS90) || defined(RETROFW) || defined(MIYOO)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_START_SELECT
|
||||
#elif defined(_XBOX1) || defined(__PS3__) || defined(_XBOX360) || defined(DINGUX)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_L3_R3
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_L3_R3
|
||||
#elif defined(PS2) || defined(PSP)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_HOLD_START
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_HOLD_START
|
||||
#elif defined(VITA)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_L1_R1_START_SELECT
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_L1_R1_START_SELECT
|
||||
#elif defined(SWITCH) || defined(ORBIS)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_START_SELECT
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_START_SELECT
|
||||
#elif TARGET_OS_TV
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_DOWN_Y_L_R
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_DOWN_Y_L_R
|
||||
#else
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_NONE
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_COMBO_NONE
|
||||
#endif
|
||||
|
||||
#define DEFAULT_QUIT_GAMEPAD_COMBO INPUT_COMBO_NONE
|
||||
|
||||
#if defined(VITA)
|
||||
static const unsigned input_backtouch_enable = false;
|
||||
static const unsigned input_backtouch_toggle = false;
|
||||
@@ -995,7 +1018,7 @@ static const bool audio_enable_menu_bgm = false;
|
||||
/* Output samplerate. */
|
||||
#ifdef GEKKO
|
||||
#define DEFAULT_OUTPUT_RATE 32000
|
||||
#elif defined(_3DS) || defined(RETROFW)
|
||||
#elif defined(_3DS) || defined(RETROFW) || defined(MIYOO)
|
||||
#define DEFAULT_OUTPUT_RATE 32730
|
||||
#else
|
||||
#define DEFAULT_OUTPUT_RATE 48000
|
||||
@@ -1006,7 +1029,7 @@ static const bool audio_enable_menu_bgm = false;
|
||||
|
||||
/* Desired audio latency in milliseconds. Might not be honored
|
||||
* if driver can't provide given latency. */
|
||||
#if defined(ANDROID) || defined(EMSCRIPTEN) || defined(RETROFW)
|
||||
#if defined(ANDROID) || defined(EMSCRIPTEN) || defined(RETROFW) || defined(MIYOO)
|
||||
/* For most Android devices, 64ms is way too low. */
|
||||
#define DEFAULT_OUT_LATENCY 128
|
||||
#else
|
||||
@@ -1080,7 +1103,7 @@ static const bool audio_enable_menu_bgm = false;
|
||||
#define DEFAULT_APPLY_CHEATS_AFTER_LOAD false
|
||||
|
||||
|
||||
#if defined(RETROFW)
|
||||
#if defined(RETROFW) || defined(MIYOO)
|
||||
/*RETROFW jz4760 has signficant slowdown with default settings */
|
||||
#define DEFAULT_REWIND_BUFFER_SIZE (1 << 20)
|
||||
#define DEFAULT_REWIND_BUFFER_SIZE_STEP 1
|
||||
@@ -1379,7 +1402,7 @@ static const unsigned menu_left_thumbnails_default = 0;
|
||||
static const unsigned gfx_thumbnail_upscale_threshold = 0;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(RS90)
|
||||
#if defined(RS90) || defined(MIYOO)
|
||||
/* The RS-90 has a hardware clock that is neither
|
||||
* configurable nor persistent, rendering it useless.
|
||||
* We therefore hide it in the menu by default. */
|
||||
@@ -1449,7 +1472,9 @@ static const bool enable_device_vibration = false;
|
||||
/* Defines the strength of rumble effects
|
||||
* on OpenDingux devices */
|
||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
||||
#define DEFAULT_DINGUX_RUMBLE_GAIN 50
|
||||
#define DEFAULT_RUMBLE_GAIN 50
|
||||
#else
|
||||
#define DEFAULT_RUMBLE_GAIN 100
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
|
||||
+723
-38
@@ -46,6 +46,7 @@
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "audio/audio_driver.h"
|
||||
#include "gfx/gfx_animation.h"
|
||||
|
||||
#include "tasks/task_content.h"
|
||||
@@ -259,6 +260,100 @@ enum midi_driver_enum
|
||||
MIDI_NULL
|
||||
};
|
||||
|
||||
#define DECLARE_BIND(base, bind, desc) { #base, desc, 0, bind, true }
|
||||
#define DECLARE_META_BIND(level, base, bind, desc) { #base, desc, level, bind, true }
|
||||
|
||||
const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = {
|
||||
DECLARE_BIND(b, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B),
|
||||
DECLARE_BIND(y, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y),
|
||||
DECLARE_BIND(select, RETRO_DEVICE_ID_JOYPAD_SELECT,MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT),
|
||||
DECLARE_BIND(start, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START),
|
||||
DECLARE_BIND(up, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP),
|
||||
DECLARE_BIND(down, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN),
|
||||
DECLARE_BIND(left, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT),
|
||||
DECLARE_BIND(right, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT),
|
||||
DECLARE_BIND(a, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A),
|
||||
DECLARE_BIND(x, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X),
|
||||
DECLARE_BIND(l, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L),
|
||||
DECLARE_BIND(r, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R),
|
||||
DECLARE_BIND(l2, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2),
|
||||
DECLARE_BIND(r2, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2),
|
||||
DECLARE_BIND(l3, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3),
|
||||
DECLARE_BIND(r3, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3),
|
||||
DECLARE_BIND(l_x_plus, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS),
|
||||
DECLARE_BIND(l_x_minus, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS),
|
||||
DECLARE_BIND(l_y_plus, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS),
|
||||
DECLARE_BIND(l_y_minus, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS),
|
||||
DECLARE_BIND(r_x_plus, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS),
|
||||
DECLARE_BIND(r_x_minus, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS),
|
||||
DECLARE_BIND(r_y_plus, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS),
|
||||
DECLARE_BIND(r_y_minus, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS),
|
||||
|
||||
DECLARE_BIND(gun_trigger, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER ),
|
||||
DECLARE_BIND(gun_offscreen_shot, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD ),
|
||||
DECLARE_BIND(gun_aux_a, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A ),
|
||||
DECLARE_BIND(gun_aux_b, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B ),
|
||||
DECLARE_BIND(gun_aux_c, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C ),
|
||||
DECLARE_BIND(gun_start, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START ),
|
||||
DECLARE_BIND(gun_select, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT ),
|
||||
DECLARE_BIND(gun_dpad_up, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP ),
|
||||
DECLARE_BIND(gun_dpad_down, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN ),
|
||||
DECLARE_BIND(gun_dpad_left, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT ),
|
||||
DECLARE_BIND(gun_dpad_right, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT ),
|
||||
|
||||
DECLARE_BIND(turbo, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE),
|
||||
|
||||
DECLARE_META_BIND(1, toggle_fast_forward, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY),
|
||||
DECLARE_META_BIND(2, hold_fast_forward, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY),
|
||||
DECLARE_META_BIND(1, toggle_slowmotion, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY),
|
||||
DECLARE_META_BIND(2, hold_slowmotion, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY),
|
||||
DECLARE_META_BIND(1, load_state, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY),
|
||||
DECLARE_META_BIND(1, save_state, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY),
|
||||
DECLARE_META_BIND(2, toggle_fullscreen, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY),
|
||||
DECLARE_META_BIND(2, close_content, RARCH_CLOSE_CONTENT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_CLOSE_CONTENT_KEY),
|
||||
#ifdef HAVE_LAKKA
|
||||
DECLARE_META_BIND(2, exit_emulator, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY),
|
||||
#else
|
||||
DECLARE_META_BIND(2, exit_emulator, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY),
|
||||
#endif
|
||||
DECLARE_META_BIND(2, state_slot_increase, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS),
|
||||
DECLARE_META_BIND(2, state_slot_decrease, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS),
|
||||
DECLARE_META_BIND(1, rewind, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND),
|
||||
DECLARE_META_BIND(2, movie_record_toggle, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE),
|
||||
DECLARE_META_BIND(2, pause_toggle, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE),
|
||||
DECLARE_META_BIND(2, frame_advance, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE),
|
||||
DECLARE_META_BIND(2, reset, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET),
|
||||
DECLARE_META_BIND(2, shader_next, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT),
|
||||
DECLARE_META_BIND(2, shader_prev, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV),
|
||||
DECLARE_META_BIND(2, cheat_index_plus, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS),
|
||||
DECLARE_META_BIND(2, cheat_index_minus, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS),
|
||||
DECLARE_META_BIND(2, cheat_toggle, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE),
|
||||
DECLARE_META_BIND(2, screenshot, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT),
|
||||
DECLARE_META_BIND(2, audio_mute, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE),
|
||||
DECLARE_META_BIND(2, osk_toggle, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK),
|
||||
DECLARE_META_BIND(2, fps_toggle, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE),
|
||||
DECLARE_META_BIND(2, send_debug_info, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO),
|
||||
DECLARE_META_BIND(2, netplay_host_toggle, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE),
|
||||
DECLARE_META_BIND(2, netplay_game_watch, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH),
|
||||
DECLARE_META_BIND(2, enable_hotkey, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY),
|
||||
DECLARE_META_BIND(2, volume_up, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP),
|
||||
DECLARE_META_BIND(2, volume_down, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN),
|
||||
DECLARE_META_BIND(2, overlay_next, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT),
|
||||
DECLARE_META_BIND(2, disk_eject_toggle, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE),
|
||||
DECLARE_META_BIND(2, disk_next, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT),
|
||||
DECLARE_META_BIND(2, disk_prev, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV),
|
||||
DECLARE_META_BIND(2, grab_mouse_toggle, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE),
|
||||
DECLARE_META_BIND(2, game_focus_toggle, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE),
|
||||
DECLARE_META_BIND(2, desktop_menu_toggle, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE),
|
||||
#ifdef HAVE_MENU
|
||||
DECLARE_META_BIND(1, menu_toggle, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE),
|
||||
#endif
|
||||
DECLARE_META_BIND(2, recording_toggle, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE),
|
||||
DECLARE_META_BIND(2, streaming_toggle, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE),
|
||||
DECLARE_META_BIND(2, runahead_toggle, RARCH_RUNAHEAD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RUNAHEAD_TOGGLE),
|
||||
DECLARE_META_BIND(2, ai_service, RARCH_AI_SERVICE, MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE),
|
||||
};
|
||||
|
||||
#if defined(HAVE_METAL)
|
||||
/* iOS supports both the OpenGL and Metal video drivers; default to OpenGL since Metal support is preliminary */
|
||||
#if defined(HAVE_COCOATOUCH) && defined(HAVE_OPENGL)
|
||||
@@ -317,7 +412,7 @@ static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL;
|
||||
#elif defined(HAVE_SDL2)
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL2;
|
||||
#elif defined(HAVE_SDL_DINGUX)
|
||||
#if defined(RS90)
|
||||
#if defined(RS90) || defined(MIYOO)
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL_RS90;
|
||||
#else
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL_DINGUX;
|
||||
@@ -400,7 +495,7 @@ static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_EXT;
|
||||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(RS90)
|
||||
#if defined(RS90) || defined(MIYOO)
|
||||
static const enum audio_resampler_driver_enum AUDIO_DEFAULT_RESAMPLER_DRIVER = AUDIO_RESAMPLER_NEAREST;
|
||||
#elif defined(PSP) || defined(EMSCRIPTEN)
|
||||
static const enum audio_resampler_driver_enum AUDIO_DEFAULT_RESAMPLER_DRIVER = AUDIO_RESAMPLER_CC;
|
||||
@@ -1562,7 +1657,7 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
SETTING_BOOL("video_scale_integer", &settings->bools.video_scale_integer, true, DEFAULT_SCALE_INTEGER, false);
|
||||
SETTING_BOOL("video_scale_integer_overscale", &settings->bools.video_scale_integer_overscale, true, DEFAULT_SCALE_INTEGER_OVERSCALE, false);
|
||||
SETTING_BOOL("video_smooth", &settings->bools.video_smooth, true, DEFAULT_VIDEO_SMOOTH, false);
|
||||
SETTING_BOOL("video_ctx_scaling", &settings->bools.video_ctx_scaling, true, DEFAULT_VIDEO_CTX_SCALING, false);
|
||||
SETTING_BOOL("video_ctx_scaling", &settings->bools.video_ctx_scaling, true, DEFAULT_VIDEO_CTX_SCALING, false);
|
||||
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, DEFAULT_FORCE_ASPECT, false);
|
||||
#if defined(DINGUX)
|
||||
SETTING_BOOL("video_dingux_ipu_keep_aspect", &settings->bools.video_dingux_ipu_keep_aspect, true, DEFAULT_DINGUX_IPU_KEEP_ASPECT, false);
|
||||
@@ -1572,6 +1667,8 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, DEFAULT_AUTO_SCREENSHOT_FILENAME, false);
|
||||
SETTING_BOOL("video_force_srgb_disable", &settings->bools.video_force_srgb_disable, true, false, false);
|
||||
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, DEFAULT_FULLSCREEN, false);
|
||||
SETTING_BOOL("video_hdr_enable", &settings->bools.video_hdr_enable, true, DEFAULT_VIDEO_HDR_ENABLE, false);
|
||||
SETTING_BOOL("video_hdr_expand_gamut", &settings->bools.video_hdr_expand_gamut, true, DEFAULT_VIDEO_HDR_EXPAND_GAMUT, false);
|
||||
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE, false);
|
||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, DEFAULT_VSYNC, false);
|
||||
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, DEFAULT_ADAPTIVE_VSYNC, false);
|
||||
@@ -1945,6 +2042,10 @@ static struct config_float_setting *populate_settings_float(
|
||||
SETTING_FLOAT("input_analog_sensitivity", &settings->floats.input_analog_sensitivity, true, DEFAULT_ANALOG_SENSITIVITY, false);
|
||||
SETTING_FLOAT("video_msg_bgcolor_opacity", &settings->floats.video_msg_bgcolor_opacity, true, message_bgcolor_opacity, false);
|
||||
|
||||
SETTING_FLOAT("video_hdr_max_nits", &settings->floats.video_hdr_max_nits, true, DEFAULT_VIDEO_HDR_MAX_NITS, false);
|
||||
SETTING_FLOAT("video_hdr_paper_white_nits", &settings->floats.video_hdr_paper_white_nits, true, DEFAULT_VIDEO_HDR_PAPER_WHITE_NITS, false);
|
||||
SETTING_FLOAT("video_hdr_display_contrast", &settings->floats.video_hdr_display_contrast, true, DEFAULT_VIDEO_HDR_CONTRAST, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1975,14 +2076,13 @@ static struct config_uint_setting *populate_settings_uint(
|
||||
SETTING_UINT("fps_update_interval", &settings->uints.fps_update_interval, true, DEFAULT_FPS_UPDATE_INTERVAL, false);
|
||||
SETTING_UINT("memory_update_interval", &settings->uints.memory_update_interval, true, DEFAULT_MEMORY_UPDATE_INTERVAL, false);
|
||||
SETTING_UINT("input_menu_toggle_gamepad_combo", &settings->uints.input_menu_toggle_gamepad_combo, true, DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO, false);
|
||||
SETTING_UINT("input_quit_gamepad_combo", &settings->uints.input_quit_gamepad_combo, true, DEFAULT_QUIT_GAMEPAD_COMBO, false);
|
||||
SETTING_UINT("input_hotkey_block_delay", &settings->uints.input_hotkey_block_delay, true, DEFAULT_INPUT_HOTKEY_BLOCK_DELAY, false);
|
||||
#ifdef GEKKO
|
||||
SETTING_UINT("input_mouse_scale", &settings->uints.input_mouse_scale, true, DEFAULT_MOUSE_SCALE, false);
|
||||
#endif
|
||||
SETTING_UINT("input_touch_scale", &settings->uints.input_touch_scale, true, DEFAULT_TOUCH_SCALE, false);
|
||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
||||
SETTING_UINT("input_dingux_rumble_gain", &settings->uints.input_dingux_rumble_gain, true, DEFAULT_DINGUX_RUMBLE_GAIN, false);
|
||||
#endif
|
||||
SETTING_UINT("input_rumble_gain", &settings->uints.input_rumble_gain, true, DEFAULT_RUMBLE_GAIN, false);
|
||||
SETTING_UINT("input_auto_game_focus", &settings->uints.input_auto_game_focus, true, DEFAULT_INPUT_AUTO_GAME_FOCUS, false);
|
||||
SETTING_UINT("audio_latency", &settings->uints.audio_latency, false, 0 /* TODO */, false);
|
||||
SETTING_UINT("audio_resampler_quality", &settings->uints.audio_resampler_quality, true, audio_resampler_quality_level, false);
|
||||
@@ -2153,7 +2253,7 @@ static struct config_uint_setting *populate_settings_uint(
|
||||
#if defined(DINGUX_BETA)
|
||||
SETTING_UINT("video_dingux_refresh_rate", &settings->uints.video_dingux_refresh_rate, true, DEFAULT_DINGUX_REFRESH_RATE, false);
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
#if defined(RS90) || defined(MIYOO)
|
||||
SETTING_UINT("video_dingux_rs90_softfilter_type", &settings->uints.video_dingux_rs90_softfilter_type, true, DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE, false);
|
||||
#endif
|
||||
#endif
|
||||
@@ -2228,6 +2328,10 @@ static struct config_int_setting *populate_settings_int(
|
||||
#endif
|
||||
#ifdef HAVE_D3D12
|
||||
SETTING_INT("d3d12_gpu_index", &settings->ints.d3d12_gpu_index, true, DEFAULT_D3D12_GPU_INDEX, false);
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW_OFFSET
|
||||
SETTING_INT("video_window_offset_x", &settings->ints.video_window_offset_x, true, DEFAULT_WINDOW_OFFSET_X, false);
|
||||
SETTING_INT("video_window_offset_y", &settings->ints.video_window_offset_y, true, DEFAULT_WINDOW_OFFSET_Y, false);
|
||||
#endif
|
||||
SETTING_INT("content_favorites_size", &settings->ints.content_favorites_size, true, default_content_favorites_size, false);
|
||||
|
||||
@@ -2505,7 +2609,7 @@ void config_set_defaults(void *data)
|
||||
settings->uints.input_mouse_index[i] = i;
|
||||
}
|
||||
|
||||
video_driver_reset_custom_viewport();
|
||||
video_driver_reset_custom_viewport(settings);
|
||||
|
||||
/* Make sure settings from other configs carry over into defaults
|
||||
* for another config. */
|
||||
@@ -2542,9 +2646,9 @@ void config_set_defaults(void *data)
|
||||
*settings->paths.directory_video_filter = '\0';
|
||||
*settings->paths.directory_audio_filter = '\0';
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
|
||||
if (global)
|
||||
{
|
||||
@@ -2780,9 +2884,9 @@ void config_set_defaults(void *data)
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
/* Avoid reloading config on every content load */
|
||||
if (DEFAULT_BLOCK_CONFIG_READ)
|
||||
rarch_ctl(RARCH_CTL_SET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_BLOCK_CONFIG_READ, NULL);
|
||||
else
|
||||
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@@ -2857,13 +2961,17 @@ static bool check_menu_driver_compatibility(settings_t *settings)
|
||||
**/
|
||||
static config_file_t *open_default_config_file(void)
|
||||
{
|
||||
char application_data[PATH_MAX_LENGTH];
|
||||
char conf_path[PATH_MAX_LENGTH];
|
||||
char app_path[PATH_MAX_LENGTH];
|
||||
bool has_application_data = false;
|
||||
config_file_t *conf = NULL;
|
||||
|
||||
application_data[0] = conf_path[0] = app_path[0] = '\0';
|
||||
#ifndef RARCH_CONSOLE
|
||||
char application_data[PATH_MAX_LENGTH];
|
||||
bool has_application_data = false;
|
||||
application_data[0] = '\0';
|
||||
#endif
|
||||
|
||||
conf_path[0] = app_path[0] = '\0';
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
@@ -3083,7 +3191,6 @@ static bool config_load_file(global_t *global,
|
||||
{
|
||||
unsigned i;
|
||||
char tmp_str[PATH_MAX_LENGTH];
|
||||
bool ret = false;
|
||||
unsigned tmp_uint = 0;
|
||||
bool tmp_bool = false;
|
||||
static bool first_load = true;
|
||||
@@ -3098,24 +3205,33 @@ static bool config_load_file(global_t *global,
|
||||
int size_settings_size = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
int array_settings_size = sizeof(settings->arrays) / sizeof(settings->arrays.placeholder);
|
||||
int path_settings_size = sizeof(settings->paths) / sizeof(settings->paths.placeholder);
|
||||
struct config_bool_setting *bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||
struct config_float_setting *float_settings = populate_settings_float (settings, &float_settings_size);
|
||||
struct config_int_setting *int_settings = populate_settings_int (settings, &int_settings_size);
|
||||
struct config_uint_setting *uint_settings = populate_settings_uint (settings, &uint_settings_size);
|
||||
struct config_size_setting *size_settings = populate_settings_size (settings, &size_settings_size);
|
||||
struct config_array_setting *array_settings = populate_settings_array (settings, &array_settings_size);
|
||||
struct config_path_setting *path_settings = populate_settings_path (settings, &path_settings_size);
|
||||
struct config_bool_setting *bool_settings = NULL;
|
||||
struct config_float_setting *float_settings = NULL;
|
||||
struct config_int_setting *int_settings = NULL;
|
||||
struct config_uint_setting *uint_settings = NULL;
|
||||
struct config_size_setting *size_settings = NULL;
|
||||
struct config_array_setting *array_settings = NULL;
|
||||
struct config_path_setting *path_settings = NULL;
|
||||
config_file_t *conf = path ? config_file_new_from_path_to_string(path) : open_default_config_file();
|
||||
|
||||
tmp_str[0] = '\0';
|
||||
tmp_str[0] = '\0';
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
first_load = false;
|
||||
if (!path)
|
||||
ret = true;
|
||||
goto end;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||
float_settings = populate_settings_float (settings, &float_settings_size);
|
||||
int_settings = populate_settings_int (settings, &int_settings_size);
|
||||
uint_settings = populate_settings_uint (settings, &uint_settings_size);
|
||||
size_settings = populate_settings_size (settings, &size_settings_size);
|
||||
array_settings = populate_settings_array (settings, &array_settings_size);
|
||||
path_settings = populate_settings_path (settings, &path_settings_size);
|
||||
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG_APPEND))
|
||||
{
|
||||
/* Don't destroy append_config_path, store in temporary
|
||||
@@ -3152,7 +3268,7 @@ static bool config_load_file(global_t *global,
|
||||
|
||||
/* Overrides */
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
override_username = strdup(settings->paths.username);
|
||||
|
||||
/* Boolean settings */
|
||||
@@ -3315,7 +3431,7 @@ static bool config_load_file(global_t *global,
|
||||
|
||||
/* Post-settings load */
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL) && override_username)
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL) && override_username)
|
||||
{
|
||||
configuration_set_string(settings,
|
||||
settings->paths.username,
|
||||
@@ -3608,8 +3724,6 @@ static bool config_load_file(global_t *global,
|
||||
settings->ints.content_favorites_size = (int)settings->uints.content_history_size;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
end:
|
||||
if (conf)
|
||||
config_file_free(conf);
|
||||
if (bool_settings)
|
||||
@@ -3627,7 +3741,7 @@ end:
|
||||
if (size_settings)
|
||||
free(size_settings);
|
||||
first_load = false;
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3914,7 +4028,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Game-specific remap found at \"%s\".\n", game_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
/* msg_remap_loaded is set to MSG_GAME_REMAP_FILE_LOADED
|
||||
* by default - no need to change it here */
|
||||
goto success;
|
||||
@@ -3930,7 +4044,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Content-dir-specific remap found at \"%s\".\n", content_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
msg_remap_loaded = MSG_DIRECTORY_REMAP_FILE_LOADED;
|
||||
goto success;
|
||||
}
|
||||
@@ -3945,7 +4059,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Core-specific remap found at \"%s\".\n", core_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
msg_remap_loaded = MSG_CORE_REMAP_FILE_LOADED;
|
||||
goto success;
|
||||
}
|
||||
@@ -4007,6 +4121,245 @@ static void video_driver_save_settings(global_t *global, config_file_t *conf)
|
||||
global->console.screen.flicker_filter_index);
|
||||
}
|
||||
|
||||
static void save_keybind_hat(config_file_t *conf, const char *key,
|
||||
const struct retro_keybind *bind)
|
||||
{
|
||||
char config[16];
|
||||
unsigned hat = (unsigned)GET_HAT(bind->joykey);
|
||||
const char *dir = NULL;
|
||||
|
||||
config[0] = '\0';
|
||||
|
||||
switch (GET_HAT_DIR(bind->joykey))
|
||||
{
|
||||
case HAT_UP_MASK:
|
||||
dir = "up";
|
||||
break;
|
||||
|
||||
case HAT_DOWN_MASK:
|
||||
dir = "down";
|
||||
break;
|
||||
|
||||
case HAT_LEFT_MASK:
|
||||
dir = "left";
|
||||
break;
|
||||
|
||||
case HAT_RIGHT_MASK:
|
||||
dir = "right";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(config, sizeof(config), "h%u%s", hat, dir);
|
||||
config_set_string(conf, key, config);
|
||||
}
|
||||
|
||||
static void save_keybind_joykey(config_file_t *conf,
|
||||
const char *prefix,
|
||||
const char *base,
|
||||
const struct retro_keybind *bind, bool save_empty)
|
||||
{
|
||||
char key[64];
|
||||
|
||||
key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim_concat(key, prefix,
|
||||
base, '_', "_btn", sizeof(key));
|
||||
|
||||
if (bind->joykey == NO_BTN)
|
||||
{
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, "nul");
|
||||
}
|
||||
else if (GET_HAT_DIR(bind->joykey))
|
||||
save_keybind_hat(conf, key, bind);
|
||||
else
|
||||
config_set_uint64(conf, key, bind->joykey);
|
||||
}
|
||||
|
||||
static void save_keybind_axis(config_file_t *conf,
|
||||
const char *prefix,
|
||||
const char *base,
|
||||
const struct retro_keybind *bind, bool save_empty)
|
||||
{
|
||||
char key[64];
|
||||
unsigned axis = 0;
|
||||
char dir = '\0';
|
||||
|
||||
key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim_concat(key,
|
||||
prefix, base, '_',
|
||||
"_axis",
|
||||
sizeof(key));
|
||||
|
||||
if (bind->joyaxis == AXIS_NONE)
|
||||
{
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, "nul");
|
||||
}
|
||||
else if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||
{
|
||||
dir = '-';
|
||||
axis = AXIS_NEG_GET(bind->joyaxis);
|
||||
}
|
||||
else if (AXIS_POS_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||
{
|
||||
dir = '+';
|
||||
axis = AXIS_POS_GET(bind->joyaxis);
|
||||
}
|
||||
|
||||
if (dir)
|
||||
{
|
||||
char config[16];
|
||||
|
||||
config[0] = '\0';
|
||||
|
||||
snprintf(config, sizeof(config), "%c%u", dir, axis);
|
||||
config_set_string(conf, key, config);
|
||||
}
|
||||
}
|
||||
|
||||
static void save_keybind_mbutton(config_file_t *conf,
|
||||
const char *prefix,
|
||||
const char *base,
|
||||
const struct retro_keybind *bind, bool save_empty)
|
||||
{
|
||||
char key[64];
|
||||
|
||||
key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim_concat(key, prefix,
|
||||
base, '_', "_mbtn", sizeof(key));
|
||||
|
||||
switch (bind->mbutton)
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
config_set_uint64(conf, key, 1);
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||
config_set_uint64(conf, key, 2);
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
config_set_uint64(conf, key, 3);
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||
config_set_uint64(conf, key, 4);
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
||||
config_set_uint64(conf, key, 5);
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
config_set_string(conf, key, "wu");
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
config_set_string(conf, key, "wd");
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
config_set_string(conf, key, "whu");
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
config_set_string(conf, key, "whd");
|
||||
break;
|
||||
default:
|
||||
if (save_empty)
|
||||
config_set_string(conf, key, "nul");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* input_config_save_keybind:
|
||||
* @conf : pointer to config file object
|
||||
* @prefix : prefix name of keybind
|
||||
* @base : base name of keybind
|
||||
* @bind : pointer to key binding object
|
||||
* @kb : save keyboard binds
|
||||
*
|
||||
* Save a key binding to the config file.
|
||||
*/
|
||||
static void input_config_save_keybind(config_file_t *conf,
|
||||
const char *prefix,
|
||||
const char *base,
|
||||
const struct retro_keybind *bind,
|
||||
bool save_empty)
|
||||
{
|
||||
save_keybind_joykey (conf, prefix, base, bind, save_empty);
|
||||
save_keybind_axis (conf, prefix, base, bind, save_empty);
|
||||
save_keybind_mbutton(conf, prefix, base, bind, save_empty);
|
||||
}
|
||||
|
||||
const char *input_config_get_prefix(unsigned user, bool meta)
|
||||
{
|
||||
static const char *bind_user_prefix[MAX_USERS] = {
|
||||
"input_player1",
|
||||
"input_player2",
|
||||
"input_player3",
|
||||
"input_player4",
|
||||
"input_player5",
|
||||
"input_player6",
|
||||
"input_player7",
|
||||
"input_player8",
|
||||
"input_player9",
|
||||
"input_player10",
|
||||
"input_player11",
|
||||
"input_player12",
|
||||
"input_player13",
|
||||
"input_player14",
|
||||
"input_player15",
|
||||
"input_player16",
|
||||
};
|
||||
if (meta)
|
||||
{
|
||||
if (user == 0)
|
||||
return "input";
|
||||
/* Don't bother with meta bind for anyone else than first user. */
|
||||
return NULL;
|
||||
}
|
||||
return bind_user_prefix[user];
|
||||
}
|
||||
|
||||
/**
|
||||
* input_config_save_keybinds_user:
|
||||
* @conf : pointer to config file object
|
||||
* @user : user number
|
||||
*
|
||||
* Save the current keybinds of a user (@user) to the config file (@conf).
|
||||
*/
|
||||
static void input_config_save_keybinds_user(config_file_t *conf, unsigned user)
|
||||
{
|
||||
unsigned i = 0;
|
||||
|
||||
for (i = 0; input_config_bind_map_get_valid(i); i++)
|
||||
{
|
||||
char key[64];
|
||||
char btn[64];
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
bool meta = keybind ? keybind->meta : false;
|
||||
const char *prefix = input_config_get_prefix(user, meta);
|
||||
const struct retro_keybind *bind = &input_config_binds[user][i];
|
||||
const char *base = NULL;
|
||||
|
||||
if (!prefix || !bind->valid || !keybind)
|
||||
continue;
|
||||
|
||||
base = keybind->base;
|
||||
key[0] = btn[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(key, prefix, base, '_', sizeof(key));
|
||||
|
||||
input_keymaps_translate_rk_to_str(bind->key, btn, sizeof(btn));
|
||||
config_set_string(conf, key, btn);
|
||||
|
||||
input_config_save_keybind(conf, prefix, base, bind, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* config_save_autoconf_profile:
|
||||
* @device_name : Input device name
|
||||
@@ -4165,7 +4518,7 @@ bool config_save_file(const char *path)
|
||||
if (!conf)
|
||||
conf = config_file_new_alloc();
|
||||
|
||||
if (!conf || rarch_ctl(RARCH_CTL_IS_OVERRIDES_ACTIVE, NULL))
|
||||
if (!conf || retroarch_ctl(RARCH_CTL_IS_OVERRIDES_ACTIVE, NULL))
|
||||
{
|
||||
if (conf)
|
||||
config_file_free(conf);
|
||||
@@ -4312,7 +4665,7 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "log_verbosity",
|
||||
verbosity_is_enabled());
|
||||
config_set_bool(conf, "perfcnt_enable",
|
||||
rarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL));
|
||||
retroarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL));
|
||||
|
||||
msg_color = (((int)(settings->floats.video_msg_color_r * 255.0f) & 0xff) << 16) +
|
||||
(((int)(settings->floats.video_msg_color_g * 255.0f) & 0xff) << 8) +
|
||||
@@ -4514,8 +4867,26 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
for (i = 0; i < (unsigned)array_settings_size; i++)
|
||||
{
|
||||
if (!string_is_equal(array_settings[i].ptr, array_overrides[i].ptr))
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* As authentication doesn't occur until after content is loaded,
|
||||
* the achievement authentication token might only exist in the
|
||||
* override set, and therefore differ from the master config set.
|
||||
* Storing the achievement authentication token in an override
|
||||
* is a recipe for disaster. If it expires and the user generates
|
||||
* a new token, then the override will be out of date and the
|
||||
* user will have to reauthenticate for each override (and also
|
||||
* remember to update each override). Also exclude the username
|
||||
* as it's directly tied to the token and password.
|
||||
*/
|
||||
if (string_is_equal(array_settings[i].ident, "cheevos_token") ||
|
||||
string_is_equal(array_settings[i].ident, "cheevos_password") ||
|
||||
string_is_equal(array_settings[i].ident, "cheevos_username"))
|
||||
continue;
|
||||
#endif
|
||||
config_set_string(conf, array_overrides[i].ident,
|
||||
array_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)path_settings_size; i++)
|
||||
@@ -4620,7 +4991,7 @@ bool config_replace(bool config_replace_save_on_exit, char *path)
|
||||
|
||||
path_set(RARCH_PATH_CONFIG, path);
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
|
||||
/* Load core in new (salamander) config. */
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
@@ -5029,3 +5400,317 @@ end:
|
||||
config_file_free(config);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool input_config_bind_map_get_valid(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return false;
|
||||
return keybind->valid;
|
||||
}
|
||||
|
||||
unsigned input_config_bind_map_get_meta(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return 0;
|
||||
return keybind->meta;
|
||||
}
|
||||
|
||||
const char *input_config_bind_map_get_base(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return NULL;
|
||||
return keybind->base;
|
||||
}
|
||||
|
||||
const char *input_config_bind_map_get_desc(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return NULL;
|
||||
return msg_hash_to_str(keybind->desc);
|
||||
}
|
||||
|
||||
uint8_t input_config_bind_map_get_retro_key(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return 0;
|
||||
return keybind->retro_key;
|
||||
}
|
||||
|
||||
void input_config_reset_autoconfig_binds(unsigned port)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (port >= MAX_USERS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
input_autoconf_binds[port][i].joykey = NO_BTN;
|
||||
input_autoconf_binds[port][i].joyaxis = AXIS_NONE;
|
||||
|
||||
if (input_autoconf_binds[port][i].joykey_label)
|
||||
{
|
||||
free(input_autoconf_binds[port][i].joykey_label);
|
||||
input_autoconf_binds[port][i].joykey_label = NULL;
|
||||
}
|
||||
|
||||
if (input_autoconf_binds[port][i].joyaxis_label)
|
||||
{
|
||||
free(input_autoconf_binds[port][i].joyaxis_label);
|
||||
input_autoconf_binds[port][i].joyaxis_label = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void input_config_set_autoconfig_binds(unsigned port, void *data)
|
||||
{
|
||||
unsigned i;
|
||||
config_file_t *config = (config_file_t*)data;
|
||||
struct retro_keybind *binds = NULL;
|
||||
|
||||
if ((port >= MAX_USERS) || !config)
|
||||
return;
|
||||
|
||||
binds = input_autoconf_binds[port];
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
if (keybind)
|
||||
{
|
||||
char str[256];
|
||||
const char *base = keybind->base;
|
||||
str[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(str, "input", base, '_', sizeof(str));
|
||||
|
||||
input_config_parse_joy_button(str, config, "input", base, &binds[i]);
|
||||
input_config_parse_joy_axis (str, config, "input", base, &binds[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void input_config_parse_mouse_button(
|
||||
char *s,
|
||||
void *conf_data, const char *prefix,
|
||||
const char *btn, void *bind_data)
|
||||
{
|
||||
int val;
|
||||
char tmp[64];
|
||||
char key[64];
|
||||
config_file_t *conf = (config_file_t*)conf_data;
|
||||
struct retro_keybind *bind = (struct retro_keybind*)bind_data;
|
||||
|
||||
tmp[0] = key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(key, s, "mbtn", '_', sizeof(key));
|
||||
|
||||
if (config_get_array(conf, key, tmp, sizeof(tmp)))
|
||||
{
|
||||
bind->mbutton = NO_BTN;
|
||||
|
||||
if (tmp[0]=='w')
|
||||
{
|
||||
switch (tmp[1])
|
||||
{
|
||||
case 'u':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_WHEELUP;
|
||||
break;
|
||||
case 'd':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_WHEELDOWN;
|
||||
break;
|
||||
case 'h':
|
||||
switch (tmp[2])
|
||||
{
|
||||
case 'u':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP;
|
||||
break;
|
||||
case 'd':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
val = atoi(tmp);
|
||||
switch (val)
|
||||
{
|
||||
case 1:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_LEFT;
|
||||
break;
|
||||
case 2:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_RIGHT;
|
||||
break;
|
||||
case 3:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_MIDDLE;
|
||||
break;
|
||||
case 4:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_BUTTON_4;
|
||||
break;
|
||||
case 5:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_BUTTON_5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void input_config_parse_joy_axis(
|
||||
char *s,
|
||||
void *conf_data, const char *prefix,
|
||||
const char *axis, void *bind_data)
|
||||
{
|
||||
char tmp[64];
|
||||
char key[64];
|
||||
char key_label[64];
|
||||
config_file_t *conf = (config_file_t*)conf_data;
|
||||
struct retro_keybind *bind = (struct retro_keybind*)bind_data;
|
||||
struct config_entry_list *tmp_a = NULL;
|
||||
|
||||
tmp[0] = key[0] = key_label[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(key, s,
|
||||
"axis", '_', sizeof(key));
|
||||
fill_pathname_join_delim(key_label, s,
|
||||
"axis_label", '_', sizeof(key_label));
|
||||
|
||||
if (config_get_array(conf, key, tmp, sizeof(tmp)))
|
||||
{
|
||||
if ( tmp[0] == 'n'
|
||||
&& tmp[1] == 'u'
|
||||
&& tmp[2] == 'l'
|
||||
&& tmp[3] == '\0'
|
||||
)
|
||||
bind->joyaxis = AXIS_NONE;
|
||||
else if (strlen(tmp) >= 2 && (*tmp == '+' || *tmp == '-'))
|
||||
{
|
||||
int i_axis = (int)strtol(tmp + 1, NULL, 0);
|
||||
if (*tmp == '+')
|
||||
bind->joyaxis = AXIS_POS(i_axis);
|
||||
else
|
||||
bind->joyaxis = AXIS_NEG(i_axis);
|
||||
}
|
||||
|
||||
/* Ensure that D-pad emulation doesn't screw this over. */
|
||||
bind->orig_joyaxis = bind->joyaxis;
|
||||
}
|
||||
|
||||
tmp_a = config_get_entry(conf, key_label);
|
||||
|
||||
if (tmp_a && (!string_is_empty(tmp_a->value)))
|
||||
{
|
||||
if (bind->joyaxis_label &&
|
||||
!string_is_empty(bind->joyaxis_label))
|
||||
free(bind->joyaxis_label);
|
||||
bind->joyaxis_label = strdup(tmp_a->value);
|
||||
}
|
||||
}
|
||||
|
||||
static uint16_t input_config_parse_hat(const char *dir)
|
||||
{
|
||||
if ( dir[0] == 'u'
|
||||
&& dir[1] == 'p'
|
||||
&& dir[2] == '\0'
|
||||
)
|
||||
return HAT_UP_MASK;
|
||||
else if (
|
||||
dir[0] == 'd'
|
||||
&& dir[1] == 'o'
|
||||
&& dir[2] == 'w'
|
||||
&& dir[3] == 'n'
|
||||
&& dir[4] == '\0'
|
||||
)
|
||||
return HAT_DOWN_MASK;
|
||||
else if (
|
||||
dir[0] == 'l'
|
||||
&& dir[1] == 'e'
|
||||
&& dir[2] == 'f'
|
||||
&& dir[3] == 't'
|
||||
&& dir[4] == '\0'
|
||||
)
|
||||
return HAT_LEFT_MASK;
|
||||
else if (
|
||||
dir[0] == 'r'
|
||||
&& dir[1] == 'i'
|
||||
&& dir[2] == 'g'
|
||||
&& dir[3] == 'h'
|
||||
&& dir[4] == 't'
|
||||
&& dir[5] == '\0'
|
||||
)
|
||||
return HAT_RIGHT_MASK;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void input_config_parse_joy_button(
|
||||
char *s,
|
||||
void *data, const char *prefix,
|
||||
const char *btn, void *bind_data)
|
||||
{
|
||||
char tmp[64];
|
||||
char key[64];
|
||||
char key_label[64];
|
||||
config_file_t *conf = (config_file_t*)data;
|
||||
struct retro_keybind *bind = (struct retro_keybind*)bind_data;
|
||||
struct config_entry_list *tmp_a = NULL;
|
||||
|
||||
tmp[0] = key[0] = key_label[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(key, s,
|
||||
"btn", '_', sizeof(key));
|
||||
fill_pathname_join_delim(key_label, s,
|
||||
"btn_label", '_', sizeof(key_label));
|
||||
|
||||
if (config_get_array(conf, key, tmp, sizeof(tmp)))
|
||||
{
|
||||
btn = tmp;
|
||||
if ( btn[0] == 'n'
|
||||
&& btn[1] == 'u'
|
||||
&& btn[2] == 'l'
|
||||
&& btn[3] == '\0'
|
||||
)
|
||||
bind->joykey = NO_BTN;
|
||||
else
|
||||
{
|
||||
if (*btn == 'h')
|
||||
{
|
||||
const char *str = btn + 1;
|
||||
/* Parse hat? */
|
||||
if (str && ISDIGIT((int)*str))
|
||||
{
|
||||
char *dir = NULL;
|
||||
uint16_t hat = strtoul(str, &dir, 0);
|
||||
uint16_t hat_dir = dir ? input_config_parse_hat(dir) : 0;
|
||||
if (hat_dir)
|
||||
bind->joykey = HAT_MAP(hat, hat_dir);
|
||||
}
|
||||
}
|
||||
else
|
||||
bind->joykey = strtoull(tmp, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
tmp_a = config_get_entry(conf, key_label);
|
||||
|
||||
if (tmp_a && !string_is_empty(tmp_a->value))
|
||||
{
|
||||
if (!string_is_empty(bind->joykey_label))
|
||||
free(bind->joykey_label);
|
||||
|
||||
bind->joykey_label = strdup(tmp_a->value);
|
||||
}
|
||||
}
|
||||
+59
-1
@@ -25,6 +25,10 @@
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gfx/video_defines.h"
|
||||
#include "input/input_defines.h"
|
||||
#include "led/led_defines.h"
|
||||
@@ -33,6 +37,8 @@
|
||||
#include "lakka.h"
|
||||
#endif
|
||||
|
||||
#include "msg_hash.h"
|
||||
|
||||
#define configuration_set_float(settings, var, newvar) \
|
||||
{ \
|
||||
settings->modified = true; \
|
||||
@@ -63,6 +69,8 @@
|
||||
strlcpy(var, newvar, sizeof(var)); \
|
||||
}
|
||||
|
||||
#define INPUT_CONFIG_BIND_MAP_GET(i) ((const struct input_bind_map*)&input_config_bind_map[(i)])
|
||||
|
||||
enum crt_switch_type
|
||||
{
|
||||
CRT_SWITCH_NONE = 0,
|
||||
@@ -82,6 +90,25 @@ enum override_type
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Input config. */
|
||||
struct input_bind_map
|
||||
{
|
||||
const char *base;
|
||||
|
||||
enum msg_hash_enums desc;
|
||||
|
||||
/* Meta binds get input as prefix, not input_playerN".
|
||||
* 0 = libretro related.
|
||||
* 1 = Common hotkey.
|
||||
* 2 = Uncommon/obscure hotkey.
|
||||
*/
|
||||
uint8_t meta;
|
||||
|
||||
uint8_t retro_key;
|
||||
|
||||
bool valid;
|
||||
};
|
||||
|
||||
typedef struct settings
|
||||
{
|
||||
struct
|
||||
@@ -113,6 +140,10 @@ typedef struct settings
|
||||
#endif
|
||||
#ifdef HAVE_D3D12
|
||||
int d3d12_gpu_index;
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW_OFFSET
|
||||
int video_window_offset_x;
|
||||
int video_window_offset_y;
|
||||
#endif
|
||||
int content_favorites_size;
|
||||
} ints;
|
||||
@@ -160,10 +191,11 @@ typedef struct settings
|
||||
#endif
|
||||
unsigned input_touch_scale;
|
||||
unsigned input_hotkey_block_delay;
|
||||
unsigned input_quit_gamepad_combo;
|
||||
unsigned input_menu_toggle_gamepad_combo;
|
||||
unsigned input_keyboard_gamepad_mapping_type;
|
||||
unsigned input_poll_type_behavior;
|
||||
unsigned input_dingux_rumble_gain;
|
||||
unsigned input_rumble_gain;
|
||||
unsigned input_auto_game_focus;
|
||||
unsigned input_max_users;
|
||||
|
||||
@@ -318,6 +350,9 @@ typedef struct settings
|
||||
float video_msg_color_g;
|
||||
float video_msg_color_b;
|
||||
float video_msg_bgcolor_opacity;
|
||||
float video_hdr_max_nits;
|
||||
float video_hdr_paper_white_nits;
|
||||
float video_hdr_display_contrast;
|
||||
|
||||
float menu_scale_factor;
|
||||
float menu_widget_scale_factor;
|
||||
@@ -526,6 +561,8 @@ typedef struct settings
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
bool video_layout_enable;
|
||||
#endif
|
||||
bool video_hdr_enable;
|
||||
bool video_hdr_expand_gamut;
|
||||
|
||||
/* Accessibility */
|
||||
bool accessibility_enable;
|
||||
@@ -1049,6 +1086,27 @@ const char *config_get_all_timezones(void);
|
||||
void config_set_timezone(char *timezone);
|
||||
#endif
|
||||
|
||||
bool input_config_bind_map_get_valid(unsigned bind_index);
|
||||
|
||||
void input_config_parse_joy_button(
|
||||
char *s,
|
||||
void *data, const char *prefix,
|
||||
const char *btn, void *bind_data);
|
||||
|
||||
void input_config_parse_joy_axis(
|
||||
char *s,
|
||||
void *conf_data, const char *prefix,
|
||||
const char *axis, void *bind_data);
|
||||
|
||||
void input_config_parse_mouse_button(
|
||||
char *s,
|
||||
void *conf_data, const char *prefix,
|
||||
const char *btn, void *bind_data);
|
||||
|
||||
const char *input_config_get_prefix(unsigned user, bool meta);
|
||||
|
||||
extern const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL];
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -45,12 +45,24 @@ bool content_load_ram_file(unsigned slot);
|
||||
/* Save a RAM state from memory to disk. */
|
||||
bool content_save_ram_file(unsigned slot, bool compress);
|
||||
|
||||
/* Load a state from memory. */
|
||||
bool content_load_state_from_ram(void);
|
||||
|
||||
/* Save a state to memory. */
|
||||
bool content_save_state_to_ram(void);
|
||||
|
||||
/* Save a ram state from memory to disk. */
|
||||
bool content_ram_state_to_file(const char *path);
|
||||
|
||||
/* Load a state from disk to memory. */
|
||||
bool content_load_state(const char* path, bool load_to_backup_buffer, bool autoload);
|
||||
|
||||
/* Save a state from memory to disk. */
|
||||
bool content_save_state(const char *path, bool save_to_disk, bool autosave);
|
||||
|
||||
/* Check a ram state write to disk. */
|
||||
bool content_ram_state_pending(void);
|
||||
|
||||
/* Gets the number of bytes required to serialize the state. */
|
||||
size_t content_get_serialized_size(void);
|
||||
|
||||
|
||||
@@ -23,130 +23,10 @@
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "core_type.h"
|
||||
#include "input/input_defines.h"
|
||||
#include "disk_control_interface.h"
|
||||
#include "retroarch_types.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum
|
||||
{
|
||||
/* Polling is performed before
|
||||
* call to retro_run. */
|
||||
POLL_TYPE_EARLY = 0,
|
||||
|
||||
/* Polling is performed when requested. */
|
||||
POLL_TYPE_NORMAL,
|
||||
|
||||
/* Polling is performed on first call to
|
||||
* retro_input_state per frame. */
|
||||
POLL_TYPE_LATE
|
||||
};
|
||||
|
||||
typedef struct rarch_memory_descriptor
|
||||
{
|
||||
struct retro_memory_descriptor core; /* uint64_t alignment */
|
||||
size_t disconnect_mask;
|
||||
} rarch_memory_descriptor_t;
|
||||
|
||||
typedef struct rarch_memory_map
|
||||
{
|
||||
rarch_memory_descriptor_t *descriptors;
|
||||
unsigned num_descriptors;
|
||||
} rarch_memory_map_t;
|
||||
|
||||
typedef struct rarch_system_info
|
||||
{
|
||||
struct retro_location_callback location_cb; /* ptr alignment */
|
||||
disk_control_interface_t disk_control; /* ptr alignment */
|
||||
struct retro_system_info info; /* ptr alignment */
|
||||
rarch_memory_map_t mmaps; /* ptr alignment */
|
||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||
struct
|
||||
{
|
||||
struct retro_subsystem_info *data;
|
||||
unsigned size;
|
||||
} subsystem;
|
||||
struct
|
||||
{
|
||||
struct retro_controller_info *data;
|
||||
unsigned size;
|
||||
} ports;
|
||||
unsigned rotation;
|
||||
unsigned performance_level;
|
||||
char valid_extensions[255];
|
||||
bool load_no_content;
|
||||
bool supports_vfs;
|
||||
} rarch_system_info_t;
|
||||
|
||||
typedef struct retro_ctx_input_state_info
|
||||
{
|
||||
retro_input_state_t cb;
|
||||
} retro_ctx_input_state_info_t;
|
||||
|
||||
typedef struct retro_ctx_cheat_info
|
||||
{
|
||||
const char *code;
|
||||
unsigned index;
|
||||
bool enabled;
|
||||
} retro_ctx_cheat_info_t;
|
||||
|
||||
typedef struct retro_ctx_api_info
|
||||
{
|
||||
unsigned version;
|
||||
} retro_ctx_api_info_t;
|
||||
|
||||
typedef struct retro_ctx_region_info
|
||||
{
|
||||
unsigned region;
|
||||
} retro_ctx_region_info_t;
|
||||
|
||||
typedef struct retro_ctx_controller_info
|
||||
{
|
||||
unsigned port;
|
||||
unsigned device;
|
||||
} retro_ctx_controller_info_t;
|
||||
|
||||
typedef struct retro_ctx_memory_info
|
||||
{
|
||||
void *data;
|
||||
size_t size;
|
||||
unsigned id;
|
||||
} retro_ctx_memory_info_t;
|
||||
|
||||
typedef struct retro_ctx_load_content_info
|
||||
{
|
||||
struct retro_game_info *info;
|
||||
const struct string_list *content;
|
||||
const struct retro_subsystem_info *special;
|
||||
} retro_ctx_load_content_info_t;
|
||||
|
||||
typedef struct retro_ctx_serialize_info
|
||||
{
|
||||
const void *data_const;
|
||||
void *data;
|
||||
size_t size;
|
||||
} retro_ctx_serialize_info_t;
|
||||
|
||||
typedef struct retro_ctx_size_info
|
||||
{
|
||||
size_t size;
|
||||
} retro_ctx_size_info_t;
|
||||
|
||||
typedef struct retro_ctx_environ_info
|
||||
{
|
||||
retro_environment_t env;
|
||||
} retro_ctx_environ_info_t;
|
||||
|
||||
typedef struct retro_callbacks
|
||||
{
|
||||
retro_video_refresh_t frame_cb;
|
||||
retro_audio_sample_t sample_cb;
|
||||
retro_audio_sample_batch_t sample_batch_cb;
|
||||
retro_input_state_t state_cb;
|
||||
retro_input_poll_t poll_cb;
|
||||
} retro_callbacks_t;
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
bool core_set_rewind_callbacks(void);
|
||||
#endif
|
||||
|
||||
+7
-5
@@ -152,7 +152,7 @@ bool core_backup_get_backup_path(
|
||||
|
||||
/* Generate backup filename */
|
||||
snprintf(backup_filename, sizeof(backup_filename),
|
||||
"%s.%04u%02u%02uT%02u%02u%02u.%08x.%u%s",
|
||||
"%s.%04u%02u%02uT%02u%02u%02u.%08lx.%u%s",
|
||||
core_filename,
|
||||
(unsigned)time_info.tm_year + 1900,
|
||||
(unsigned)time_info.tm_mon + 1,
|
||||
@@ -160,7 +160,7 @@ bool core_backup_get_backup_path(
|
||||
(unsigned)time_info.tm_hour,
|
||||
(unsigned)time_info.tm_min,
|
||||
(unsigned)time_info.tm_sec,
|
||||
crc,
|
||||
(unsigned long)crc,
|
||||
(unsigned)backup_mode,
|
||||
FILE_PATH_CORE_BACKUP_EXTENSION);
|
||||
|
||||
@@ -423,6 +423,7 @@ static bool core_backup_add_entry(core_backup_list_t *backup_list,
|
||||
{
|
||||
char *backup_filename = NULL;
|
||||
core_backup_list_entry_t *entry = NULL;
|
||||
unsigned long crc = 0;
|
||||
unsigned backup_mode = 0;
|
||||
|
||||
if (!backup_list ||
|
||||
@@ -449,12 +450,13 @@ static bool core_backup_add_entry(core_backup_list_t *backup_list,
|
||||
entry = &backup_list->entries[backup_list->size];
|
||||
|
||||
if (sscanf(backup_filename + strlen(core_filename),
|
||||
".%04u%02u%02uT%02u%02u%02u.%08x.%u",
|
||||
".%04u%02u%02uT%02u%02u%02u.%08lx.%u",
|
||||
&entry->date.year, &entry->date.month, &entry->date.day,
|
||||
&entry->date.hour, &entry->date.minute, &entry->date.second,
|
||||
&entry->crc, &backup_mode) != 8)
|
||||
&crc, &backup_mode) != 8)
|
||||
goto error;
|
||||
|
||||
entry->crc = (uint32_t)crc;
|
||||
entry->backup_mode = (enum core_backup_mode)backup_mode;
|
||||
|
||||
/* Cache backup path */
|
||||
@@ -748,6 +750,6 @@ bool core_backup_list_get_entry_crc_str(
|
||||
if (!entry || (len < 9))
|
||||
return false;
|
||||
|
||||
snprintf(crc, len, "%08x", entry->crc);
|
||||
snprintf(crc, len, "%08lx", (unsigned long)entry->crc);
|
||||
return true;
|
||||
}
|
||||
+40
-22
@@ -81,12 +81,22 @@ typedef struct
|
||||
static void core_info_free(core_info_t* info);
|
||||
static uint32_t core_info_hash_string(const char *str);
|
||||
static core_info_cache_list_t *core_info_cache_list_new(void);
|
||||
static void core_info_cache_add(core_info_cache_list_t *list, core_info_t *info,
|
||||
bool transfer);
|
||||
static void core_info_cache_add(core_info_cache_list_t *list,
|
||||
core_info_t *info, bool transfer);
|
||||
|
||||
static core_info_state_t core_info_st = {
|
||||
#ifdef HAVE_COMPRESSION
|
||||
NULL,
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* JSON Handlers START */
|
||||
|
||||
static bool CCJSONObjectMemberHandler(void *context, const char *pValue, size_t length)
|
||||
static bool CCJSONObjectMemberHandler(void *context,
|
||||
const char *pValue, size_t length)
|
||||
{
|
||||
CCJSONContext *pCtx = (CCJSONContext *)context;
|
||||
|
||||
@@ -223,7 +233,8 @@ static bool CCJSONObjectMemberHandler(void *context, const char *pValue, size_t
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool CCJSONStringHandler(void *context, const char *pValue, size_t length)
|
||||
static bool CCJSONStringHandler(void *context,
|
||||
const char *pValue, size_t length)
|
||||
{
|
||||
CCJSONContext *pCtx = (CCJSONContext*)context;
|
||||
|
||||
@@ -247,7 +258,8 @@ static bool CCJSONStringHandler(void *context, const char *pValue, size_t length
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool CCJSONNumberHandler(void *context, const char *pValue, size_t length)
|
||||
static bool CCJSONNumberHandler(void *context,
|
||||
const char *pValue, size_t length)
|
||||
{
|
||||
CCJSONContext *pCtx = (CCJSONContext*)context;
|
||||
|
||||
@@ -1803,6 +1815,7 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
core_info_list->list = core_info;
|
||||
core_info_list->count = path_list->core_list->size;
|
||||
|
||||
#ifdef HAVE_CORE_INFO_CACHE
|
||||
/* Read core info cache, if enabled */
|
||||
if (enable_cache)
|
||||
{
|
||||
@@ -1810,6 +1823,7 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
if (!core_info_cache_list)
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < path_list->core_list->size; i++)
|
||||
{
|
||||
@@ -1977,7 +1991,7 @@ static bool core_info_does_support_file(
|
||||
|
||||
static int core_info_qsort_cmp(const void *a_, const void *b_)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
const core_info_t *a = (const core_info_t*)a_;
|
||||
const core_info_t *b = (const core_info_t*)b_;
|
||||
int support_a = core_info_does_support_file(a,
|
||||
@@ -2031,8 +2045,9 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
return true;
|
||||
}
|
||||
|
||||
void core_info_free_current_core(core_info_state_t *p_coreinfo)
|
||||
void core_info_free_current_core(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (p_coreinfo->current)
|
||||
free(p_coreinfo->current);
|
||||
p_coreinfo->current = NULL;
|
||||
@@ -2040,7 +2055,7 @@ void core_info_free_current_core(core_info_state_t *p_coreinfo)
|
||||
|
||||
bool core_info_init_current_core(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
core_info_t *current = (core_info_t*)
|
||||
malloc(sizeof(*current));
|
||||
if (!current)
|
||||
@@ -2085,7 +2100,7 @@ bool core_info_init_current_core(void)
|
||||
|
||||
bool core_info_get_current_core(core_info_t **core)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (!core)
|
||||
return false;
|
||||
*core = p_coreinfo->current;
|
||||
@@ -2094,7 +2109,7 @@ bool core_info_get_current_core(core_info_t **core)
|
||||
|
||||
void core_info_deinit_list(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (p_coreinfo->curr_list)
|
||||
core_info_list_free(p_coreinfo->curr_list);
|
||||
p_coreinfo->curr_list = NULL;
|
||||
@@ -2104,9 +2119,12 @@ bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool dir_show_hidden_files,
|
||||
bool enable_cache, bool *cache_supported)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
if (!(p_coreinfo->curr_list = core_info_list_new(dir_cores,
|
||||
!string_is_empty(path_info) ? path_info : dir_cores,
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (!(p_coreinfo->curr_list = core_info_list_new(
|
||||
dir_cores,
|
||||
!string_is_empty(path_info)
|
||||
? path_info
|
||||
: dir_cores,
|
||||
exts,
|
||||
dir_show_hidden_files,
|
||||
enable_cache,
|
||||
@@ -2117,7 +2135,7 @@ bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
|
||||
bool core_info_get_list(core_info_list_t **core)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (!core)
|
||||
return false;
|
||||
*core = p_coreinfo->curr_list;
|
||||
@@ -2127,7 +2145,7 @@ bool core_info_get_list(core_info_list_t **core)
|
||||
/* Returns number of installed cores */
|
||||
size_t core_info_count(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (!p_coreinfo || !p_coreinfo->curr_list)
|
||||
return 0;
|
||||
return p_coreinfo->curr_list->count;
|
||||
@@ -2136,7 +2154,7 @@ size_t core_info_count(void)
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool *set_missing_bios)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
if (!info)
|
||||
return false;
|
||||
return core_info_list_update_missing_firmware_internal(
|
||||
@@ -2145,9 +2163,9 @@ bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
set_missing_bios);
|
||||
}
|
||||
|
||||
bool core_info_load(const char *core_path,
|
||||
core_info_state_t *p_coreinfo)
|
||||
bool core_info_load(const char *core_path)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
core_info_t *core_info = NULL;
|
||||
|
||||
if (!p_coreinfo->current)
|
||||
@@ -2168,7 +2186,7 @@ bool core_info_load(const char *core_path,
|
||||
bool core_info_find(const char *core_path,
|
||||
core_info_t **core_info)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
core_info_t *info = NULL;
|
||||
|
||||
if (!core_info || !p_coreinfo->curr_list)
|
||||
@@ -2204,7 +2222,7 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
|
||||
#ifdef HAVE_COMPRESSION
|
||||
struct string_list *list = NULL;
|
||||
#endif
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
|
||||
if (!core_info_list)
|
||||
return;
|
||||
@@ -2287,7 +2305,7 @@ bool core_info_database_match_archive_member(const char *database_path)
|
||||
|
||||
path_remove_extension(database);
|
||||
|
||||
p_coreinfo = coreinfo_get_ptr();
|
||||
p_coreinfo = &core_info_st;
|
||||
|
||||
if (p_coreinfo->curr_list)
|
||||
{
|
||||
@@ -2326,7 +2344,7 @@ bool core_info_database_supports_content_path(
|
||||
|
||||
path_remove_extension(database);
|
||||
|
||||
p_coreinfo = coreinfo_get_ptr();
|
||||
p_coreinfo = &core_info_st;
|
||||
|
||||
if (p_coreinfo->curr_list)
|
||||
{
|
||||
|
||||
+2
-5
@@ -148,7 +148,7 @@ void core_info_free_core_updater_info(core_updater_info_t *info);
|
||||
|
||||
core_info_t *core_info_get(core_info_list_t *list, size_t i);
|
||||
|
||||
void core_info_free_current_core(core_info_state_t *p_coreinfo);
|
||||
void core_info_free_current_core(void);
|
||||
|
||||
bool core_info_init_current_core(void);
|
||||
|
||||
@@ -171,8 +171,7 @@ bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool core_info_find(const char *core_path,
|
||||
core_info_t **core_info);
|
||||
|
||||
bool core_info_load(const char *core_path,
|
||||
core_info_state_t *p_coreinfo);
|
||||
bool core_info_load(const char *core_path);
|
||||
|
||||
bool core_info_database_supports_content_path(const char *database_path, const char *path);
|
||||
|
||||
@@ -201,8 +200,6 @@ bool core_info_set_core_lock(const char *core_path, bool lock);
|
||||
* must be checked externally */
|
||||
bool core_info_get_core_lock(const char *core_path, bool validate_path);
|
||||
|
||||
core_info_state_t *coreinfo_get_ptr(void);
|
||||
|
||||
bool core_info_core_file_id_is_equal(const char *core_path_a, const char *core_path_b);
|
||||
|
||||
/* When called, generates a temporary file
|
||||
|
||||
+82
-6
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include "core_option_manager.h"
|
||||
#include "msg_hash.h"
|
||||
|
||||
#define CORE_OPTION_MANAGER_MAP_TAG "#"
|
||||
#define CORE_OPTION_MANAGER_MAP_DELIM ":"
|
||||
@@ -725,13 +726,20 @@ static bool core_option_manager_parse_variable(
|
||||
if (!option->val_labels)
|
||||
goto error;
|
||||
|
||||
/* > Loop over values and 'extract' labels */
|
||||
/* > Loop over values and:
|
||||
* - Set value hashes
|
||||
* - 'Extract' labels */
|
||||
for (i = 0; i < option->vals->size; i++)
|
||||
{
|
||||
const char *value = option->vals->elems[i].data;
|
||||
uint32_t *value_hash = (uint32_t *)malloc(sizeof(uint32_t));
|
||||
const char *value_label = core_option_manager_parse_value_label(
|
||||
value, NULL);
|
||||
|
||||
/* Set value hash */
|
||||
*value_hash = core_option_manager_hash_string(value);
|
||||
option->vals->elems[i].userdata = (void*)value_hash;
|
||||
|
||||
/* Redundant safely check... */
|
||||
value_label = string_is_empty(value_label) ?
|
||||
value : value_label;
|
||||
@@ -753,9 +761,15 @@ static bool core_option_manager_parse_variable(
|
||||
/* Set current config value */
|
||||
if (entry && !string_is_empty(entry->value))
|
||||
{
|
||||
uint32_t entry_value_hash = core_option_manager_hash_string(entry->value);
|
||||
|
||||
for (i = 0; i < option->vals->size; i++)
|
||||
{
|
||||
if (string_is_equal(option->vals->elems[i].data, entry->value))
|
||||
const char *value = option->vals->elems[i].data;
|
||||
uint32_t value_hash = *((uint32_t*)option->vals->elems[i].userdata);
|
||||
|
||||
if ((value_hash == entry_value_hash) &&
|
||||
string_is_equal(value, entry->value))
|
||||
{
|
||||
option->index = i;
|
||||
break;
|
||||
@@ -998,12 +1012,17 @@ static bool core_option_manager_parse_option(
|
||||
for (i = 0; i < num_vals; i++)
|
||||
{
|
||||
const char *value = values[i].value;
|
||||
uint32_t *value_hash = (uint32_t *)malloc(sizeof(uint32_t));
|
||||
const char *value_label = values[i].label;
|
||||
|
||||
/* Append value string
|
||||
* > We know that 'value' is always valid */
|
||||
string_list_append(option->vals, value, attr);
|
||||
|
||||
/* > Set value hash */
|
||||
*value_hash = core_option_manager_hash_string(value);
|
||||
option->vals->elems[option->vals->size - 1].userdata = (void*)value_hash;
|
||||
|
||||
/* Value label requires additional processing */
|
||||
value_label = core_option_manager_parse_value_label(
|
||||
value, value_label);
|
||||
@@ -1034,9 +1053,15 @@ static bool core_option_manager_parse_option(
|
||||
/* Set current config value */
|
||||
if (entry && !string_is_empty(entry->value))
|
||||
{
|
||||
uint32_t entry_value_hash = core_option_manager_hash_string(entry->value);
|
||||
|
||||
for (i = 0; i < option->vals->size; i++)
|
||||
{
|
||||
if (string_is_equal(option->vals->elems[i].data, entry->value))
|
||||
const char *value = option->vals->elems[i].data;
|
||||
uint32_t value_hash = *((uint32_t*)option->vals->elems[i].userdata);
|
||||
|
||||
if ((value_hash == entry_value_hash) &&
|
||||
string_is_equal(value, entry->value))
|
||||
{
|
||||
option->index = i;
|
||||
break;
|
||||
@@ -1479,6 +1504,57 @@ bool core_option_manager_get_idx(core_option_manager_t *opt,
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* core_option_manager_get_val_idx:
|
||||
*
|
||||
* @opt : options manager handle
|
||||
* @idx : core option index
|
||||
* @val : string representation of the
|
||||
* core option value
|
||||
* @val_idx : index of core option value
|
||||
* corresponding to @val
|
||||
*
|
||||
* Fetches the index of the core option value
|
||||
* identified by the specified core option @idx
|
||||
* and @val string.
|
||||
*
|
||||
* Returns: true if option value matching the
|
||||
* specified option index and value string
|
||||
* was found, otherwise false.
|
||||
**/
|
||||
bool core_option_manager_get_val_idx(core_option_manager_t *opt,
|
||||
size_t idx, const char *val, size_t *val_idx)
|
||||
{
|
||||
struct core_option *option = NULL;
|
||||
uint32_t val_hash;
|
||||
size_t i;
|
||||
|
||||
if (!opt ||
|
||||
(idx >= opt->size) ||
|
||||
string_is_empty(val) ||
|
||||
!val_idx)
|
||||
return false;
|
||||
|
||||
val_hash = core_option_manager_hash_string(val);
|
||||
option = (struct core_option*)&opt->opts[idx];
|
||||
|
||||
for (i = 0; i < option->vals->size; i++)
|
||||
{
|
||||
const char *option_val = option->vals->elems[i].data;
|
||||
uint32_t option_val_hash = *((uint32_t*)option->vals->elems[i].userdata);
|
||||
|
||||
if ((val_hash == option_val_hash) &&
|
||||
!string_is_empty(option_val) &&
|
||||
string_is_equal(val, option_val))
|
||||
{
|
||||
*val_idx = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* core_option_manager_get_desc:
|
||||
*
|
||||
@@ -1678,7 +1754,7 @@ void core_option_manager_set_val(core_option_manager_t *opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
@@ -1730,7 +1806,7 @@ void core_option_manager_adjust_val(core_option_manager_t* opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
@@ -1776,7 +1852,7 @@ void core_option_manager_set_default(core_option_manager_t *opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
|
||||
+24
-1
@@ -23,8 +23,10 @@
|
||||
#include <retro_common_api.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <lists/nested_list.h>
|
||||
#include <file/config_file.h>
|
||||
#include <libretro.h>
|
||||
|
||||
#include "retroarch.h"
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
@@ -278,6 +280,27 @@ bool core_option_manager_get_category_visible(core_option_manager_t *opt,
|
||||
bool core_option_manager_get_idx(core_option_manager_t *opt,
|
||||
const char *key, size_t *idx);
|
||||
|
||||
/**
|
||||
* core_option_manager_get_val_idx:
|
||||
*
|
||||
* @opt : options manager handle
|
||||
* @idx : core option index
|
||||
* @val : string representation of the
|
||||
* core option value
|
||||
* @val_idx : index of core option value
|
||||
* corresponding to @val
|
||||
*
|
||||
* Fetches the index of the core option value
|
||||
* identified by the specified core option @idx
|
||||
* and @val string.
|
||||
*
|
||||
* Returns: true if option value matching the
|
||||
* specified option index and value string
|
||||
* was found, otherwise false.
|
||||
**/
|
||||
bool core_option_manager_get_val_idx(core_option_manager_t *opt,
|
||||
size_t idx, const char *val, size_t *val_idx);
|
||||
|
||||
/**
|
||||
* core_option_manager_get_desc:
|
||||
*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+23
-25
@@ -149,31 +149,29 @@ int _FAT_open_r (struct _reent *r, void *fileStruct, const char *path, int flags
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Determine which mode the file is openned for */
|
||||
if ((flags & 0x03) == O_RDONLY)
|
||||
{
|
||||
/* Open the file for read-only access */
|
||||
file->read = true;
|
||||
file->write = false;
|
||||
file->append = false;
|
||||
}
|
||||
else if ((flags & 0x03) == O_WRONLY)
|
||||
{
|
||||
/* Open file for write only access */
|
||||
file->read = false;
|
||||
file->write = true;
|
||||
file->append = false;
|
||||
}
|
||||
else if ((flags & 0x03) == O_RDWR)
|
||||
{
|
||||
/* Open file for read/write access */
|
||||
file->read = true;
|
||||
file->write = true;
|
||||
file->append = false;
|
||||
} else {
|
||||
r->_errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
switch((flags & 0x03)) {
|
||||
case O_RDONLY:
|
||||
/* Open the file for read-only access */
|
||||
file->read = true;
|
||||
file->write = false;
|
||||
file->append = false;
|
||||
break;
|
||||
case O_WRONLY:
|
||||
/* Open file for write only access */
|
||||
file->read = false;
|
||||
file->write = true;
|
||||
file->append = false;
|
||||
break;
|
||||
case O_RDWR:
|
||||
/* Open file for read/write access */
|
||||
file->read = true;
|
||||
file->write = true;
|
||||
file->append = false;
|
||||
break;
|
||||
default:
|
||||
r->_errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Make sure we aren't trying to write to a read-only disc */
|
||||
if (file->write && partition->readOnly)
|
||||
|
||||
Vendored
+21
@@ -1,3 +1,24 @@
|
||||
# v10.2.0
|
||||
|
||||
* add RC_MEMSIZE_16_BITS_BE, RC_MEMSIZE_24_BITS_BE, and RC_MEMSIZE_32_BITS_BE
|
||||
* add secondary flag for RC_CONDITION_MEASURED that tells the UI when to show progress as raw vs. as a percentage
|
||||
* add rapi calls for fetch_leaderboard_info, fetch_achievement_info and fetch_game_list
|
||||
* add hash support for RC_CONSOLE_PSP
|
||||
* add RCHEEVOS_URL_SSL compile flag to use https in rurl functions
|
||||
* add space to "PC Engine" label
|
||||
* update RC_CONSOLE_INTELLIVISION memory map to acknowledge non-8-bit addresses
|
||||
* standardize to z64 format when hashing RC_CONSOLE_N64
|
||||
* prevent generating hash for PSX disc when requesting RC_CONSOLE_PLAYSTATION2
|
||||
* fix wrong error message being returned when a leaderboard was only slightly malformed
|
||||
|
||||
# v10.1.0
|
||||
|
||||
* add RC_RUNTIME_EVENT_ACHIEVEMENT_UNPRIMED
|
||||
* add rc_runtime_validate_addresses
|
||||
* add external memory to memory map for Magnavox Odyssey 2
|
||||
* fix memory map base address for NeoGeo Pocket
|
||||
* fix bitcount always returning 0 when used in rich presence
|
||||
|
||||
# v10.0.0
|
||||
|
||||
* add rapi sublibrary for communicating with server (eliminates need for client-side JSON parsing; client must still
|
||||
|
||||
Vendored
+182
@@ -0,0 +1,182 @@
|
||||
#ifndef RC_API_INFO_H
|
||||
#define RC_API_INFO_H
|
||||
|
||||
#include "rc_api_request.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* --- Fetch Achievement Info --- */
|
||||
|
||||
/**
|
||||
* API parameters for a fetch achievement info request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_achievement_info_request_t {
|
||||
/* The username of the player */
|
||||
const char* username;
|
||||
/* The API token from the login request */
|
||||
const char* api_token;
|
||||
/* The unique identifier of the achievement */
|
||||
unsigned achievement_id;
|
||||
/* The 1-based index of the first entry to retrieve */
|
||||
unsigned first_entry;
|
||||
/* The number of entries to retrieve */
|
||||
unsigned count;
|
||||
/* Non-zero to only return unlocks earned by the user's friends */
|
||||
unsigned friends_only;
|
||||
}
|
||||
rc_api_fetch_achievement_info_request_t;
|
||||
|
||||
/* An achievement awarded entry */
|
||||
typedef struct rc_api_achievement_awarded_entry_t {
|
||||
/* The user associated to the entry */
|
||||
const char* username;
|
||||
/* When the achievement was awarded */
|
||||
time_t awarded;
|
||||
}
|
||||
rc_api_achievement_awarded_entry_t;
|
||||
|
||||
/**
|
||||
* Response data for a fetch achievement info request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_achievement_info_response_t {
|
||||
/* The unique identifier of the achievement */
|
||||
unsigned id;
|
||||
/* The unique identifier of the game to which the leaderboard is associated */
|
||||
unsigned game_id;
|
||||
/* The number of times the achievement has been awarded */
|
||||
unsigned num_awarded;
|
||||
/* The number of players that have earned at least one achievement for the game */
|
||||
unsigned num_players;
|
||||
|
||||
/* An array of recently rewarded entries */
|
||||
rc_api_achievement_awarded_entry_t* recently_awarded;
|
||||
/* The number of items in the recently_awarded array */
|
||||
unsigned num_recently_awarded;
|
||||
|
||||
/* Common server-provided response information */
|
||||
rc_api_response_t response;
|
||||
}
|
||||
rc_api_fetch_achievement_info_response_t;
|
||||
|
||||
int rc_api_init_fetch_achievement_info_request(rc_api_request_t* request, const rc_api_fetch_achievement_info_request_t* api_params);
|
||||
int rc_api_process_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response, const char* server_response);
|
||||
void rc_api_destroy_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response);
|
||||
|
||||
/* --- Fetch Leaderboard Info --- */
|
||||
|
||||
/**
|
||||
* API parameters for a fetch leaderboard info request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_leaderboard_info_request_t {
|
||||
/* The unique identifier of the leaderboard */
|
||||
unsigned leaderboard_id;
|
||||
/* The number of entries to retrieve */
|
||||
unsigned count;
|
||||
/* The 1-based index of the first entry to retrieve */
|
||||
unsigned first_entry;
|
||||
/* The username of the player around whom the entries should be returned */
|
||||
const char* username;
|
||||
}
|
||||
rc_api_fetch_leaderboard_info_request_t;
|
||||
|
||||
/* A leaderboard info entry */
|
||||
typedef struct rc_api_lboard_info_entry_t {
|
||||
/* The user associated to the entry */
|
||||
const char* username;
|
||||
/* The rank of the entry */
|
||||
unsigned rank;
|
||||
/* The index of the entry */
|
||||
unsigned index;
|
||||
/* The value of the entry */
|
||||
int score;
|
||||
/* When the entry was submitted */
|
||||
time_t submitted;
|
||||
}
|
||||
rc_api_lboard_info_entry_t;
|
||||
|
||||
/**
|
||||
* Response data for a fetch leaderboard info request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_leaderboard_info_response_t {
|
||||
/* The unique identifier of the leaderboard */
|
||||
unsigned id;
|
||||
/* The format to pass to rc_format_value to format the leaderboard value */
|
||||
int format;
|
||||
/* If non-zero, indicates that lower scores appear first */
|
||||
int lower_is_better;
|
||||
/* The title of the leaderboard */
|
||||
const char* title;
|
||||
/* The description of the leaderboard */
|
||||
const char* description;
|
||||
/* The definition of the leaderboard to be passed to rc_runtime_activate_lboard */
|
||||
const char* definition;
|
||||
/* The unique identifier of the game to which the leaderboard is associated */
|
||||
unsigned game_id;
|
||||
/* The author of the leaderboard */
|
||||
const char* author;
|
||||
/* When the leaderboard was first uploaded to the server */
|
||||
time_t created;
|
||||
/* When the leaderboard was last modified on the server */
|
||||
time_t updated;
|
||||
|
||||
/* An array of requested entries */
|
||||
rc_api_lboard_info_entry_t* entries;
|
||||
/* The number of items in the entries array */
|
||||
unsigned num_entries;
|
||||
|
||||
/* Common server-provided response information */
|
||||
rc_api_response_t response;
|
||||
}
|
||||
rc_api_fetch_leaderboard_info_response_t;
|
||||
|
||||
int rc_api_init_fetch_leaderboard_info_request(rc_api_request_t* request, const rc_api_fetch_leaderboard_info_request_t* api_params);
|
||||
int rc_api_process_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response, const char* server_response);
|
||||
void rc_api_destroy_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response);
|
||||
|
||||
/* --- Fetch Games List --- */
|
||||
|
||||
/**
|
||||
* API parameters for a fetch games list request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_games_list_request_t {
|
||||
/* The unique identifier of the console to query */
|
||||
unsigned console_id;
|
||||
}
|
||||
rc_api_fetch_games_list_request_t;
|
||||
|
||||
/* A game list entry */
|
||||
typedef struct rc_api_game_list_entry_t {
|
||||
/* The unique identifier of the game */
|
||||
unsigned id;
|
||||
/* The name of the game */
|
||||
const char* name;
|
||||
}
|
||||
rc_api_game_list_entry_t;
|
||||
|
||||
/**
|
||||
* Response data for a fetch games list request.
|
||||
*/
|
||||
typedef struct rc_api_fetch_games_list_response_t {
|
||||
/* An array of requested entries */
|
||||
rc_api_game_list_entry_t* entries;
|
||||
/* The number of items in the entries array */
|
||||
unsigned num_entries;
|
||||
|
||||
/* Common server-provided response information */
|
||||
rc_api_response_t response;
|
||||
}
|
||||
rc_api_fetch_games_list_response_t;
|
||||
|
||||
int rc_api_init_fetch_games_list_request(rc_api_request_t* request, const rc_api_fetch_games_list_request_t* api_params);
|
||||
int rc_api_process_fetch_games_list_response(rc_api_fetch_games_list_response_t* response, const char* server_response);
|
||||
void rc_api_destroy_fetch_games_list_response(rc_api_fetch_games_list_response_t* response);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RC_API_INFO_H */
|
||||
+2
-2
@@ -36,9 +36,9 @@ int rc_api_init_fetch_image_request(rc_api_request_t* request, const rc_api_fetc
|
||||
* API parameters for a resolve hash request.
|
||||
*/
|
||||
typedef struct rc_api_resolve_hash_request_t {
|
||||
/* The username of the player */
|
||||
/* Unused - hash lookup does not require credentials */
|
||||
const char* username;
|
||||
/* The API token from the login request */
|
||||
/* Unused - hash lookup does not require credentials */
|
||||
const char* api_token;
|
||||
/* The generated hash of the game to be identified */
|
||||
const char* game_hash;
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ extern "C" {
|
||||
/* generates a hash from a block of memory.
|
||||
* returns non-zero on success, or zero on failure.
|
||||
*/
|
||||
int rc_hash_generate_from_buffer(char hash[33], int console_id, uint8_t* buffer, size_t buffer_size);
|
||||
int rc_hash_generate_from_buffer(char hash[33], int console_id, const uint8_t* buffer, size_t buffer_size);
|
||||
|
||||
/* generates a hash from a file.
|
||||
* returns non-zero on success, or zero on failure.
|
||||
|
||||
Vendored
+3
@@ -7,6 +7,8 @@ extern "C" {
|
||||
|
||||
#include "rc_error.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/*****************************************************************************\
|
||||
| Forward Declarations (defined in rc_runtime_types.h) |
|
||||
\*****************************************************************************/
|
||||
@@ -94,6 +96,7 @@ int rc_runtime_activate_achievement(rc_runtime_t* runtime, unsigned id, const ch
|
||||
void rc_runtime_deactivate_achievement(rc_runtime_t* runtime, unsigned id);
|
||||
rc_trigger_t* rc_runtime_get_achievement(const rc_runtime_t* runtime, unsigned id);
|
||||
int rc_runtime_get_achievement_measured(const rc_runtime_t* runtime, unsigned id, unsigned* measured_value, unsigned* measured_target);
|
||||
int rc_runtime_format_achievement_measured(const rc_runtime_t* runtime, unsigned id, char *buffer, size_t buffer_size);
|
||||
|
||||
int rc_runtime_activate_lboard(rc_runtime_t* runtime, unsigned id, const char* memaddr, lua_State* L, int funcs_idx);
|
||||
void rc_runtime_deactivate_lboard(rc_runtime_t* runtime, unsigned id);
|
||||
|
||||
+6
@@ -51,6 +51,9 @@ enum {
|
||||
RC_MEMSIZE_BIT_6,
|
||||
RC_MEMSIZE_BIT_7,
|
||||
RC_MEMSIZE_BITCOUNT,
|
||||
RC_MEMSIZE_16_BITS_BE,
|
||||
RC_MEMSIZE_24_BITS_BE,
|
||||
RC_MEMSIZE_32_BITS_BE,
|
||||
RC_MEMSIZE_VARIABLE
|
||||
};
|
||||
|
||||
@@ -255,6 +258,9 @@ struct rc_trigger_t {
|
||||
|
||||
/* True if at least one condition has a non-zero required hit count */
|
||||
char has_required_hits;
|
||||
|
||||
/* True if the measured value should be displayed as a percentage */
|
||||
char measured_as_percent;
|
||||
};
|
||||
|
||||
int rc_trigger_size(const char* memaddr);
|
||||
|
||||
Vendored
+3
@@ -11,6 +11,9 @@ int rc_url_award_cheevo(char* buffer, size_t size, const char* user_name, const
|
||||
|
||||
int rc_url_submit_lboard(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned lboard_id, int value);
|
||||
|
||||
int rc_url_get_lboard_entries(char* buffer, size_t size, unsigned lboard_id, unsigned first_index, unsigned count);
|
||||
int rc_url_get_lboard_entries_near_user(char* buffer, size_t size, unsigned lboard_id, const char* user_name, unsigned count);
|
||||
|
||||
int rc_url_get_gameid(char* buffer, size_t size, const char* hash);
|
||||
|
||||
int rc_url_get_patch(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned gameid);
|
||||
|
||||
+130
-49
@@ -20,7 +20,7 @@ static char* g_imagehost = NULL;
|
||||
|
||||
/* --- rc_json --- */
|
||||
|
||||
static int rc_json_parse_object(const char** json_ptr, rc_json_field_t* fields, size_t field_count);
|
||||
static int rc_json_parse_object(const char** json_ptr, rc_json_field_t* fields, size_t field_count, unsigned* fields_seen);
|
||||
static int rc_json_parse_array(const char** json_ptr, rc_json_field_t* field);
|
||||
|
||||
static int rc_json_parse_field(const char** json_ptr, rc_json_field_t* field) {
|
||||
@@ -68,7 +68,7 @@ static int rc_json_parse_field(const char** json_ptr, rc_json_field_t* field) {
|
||||
break;
|
||||
|
||||
case '{': /* object */
|
||||
result = rc_json_parse_object(json_ptr, NULL, 0);
|
||||
result = rc_json_parse_object(json_ptr, NULL, 0, &field->array_size);
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
@@ -127,13 +127,54 @@ static int rc_json_parse_array(const char** json_ptr, rc_json_field_t* field) {
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
static int rc_json_parse_object(const char** json_ptr, rc_json_field_t* fields, size_t field_count) {
|
||||
rc_json_field_t non_matching_field;
|
||||
rc_json_field_t* field;
|
||||
static int rc_json_get_next_field(rc_json_object_field_iterator_t* iterator) {
|
||||
const char* json = iterator->json;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
if (*json != '"')
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
iterator->field.name = ++json;
|
||||
while (*json != '"') {
|
||||
if (!*json)
|
||||
return RC_INVALID_JSON;
|
||||
++json;
|
||||
}
|
||||
iterator->name_len = json - iterator->field.name;
|
||||
++json;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
if (*json != ':')
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
++json;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
if (rc_json_parse_field(&json, &iterator->field) < 0)
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
iterator->json = json;
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
static int rc_json_parse_object(const char** json_ptr, rc_json_field_t* fields, size_t field_count, unsigned* fields_seen) {
|
||||
rc_json_object_field_iterator_t iterator;
|
||||
const char* json = *json_ptr;
|
||||
const char* key_start;
|
||||
size_t key_len;
|
||||
size_t i;
|
||||
unsigned num_fields = 0;
|
||||
int result;
|
||||
|
||||
if (fields_seen)
|
||||
*fields_seen = 0;
|
||||
|
||||
for (i = 0; i < field_count; ++i)
|
||||
fields[i].value_start = fields[i].value_end = NULL;
|
||||
@@ -147,61 +188,50 @@ static int rc_json_parse_object(const char** json_ptr, rc_json_field_t* fields,
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
memset(&iterator, 0, sizeof(iterator));
|
||||
iterator.json = json;
|
||||
|
||||
do
|
||||
{
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
result = rc_json_get_next_field(&iterator);
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
if (*json != '"')
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
key_start = ++json;
|
||||
while (*json != '"') {
|
||||
if (!*json)
|
||||
return RC_INVALID_JSON;
|
||||
++json;
|
||||
}
|
||||
key_len = json - key_start;
|
||||
++json;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
if (*json != ':')
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
++json;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
field = &non_matching_field;
|
||||
for (i = 0; i < field_count; ++i) {
|
||||
if (!fields[i].value_start && strncmp(fields[i].name, key_start, key_len) == 0 && fields[i].name[key_len] == '\0') {
|
||||
field = &fields[i];
|
||||
if (!fields[i].value_start && strncmp(fields[i].name, iterator.field.name, iterator.name_len) == 0 &&
|
||||
fields[i].name[iterator.name_len] == '\0') {
|
||||
fields[i].value_start = iterator.field.value_start;
|
||||
fields[i].value_end = iterator.field.value_end;
|
||||
fields[i].array_size = iterator.field.array_size;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (rc_json_parse_field(&json, field) < 0)
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
while (isspace((unsigned char)*json))
|
||||
++json;
|
||||
|
||||
if (*json != ',')
|
||||
++num_fields;
|
||||
if (*iterator.json != ',')
|
||||
break;
|
||||
|
||||
++json;
|
||||
++iterator.json;
|
||||
} while (1);
|
||||
|
||||
if (*json != '}')
|
||||
if (*iterator.json != '}')
|
||||
return RC_INVALID_JSON;
|
||||
|
||||
*json_ptr = ++json;
|
||||
if (fields_seen)
|
||||
*fields_seen = num_fields;
|
||||
|
||||
*json_ptr = ++iterator.json;
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
int rc_json_get_next_object_field(rc_json_object_field_iterator_t* iterator) {
|
||||
if (*iterator->json != ',' && *iterator->json != '{')
|
||||
return 0;
|
||||
|
||||
++iterator->json;
|
||||
return (rc_json_get_next_field(iterator) == RC_OK);
|
||||
}
|
||||
|
||||
int rc_json_parse_response(rc_api_response_t* response, const char* json, rc_json_field_t* fields, size_t field_count) {
|
||||
#ifndef NDEBUG
|
||||
if (field_count < 2)
|
||||
@@ -213,7 +243,7 @@ int rc_json_parse_response(rc_api_response_t* response, const char* json, rc_jso
|
||||
#endif
|
||||
|
||||
if (*json == '{') {
|
||||
int result = rc_json_parse_object(&json, fields, field_count);
|
||||
int result = rc_json_parse_object(&json, fields, field_count, NULL);
|
||||
|
||||
rc_json_get_optional_string(&response->error_message, response, &fields[1], "Error", NULL);
|
||||
rc_json_get_optional_bool(&response->succeeded, &fields[0], "Success", 1);
|
||||
@@ -266,11 +296,15 @@ static int rc_json_missing_field(rc_api_response_t* response, const rc_json_fiel
|
||||
|
||||
int rc_json_get_required_object(rc_json_field_t* fields, size_t field_count, rc_api_response_t* response, rc_json_field_t* field, const char* field_name) {
|
||||
const char* json = field->value_start;
|
||||
#ifndef NDEBUG
|
||||
if (strcmp(field->name, field_name) != 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (!json)
|
||||
return rc_json_missing_field(response, field);
|
||||
|
||||
return (rc_json_parse_object(&json, fields, field_count) == RC_OK);
|
||||
return (rc_json_parse_object(&json, fields, field_count, &field->array_size) == RC_OK);
|
||||
}
|
||||
|
||||
static int rc_json_get_array_entry_value(rc_json_field_t* field, rc_json_field_t* iterator) {
|
||||
@@ -322,6 +356,11 @@ int rc_json_get_required_unum_array(unsigned** entries, unsigned* num_entries, r
|
||||
}
|
||||
|
||||
int rc_json_get_required_array(unsigned* num_entries, rc_json_field_t* iterator, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name) {
|
||||
#ifndef NDEBUG
|
||||
if (strcmp(field->name, field_name) != 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (!field->value_start || *field->value_start != '[') {
|
||||
*num_entries = 0;
|
||||
return rc_json_missing_field(response, field);
|
||||
@@ -341,7 +380,7 @@ int rc_json_get_array_entry_object(rc_json_field_t* fields, size_t field_count,
|
||||
while (isspace((unsigned char)*iterator->value_start))
|
||||
++iterator->value_start;
|
||||
|
||||
rc_json_parse_object(&iterator->value_start, fields, field_count);
|
||||
rc_json_parse_object(&iterator->value_start, fields, field_count, NULL);
|
||||
|
||||
while (isspace((unsigned char)*iterator->value_start))
|
||||
++iterator->value_start;
|
||||
@@ -358,7 +397,7 @@ static unsigned rc_json_decode_hex4(const char* input) {
|
||||
memcpy(hex, input, 4);
|
||||
hex[4] = '\0';
|
||||
|
||||
return strtol(hex, NULL, 16);
|
||||
return (unsigned)strtoul(hex, NULL, 16);
|
||||
}
|
||||
|
||||
static int rc_json_ucs32_to_utf8(unsigned char* dst, unsigned ucs32_char) {
|
||||
@@ -604,6 +643,48 @@ int rc_json_get_required_unum(unsigned* out, rc_api_response_t* response, const
|
||||
return rc_json_missing_field(response, field);
|
||||
}
|
||||
|
||||
int rc_json_get_datetime(time_t* out, const rc_json_field_t* field, const char* field_name) {
|
||||
struct tm tm;
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (strcmp(field->name, field_name) != 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (*field->value_start == '\"') {
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
if (sscanf(field->value_start + 1, "%d-%d-%d %d:%d:%d",
|
||||
&tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) == 6) {
|
||||
tm.tm_mon--; /* 0-based */
|
||||
tm.tm_year -= 1900; /* 1900 based */
|
||||
|
||||
/* mktime converts a struct tm to a time_t using the local timezone.
|
||||
* the input string is UTC. since timegm is not universally cross-platform,
|
||||
* figure out the offset between UTC and local time by applying the
|
||||
* timezone conversion twice and manually removing the difference */
|
||||
{
|
||||
time_t local_timet = mktime(&tm);
|
||||
struct tm* gmt_tm = gmtime(&local_timet);
|
||||
time_t skewed_timet = mktime(gmt_tm); /* applies local time adjustment second time */
|
||||
time_t tz_offset = skewed_timet - local_timet;
|
||||
*out = local_timet - tz_offset;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
*out = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rc_json_get_required_datetime(time_t* out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name) {
|
||||
if (rc_json_get_datetime(out, field, field_name))
|
||||
return 1;
|
||||
|
||||
return rc_json_missing_field(response, field);
|
||||
}
|
||||
|
||||
int rc_json_get_bool(int* out, const rc_json_field_t* field, const char* field_name) {
|
||||
const char* src = field->value_start;
|
||||
|
||||
|
||||
+11
@@ -4,6 +4,7 @@
|
||||
#include "rc_api_request.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -30,11 +31,19 @@ typedef struct rc_json_field_t {
|
||||
}
|
||||
rc_json_field_t;
|
||||
|
||||
typedef struct rc_json_object_field_iterator_t {
|
||||
rc_json_field_t field;
|
||||
const char* json;
|
||||
size_t name_len;
|
||||
}
|
||||
rc_json_object_field_iterator_t;
|
||||
|
||||
int rc_json_parse_response(rc_api_response_t* response, const char* json, rc_json_field_t* fields, size_t field_count);
|
||||
int rc_json_get_string(const char** out, rc_api_buffer_t* buffer, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_num(int* out, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_unum(unsigned* out, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_bool(int* out, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_datetime(time_t* out, const rc_json_field_t* field, const char* field_name);
|
||||
void rc_json_get_optional_string(const char** out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name, const char* default_value);
|
||||
void rc_json_get_optional_num(int* out, const rc_json_field_t* field, const char* field_name, int default_value);
|
||||
void rc_json_get_optional_unum(unsigned* out, const rc_json_field_t* field, const char* field_name, int default_value);
|
||||
@@ -43,10 +52,12 @@ int rc_json_get_required_string(const char** out, rc_api_response_t* response, c
|
||||
int rc_json_get_required_num(int* out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_unum(unsigned* out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_bool(int* out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_datetime(time_t* out, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_object(rc_json_field_t* fields, size_t field_count, rc_api_response_t* response, rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_unum_array(unsigned** entries, unsigned* num_entries, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_required_array(unsigned* num_entries, rc_json_field_t* iterator, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name);
|
||||
int rc_json_get_array_entry_object(rc_json_field_t* fields, size_t field_count, rc_json_field_t* iterator);
|
||||
int rc_json_get_next_object_field(rc_json_object_field_iterator_t* iterator);
|
||||
|
||||
void rc_buf_init(rc_api_buffer_t* buffer);
|
||||
void rc_buf_destroy(rc_api_buffer_t* buffer);
|
||||
|
||||
Vendored
+328
@@ -0,0 +1,328 @@
|
||||
#include "rc_api_info.h"
|
||||
#include "rc_api_common.h"
|
||||
|
||||
#include "rc_runtime_types.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* --- Fetch Achievement Info --- */
|
||||
|
||||
int rc_api_init_fetch_achievement_info_request(rc_api_request_t* request, const rc_api_fetch_achievement_info_request_t* api_params) {
|
||||
rc_api_url_builder_t builder;
|
||||
|
||||
rc_api_url_build_dorequest_url(request);
|
||||
|
||||
if (api_params->achievement_id == 0)
|
||||
return RC_INVALID_STATE;
|
||||
|
||||
rc_url_builder_init(&builder, &request->buffer, 48);
|
||||
if (rc_api_url_build_dorequest(&builder, "achievementwondata", api_params->username, api_params->api_token)) {
|
||||
rc_url_builder_append_unum_param(&builder, "a", api_params->achievement_id);
|
||||
|
||||
if (api_params->friends_only)
|
||||
rc_url_builder_append_unum_param(&builder, "f", 1);
|
||||
if (api_params->first_entry > 1)
|
||||
rc_url_builder_append_unum_param(&builder, "o", api_params->first_entry - 1); /* number of entries to skip */
|
||||
rc_url_builder_append_unum_param(&builder, "c", api_params->count);
|
||||
|
||||
request->post_data = rc_url_builder_finalize(&builder);
|
||||
}
|
||||
|
||||
return builder.result;
|
||||
}
|
||||
|
||||
int rc_api_process_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response, const char* server_response) {
|
||||
rc_api_achievement_awarded_entry_t* entry;
|
||||
rc_json_field_t iterator;
|
||||
unsigned timet;
|
||||
int result;
|
||||
|
||||
rc_json_field_t fields[] = {
|
||||
{"Success"},
|
||||
{"Error"},
|
||||
{"AchievementID"},
|
||||
{"Response"}
|
||||
/* unused fields
|
||||
{"Offset"},
|
||||
{"Count"},
|
||||
{"FriendsOnly"},
|
||||
* unused fields */
|
||||
};
|
||||
|
||||
rc_json_field_t response_fields[] = {
|
||||
{"NumEarned"},
|
||||
{"TotalPlayers"},
|
||||
{"GameID"},
|
||||
{"RecentWinner"} /* array */
|
||||
};
|
||||
|
||||
rc_json_field_t entry_fields[] = {
|
||||
{"User"},
|
||||
{"DateAwarded"}
|
||||
};
|
||||
|
||||
memset(response, 0, sizeof(*response));
|
||||
rc_buf_init(&response->response.buffer);
|
||||
|
||||
result = rc_json_parse_response(&response->response, server_response, fields, sizeof(fields) / sizeof(fields[0]));
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
if (!rc_json_get_required_unum(&response->id, &response->response, &fields[2], "AchievementID"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_object(response_fields, sizeof(response_fields) / sizeof(response_fields[0]), &response->response, &fields[3], "Response"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&response->num_awarded, &response->response, &response_fields[0], "NumEarned"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_unum(&response->num_players, &response->response, &response_fields[1], "TotalPlayers"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_unum(&response->game_id, &response->response, &response_fields[2], "GameID"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_array(&response->num_recently_awarded, &iterator, &response->response, &response_fields[3], "RecentWinner"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (response->num_recently_awarded) {
|
||||
response->recently_awarded = (rc_api_achievement_awarded_entry_t*)rc_buf_alloc(&response->response.buffer, response->num_recently_awarded * sizeof(rc_api_achievement_awarded_entry_t));
|
||||
if (!response->recently_awarded)
|
||||
return RC_OUT_OF_MEMORY;
|
||||
|
||||
entry = response->recently_awarded;
|
||||
while (rc_json_get_array_entry_object(entry_fields, sizeof(entry_fields) / sizeof(entry_fields[0]), &iterator)) {
|
||||
if (!rc_json_get_required_string(&entry->username, &response->response, &entry_fields[0], "User"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&timet, &response->response, &entry_fields[1], "DateAwarded"))
|
||||
return RC_MISSING_VALUE;
|
||||
entry->awarded = (time_t)timet;
|
||||
|
||||
++entry;
|
||||
}
|
||||
}
|
||||
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
void rc_api_destroy_fetch_achievement_info_response(rc_api_fetch_achievement_info_response_t* response) {
|
||||
rc_buf_destroy(&response->response.buffer);
|
||||
}
|
||||
|
||||
/* --- Fetch Leaderboard Info --- */
|
||||
|
||||
int rc_api_init_fetch_leaderboard_info_request(rc_api_request_t* request, const rc_api_fetch_leaderboard_info_request_t* api_params) {
|
||||
rc_api_url_builder_t builder;
|
||||
|
||||
rc_api_url_build_dorequest_url(request);
|
||||
|
||||
if (api_params->leaderboard_id == 0)
|
||||
return RC_INVALID_STATE;
|
||||
|
||||
rc_url_builder_init(&builder, &request->buffer, 48);
|
||||
rc_url_builder_append_str_param(&builder, "r", "lbinfo");
|
||||
rc_url_builder_append_unum_param(&builder, "i", api_params->leaderboard_id);
|
||||
|
||||
if (api_params->username)
|
||||
rc_url_builder_append_str_param(&builder, "u", api_params->username);
|
||||
else if (api_params->first_entry > 1)
|
||||
rc_url_builder_append_unum_param(&builder, "o", api_params->first_entry - 1); /* number of entries to skip */
|
||||
|
||||
rc_url_builder_append_unum_param(&builder, "c", api_params->count);
|
||||
request->post_data = rc_url_builder_finalize(&builder);
|
||||
|
||||
return builder.result;
|
||||
}
|
||||
|
||||
int rc_api_process_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response, const char* server_response) {
|
||||
rc_api_lboard_info_entry_t* entry;
|
||||
rc_json_field_t iterator;
|
||||
unsigned timet;
|
||||
int result;
|
||||
size_t len;
|
||||
char format[16];
|
||||
|
||||
rc_json_field_t fields[] = {
|
||||
{"Success"},
|
||||
{"Error"},
|
||||
{"LeaderboardData"}
|
||||
};
|
||||
|
||||
rc_json_field_t leaderboarddata_fields[] = {
|
||||
{"LBID"},
|
||||
{"LBFormat"},
|
||||
{"LowerIsBetter"},
|
||||
{"LBTitle"},
|
||||
{"LBDesc"},
|
||||
{"LBMem"},
|
||||
{"GameID"},
|
||||
{"LBAuthor"},
|
||||
{"LBCreated"},
|
||||
{"LBUpdated"},
|
||||
{"Entries"} /* array */
|
||||
/* unused fields
|
||||
{"GameTitle"},
|
||||
{"ConsoleID"},
|
||||
{"ConsoleName"},
|
||||
{"ForumTopicID"},
|
||||
{"GameIcon"},
|
||||
* unused fields */
|
||||
};
|
||||
|
||||
rc_json_field_t entry_fields[] = {
|
||||
{"User"},
|
||||
{"Rank"},
|
||||
{"Index"},
|
||||
{"Score"},
|
||||
{"DateSubmitted"}
|
||||
};
|
||||
|
||||
memset(response, 0, sizeof(*response));
|
||||
rc_buf_init(&response->response.buffer);
|
||||
|
||||
result = rc_json_parse_response(&response->response, server_response, fields, sizeof(fields) / sizeof(fields[0]));
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
if (!rc_json_get_required_object(leaderboarddata_fields, sizeof(leaderboarddata_fields) / sizeof(leaderboarddata_fields[0]), &response->response, &fields[2], "LeaderboardData"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&response->id, &response->response, &leaderboarddata_fields[0], "LBID"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_num(&response->lower_is_better, &response->response, &leaderboarddata_fields[2], "LowerIsBetter"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_string(&response->title, &response->response, &leaderboarddata_fields[3], "LBTitle"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_string(&response->description, &response->response, &leaderboarddata_fields[4], "LBDesc"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_string(&response->definition, &response->response, &leaderboarddata_fields[5], "LBMem"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_unum(&response->game_id, &response->response, &leaderboarddata_fields[6], "GameID"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_string(&response->author, &response->response, &leaderboarddata_fields[7], "LBAuthor"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_datetime(&response->created, &response->response, &leaderboarddata_fields[8], "LBCreated"))
|
||||
return RC_MISSING_VALUE;
|
||||
if (!rc_json_get_required_datetime(&response->updated, &response->response, &leaderboarddata_fields[9], "LBUpdated"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!leaderboarddata_fields[1].value_end)
|
||||
return RC_MISSING_VALUE;
|
||||
len = leaderboarddata_fields[1].value_end - leaderboarddata_fields[1].value_start - 2;
|
||||
if (len < sizeof(format) - 1) {
|
||||
memcpy(format, leaderboarddata_fields[1].value_start + 1, len);
|
||||
format[len] = '\0';
|
||||
response->format = rc_parse_format(format);
|
||||
}
|
||||
else {
|
||||
response->format = RC_FORMAT_VALUE;
|
||||
}
|
||||
|
||||
if (!rc_json_get_required_array(&response->num_entries, &iterator, &response->response, &leaderboarddata_fields[10], "Entries"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (response->num_entries) {
|
||||
response->entries = (rc_api_lboard_info_entry_t*)rc_buf_alloc(&response->response.buffer, response->num_entries * sizeof(rc_api_lboard_info_entry_t));
|
||||
if (!response->entries)
|
||||
return RC_OUT_OF_MEMORY;
|
||||
|
||||
entry = response->entries;
|
||||
while (rc_json_get_array_entry_object(entry_fields, sizeof(entry_fields) / sizeof(entry_fields[0]), &iterator)) {
|
||||
if (!rc_json_get_required_string(&entry->username, &response->response, &entry_fields[0], "User"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&entry->rank, &response->response, &entry_fields[1], "Rank"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&entry->index, &response->response, &entry_fields[2], "Index"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_num(&entry->score, &response->response, &entry_fields[3], "Score"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&timet, &response->response, &entry_fields[4], "DateSubmitted"))
|
||||
return RC_MISSING_VALUE;
|
||||
entry->submitted = (time_t)timet;
|
||||
|
||||
++entry;
|
||||
}
|
||||
}
|
||||
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
void rc_api_destroy_fetch_leaderboard_info_response(rc_api_fetch_leaderboard_info_response_t* response) {
|
||||
rc_buf_destroy(&response->response.buffer);
|
||||
}
|
||||
|
||||
/* --- Fetch Games List --- */
|
||||
|
||||
int rc_api_init_fetch_games_list_request(rc_api_request_t* request, const rc_api_fetch_games_list_request_t* api_params) {
|
||||
rc_api_url_builder_t builder;
|
||||
|
||||
rc_api_url_build_dorequest_url(request);
|
||||
|
||||
if (api_params->console_id == 0)
|
||||
return RC_INVALID_STATE;
|
||||
|
||||
rc_url_builder_init(&builder, &request->buffer, 48);
|
||||
rc_url_builder_append_str_param(&builder, "r", "gameslist");
|
||||
rc_url_builder_append_unum_param(&builder, "c", api_params->console_id);
|
||||
|
||||
request->post_data = rc_url_builder_finalize(&builder);
|
||||
|
||||
return builder.result;
|
||||
}
|
||||
|
||||
int rc_api_process_fetch_games_list_response(rc_api_fetch_games_list_response_t* response, const char* server_response) {
|
||||
rc_api_game_list_entry_t* entry;
|
||||
rc_json_object_field_iterator_t iterator;
|
||||
int result;
|
||||
char* end;
|
||||
|
||||
rc_json_field_t fields[] = {
|
||||
{"Success"},
|
||||
{"Error"},
|
||||
{"Response"}
|
||||
};
|
||||
|
||||
memset(response, 0, sizeof(*response));
|
||||
rc_buf_init(&response->response.buffer);
|
||||
|
||||
result = rc_json_parse_response(&response->response, server_response, fields, sizeof(fields) / sizeof(fields[0]));
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
if (!fields[2].value_start) {
|
||||
/* call rc_json_get_required_object to generate the error message */
|
||||
rc_json_get_required_object(NULL, 0, &response->response, &fields[2], "Response");
|
||||
return RC_MISSING_VALUE;
|
||||
}
|
||||
|
||||
response->num_entries = fields[2].array_size;
|
||||
rc_buf_reserve(&response->response.buffer, response->num_entries * (32 + sizeof(rc_api_game_list_entry_t)));
|
||||
|
||||
response->entries = (rc_api_game_list_entry_t*)rc_buf_alloc(&response->response.buffer, response->num_entries * sizeof(rc_api_game_list_entry_t));
|
||||
if (!response->entries)
|
||||
return RC_OUT_OF_MEMORY;
|
||||
|
||||
memset(&iterator, 0, sizeof(iterator));
|
||||
iterator.json = fields[2].value_start;
|
||||
|
||||
entry = response->entries;
|
||||
while (rc_json_get_next_object_field(&iterator)) {
|
||||
entry->id = strtol(iterator.field.name, &end, 10);
|
||||
|
||||
iterator.field.name = "";
|
||||
if (!rc_json_get_string(&entry->name, &response->response.buffer, &iterator.field, ""))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
++entry;
|
||||
}
|
||||
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
void rc_api_destroy_fetch_games_list_response(rc_api_fetch_games_list_response_t* response) {
|
||||
rc_buf_destroy(&response->response.buffer);
|
||||
}
|
||||
+6
-7
@@ -20,10 +20,9 @@ int rc_api_init_resolve_hash_request(rc_api_request_t* request, const rc_api_res
|
||||
return RC_INVALID_STATE;
|
||||
|
||||
rc_url_builder_init(&builder, &request->buffer, 48);
|
||||
if (rc_api_url_build_dorequest(&builder, "gameid", api_params->username, api_params->api_token)) {
|
||||
rc_url_builder_append_str_param(&builder, "m", api_params->game_hash);
|
||||
request->post_data = rc_url_builder_finalize(&builder);
|
||||
}
|
||||
rc_url_builder_append_str_param(&builder, "r", "gameid");
|
||||
rc_url_builder_append_str_param(&builder, "m", api_params->game_hash);
|
||||
request->post_data = rc_url_builder_finalize(&builder);
|
||||
|
||||
return builder.result;
|
||||
}
|
||||
@@ -130,7 +129,7 @@ int rc_api_process_fetch_game_data_response(rc_api_fetch_game_data_response_t* r
|
||||
if (result != RC_OK)
|
||||
return result;
|
||||
|
||||
if (!rc_json_get_required_object(patchdata_fields, sizeof(patchdata_fields) / sizeof(patchdata_fields[0]), &response->response, &fields[2], "Response"))
|
||||
if (!rc_json_get_required_object(patchdata_fields, sizeof(patchdata_fields) / sizeof(patchdata_fields[0]), &response->response, &fields[2], "PatchData"))
|
||||
return RC_MISSING_VALUE;
|
||||
|
||||
if (!rc_json_get_required_unum(&response->id, &response->response, &patchdata_fields[0], "ID"))
|
||||
@@ -440,8 +439,8 @@ int rc_api_process_submit_lboard_entry_response(rc_api_submit_lboard_entry_respo
|
||||
{"Rank"},
|
||||
{"Score"}
|
||||
/* unused fields
|
||||
{ "DateSumitted" },
|
||||
* unused fields */
|
||||
{"DateSubmitted"},
|
||||
* unused fields */
|
||||
};
|
||||
|
||||
rc_json_field_t rank_info_fields[] = {
|
||||
|
||||
Vendored
+1
@@ -144,6 +144,7 @@ void rc_init_parse_state(rc_parse_state_t* parse, void* buffer, lua_State* L, in
|
||||
parse->measured_target = 0;
|
||||
parse->lines_read = 0;
|
||||
parse->has_required_hits = 0;
|
||||
parse->measured_as_percent = 0;
|
||||
}
|
||||
|
||||
void rc_destroy_parse_state(rc_parse_state_t* parse)
|
||||
|
||||
Loaded 100 of 551 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user