mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-10 03:21:30 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62da78ca3d | ||
|
|
4fad77304f | ||
|
|
ba3f164bdd | ||
|
|
7530436918 | ||
|
|
5e9bfd52db | ||
|
|
775c272029 | ||
|
|
e8c9a272ee | ||
|
|
9da9f4bad0 | ||
|
|
9dd5a55310 | ||
|
|
739a8d70a7 | ||
|
|
5f8f029c6e | ||
|
|
652d89cbf4 | ||
|
|
7c4329f31d | ||
|
|
34c5d2ef07 | ||
|
|
68e91e3121 | ||
|
|
d22d627d94 | ||
|
|
c3af160f08 | ||
|
|
8092f601a6 | ||
|
|
82be4ea0e5 | ||
|
|
41e2346880 | ||
|
|
ccbb3f0960 | ||
|
|
5794c2051c | ||
|
|
0919cd9746 | ||
|
|
720ebc6834 | ||
|
|
7be2e75c08 | ||
|
|
9108ce514f | ||
|
|
4ac4b779a9 | ||
|
|
30f1148835 | ||
|
|
705851b147 | ||
|
|
e59bafccbe | ||
|
|
aaff9d6d55 | ||
|
|
b0c6b8bf0f | ||
|
|
1e55ac33d7 | ||
|
|
f1a060cc5a | ||
|
|
5171c28196 | ||
|
|
18fd85de24 | ||
|
|
f1c8f78c16 | ||
|
|
14bd37415b | ||
|
|
0f9fd971e2 | ||
|
|
0b426b2022 | ||
|
|
5d018db08d | ||
|
|
087eb939a5 | ||
|
|
360f8189e0 | ||
|
|
50a57b03a1 | ||
|
|
f349410082 | ||
|
|
c0f8f2cab6 | ||
|
|
3b110c0e3b | ||
|
|
79e8adb90e | ||
|
|
c3d2b190f2 | ||
|
|
a0b2d97ca3 | ||
|
|
8094e02823 | ||
|
|
a038dc785d | ||
|
|
e63b85cbba | ||
|
|
53185e3715 | ||
|
|
7b5f32eed6 | ||
|
|
26b8334c6b | ||
|
|
108a54a7f2 | ||
|
|
f5879dfad7 | ||
|
|
786a5bd9a8 | ||
|
|
1f0b1fb61c | ||
|
|
23abe5025b | ||
|
|
a381c2180d | ||
|
|
872e8ffb99 | ||
|
|
493083f5c7 | ||
|
|
ab7cc305e5 | ||
|
|
9a41ccd694 | ||
|
|
5f8bf221c6 | ||
|
|
22a956f663 | ||
|
|
9e9849170d | ||
|
|
6552828244 | ||
|
|
95c585e864 | ||
|
|
03e3e3f520 | ||
|
|
8a92ad7dbf | ||
|
|
3c2307de80 | ||
|
|
182c44df70 | ||
|
|
2ed4fbf2f7 | ||
|
|
b85cd1f1ab | ||
|
|
17b4cdb60a | ||
|
|
b30b7d01f1 | ||
|
|
0ce40be87e | ||
|
|
619ea2e627 | ||
|
|
c176ad605d | ||
|
|
aed4c6b34d | ||
|
|
ee2f66bbd3 | ||
|
|
990c2c405b | ||
|
|
d8d4fefb48 | ||
|
|
27189029c4 | ||
|
|
ad7da9736a | ||
|
|
53a872aa5b | ||
|
|
c93272de15 | ||
|
|
5455f6bcf6 | ||
|
|
869b47ead3 | ||
|
|
6a71aa06c8 | ||
|
|
64918cab99 | ||
|
|
636f2ddb28 | ||
|
|
937ae55934 | ||
|
|
1d1cc87c4f | ||
|
|
27712d648a | ||
|
|
792031c45e | ||
|
|
6bb5dea1d4 | ||
|
|
f2fbaf2cb4 | ||
|
|
4502b58ab3 | ||
|
|
eb81597871 | ||
|
|
b9cdeebf35 | ||
|
|
048f025ca5 | ||
|
|
d8eb6819b0 | ||
|
|
b7e7f6a651 | ||
|
|
2424049fdf | ||
|
|
7b47787887 | ||
|
|
8b0f083a4e | ||
|
|
6bc29174b7 | ||
|
|
c4d328af8e | ||
|
|
a162613a16 | ||
|
|
c205e59f57 | ||
|
|
18568718ca | ||
|
|
05e0a6c8d2 | ||
|
|
e8722195e9 | ||
|
|
6963fefc53 | ||
|
|
7cc7a6df75 | ||
|
|
b5a7422b54 | ||
|
|
ff578de39e | ||
|
|
abd5e72856 | ||
|
|
c8cf92ee5d | ||
|
|
19f3be21c2 | ||
|
|
7d72a1b6ab | ||
|
|
a253fac207 | ||
|
|
90fb11cb9a | ||
|
|
486f438cc3 | ||
|
|
c59fbbd2f2 | ||
|
|
f0f8e8a208 | ||
|
|
d170f99c03 | ||
|
|
2e68a634a2 | ||
|
|
c9f98fce2f | ||
|
|
9ee33a6a1d | ||
|
|
cce4aa9c86 | ||
|
|
7ffbba6187 | ||
|
|
066643ac6e | ||
|
|
dbb9fb448d | ||
|
|
29b8ddef28 | ||
|
|
39eadbab6f | ||
|
|
4b22522ae0 | ||
|
|
662976608a | ||
|
|
6683be9c44 | ||
|
|
49f5e6e2cc | ||
|
|
5465c2b345 | ||
|
|
17f3bc2255 | ||
|
|
55737ba127 | ||
|
|
01284c0231 | ||
|
|
ce5b1b2c0a | ||
|
|
5bd0fdcc13 | ||
|
|
06cfdfdcbb | ||
|
|
bc2bdd5734 | ||
|
|
2dbb334fb1 | ||
|
|
43d217668d | ||
|
|
e76a8e6a75 | ||
|
|
1819584d74 | ||
|
|
44b83cf353 | ||
|
|
34be5862ee | ||
|
|
2d99cdcbf3 | ||
|
|
9e2c82c26e | ||
|
|
2315362997 | ||
|
|
a797324133 | ||
|
|
90ea42c2d9 | ||
|
|
b0b4f859cc | ||
|
|
8c7db837b4 | ||
|
|
3b5954b877 | ||
|
|
6bfa3fa807 | ||
|
|
ecdb5383ba | ||
|
|
24dadb276e | ||
|
|
0984a13665 | ||
|
|
ff906a9228 | ||
|
|
c2f95940fb | ||
|
|
4f8e59a3f8 | ||
|
|
4c3e0d44b8 | ||
|
|
bae73a0ccc | ||
|
|
c8ad747a46 | ||
|
|
26d6aee1eb | ||
|
|
161d4caa8f | ||
|
|
4c154f347d | ||
|
|
5faf6a124d | ||
|
|
3b24565b66 | ||
|
|
8784d21c74 | ||
|
|
2aa0b74d55 | ||
|
|
a6998d593a | ||
|
|
8ea1305d75 | ||
|
|
2b5b67d663 | ||
|
|
706a63fedf | ||
|
|
6888a0cc71 | ||
|
|
39c3a25ad6 | ||
|
|
2a164f2034 | ||
|
|
415646111b | ||
|
|
9fbc3c0769 | ||
|
|
c209b0b3d9 | ||
|
|
a41f23240d | ||
|
|
ecd7f3c1fd | ||
|
|
4390317992 | ||
|
|
5044537625 | ||
|
|
ac2fec7298 | ||
|
|
2c47d571aa | ||
|
|
627c86721f | ||
|
|
7502914a1d | ||
|
|
f7d4bd5faa | ||
|
|
b43b3e2bb0 | ||
|
|
cff92152db | ||
|
|
e1b11593fc | ||
|
|
890e1eb064 | ||
|
|
c56225ab65 | ||
|
|
9a6df2b591 | ||
|
|
636e1bef50 | ||
|
|
49156e645e | ||
|
|
7fb5d9da62 | ||
|
|
58073eeb15 | ||
|
|
3e72c502a8 | ||
|
|
2b401ce13b | ||
|
|
7af68ca0b9 | ||
|
|
a2cb3f60a4 | ||
|
|
fbae4efc97 | ||
|
|
1c2cbe596c | ||
|
|
5c3d340e01 | ||
|
|
f4f1212372 | ||
|
|
ca80a3a4da | ||
|
|
fce660de29 | ||
|
|
1ee127fe68 | ||
|
|
7201d0bf22 | ||
|
|
88e3abd6fd | ||
|
|
1598cc773c | ||
|
|
68ab984603 | ||
|
|
aa156bd804 | ||
|
|
60c028a562 | ||
|
|
cec858748f | ||
|
|
1433a587b2 | ||
|
|
ad03ac055d | ||
|
|
ddace03872 | ||
|
|
89563ce9c8 | ||
|
|
d41827ec7e | ||
|
|
fb653d22dc | ||
|
|
c9caa5c39b | ||
|
|
246e224626 | ||
|
|
cd11385348 | ||
|
|
1f53eea4ee | ||
|
|
0b5a62ff9e | ||
|
|
9edf8ecab0 | ||
|
|
30c08c369c | ||
|
|
aed89c053b | ||
|
|
fa09b29ad9 | ||
|
|
c45699aeae | ||
|
|
71e07316db | ||
|
|
ff40ae2486 | ||
|
|
a42b8f616f | ||
|
|
0bae77d199 | ||
|
|
15afaedaa8 | ||
|
|
e40c3ec07b | ||
|
|
55b53929db | ||
|
|
604403fe90 | ||
|
|
e42dae928e | ||
|
|
51a69dff44 | ||
|
|
3225876f0b | ||
|
|
c85bf21fbb | ||
|
|
780fa2679f | ||
|
|
8fc40d2a2a | ||
|
|
5e82940a08 | ||
|
|
a60844897f | ||
|
|
c3c3b6c2a2 | ||
|
|
f3d04b7562 | ||
|
|
e9bbc8d8dd | ||
|
|
c422ec1a0f | ||
|
|
fb4e9f560f | ||
|
|
9ac971050d | ||
|
|
c55873c324 | ||
|
|
4f542c051d | ||
|
|
59b45f7812 | ||
|
|
21cd11acb4 | ||
|
|
552cc08549 | ||
|
|
d6e9776ab8 | ||
|
|
b3686aee4c | ||
|
|
c854d0916b | ||
|
|
3e15f1b512 | ||
|
|
f3a31ffd8d | ||
|
|
22ac50d39c | ||
|
|
e7cb5ccdee | ||
|
|
70d0bd5092 | ||
|
|
f573626144 | ||
|
|
b8694ff127 | ||
|
|
7fe3f5f7ff | ||
|
|
cca51030d7 | ||
|
|
f9f66a14b3 | ||
|
|
589e886954 | ||
|
|
4d7f9a85f1 | ||
|
|
b5a7020366 | ||
|
|
f8881f7cbe | ||
|
|
4eb2d8ae09 | ||
|
|
95ad896f9b | ||
|
|
b69c005c85 | ||
|
|
ff3467a79f | ||
|
|
6268d979c0 | ||
|
|
aba9cbb5b4 | ||
|
|
ff3a3f80d3 | ||
|
|
b25372b6f7 | ||
|
|
a2d4577a1f | ||
|
|
d1e4ada773 | ||
|
|
804fab61bc | ||
|
|
a53c67791b | ||
|
|
499d61cb3d | ||
|
|
4b3b9add3e | ||
|
|
d1f99e4610 | ||
|
|
5ca821c9db | ||
|
|
485b41163c | ||
|
|
e686cb34b0 | ||
|
|
afbc113e7b | ||
|
|
3c130927d3 | ||
|
|
15000edf11 | ||
|
|
4dd95212ac | ||
|
|
7311aa6a69 | ||
|
|
52874b6316 | ||
|
|
e4f48fac19 | ||
|
|
8811a4a8f9 | ||
|
|
8c3c34f984 | ||
|
|
70ece8435c | ||
|
|
a6e18f23a8 | ||
|
|
566abd0cfd | ||
|
|
656283322e | ||
|
|
a48dbcb52e | ||
|
|
31c7abce64 | ||
|
|
c4d99586ba | ||
|
|
563253f268 | ||
|
|
04d062b3d4 | ||
|
|
3680c264d9 | ||
|
|
d08f9cb212 | ||
|
|
799872e59d | ||
|
|
4133da0fcf | ||
|
|
077a5dd685 | ||
|
|
64dea335ff | ||
|
|
63c8eb1a4c | ||
|
|
1bb293ebae | ||
|
|
a2ec579689 | ||
|
|
5171d167c8 | ||
|
|
cec7037839 | ||
|
|
85c4a29d38 | ||
|
|
b69c7ec558 | ||
|
|
f18407a011 | ||
|
|
64ee26baae | ||
|
|
9bd38b7011 | ||
|
|
dcd5cb2602 | ||
|
|
def9210cdc | ||
|
|
31fc95a6cf | ||
|
|
c38ed7f843 | ||
|
|
33e5a92867 | ||
|
|
146b4ccc50 | ||
|
|
317a443741 | ||
|
|
955a149ce9 | ||
|
|
16e2db25c4 | ||
|
|
69168ec6bc | ||
|
|
b41384a0d0 | ||
|
|
d281e3f889 | ||
|
|
b998bda5a1 | ||
|
|
3f1a516696 | ||
|
|
2509ee9646 | ||
|
|
435c80a844 | ||
|
|
1e86824e96 | ||
|
|
b0b1b0b782 | ||
|
|
f292524031 | ||
|
|
8165b43170 | ||
|
|
7ae0c6b2c1 | ||
|
|
8312d67a11 | ||
|
|
b6fd875230 | ||
|
|
f6fec009d2 | ||
|
|
a79eec8698 | ||
|
|
af2805406d | ||
|
|
270e95bc97 | ||
|
|
0226820825 | ||
|
|
ce31ed6a51 | ||
|
|
7372bafb44 | ||
|
|
e5800cf733 | ||
|
|
81d22c63de | ||
|
|
5771a7a71d | ||
|
|
b63fa7b94b | ||
|
|
0909c80138 | ||
|
|
565e25d2ab | ||
|
|
2d9f0ea7ce | ||
|
|
2941365741 | ||
|
|
05b50c346d | ||
|
|
5748de8b1f | ||
|
|
a150bc27ce | ||
|
|
e705862c07 | ||
|
|
c662da11c3 | ||
|
|
254c48707d | ||
|
|
1dc0fa83ff | ||
|
|
f45a70d1e8 | ||
|
|
91d56bf43f | ||
|
|
b5ba2ddc7b | ||
|
|
0805838050 | ||
|
|
a58297a577 | ||
|
|
9ba1b522c2 | ||
|
|
ba3161af87 | ||
|
|
aac42e309c | ||
|
|
d6d882f34b | ||
|
|
ea4415b5f4 | ||
|
|
cc749c6e60 | ||
|
|
287c95ac8b | ||
|
|
2319b2bde8 | ||
|
|
443e6a2b1d | ||
|
|
8e638f435a | ||
|
|
499235cd40 | ||
|
|
e4873f8a46 | ||
|
|
7b3be5eddf | ||
|
|
aa03025dd1 | ||
|
|
762e28e1e0 | ||
|
|
c9cfd1cd89 | ||
|
|
26bbf46054 | ||
|
|
797a4bca0f | ||
|
|
22739b4430 | ||
|
|
4bd3a54fbb | ||
|
|
f1a2652024 | ||
|
|
bb45102450 | ||
|
|
bca306a006 | ||
|
|
e35cd80a14 | ||
|
|
9091409efa | ||
|
|
c2364096f3 | ||
|
|
b137616746 | ||
|
|
1d3533d847 | ||
|
|
e786798527 | ||
|
|
1fb1b1bdb7 | ||
|
|
d7d201cb63 | ||
|
|
dab941e53d | ||
|
|
c0bb911501 | ||
|
|
8aa16caef5 | ||
|
|
51d3376f07 | ||
|
|
e61c331656 | ||
|
|
a86848d822 | ||
|
|
46dda3b5c3 | ||
|
|
b7b17ee7e5 | ||
|
|
d7a7260909 | ||
|
|
dd9bde2184 | ||
|
|
572c16cb2a | ||
|
|
e7dbac7eb0 | ||
|
|
fa128f950d | ||
|
|
99a1d8ccc6 | ||
|
|
ed1480bc87 | ||
|
|
d8968d8d0b | ||
|
|
a41e7aa0a7 | ||
|
|
10f8077294 | ||
|
|
d013a04bfb | ||
|
|
56d45ea0c0 | ||
|
|
a9a5782cc0 | ||
|
|
be7356ec6d | ||
|
|
a5e52bd3c7 | ||
|
|
ffb07f3076 | ||
|
|
1ecc5fd9d1 | ||
|
|
aa588dec35 | ||
|
|
e1573e4b39 | ||
|
|
2fcb4b5854 | ||
|
|
1baebdbd47 | ||
|
|
bd843857de | ||
|
|
aa98a80fa6 | ||
|
|
ac6e4732f1 | ||
|
|
f9ce822a7b | ||
|
|
dc37d56ac8 | ||
|
|
54e1711f9a | ||
|
|
3d7eb19abd | ||
|
|
d620e9ce1d | ||
|
|
2e21a35261 | ||
|
|
39c111bb92 | ||
|
|
a680133a38 | ||
|
|
df1fe1f1ae | ||
|
|
1f7d7d6441 | ||
|
|
f33e04c747 | ||
|
|
085f25e81f | ||
|
|
1599f1f5d3 | ||
|
|
29ca98c10c | ||
|
|
b38a4dcb08 | ||
|
|
d9723d2282 | ||
|
|
52d2b6ae94 | ||
|
|
060396e726 | ||
|
|
756e49d2af | ||
|
|
534cfb60cf | ||
|
|
4b3ca341c2 | ||
|
|
181cff34d8 | ||
|
|
f3a7f6971b | ||
|
|
e0849df59f | ||
|
|
051c877c62 | ||
|
|
0feb657e29 | ||
|
|
9f09efe5c9 | ||
|
|
338ce7e678 | ||
|
|
82e38ca2ee | ||
|
|
95f77a2288 | ||
|
|
0cb94aef85 | ||
|
|
e840a6c95a | ||
|
|
9c8c889477 | ||
|
|
2bab38e857 | ||
|
|
cee285bcd5 | ||
|
|
fb306a9358 | ||
|
|
10d66d28c0 | ||
|
|
a7abd77141 | ||
|
|
70373dba9a | ||
|
|
95145ec0d4 | ||
|
|
3619fae2d9 | ||
|
|
5dde91040f | ||
|
|
b8471aa3dc | ||
|
|
247d427ea4 | ||
|
|
8918d0d873 | ||
|
|
0cbb89168b | ||
|
|
15c0191f08 | ||
|
|
f7b0c0947c | ||
|
|
fed06044c4 | ||
|
|
a446f8ad51 | ||
|
|
3345bed1d3 | ||
|
|
0f92f001b0 | ||
|
|
4f004ebebc | ||
|
|
e85167072e | ||
|
|
e35a3cb08b | ||
|
|
2c71ce437c | ||
|
|
d08779adf0 | ||
|
|
198bb6d047 | ||
|
|
729f13cad4 | ||
|
|
71bfd98012 | ||
|
|
1250565e9e | ||
|
|
2f64653241 | ||
|
|
da667600e1 | ||
|
|
8287049a13 | ||
|
|
f941d4e625 | ||
|
|
942d228e3a | ||
|
|
a870526dc9 | ||
|
|
230c64ba4b | ||
|
|
702c889cd1 | ||
|
|
2bfb073b3e | ||
|
|
a7049b0020 | ||
|
|
7e80f5520a | ||
|
|
7648da1413 | ||
|
|
e0b59f13e2 | ||
|
|
dc80e49509 | ||
|
|
002ac5a344 | ||
|
|
145e09a629 | ||
|
|
136762f6a2 | ||
|
|
f718b3558f | ||
|
|
076a0d2f56 | ||
|
|
b25c571b23 | ||
|
|
3346cd23c0 | ||
|
|
f82601c4a8 | ||
|
|
3199edcde2 | ||
|
|
e206230a89 | ||
|
|
d6dfa240c8 | ||
|
|
8d7a0117bc | ||
|
|
0af7167586 | ||
|
|
4d429ea4d8 | ||
|
|
c12e8dea07 | ||
|
|
38d2febba5 | ||
|
|
8aaef0e95c | ||
|
|
55d0701ac1 | ||
|
|
fba6f69d74 | ||
|
|
f036ce442e | ||
|
|
7a7f444e55 | ||
|
|
5667c73ebf | ||
|
|
b750199db4 | ||
|
|
3d52f2bf8f | ||
|
|
e1838b4908 | ||
|
|
7a3caf82d0 | ||
|
|
e6efc02457 | ||
|
|
4065dbf18e | ||
|
|
45fa047b07 | ||
|
|
682d757cf7 | ||
|
|
9fff07e589 | ||
|
|
d03ff44d53 | ||
|
|
b49577b65f | ||
|
|
dd016c44c9 | ||
|
|
79ffb53ef2 | ||
|
|
e0cb900abe | ||
|
|
ffad99d886 | ||
|
|
e181bc6d39 | ||
|
|
9579804c72 | ||
|
|
48dc251303 | ||
|
|
46455a6ff8 | ||
|
|
b301e4d444 | ||
|
|
827802d883 | ||
|
|
d7d260556b | ||
|
|
1a3ec1c3be | ||
|
|
ca56e0e91d | ||
|
|
c8b9b4ef25 | ||
|
|
a5aa4d731b | ||
|
|
ae12c30285 | ||
|
|
ab33d16da1 | ||
|
|
25ba8f4ab0 | ||
|
|
be7b845b6c | ||
|
|
e0aa224575 | ||
|
|
637414c138 | ||
|
|
052137b027 | ||
|
|
03381da506 | ||
|
|
7e9c05c442 | ||
|
|
9739b181bf | ||
|
|
e7373a9cc2 | ||
|
|
61fa0a0807 | ||
|
|
737989cce4 | ||
|
|
3c10731fbd | ||
|
|
797f3226a7 | ||
|
|
224f925b3b | ||
|
|
255dc9d932 | ||
|
|
6e730cf2dd | ||
|
|
8639018976 | ||
|
|
306653d069 | ||
|
|
41eab46111 | ||
|
|
a924ac15c9 | ||
|
|
0c91f4dff5 | ||
|
|
98ef566473 | ||
|
|
3fda353fbc | ||
|
|
022f25df0c | ||
|
|
4086826e92 | ||
|
|
2148f8ca0a | ||
|
|
190cf1be97 | ||
|
|
8bbdf39cbf | ||
|
|
c2122ed1d8 | ||
|
|
bd6fedc0f2 | ||
|
|
2e125cd608 | ||
|
|
7c13e57468 | ||
|
|
e7891b8c1a | ||
|
|
cc07982ee0 | ||
|
|
2c65068be0 | ||
|
|
f61cacd24c | ||
|
|
a77327d20e | ||
|
|
d017163612 | ||
|
|
cec06a0859 | ||
|
|
c66b866a87 | ||
|
|
dda6716926 | ||
|
|
fcd55d871e | ||
|
|
5b835614d4 | ||
|
|
4d2c35f6fe | ||
|
|
11e4b0b6ef | ||
|
|
5ba97fbcb2 | ||
|
|
6abaded373 | ||
|
|
4258836422 | ||
|
|
28ef222886 | ||
|
|
123cd67a6a | ||
|
|
586192c431 | ||
|
|
e8dc6b8c3e | ||
|
|
b9b9464652 | ||
|
|
04e87a00db | ||
|
|
9b9b1e6b9c | ||
|
|
961e435317 | ||
|
|
dcd9860e80 | ||
|
|
8771e5b958 | ||
|
|
194a675448 | ||
|
|
93506a0d18 | ||
|
|
538576e6f9 | ||
|
|
b518e639b6 | ||
|
|
677d65bf8d | ||
|
|
231e310ea1 | ||
|
|
1f9928c677 | ||
|
|
be9a8c0e18 | ||
|
|
dc46bea45a | ||
|
|
5d3233c1d5 | ||
|
|
9fa8730023 | ||
|
|
f114e14d48 | ||
|
|
9f93ec1077 | ||
|
|
c168835c5f | ||
|
|
513273e3f2 | ||
|
|
7b9fcfd280 | ||
|
|
3fb4ed753d | ||
|
|
c5d9a69ae7 | ||
|
|
5aa0d17659 | ||
|
|
d444044fde | ||
|
|
4506a58e31 | ||
|
|
a5acd559d6 | ||
|
|
469a65b55e | ||
|
|
208a68b528 | ||
|
|
7646757faf | ||
|
|
8336163112 | ||
|
|
51af4330eb | ||
|
|
cd75045792 | ||
|
|
b10901e6b9 | ||
|
|
f943688dff | ||
|
|
a17f0e2136 | ||
|
|
e72c67bf87 | ||
|
|
4fb95db80b | ||
|
|
18803479ac | ||
|
|
46dc4508f4 | ||
|
|
794f9c8968 | ||
|
|
7c93da1360 | ||
|
|
819016b00c | ||
|
|
27928081cf | ||
|
|
f67bfa24ef | ||
|
|
399cfe67f4 | ||
|
|
e94c8a762d | ||
|
|
fe1255094f | ||
|
|
03641f2378 | ||
|
|
ab814efc62 | ||
|
|
8361253b52 | ||
|
|
2acfe9cb6a | ||
|
|
0c2f5093b2 | ||
|
|
8fd0aedc56 | ||
|
|
a8a06d498c | ||
|
|
cd5e844ee4 | ||
|
|
69087727e9 | ||
|
|
45069537fb | ||
|
|
4bb7054f8c | ||
|
|
b1846ee449 | ||
|
|
88ea33bbd2 | ||
|
|
2d838a7e76 | ||
|
|
8d1adbc6ee | ||
|
|
adf2743464 | ||
|
|
da86549b8e | ||
|
|
4c24a17119 | ||
|
|
f75f8482f8 | ||
|
|
1dc0d43f68 | ||
|
|
d1e457115c | ||
|
|
5661c29409 | ||
|
|
e3a88e8806 | ||
|
|
5919171181 | ||
|
|
4834119963 | ||
|
|
bf89c4bd3d | ||
|
|
6807f1b9bb | ||
|
|
35aacadd23 | ||
|
|
27c1dd4b7b | ||
|
|
3adc9fce13 | ||
|
|
7fa513be08 | ||
|
|
26f7503959 | ||
|
|
1a4786a7f1 | ||
|
|
145013074e | ||
|
|
6f284a1d43 | ||
|
|
c9dca9cdf1 | ||
|
|
15e489fd0a | ||
|
|
2f659e3e17 | ||
|
|
c8eb85ec2e | ||
|
|
b7fb66b24e | ||
|
|
0cfefdd2a8 | ||
|
|
a68072e293 | ||
|
|
f2398280e0 | ||
|
|
d415d4eb23 | ||
|
|
44db578691 | ||
|
|
794f4a6b34 | ||
|
|
b10a318f16 | ||
|
|
1233c9d0dc | ||
|
|
136c08a4bb | ||
|
|
43b1768ee7 | ||
|
|
f50567d340 | ||
|
|
d65068cf15 | ||
|
|
53268540f8 | ||
|
|
35be34eb32 | ||
|
|
643cd1923e | ||
|
|
dc8590a6e5 | ||
|
|
970404dc28 | ||
|
|
28bb7c67af | ||
|
|
8064672f11 | ||
|
|
79d0870526 | ||
|
|
d744ed4666 | ||
|
|
57e11a10e7 | ||
|
|
4c29f3102f | ||
|
|
190e6316e3 | ||
|
|
7e96595894 | ||
|
|
456452f1b7 | ||
|
|
97247dbaec | ||
|
|
b68764862d | ||
|
|
beff1144f6 | ||
|
|
ecc7bc0cf2 | ||
|
|
77c8688d6a | ||
|
|
3691f4fabf | ||
|
|
83be5a1950 | ||
|
|
5e49a683ec | ||
|
|
dd5eca0f46 | ||
|
|
b347b26d61 | ||
|
|
a8a7fba2ca | ||
|
|
cd77093588 | ||
|
|
1a8b185c5e | ||
|
|
b468592097 | ||
|
|
ae35484eea | ||
|
|
6a31f87a85 | ||
|
|
062a307b09 | ||
|
|
de4e9b9fcc | ||
|
|
191d0c0309 | ||
|
|
365053266f | ||
|
|
3a9a9df218 | ||
|
|
c1c71f35db | ||
|
|
76d0b4ebd5 | ||
|
|
4db2bc3354 | ||
|
|
44a06d69a6 | ||
|
|
2c024f400e | ||
|
|
5e684da3d2 | ||
|
|
2d56ceedfd | ||
|
|
2d5715b807 | ||
|
|
fa1603127f | ||
|
|
16681653b4 | ||
|
|
3d06b4aee2 | ||
|
|
911a6a905b | ||
|
|
885b9cb9b7 | ||
|
|
954c54baee | ||
|
|
e7bf2a345c | ||
|
|
8a6de4adfb | ||
|
|
34f4d5ed0e | ||
|
|
03ba1153a4 | ||
|
|
6ba6f9e3ec | ||
|
|
3ddbb0bc4a | ||
|
|
82ce70eab8 | ||
|
|
b193bb7fb8 | ||
|
|
51cf8b6bfe | ||
|
|
89c8239ecb | ||
|
|
e961dadc94 | ||
|
|
7d9c7ba1f7 | ||
|
|
3ab981f292 | ||
|
|
104508a29c | ||
|
|
bfe4b444af | ||
|
|
a60cc08063 | ||
|
|
75190c9226 | ||
|
|
e3907f2380 | ||
|
|
eb7797daa5 | ||
|
|
f06d955996 | ||
|
|
222b7e7be0 | ||
|
|
adb8714105 | ||
|
|
57dd10b5eb | ||
|
|
ddc21520dc | ||
|
|
6ec86d65c5 | ||
|
|
409db3b1c2 | ||
|
|
279a2d58db | ||
|
|
be47416f84 | ||
|
|
c05548e2ab | ||
|
|
fb6a403220 | ||
|
|
f6dc7f4f02 | ||
|
|
75102a435f | ||
|
|
031bcf8cbc | ||
|
|
0ff2832e83 | ||
|
|
ed5bd8023e | ||
|
|
19ced73596 | ||
|
|
4bb81bbb1b | ||
|
|
83e7fda272 | ||
|
|
1d0b3b96e6 | ||
|
|
46036894d4 | ||
|
|
99035dbb0a | ||
|
|
c7213c81e3 | ||
|
|
300e67a133 | ||
|
|
dc8ef72323 | ||
|
|
37298876fc | ||
|
|
1ba8c626ed | ||
|
|
4bb17fd6e9 | ||
|
|
a4e35634e0 | ||
|
|
07bf62eaba | ||
|
|
d9b245ce66 | ||
|
|
74039617ce | ||
|
|
4adf16b5ed | ||
|
|
eb374e6b58 | ||
|
|
3029f96511 | ||
|
|
89220ec4b5 | ||
|
|
f4e6aaa4d8 | ||
|
|
9279d06f93 | ||
|
|
10df615d14 | ||
|
|
06e2ab7bb0 | ||
|
|
187f2fd6b1 | ||
|
|
8a2cd64889 | ||
|
|
2c8d7bf5ed | ||
|
|
fe3be212b3 | ||
|
|
58eed3322b | ||
|
|
652300f674 | ||
|
|
27ab4ac78b | ||
|
|
7f726fc1eb | ||
|
|
646685f40b | ||
|
|
9bcc80320d | ||
|
|
064a979fbc | ||
|
|
fa5f2c61c3 | ||
|
|
6b742fb70e | ||
|
|
587424e0ef | ||
|
|
7fd71c735f | ||
|
|
334cc943cb | ||
|
|
c0a2e846a1 | ||
|
|
6f76e9e615 | ||
|
|
eebe3ec0ec | ||
|
|
822edd4487 | ||
|
|
541cb42e5a | ||
|
|
eeaa34f024 | ||
|
|
8bc25472be | ||
|
|
1414bffa8e | ||
|
|
26a8a7d391 | ||
|
|
02e37718e1 | ||
|
|
bf8dcd17f3 | ||
|
|
cfbec687e5 | ||
|
|
8e74ff6122 | ||
|
|
84d6f6231d | ||
|
|
d22ce632e5 | ||
|
|
8316d073bc | ||
|
|
9ac7059d05 | ||
|
|
b0cc374185 | ||
|
|
ebc8169b17 | ||
|
|
5aecb345e5 | ||
|
|
dcd76a0d2d | ||
|
|
5cb2e9f54c | ||
|
|
58a71c0ae8 | ||
|
|
6d2bba220f | ||
|
|
a8f2381155 | ||
|
|
389138197b | ||
|
|
ad7cb35d31 | ||
|
|
5e5c9e4729 | ||
|
|
e0b75ec3fb | ||
|
|
a09e110d24 | ||
|
|
24716bc367 | ||
|
|
33c27606d3 | ||
|
|
5cce51ed8d | ||
|
|
0b63b7b499 | ||
|
|
7998e7f4dc | ||
|
|
5827e3b3af | ||
|
|
ea68e82b1e | ||
|
|
c606e8893c | ||
|
|
16b30d9ae8 | ||
|
|
2b2903cfff | ||
|
|
abdbeade7b | ||
|
|
cc664e4d72 | ||
|
|
49304bbee3 | ||
|
|
5ddf0b948f | ||
|
|
5d8ea231be | ||
|
|
43ff843757 | ||
|
|
3ffb52121c | ||
|
|
2ab333e00f | ||
|
|
48d46dcc44 | ||
|
|
38c54eaebe | ||
|
|
ebae7ebc79 | ||
|
|
829aedc6e2 | ||
|
|
712115ef9d | ||
|
|
e709fd1ac6 | ||
|
|
433cbb021f | ||
|
|
4ec71da9a9 | ||
|
|
d1dbf6fbe1 | ||
|
|
d619f14839 | ||
|
|
211515ece1 | ||
|
|
3ec2ec2e11 | ||
|
|
0e7d5ed32b | ||
|
|
20aae8a3b7 | ||
|
|
0aa9df6acd | ||
|
|
ce7355626f | ||
|
|
0963b970a1 | ||
|
|
33e65e10ba | ||
|
|
6ea79bca36 | ||
|
|
7ddb876330 | ||
|
|
37f536a915 | ||
|
|
20a96e2632 | ||
|
|
6b6f9ae678 | ||
|
|
0e66da3930 | ||
|
|
42922c9e60 | ||
|
|
11488857ee | ||
|
|
6592325b67 | ||
|
|
e3c8364f31 | ||
|
|
d683892b1f | ||
|
|
448b780a8b | ||
|
|
b40aa13418 | ||
|
|
77183b9e4c | ||
|
|
9168f2a645 | ||
|
|
409f9eb5b8 | ||
|
|
147bd5e051 | ||
|
|
b5368c9423 | ||
|
|
1c9ac4e825 | ||
|
|
1d0a9262ae | ||
|
|
e22148fed4 | ||
|
|
f0d51596d1 | ||
|
|
8984702ba8 | ||
|
|
97b7512420 | ||
|
|
9493a4911e | ||
|
|
3cbae9c767 | ||
|
|
adc9ecf4cc | ||
|
|
7210ec9a4b | ||
|
|
401588f3a5 | ||
|
|
76ca37aaee | ||
|
|
4f0d61a2ac | ||
|
|
8e14d1dd87 | ||
|
|
477d46d52b | ||
|
|
6e971053fe | ||
|
|
93adedccec | ||
|
|
6f878fed91 | ||
|
|
4a26e4bc97 | ||
|
|
d2f73e3f33 | ||
|
|
292c5e93ad | ||
|
|
0778847062 | ||
|
|
7ec160f860 | ||
|
|
74a35d8be1 | ||
|
|
0cb6ed7b29 | ||
|
|
eba1c474b5 | ||
|
|
a39bed3bb1 | ||
|
|
a98cb75549 | ||
|
|
4d86030cc2 | ||
|
|
6e20d216bd | ||
|
|
42325ea368 | ||
|
|
239f3febc6 | ||
|
|
95ed29fd7d | ||
|
|
99f4203abf | ||
|
|
46c557f3a5 | ||
|
|
8936faf21f | ||
|
|
42adb37474 | ||
|
|
2cd845469c | ||
|
|
d19970de5e | ||
|
|
e3a93ca96e | ||
|
|
814db2c44e | ||
|
|
e6d5f427fc | ||
|
|
1d0cee5fe5 | ||
|
|
0b04312412 | ||
|
|
44431ad227 | ||
|
|
4cb102a64f | ||
|
|
f5f492845f | ||
|
|
fa8d486887 | ||
|
|
e71b6d6d23 | ||
|
|
bc387a5848 | ||
|
|
d46a60bb2b | ||
|
|
cf68058e67 | ||
|
|
6507b86973 | ||
|
|
9508936ac1 | ||
|
|
660951330c | ||
|
|
80a21bcc9e | ||
|
|
1abc0b3296 | ||
|
|
ba4d7f3ea3 | ||
|
|
c147866562 | ||
|
|
81cff95959 | ||
|
|
ece17f6a61 | ||
|
|
e76fc2d487 | ||
|
|
59febcdb9c | ||
|
|
7447434233 | ||
|
|
834f1c1b23 | ||
|
|
3cc17a63eb | ||
|
|
964c4ec6e9 | ||
|
|
2582a802cd | ||
|
|
16a5448f43 | ||
|
|
e96b872693 | ||
|
|
8cca081719 | ||
|
|
905f67810c | ||
|
|
e2e9739d09 | ||
|
|
c0ed989738 | ||
|
|
3a431adf02 | ||
|
|
45287628d4 | ||
|
|
b8e2216dd4 | ||
|
|
998465d2fc | ||
|
|
ff113534d9 | ||
|
|
631f9e6b8e | ||
|
|
2ceecd2ff1 | ||
|
|
dfcb1efa26 | ||
|
|
158a442036 | ||
|
|
542f2f4262 | ||
|
|
a111908f55 | ||
|
|
09d409d5cc | ||
|
|
cef04fc693 | ||
|
|
420f3a171b | ||
|
|
7784d240a8 | ||
|
|
1922d898af | ||
|
|
975b5738fb | ||
|
|
79be7b6913 | ||
|
|
b617bb5d64 | ||
|
|
3192bd018a | ||
|
|
691462e3d6 | ||
|
|
b0200a2efa | ||
|
|
48e4848536 | ||
|
|
2dcc2d4df5 | ||
|
|
f6a31b37a0 | ||
|
|
b451ca2121 | ||
|
|
5e177c75a5 | ||
|
|
5bc8330548 | ||
|
|
3b9ad729fb | ||
|
|
0a8d20c9b9 | ||
|
|
4cbaffcdc7 | ||
|
|
1263663fae | ||
|
|
f4a374a209 | ||
|
|
2a78745470 | ||
|
|
a3c5feaa68 | ||
|
|
f54f246247 | ||
|
|
dc352fe7a0 | ||
|
|
35b9a2f814 | ||
|
|
4368f6cb66 | ||
|
|
4ac4f1fe3a | ||
|
|
4ac430e488 | ||
|
|
43a4c3c82f | ||
|
|
bfe0c3fb48 | ||
|
|
9b84a0f701 | ||
|
|
f481c594e8 | ||
|
|
bfcc32b7be | ||
|
|
bf50367503 | ||
|
|
feb6b19c78 | ||
|
|
27694b6b31 | ||
|
|
1daaf7385c | ||
|
|
8a1cab9b74 | ||
|
|
f6afc84885 | ||
|
|
a702e0d59d | ||
|
|
d0e5eb01c0 | ||
|
|
9b8efbc712 | ||
|
|
7107175b93 | ||
|
|
86c402016f | ||
|
|
3e85f40563 | ||
|
|
250f7e5b27 | ||
|
|
916d99f5e1 | ||
|
|
4c554445c6 | ||
|
|
ee98a595ca | ||
|
|
2586e727e7 | ||
|
|
7d07130942 | ||
|
|
987264ab1b | ||
|
|
3b131ee2da | ||
|
|
ed29eb8bd7 | ||
|
|
cf6e23cebd | ||
|
|
692d463994 | ||
|
|
492590a0ae | ||
|
|
cb9d227db5 | ||
|
|
59398e4dd2 | ||
|
|
68e54315c3 | ||
|
|
4e79f13139 | ||
|
|
dac31786ea | ||
|
|
4c130fc4fd | ||
|
|
eb1dc6624f | ||
|
|
4ded3ad983 | ||
|
|
45a2b5d9b3 | ||
|
|
45dae75333 | ||
|
|
5cc89160e0 | ||
|
|
e11c910c39 | ||
|
|
5cf15c8609 | ||
|
|
4e0c592bfa | ||
|
|
211dd11336 | ||
|
|
8ebf254a75 | ||
|
|
74cd5a067f | ||
|
|
2b5a2f0b3d | ||
|
|
8ac4e6c72f | ||
|
|
d7bb9807b4 | ||
|
|
305a15f056 | ||
|
|
8259bc33ac | ||
|
|
bdf2526f80 | ||
|
|
84a784e28b | ||
|
|
b37c64742f | ||
|
|
b3e2df53d2 | ||
|
|
2ccc6534ee | ||
|
|
32525d6bd3 | ||
|
|
7b506fafcc | ||
|
|
aec65d0fa1 | ||
|
|
c9db325bd1 | ||
|
|
a27b4e1912 | ||
|
|
2172dbe8ba | ||
|
|
694a3b1e2c | ||
|
|
362f58ec3b | ||
|
|
c9c3c626e8 | ||
|
|
1569785a1c | ||
|
|
31ad524556 | ||
|
|
b1c5d9a594 | ||
|
|
17fe39a3ee | ||
|
|
acbb014b2d | ||
|
|
55f3edb5ad | ||
|
|
924fcc2834 | ||
|
|
238a56978d | ||
|
|
7aabf7f5e1 | ||
|
|
e0d84cd64c | ||
|
|
a76c1f4c51 | ||
|
|
f5fd6e046b | ||
|
|
f7d2fbd212 | ||
|
|
9d9be36521 | ||
|
|
1282a02212 | ||
|
|
88be0e2b56 | ||
|
|
4dc6cf2fb4 | ||
|
|
7a6a4998c7 | ||
|
|
14b80cc3e1 | ||
|
|
49011e9df9 | ||
|
|
5d7a30d806 | ||
|
|
44c4be1863 | ||
|
|
49bade15ae | ||
|
|
d70d9d35f8 | ||
|
|
a51acb8377 | ||
|
|
660d0c8de9 | ||
|
|
4505f0ef51 | ||
|
|
f41e70ba11 | ||
|
|
97ab1ec6e8 | ||
|
|
2e5d144e6d | ||
|
|
0eff833334 | ||
|
|
f6d8f2911d | ||
|
|
0c790d89dc | ||
|
|
1caa28dea9 | ||
|
|
42098e09ad | ||
|
|
d1a831e6ec | ||
|
|
769612c274 | ||
|
|
a82cc31a1f | ||
|
|
7f88822853 | ||
|
|
ac1a0457dc | ||
|
|
a542cd049a | ||
|
|
f71b508356 | ||
|
|
5a3a58c8a6 | ||
|
|
930bb5d71f | ||
|
|
17f90a3624 | ||
|
|
d3dcc548b2 | ||
|
|
57ec26f269 | ||
|
|
8435fc5542 | ||
|
|
bf43b61070 | ||
|
|
2030f7faf8 | ||
|
|
07208c9f49 | ||
|
|
b5e7992579 | ||
|
|
b259be8a38 | ||
|
|
5d9356f2ff | ||
|
|
d319e6a93d | ||
|
|
3fec3c89fc | ||
|
|
83497d5029 | ||
|
|
737c567cdc | ||
|
|
b9db1c1702 | ||
|
|
846ca5fd3b | ||
|
|
5733ed9a29 | ||
|
|
293eac3019 | ||
|
|
62cef96118 | ||
|
|
794ab4ef68 | ||
|
|
2c9b7c84df | ||
|
|
a49d0a50b9 | ||
|
|
35ce4dcadc | ||
|
|
74bddae86e | ||
|
|
b1c4bdf6f7 | ||
|
|
ed458cd89b | ||
|
|
20a94a5f37 | ||
|
|
d0e26c10aa | ||
|
|
c363eb4397 | ||
|
|
6f43b7974b | ||
|
|
8a033bbf35 | ||
|
|
afbf896c9a | ||
|
|
864f2deb28 | ||
|
|
fa4e074552 | ||
|
|
d85385ca8a | ||
|
|
13b8d63bc5 | ||
|
|
08bd58e0c4 | ||
|
|
ce70d8db4c | ||
|
|
a97fffccb8 | ||
|
|
35ee386274 | ||
|
|
58855c7b28 | ||
|
|
264c93585c | ||
|
|
b229e9d803 | ||
|
|
fc74aee750 | ||
|
|
5c8a835cda | ||
|
|
157494cab7 | ||
|
|
3b66ef528d | ||
|
|
b62d4e394b | ||
|
|
b508135218 | ||
|
|
bf04d658e6 | ||
|
|
c36ddf973c | ||
|
|
bc8b348a04 | ||
|
|
47ed8d3627 | ||
|
|
1a8ad73c3f | ||
|
|
f64f598987 | ||
|
|
b90a9ad4af | ||
|
|
ef8d1ad406 | ||
|
|
acf71fc46c | ||
|
|
58eb7f3bf3 | ||
|
|
0dc533d976 | ||
|
|
eee2445c45 | ||
|
|
aac14a00a4 | ||
|
|
ab182cbe20 | ||
|
|
8292a41ccd | ||
|
|
78dbe1cef1 | ||
|
|
6b8f18676c | ||
|
|
8d8feec318 | ||
|
|
1b3acfd15b | ||
|
|
d64933b30d | ||
|
|
89e91bdf8b | ||
|
|
c83611e526 | ||
|
|
fe28192438 | ||
|
|
cbbb81f46f | ||
|
|
8936972ba2 | ||
|
|
7cd6c9cf60 | ||
|
|
f3ff7f2a89 | ||
|
|
333c630469 | ||
|
|
3b19fa9bad | ||
|
|
e724b9101b | ||
|
|
0731c8f26f | ||
|
|
b609eaf83f | ||
|
|
9a292226cf | ||
|
|
74fd184097 | ||
|
|
f40a6438dd | ||
|
|
840e132408 | ||
|
|
1938f00c76 | ||
|
|
64e6d073d3 | ||
|
|
59ded50d59 | ||
|
|
386657a366 | ||
|
|
894f3b7aef | ||
|
|
7022786f34 | ||
|
|
a22540310c | ||
|
|
72d58d318a | ||
|
|
5542214409 | ||
|
|
b549f5181b | ||
|
|
d51fbbc37b | ||
|
|
e61f6b3fc9 | ||
|
|
179976e6b3 | ||
|
|
25f41809f5 | ||
|
|
9d6b1c3ea7 | ||
|
|
6587fee6b1 | ||
|
|
7cde32a2b3 | ||
|
|
1b7362838e | ||
|
|
03107c5b73 | ||
|
|
6d54ebfcec | ||
|
|
701ac1dd72 | ||
|
|
f60923c4a9 | ||
|
|
c1415d70f8 | ||
|
|
9e5a9baa66 | ||
|
|
cb1b7a8006 | ||
|
|
b1dcef379b | ||
|
|
15bac439ca | ||
|
|
c0296179ac | ||
|
|
d03b472f73 | ||
|
|
aa442db22b | ||
|
|
b8ac8e92e3 | ||
|
|
cc39a5d926 | ||
|
|
58a32ab4b3 | ||
|
|
f62e44c3e8 | ||
|
|
e3c383bb41 | ||
|
|
e2b620ae05 | ||
|
|
4ce93b11ee | ||
|
|
ede83831aa | ||
|
|
294901db5a | ||
|
|
b34aa0eeca | ||
|
|
b27c23f0eb | ||
|
|
8f3c77f719 | ||
|
|
76f53535bd | ||
|
|
c808c80e4a | ||
|
|
affd507151 | ||
|
|
11e138fe6e | ||
|
|
0af4b6a0d6 | ||
|
|
4df6a5ad25 | ||
|
|
89a6992d0c | ||
|
|
bd19958658 | ||
|
|
e612773645 | ||
|
|
54a9a3bd1d | ||
|
|
2cad3e09d2 | ||
|
|
fa4494ff8b | ||
|
|
cb829d8552 | ||
|
|
0a6c7acbd4 | ||
|
|
671e90a415 | ||
|
|
2599172831 | ||
|
|
ce05185cdf | ||
|
|
25157942a3 | ||
|
|
136193ab8d | ||
|
|
f705503531 | ||
|
|
d1edfabddb | ||
|
|
d3da2e2616 | ||
|
|
715ddf1924 | ||
|
|
f49b6e26a0 | ||
|
|
4b2fdfad48 | ||
|
|
b0dcbdc15e | ||
|
|
dd21cfd825 | ||
|
|
fb121ac75e | ||
|
|
45b1ed33b2 | ||
|
|
0ab79550c9 | ||
|
|
cbfe33c579 | ||
|
|
12368d6cbd | ||
|
|
74cbbb06b0 | ||
|
|
477170884b | ||
|
|
7c7d733d26 | ||
|
|
49f7f457cd | ||
|
|
79b5a05aeb | ||
|
|
81320adf28 | ||
|
|
c20ab3864d | ||
|
|
0bef880609 | ||
|
|
b9cbc9881a | ||
|
|
a1150800f8 | ||
|
|
c48febc4f9 | ||
|
|
1e394091d8 | ||
|
|
cf6c49b9a1 | ||
|
|
b7c1fda56f | ||
|
|
5d1c45e8f9 | ||
|
|
8bc4a66d49 | ||
|
|
8ff0b14281 | ||
|
|
ceb439ca2a | ||
|
|
0caa88a375 | ||
|
|
9c32d0df8a | ||
|
|
6b3e5fa7a0 | ||
|
|
69d89bc991 | ||
|
|
97b32b890e | ||
|
|
6f5dfeb20e | ||
|
|
c582b40525 | ||
|
|
5855391ac4 | ||
|
|
6875ad8ae0 | ||
|
|
11b02125dc | ||
|
|
475f3c3cc0 | ||
|
|
6e841e20c5 | ||
|
|
5e7513ad60 | ||
|
|
c9b0ba1123 | ||
|
|
f5343c83eb | ||
|
|
b06d75ec99 | ||
|
|
061b3464c2 | ||
|
|
55b449d743 | ||
|
|
0a04a1c80a | ||
|
|
1b79f08715 | ||
|
|
ba9de324bf | ||
|
|
9877e1ce3e | ||
|
|
5102eff399 | ||
|
|
7fedabee4b | ||
|
|
b0be198084 | ||
|
|
12594e51fd | ||
|
|
845b30131f | ||
|
|
ebce936557 | ||
|
|
762151758d | ||
|
|
4562d36b39 | ||
|
|
12c6fe1dc0 | ||
|
|
4461b55375 | ||
|
|
512e280c68 | ||
|
|
28ff4b391a | ||
|
|
4c56167446 | ||
|
|
8542ecd79c | ||
|
|
9fec6d4a18 | ||
|
|
b9a07a759b | ||
|
|
79264c7278 | ||
|
|
96ea874850 |
No files matched your search
+29
-29
@@ -2,34 +2,34 @@
|
||||
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
|
||||
- This is not a forum or a help section, this is strictly developer oriented
|
||||
|
||||
## Description
|
||||
|
||||
[Description of the bug]
|
||||
|
||||
### Expected behavior
|
||||
|
||||
[What you expected to happen]
|
||||
|
||||
### Actual behavior
|
||||
|
||||
[What is actually happening]
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
|
||||
### Bisect Results
|
||||
## Description
|
||||
|
||||
[Description of the bug]
|
||||
|
||||
### Expected behavior
|
||||
|
||||
[What you expected to happen]
|
||||
|
||||
### Actual behavior
|
||||
|
||||
[What is actually happening]
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
|
||||
### Bisect Results
|
||||
|
||||
[Try to bisect and tell us when this started happening]
|
||||
|
||||
### Version/Commit
|
||||
You can find this information under Information/System Information
|
||||
|
||||
- RetroArch: [version/commit]
|
||||
|
||||
### Environment information
|
||||
|
||||
[Try to bisect and tell us when this started happening]
|
||||
|
||||
### Version/Commit
|
||||
You can find this information under Information/System Information
|
||||
|
||||
- RetroArch: [version/commit]
|
||||
|
||||
### Environment information
|
||||
|
||||
- OS: [The operating system you're running]
|
||||
- Compiler: [In case you are running local builds]
|
||||
- Compiler: [In case you are running local builds]
|
||||
@@ -4,7 +4,6 @@
|
||||
2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
|
||||
3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
[Description of the pull request, detail any issues you are fixing or any features you are implementing]
|
||||
|
||||
+9
-2
@@ -62,7 +62,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
/freetype2/
|
||||
/ft2build.h
|
||||
/iconv.h
|
||||
/libxml2/
|
||||
/phoenix/
|
||||
/python/
|
||||
/rsound.h
|
||||
@@ -76,6 +75,11 @@ run.sh
|
||||
convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
info
|
||||
content_image_history.lpl
|
||||
saves
|
||||
screenshots
|
||||
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -87,7 +91,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
/pkg/wiiu/rpx
|
||||
/wiiu-devel.properties
|
||||
|
||||
|
||||
# 3ds
|
||||
/.lst
|
||||
*.3dsx
|
||||
@@ -165,6 +168,10 @@ retroarch_switch.nacp
|
||||
retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
ps2/irx/*.c
|
||||
ps2/libcdvd/lib/
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
|
||||
+59
-25
@@ -4,36 +4,37 @@ language: generic
|
||||
matrix:
|
||||
include:
|
||||
- compiler: mingw-x86
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-mingw-w64-i686
|
||||
- mingw-w64-i686-dev
|
||||
script:
|
||||
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
|
||||
- make
|
||||
addons: true
|
||||
env: CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x86
|
||||
addons: true
|
||||
env: C89_BUILD=1 CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x86
|
||||
addons: true
|
||||
env: CXX_BUILD=1 CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-mingw-w64-x86-64
|
||||
- mingw-w64-x86-64-dev
|
||||
script:
|
||||
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
|
||||
- make
|
||||
addons: true
|
||||
env: CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x64
|
||||
addons: true
|
||||
env: C89_BUILD=1 CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x64
|
||||
addons: true
|
||||
env: CXX_BUILD=1 CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: gcc
|
||||
# Install a more recent gcc than the default
|
||||
before_install:
|
||||
- sudo apt-get install -y g++-8
|
||||
env: CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: C89_BUILD=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: clang
|
||||
# Install a more recent clang than the default
|
||||
before_install:
|
||||
- sudo apt-get install -y libstdc++-7-dev
|
||||
- sudo apt-get install -y clang-6.0
|
||||
env: CC=clang-6.0 CXX=clang++-6.0
|
||||
- compiler: clang
|
||||
env: C89_BUILD=1 CC=clang-6.0 CXX=clang++-6.0
|
||||
- compiler: clang
|
||||
env: CXX_BUILD=1 CC=clang-6.0 CXX=clang++-6.0
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
script:
|
||||
@@ -50,12 +51,45 @@ matrix:
|
||||
on:
|
||||
branch: master
|
||||
|
||||
before_install:
|
||||
- |
|
||||
if [ "$CC" = gcc-8 ]; then
|
||||
# Install a more recent gcc than the default
|
||||
sudo apt-get install -y g++-8
|
||||
elif [ "$CC" = clang-6.0 ]; then
|
||||
# Install a more recent clang than the default
|
||||
sudo apt-get install -y libstdc++-7-dev
|
||||
sudo apt-get install -y clang-6.0
|
||||
elif [ "$CROSS_COMPILE" = i686-w64-mingw32- ]; then
|
||||
sudo apt-get install -y g++-mingw-w64-i686
|
||||
sudo apt-get install -y mingw-w64-i686-dev
|
||||
elif [ "$CROSS_COMPILE" = x86_64-w64-mingw32- ]; then
|
||||
sudo apt-get install -y g++-mingw-w64-x86-64
|
||||
sudo apt-get install -y mingw-w64-x86-64-dev
|
||||
fi
|
||||
|
||||
script:
|
||||
- ./configure
|
||||
- make
|
||||
- |
|
||||
if [ -n "$CROSS_COMPILE" ]; then
|
||||
ARGS="$ARGS --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_MENU" ]; then
|
||||
ARGS="$ARGS --disable-menu"
|
||||
fi
|
||||
- ./configure $ARGS
|
||||
- |
|
||||
if [ -n "$C89_BUILD" ]; then
|
||||
make C89_BUILD=1
|
||||
elif [ -n "$CXX_BUILD" ]; then
|
||||
make CXX_BUILD=1
|
||||
else
|
||||
make
|
||||
fi
|
||||
|
||||
env:
|
||||
global:
|
||||
- ARGS=""
|
||||
- MAKEFLAGS="-j2"
|
||||
- secure: "qc91ReC3OlzSh2gFaSH6TYzC2qIQvgA2AZff6J13eaH8xijAhuMzttZ0rMQJ0DWCIhPeUb0kIzVyaGoe4MwPALzpw1C1AznIWiZJ53HN+hWCOcS/af7YVPk6HPySnwqrS+Wv3AIIvIKFV2mxv21F/JbT/N+pArlRrp904Xj+KPo="
|
||||
addons:
|
||||
|
||||
Vendored
+148
-124
@@ -1,131 +1,155 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
"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}"
|
||||
],
|
||||
"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": ""
|
||||
},
|
||||
"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": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
"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}"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"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": "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}"
|
||||
],
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
"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
|
||||
}
|
||||
Vendored
+1
-1
@@ -24,7 +24,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "(gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
|
||||
Vendored
+28
-2
@@ -40,9 +40,35 @@
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c"
|
||||
"core_info.h": "c",
|
||||
"thread": "c",
|
||||
"xlocale": "c"
|
||||
"xlocale": "c",
|
||||
"menu_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",
|
||||
"menu_animation.h": "c",
|
||||
"audio_driver.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",
|
||||
"menu_filebrowser.h": "c",
|
||||
"ozone_sidebar.h": "c",
|
||||
"menu_thumbnail_path.h": "c",
|
||||
"badges.h": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
Vendored
+1
-1
@@ -45,7 +45,7 @@
|
||||
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
"isDefault": true
|
||||
},
|
||||
|
||||
"command": "./configure; make -j2",
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ index b90a8e40c3..e57c4df194 100644
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
@@ -313,6 +354,43 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
RARCH_LOG("[WGL]: Adaptive VSync supported.\n");
|
||||
|
||||
+136
-1
@@ -1,4 +1,139 @@
|
||||
# 1.7.7 (future)
|
||||
# 1.7.8 (future)
|
||||
|
||||
# 1.7.7
|
||||
- 3DS: Add unique IDs to prevent cores overwriting each other.
|
||||
- 3DS: Fix screen tearing when running 50Hz content.
|
||||
- ANDROID: We now target API level 26 (minimum is still API level 9).
|
||||
- ANDROID: Add option to vibrate on touch (works in menu or overlay).
|
||||
- ANDROID: Add device vibration option for cores that support rumble.
|
||||
- ANDROID: Add gamepad vibration support for cores that support rumble.
|
||||
- ANDROID: Allow stylus/pen to move mouse without pressing down.
|
||||
- AUDIO: Avoid deadlocks in certain audio drivers when toggling menu sounds on.
|
||||
- BLISS-BOX: Support PSX Jogcon (requires firmware 3.0).
|
||||
- CHEEVOS: Fix crash when reading memory that is out of range.
|
||||
- CHEEVOS: New Cheevos implementation enabled by default.
|
||||
- CHEEVOS: Pop-up badges when an achievement is triggered.
|
||||
- CRT: Dynamic super resolution support.
|
||||
- DISCORD: Fix potential crash when username is empty and discord is disabled.
|
||||
- DISCORD: Ask to join support for Linux.
|
||||
- INPUT/ANDROID: Add "Input Block Timeout" option.
|
||||
- COMMON: For platforms without HAVE_THREADS, don't automatically resume content when saving/loading states
|
||||
- COMMON: Make playlist sorting optional and consistent.
|
||||
- COMMON: Fix sorting of playlists with blank labels.
|
||||
- COMMON: Fix content scanner creating false positive playlist entries that also have wrong label and crc32.
|
||||
- COMMON: Add some MMX-optimized pixel conversion routines.
|
||||
- COMMON: Fix typo preventing some SSE2-optimized pixel conversions from being used.
|
||||
- COMMON: Add option to track how long content has been running over time.
|
||||
- COMMON: Fix buffer overflows in system information.
|
||||
- COMMON: Add option to change screen orientation via the windowing system (Android, Windows, X11).
|
||||
- COMMON: Show CPU model name in log.
|
||||
- COMMON: Add "Help -> Send Debug Info" option (and F10 hotkey) to send diagnostic info to the RetroArch team for help with problems.
|
||||
- COMMON: Show GPU device name/version in log.
|
||||
- COMMON: Add menu option to write log info to a file.
|
||||
- COMMON: Add subsystem support for playlists. Subsystem info is automatically saved to the history playlist for easy relaunching.
|
||||
- GL: Add new "gl1" OpenGL 1.1 compliant video driver for legacy GPUs and software renderers
|
||||
- GL: Add a new "glcore" driver with slang support (requires GL 3.2+ or GLES3).
|
||||
- GL: Draw OSD on top of overlay.
|
||||
- GONG: Add savestate support.
|
||||
- GONG: Add video refresh rate core options.
|
||||
- GONG: Two player support via core option.
|
||||
- GUI: Fix text alignment when using stb_unicode.
|
||||
- GUI: Fix text display issues when using Japanese (and other unicode-dependent language) text with stb_unicode.
|
||||
- GUI: Set language on first startup to the user's preferred OS language (Windows, *nix and Android).
|
||||
- INPUT: Add (scaled radial) analog deadzone and sensitivity options.
|
||||
- LIBRETRO: Add Turkish language support.
|
||||
- LIBRETRO: Allow non-accelerated video to rotate the display.
|
||||
- LOCALIZATION: Update Chinese (Simplified) translation.
|
||||
- LOCALIZATION: Update Chinese (Traditional) translation.
|
||||
- LOCALIZATION: Update Dutch translation.
|
||||
- LOCALIZATION: Update French translation.
|
||||
- LOCALIZATION: Update German translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- LOCALIZATION: Update Russian translation.
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- LOCALIZATION: Add new Turkish translation.
|
||||
- MIDI: Fix startup crash in midi driver.
|
||||
- MENU: Bugfix - you can no longer get stuck in Online Updater -> Update Core screen when toggling between ingame and menu.
|
||||
- MENU: Selectively hide 'Take Screenshot' for video drivers that don't support taking screenshots.
|
||||
- MENU: Framerate independent menu rendering. MaterialUI/Ozone/XMB/RGUI can now run at higher framerates.
|
||||
- MENU: Thumbnails work in history list.
|
||||
- MENU: Menu widgets.
|
||||
- MENU: Add memory statistics support to more context drivers.
|
||||
- MENU: Enable ozone driver for UWP builds.
|
||||
- MENU: Add optional "looping" menu text ticker with configurable speed.
|
||||
- MENU: Fix core video rendering when using ozone with GL cores that implement the scissor test.
|
||||
- MENU: Add optional playlist sublabels (associated core + play time, where available).
|
||||
- MENU: Dropdown list settings now apply immediately.
|
||||
- MENU: Add setting to require pressing the "Exit RetroArch" hotkey twice to confirm.
|
||||
- MENU: Now able to run at higher refresh rates than 60Hz.
|
||||
- MENU: Enable "Add to Favorites" without loading a core.
|
||||
- MENU: Allow core name to be hidden on history/favorites playlists.
|
||||
- MENU: Populate crc32 and db_name fields when adding history/favourites playlist entries.
|
||||
- MENU: Fix TTF files not showing in OSD/menu font selection screen.
|
||||
- MENU: Fix audio/video filters not showing in file browser.
|
||||
- MENU/MaterialUI: Add subsystem support.
|
||||
- MENU/MaterialUI: Add currently selected entry in dropdown menus.
|
||||
- MENU/OZONE: Add mouse support on entries (no sidebar yet).
|
||||
- MENU/OZONE: Allow collapsing the sidebar.
|
||||
- MENU/OZONE: Add thumbnail support.
|
||||
- MENU/OZONE: Battery notifications.
|
||||
- MENU/OZONE: Add wifi icon for network entries.
|
||||
- MENU/QT/WIMP: Add git version and build date to Help->About window.
|
||||
- MENU/QT/WIMP: Fix content loading via the file browser.
|
||||
- MENU/QT/WIMP: Add new settings window to control all RetroArch settings.
|
||||
- MENU/RGUI: Improve playlist titles.
|
||||
- MENU/RGUI: Add option to hide associated cores in playlists.
|
||||
- MENU/RGUI: Add internal upscaling option.
|
||||
- MENU/RGUI: Add subsystem support.
|
||||
- MENU/RGUI: Add menu sublabel support.
|
||||
- MENU/RGUI: Re-enable "Load Core" option when content is loaded.
|
||||
- MENU/RGUI: Add optional "Collections" entry to main menu.
|
||||
- MENU/RGUI: Add "Lock Menu Aspect Ratio" option.
|
||||
- MENU/RGUI: Add "full width" layout option.
|
||||
- MENU/RGUI: Ensure menu color theme is applied immediately.
|
||||
- MENU/RGUI: Fix "Lock Menu Aspect Ratio" option when using custom viewports.
|
||||
- MENU/RGUI: Add widescreen support.
|
||||
- MENU/RGUI: Allow text to be centred when selecting widescreen layouts.
|
||||
- MENU/RGUI: Add inline playlist thumbnail support.
|
||||
- MENU/RGUI: Add optional shadow effects.
|
||||
- MENU/RGUI: Performance optimizations.
|
||||
- MENU/RGUI: Add optional extended ASCII support.
|
||||
- MENU/RGUI: Add optional delay when loading thumbnails.
|
||||
- MENU/RGUI: Add on-screen keyboard.
|
||||
- MENU/RGUI: Battery notifications.
|
||||
- MENU/XMB: Prevent crashes when resizing to a tiny window.
|
||||
- MENU/XMB: XMB honors the 'show menu sublabels' setting now - was previously RGUI only
|
||||
- NETPLAY: Fix stall-out causing total disconnection with >2 players.
|
||||
- NETPLAY: Different (more intuitive?) default netplay share policy.
|
||||
- NETPLAY: Add hotkey option to toggle hosting on/off.
|
||||
- NETWORKING: Encode URLs to allow for spaces in directory names.
|
||||
- OSX: Prevent crash on exit.
|
||||
- OSX: Metal is now the default video driver for the RetroArch Metal build.
|
||||
- OSX: Enable CoreAudio v3 driver for Metal.
|
||||
- OSX/MACOS/IOS: Now uses the STB Unicode font driver.
|
||||
- PS2: CDFS support.
|
||||
- PS2: Implemented analog support for ps2 controllers.
|
||||
- PS2: Fix audio freeze after restarting core.
|
||||
- PS2: Fix issues with load state and the font driver.
|
||||
- PS2: File I/O now works for USB and network host.
|
||||
- PS2: Support cores with extra padding in their frame buffers.
|
||||
- SCANNER: New option 'Scan without core match'. When this is enabled,
|
||||
supported extensions by all installed cores are not checked, and instead
|
||||
it will add all content it finds to a playlist. This way, you can install the core you need later on after scanning. Not enabled by default.
|
||||
- SHADERS: Don't alphabetize shader presets.
|
||||
- SWITCH: Add rumble support.
|
||||
- SWITCH: Add USB keyboard support.
|
||||
- VITA: Add bluetooth mouse and keyboard support.
|
||||
- VULKAN: Fix color issues with RGBA8888 swapchains in readback (screenshots).
|
||||
- WII: Don't init overlay when RAM is beyond 72MB.
|
||||
- WII: Skip CRC calculation on content load, can improve load times of larger games by several seconds.
|
||||
- WINDOWS: Fall back to gl1 driver if accelerated GPU driver is unavailable.
|
||||
- WINDOWS: Allow winraw and xinput to work without dinput (needed for WinRT).
|
||||
- WINDOWS: Add MSVC2017 ARM desktop support.
|
||||
- UWP: Fix rewind by opting for slower codepath.
|
||||
- UWP: Fix relative path name issues when loading shaders.
|
||||
- UWP: Optimizations for VFS system.
|
||||
|
||||
# 1.7.6
|
||||
- ANDROID: Fix Xperia Play input binding.
|
||||
|
||||
+57
-57
@@ -1,58 +1,58 @@
|
||||
# Contributing to RetroArch
|
||||
|
||||
If you are a developer and want to contribute to the development of RetroArch, please read this.
|
||||
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
|
||||
|
||||
# Submitting a bug report
|
||||
When submitting a bug report, make sure that the bug is local to RetroArch.
|
||||
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
|
||||
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
|
||||
|
||||
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
|
||||
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
|
||||
|
||||
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
|
||||
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
|
||||
In console, make sure to run with verbose (-v) flag.
|
||||
|
||||
# Pull Requests
|
||||
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
|
||||
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
|
||||
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
|
||||
note that it's possible to continue pushing up commits to your branch.
|
||||
|
||||
If you want to develop a larger feature,
|
||||
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
|
||||
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
|
||||
|
||||
## libretro API
|
||||
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
|
||||
to libretro API will affect other projects as well, and we highly value API/ABI stability.
|
||||
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
|
||||
Features will not be added on basis of hypothetical libretro implementations.
|
||||
|
||||
# Coding style
|
||||
Having a consistent code style throughout the code base is highly valued.
|
||||
Please look through the code to get a feel for the coding style.
|
||||
A pull request may be asked to fix the coding style before submission.
|
||||
In other cases, a pull request may be followed up with a "style nit commit".
|
||||
|
||||
## Non-obvious things:
|
||||
- Code should be both ISO C99 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
|
||||
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
|
||||
- Using deprecated APIs is discouraged.
|
||||
|
||||
# Copyright Headers and AUTHORS
|
||||
If you have contributed to a part of a source file (a chunk of code that's written by you),
|
||||
you should add yourself to the copyright header in that file.
|
||||
If you have contributed significantly
|
||||
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
|
||||
We'd like your full name and email, and which features you have been part of.
|
||||
|
||||
# IRC
|
||||
Active development happens on IRC. (#retroarch @ irc.freenode.org)
|
||||
We value discussing things in "real-time".
|
||||
|
||||
# Commit Access
|
||||
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
|
||||
# Contributing to RetroArch
|
||||
|
||||
If you are a developer and want to contribute to the development of RetroArch, please read this.
|
||||
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
|
||||
|
||||
# Submitting a bug report
|
||||
When submitting a bug report, make sure that the bug is local to RetroArch.
|
||||
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
|
||||
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
|
||||
|
||||
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
|
||||
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
|
||||
|
||||
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
|
||||
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
|
||||
In console, make sure to run with verbose (-v) flag.
|
||||
|
||||
# Pull Requests
|
||||
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
|
||||
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
|
||||
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
|
||||
note that it's possible to continue pushing up commits to your branch.
|
||||
|
||||
If you want to develop a larger feature,
|
||||
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
|
||||
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
|
||||
|
||||
## libretro API
|
||||
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
|
||||
to libretro API will affect other projects as well, and we highly value API/ABI stability.
|
||||
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
|
||||
Features will not be added on basis of hypothetical libretro implementations.
|
||||
|
||||
# Coding style
|
||||
Having a consistent code style throughout the code base is highly valued.
|
||||
Please look through the code to get a feel for the coding style.
|
||||
A pull request may be asked to fix the coding style before submission.
|
||||
In other cases, a pull request may be followed up with a "style nit commit".
|
||||
|
||||
## Non-obvious things:
|
||||
- Code should be both ISO C99 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
|
||||
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
|
||||
- Using deprecated APIs is discouraged.
|
||||
|
||||
# Copyright Headers and AUTHORS
|
||||
If you have contributed to a part of a source file (a chunk of code that's written by you),
|
||||
you should add yourself to the copyright header in that file.
|
||||
If you have contributed significantly
|
||||
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
|
||||
We'd like your full name and email, and which features you have been part of.
|
||||
|
||||
# IRC
|
||||
Active development happens on IRC. (#retroarch @ irc.freenode.org)
|
||||
We value discussing things in "real-time".
|
||||
|
||||
# Commit Access
|
||||
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
|
||||
This typically happens when the "overhead" of looking through pull requests over time becomes a burden.
|
||||
+2
-2
@@ -19,6 +19,6 @@ $(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
||||
|
||||
generate: $(MOC_SRC)
|
||||
@echo $(MOC_SRC)
|
||||
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
@echo '$*=$($*)'
|
||||
@@ -1,23 +1,20 @@
|
||||
# This build was put together and is maintained by ModMyClassic.com for Libretro.
|
||||
# The purpose is to give Libretro a proper "official" build platform for classic consoles.
|
||||
# If you need any help in building for the classics or have any questions then please visit
|
||||
# https://modmyclassic.com/comp and we will help in any way possible!
|
||||
# https://modmyclassic.com/comp and we will help in any way possible!
|
||||
|
||||
# Building Prerequisites ##############
|
||||
# arm-linux-gnueabihf-gcc-8
|
||||
# arm-linux-gnueabihf-g++-8
|
||||
# arm-linux-gnueabihf-as
|
||||
# arm-linux-gnueabihf-strip
|
||||
# patchelf
|
||||
# bc
|
||||
|
||||
include version.all
|
||||
|
||||
# Classic Readme Variables ############
|
||||
# Classic Readme Variables ############
|
||||
CLASSIC_ALT_VER := $(shell echo $(RARCH_VERSION) | tr . _)
|
||||
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)c_COptimised
|
||||
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION)c \(Official Classic Optimised\)
|
||||
CLASSIC_VERSION := $(RARCH_VERSION)c \(Classic+\)
|
||||
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)
|
||||
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION) (Official Optimised)
|
||||
CLASSIC_VERSION := $(RARCH_VERSION)
|
||||
MOD_CREATOR := Libretro + ModMyClassic
|
||||
MOD_CATEGORY := RetroArch
|
||||
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
|
||||
@@ -28,10 +25,6 @@ HAKCHI_GIT := https://github.com/Classicmods/RA_Platform-Hakchi
|
||||
|
||||
# General Shared Variables ############
|
||||
TARGET := retroarch
|
||||
CC_V = arm-linux-gnueabihf-gcc-8
|
||||
CXX_V = arm-linux-gnueabihf-g++-8
|
||||
AS_V = arm-linux-gnueabihf-as
|
||||
CC_AS_V = arm-linux-gnueabihf-gcc-8
|
||||
|
||||
# Libretro Defines ####################
|
||||
#HAVE_CLASSIC = Classic Hook, disable some features
|
||||
@@ -41,15 +34,10 @@ CC_AS_V = arm-linux-gnueabihf-gcc-8
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
#Backup vanilla version files + ammend version
|
||||
cp version.all version_BACKUP.all && cp version.dtd version_BACKUP.dtd
|
||||
sed -i -e 's/RARCH_VERSION="[^"]*"/RARCH_VERSION="$(CLASSIC_VERSION)"/g' version.all
|
||||
sed -i -e 's/PACKAGE_VERSION "[^"]*"/PACKAGE_VERSION "$(CLASSIC_VERSION)"/g' version.all
|
||||
sed -i -e 's/ENTITY version "[^"]*"/ENTITY version "$(CLASSIC_VERSION)"/g' version.dtd
|
||||
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
|
||||
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
|
||||
./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
|
||||
make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
|
||||
CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
|
||||
make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
|
||||
arm-linux-gnueabihf-strip -v retroarch
|
||||
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
|
||||
|
||||
@@ -78,11 +66,6 @@ retroarch:
|
||||
@echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp
|
||||
|
||||
#COMMODORE 64 MINI BUILD (WIP)
|
||||
|
||||
#Clean down dirty files
|
||||
rm -f version.all version.dtd
|
||||
mv version_BACKUP.all version.all && mv version_BACKUP.dtd version.dtd
|
||||
@echo "*********************************************************************"
|
||||
@echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***"
|
||||
@echo "****************** Winner, Winner, Chicken Dinner! ******************"
|
||||
@@ -107,7 +90,4 @@ clean:
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
rm -f $(CLASSIC_MODS_VER).hmod
|
||||
rm -f version.all version.dtd
|
||||
mv -f version_BACKUP.all version.all || echo "Backup Doesn't Exist - Ignoring..."
|
||||
mv -f version_BACKUP.dtd version.dtd || echo "Backup Doesn't Exist - Ignoring..."
|
||||
rm -f *_BACKUP*
|
||||
|
||||
+182
-137
@@ -8,18 +8,26 @@ ifeq ($(HAVE_STACK_USAGE), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT),)
|
||||
HAVE_GL_CONTEXT=0
|
||||
HAVE_GL_CONTEXT = 0
|
||||
HAVE_GL_MODERN = 0
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_GL_CONTEXT=1
|
||||
HAVE_GL_CONTEXT = 1
|
||||
HAVE_GL_MODERN = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGL1), 1)
|
||||
HAVE_GL_CONTEXT = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGLES), 1)
|
||||
HAVE_GL_CONTEXT=1
|
||||
HAVE_GL_CONTEXT = 1
|
||||
HAVE_GL_MODERN = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGLES3), 1)
|
||||
HAVE_GL_CONTEXT=1
|
||||
HAVE_GL_CONTEXT = 1
|
||||
HAVE_GL_MODERN = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -94,9 +102,9 @@ ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETLOGGER), 1)
|
||||
DEF_FLAGS += -DHAVE_LOGGER
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
OBJ += network/net_logger.o
|
||||
DEF_FLAGS += -DHAVE_LOGGER
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
OBJ += network/net_logger.o
|
||||
endif
|
||||
|
||||
# System
|
||||
@@ -185,7 +193,6 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
|
||||
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
|
||||
$(LIBRETRO_COMM_DIR)/memmap/memalign.o \
|
||||
setting_list.o \
|
||||
list_special.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \
|
||||
@@ -211,13 +218,11 @@ OBJ += frontend/frontend.o \
|
||||
camera/camera_driver.o \
|
||||
wifi/wifi_driver.o \
|
||||
location/location_driver.o \
|
||||
driver.o \
|
||||
configuration.o \
|
||||
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
|
||||
dynamic.o \
|
||||
cores/dynamic_dummy.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/message_queue.o \
|
||||
managers/core_manager.o \
|
||||
managers/state_manager.o \
|
||||
gfx/drivers_font_renderer/bitmapfont.o \
|
||||
tasks/task_autodetect.o \
|
||||
@@ -232,10 +237,10 @@ OBJ += frontend/frontend.o \
|
||||
core_info.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/config_file.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \
|
||||
runtime_file.o \
|
||||
tasks/task_screenshot.o \
|
||||
tasks/task_powerstate.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
|
||||
gfx/drivers_shader/shader_null.o \
|
||||
gfx/video_shader_parse.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
|
||||
@@ -302,7 +307,8 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
intl/msg_hash_chs.o \
|
||||
intl/msg_hash_cht.o \
|
||||
intl/msg_hash_ar.o \
|
||||
intl/msg_hash_el.o
|
||||
intl/msg_hash_el.o \
|
||||
intl/msg_hash_tr.o
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_GETOPT_LONG), 1)
|
||||
@@ -350,6 +356,27 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/thumbnaildownload.o \
|
||||
ui/drivers/qt/thumbnailpackdownload.o \
|
||||
ui/drivers/qt/playlistthumbnaildownload.o
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
OBJ += ui/drivers/qt/settingswidgets.o \
|
||||
ui/drivers/qt/options/achievements.o \
|
||||
ui/drivers/qt/options/audio.o \
|
||||
ui/drivers/qt/options/configuration.o \
|
||||
ui/drivers/qt/options/core.o \
|
||||
ui/drivers/qt/options/directory.o \
|
||||
ui/drivers/qt/options/drivers.o \
|
||||
ui/drivers/qt/options/input.o \
|
||||
ui/drivers/qt/options/latency.o \
|
||||
ui/drivers/qt/options/logging.o \
|
||||
ui/drivers/qt/options/network.o \
|
||||
ui/drivers/qt/options/osd.o \
|
||||
ui/drivers/qt/options/playlists.o \
|
||||
ui/drivers/qt/options/recording.o \
|
||||
ui/drivers/qt/options/saving.o \
|
||||
ui/drivers/qt/options/throttle.o \
|
||||
ui/drivers/qt/options/ui.o \
|
||||
ui/drivers/qt/options/user.o \
|
||||
ui/drivers/qt/options/video.o
|
||||
endif
|
||||
|
||||
MOC_HEADERS += ui/drivers/ui_qt.h \
|
||||
ui/drivers/qt/ui_qt_load_core_window.h \
|
||||
@@ -360,6 +387,10 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/coreinfodialog.h \
|
||||
ui/drivers/qt/playlistentrydialog.h \
|
||||
ui/drivers/qt/viewoptionsdialog.h
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
|
||||
ui/drivers/qt/options/options.h
|
||||
endif
|
||||
|
||||
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
|
||||
#DEFINES += $(QT5WEBENGINE_CFLAGS)
|
||||
@@ -510,19 +541,18 @@ endif
|
||||
|
||||
# Audio
|
||||
|
||||
|
||||
ifeq ($(HAVE_COREAUDIO), 1)
|
||||
OBJ += audio/drivers/coreaudio.o
|
||||
HAVE_COREAUDIO_LIBS = 1
|
||||
HAVE_COREAUDIO_LIBS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_COREAUDIO3), 1)
|
||||
OBJ += audio/drivers/coreaudio3.o
|
||||
HAVE_COREAUDIO_LIBS = 1
|
||||
HAVE_COREAUDIO_LIBS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_COREAUDIO_LIBS), 1)
|
||||
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
||||
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORETEXT), 1)
|
||||
@@ -554,7 +584,10 @@ endif
|
||||
|
||||
ifeq ($(HAVE_ALSA), 1)
|
||||
OBJ += audio/drivers/alsa.o
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
|
||||
ifneq ($(HAVE_HAKCHI), 1)
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += audio/drivers/alsathread.o
|
||||
@@ -681,7 +714,7 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
|
||||
ifeq ($(HAVE_XMB),)
|
||||
HAVE_XMB = 1
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(HAVE_STRIPES),)
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
@@ -701,6 +734,10 @@ ifeq ($(HAVE_MENU), 1)
|
||||
DEFINES += -DHAVE_MENU
|
||||
HAVE_MENU_COMMON = 1
|
||||
|
||||
ifeq ($(HAVE_MENU_WIDGETS), 1)
|
||||
DEFINES += -DHAVE_MENU_WIDGETS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RGUI), 1)
|
||||
OBJ += menu/drivers/rgui.o
|
||||
DEFINES += -DHAVE_RGUI
|
||||
@@ -756,7 +793,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/widgets/menu_dialog.o \
|
||||
menu/widgets/menu_input_dialog.o \
|
||||
menu/widgets/menu_input_bind_dialog.o \
|
||||
menu/widgets/menu_entry.o \
|
||||
menu/widgets/menu_osk.o \
|
||||
menu/menu_cbs.o \
|
||||
menu/cbs/menu_cbs_ok.o \
|
||||
@@ -779,18 +815,23 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/menu_displaylist.o \
|
||||
menu/menu_animation.o \
|
||||
menu/drivers/menu_generic.o \
|
||||
menu/drivers/null.o
|
||||
menu/drivers/null.o \
|
||||
menu/menu_thumbnail_path.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON),1)
|
||||
OBJ += menu/drivers_display/menu_display_null.o
|
||||
endif
|
||||
OBJ += menu/drivers_display/menu_display_null.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_WIDGETS), 1)
|
||||
OBJ += menu/widgets/menu_widgets.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
OBJ += tasks/task_overlay.o \
|
||||
input/input_overlay.o \
|
||||
led/drivers/led_overlay.o
|
||||
input/input_overlay.o \
|
||||
led/drivers/led_overlay.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STB_FONT), 1)
|
||||
@@ -807,6 +848,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
||||
$(LIBRETRO_COMM_DIR)/rthreads/rsemaphore.o \
|
||||
gfx/video_thread_wrapper.o \
|
||||
audio/audio_thread_wrapper.o
|
||||
DEFINES += -DHAVE_THREADS
|
||||
@@ -857,9 +899,6 @@ ifeq ($(TARGET), retroarch_switch)
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
OBJ += gfx/drivers_context/switch_ctx.o
|
||||
endif
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/switch_pthread.o
|
||||
endif
|
||||
else
|
||||
OBJ += gfx/drivers/switch_gfx.o
|
||||
endif
|
||||
@@ -877,11 +916,11 @@ endif
|
||||
|
||||
ifeq ($(HAVE_WAYLAND), 1)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.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
|
||||
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
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
@@ -974,11 +1013,6 @@ ifeq ($(HAVE_IOHIDMANAGER), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORELOCATION), 1)
|
||||
DEFINES += -DHAVE_CORELOCATION
|
||||
LIBS += -framework CoreLocation
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HID), 1)
|
||||
DEFINES += -DHAVE_HID
|
||||
OBJ += input/drivers_joypad/hid_joypad.o \
|
||||
@@ -1053,14 +1087,29 @@ ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
|
||||
gfx/drivers_font/gl_raster_font.o \
|
||||
$(LIBRETRO_COMM_DIR)/glsym/rglgen.o
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
DEFINES += -DHAVE_OPENGL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
|
||||
gfx/drivers_font/gl_raster_font.o
|
||||
endif
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/glsym/rglgen.o
|
||||
|
||||
ifeq ($(HAVE_OPENGL1), 1)
|
||||
DEFINES += -DHAVE_OPENGL1
|
||||
OBJ += gfx/drivers/gl1.o \
|
||||
gfx/drivers_font/gl1_raster_font.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl.o
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGL1), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl1.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEOCORE), 1)
|
||||
@@ -1094,7 +1143,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OSMESA), 1)
|
||||
OBJ += gfx/drivers_context/osmesa_ctx.o
|
||||
OBJ += gfx/drivers_context/osmesa_ctx.o
|
||||
LIBS += -lOSMesa
|
||||
endif
|
||||
|
||||
@@ -1146,12 +1195,15 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
OBJ += gfx/drivers_context/cgl_ctx.o
|
||||
else ifneq ($(findstring Win32,$(OS)),)
|
||||
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
|
||||
WANT_WGL=1
|
||||
WANT_WGL=1
|
||||
endif
|
||||
LIBS += $(GL_LIBS)
|
||||
endif
|
||||
|
||||
OBJ += gfx/drivers_shader/shader_glsl.o
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
DEFINES += -DHAVE_GLSL
|
||||
OBJ += gfx/drivers_shader/shader_glsl.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
@@ -1218,6 +1270,21 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
HAVE_SPIRV_CROSS = 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
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl_core.o
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_OPENGL_CORE
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
NEED_CXX_LINKER = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OMAP), 1)
|
||||
OBJ += gfx/drivers/omap_gfx.o
|
||||
endif
|
||||
@@ -1301,8 +1368,8 @@ ifeq ($(HAVE_D3D11), 1)
|
||||
gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d11.o
|
||||
endif
|
||||
OBJ += menu/drivers_display/menu_display_d3d11.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D11
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
@@ -1428,13 +1495,6 @@ ifeq ($(WANT_WGL), 1)
|
||||
LIBS += -lcomctl32
|
||||
endif
|
||||
|
||||
#ifeq ($(HAVE_LIBXML2), 1)
|
||||
#LIBS += $(LIBXML2_LIBS)
|
||||
#DEFINES += $(LIBXML2_CFLAGS)
|
||||
#else
|
||||
#OBJ += $(LIBRETRO_COMM_DIR)/formats/xml/rxml.o
|
||||
#endif
|
||||
|
||||
# Compression/Archive
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
|
||||
@@ -1535,8 +1595,6 @@ ifeq ($(HAVE_CHD), 1)
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_chd.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_huffman.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o
|
||||
|
||||
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o
|
||||
ifeq ($(HAVE_FLAC),1)
|
||||
@@ -1573,6 +1631,7 @@ endif
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/xml/rxml.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/image_transfer.o
|
||||
|
||||
ifdef HAVE_COMPRESSION
|
||||
@@ -1631,8 +1690,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
endif
|
||||
|
||||
# Netplay
|
||||
DEFINES += -DHAVE_NETWORK_CMD
|
||||
OBJ += network/netplay/netplay_delta.o \
|
||||
DEFINES += -DHAVE_NETWORK_CMD
|
||||
OBJ += network/netplay/netplay_delta.o \
|
||||
network/netplay/netplay_frontend.o \
|
||||
network/netplay/netplay_handshake.o \
|
||||
network/netplay/netplay_init.o \
|
||||
@@ -1645,77 +1704,72 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
|
||||
# RetroAchievements
|
||||
ifeq ($(HAVE_CHEEVOS), 1)
|
||||
DEFINES += -DHAVE_CHEEVOS
|
||||
DEFINES += -DHAVE_CHEEVOS \
|
||||
-Ideps/rcheevos/include
|
||||
|
||||
ifeq ($(HAVE_NEW_CHEEVOS), 1)
|
||||
DEFINES += -DHAVE_NEW_CHEEVOS \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ideps/lua/src
|
||||
OBJ += cheevos-new/cheevos.o \
|
||||
cheevos-new/badges.o \
|
||||
cheevos-new/fixup.o \
|
||||
cheevos-new/parser.o \
|
||||
cheevos-new/hash.o \
|
||||
deps/rcheevos/src/rcheevos/trigger.o \
|
||||
deps/rcheevos/src/rcheevos/condset.o \
|
||||
deps/rcheevos/src/rcheevos/condition.o \
|
||||
deps/rcheevos/src/rcheevos/operand.o \
|
||||
deps/rcheevos/src/rcheevos/term.o \
|
||||
deps/rcheevos/src/rcheevos/expression.o \
|
||||
deps/rcheevos/src/rcheevos/value.o \
|
||||
deps/rcheevos/src/rcheevos/lboard.o \
|
||||
deps/rcheevos/src/rcheevos/alloc.o \
|
||||
deps/rcheevos/src/rcheevos/format.o \
|
||||
deps/rcheevos/src/rurl/url.o
|
||||
OBJ += cheevos/cheevos.o \
|
||||
cheevos/badges.o \
|
||||
cheevos/var.o \
|
||||
cheevos/cond.o \
|
||||
cheevos-new/cheevos.o \
|
||||
cheevos-new/fixup.o \
|
||||
cheevos-new/parser.o \
|
||||
cheevos-new/hash.o \
|
||||
deps/rcheevos/src/rcheevos/trigger.o \
|
||||
deps/rcheevos/src/rcheevos/condset.o \
|
||||
deps/rcheevos/src/rcheevos/condition.o \
|
||||
deps/rcheevos/src/rcheevos/operand.o \
|
||||
deps/rcheevos/src/rcheevos/term.o \
|
||||
deps/rcheevos/src/rcheevos/expression.o \
|
||||
deps/rcheevos/src/rcheevos/value.o \
|
||||
deps/rcheevos/src/rcheevos/lboard.o \
|
||||
deps/rcheevos/src/rcheevos/alloc.o \
|
||||
deps/rcheevos/src/rcheevos/format.o \
|
||||
deps/rcheevos/src/rcheevos/memref.o \
|
||||
deps/rcheevos/src/rcheevos/richpresence.o \
|
||||
deps/rcheevos/src/rurl/url.o
|
||||
|
||||
ifeq ($(HAVE_LUA), 1)
|
||||
DEFINES += -DHAVE_LUA \
|
||||
-DLUA_32BITS \
|
||||
-Ideps/lua/src
|
||||
OBJ += deps/lua/src/lapi.o \
|
||||
deps/lua/src/lcode.o \
|
||||
deps/lua/src/lctype.o \
|
||||
deps/lua/src/ldebug.o \
|
||||
deps/lua/src/ldo.o \
|
||||
deps/lua/src/ldump.o \
|
||||
deps/lua/src/lfunc.o \
|
||||
deps/lua/src/lgc.o \
|
||||
deps/lua/src/llex.o \
|
||||
deps/lua/src/lmem.o \
|
||||
deps/lua/src/lobject.o \
|
||||
deps/lua/src/lopcodes.o \
|
||||
deps/lua/src/lparser.o \
|
||||
deps/lua/src/lstate.o \
|
||||
deps/lua/src/lstring.o \
|
||||
deps/lua/src/ltable.o \
|
||||
deps/lua/src/ltm.o \
|
||||
deps/lua/src/lundump.o \
|
||||
deps/lua/src/lvm.o \
|
||||
deps/lua/src/lzio.o \
|
||||
deps/lua/src/lauxlib.o \
|
||||
deps/lua/src/lbaselib.o \
|
||||
deps/lua/src/lbitlib.o \
|
||||
deps/lua/src/lcorolib.o \
|
||||
deps/lua/src/ldblib.o \
|
||||
deps/lua/src/liolib.o \
|
||||
deps/lua/src/lmathlib.o \
|
||||
deps/lua/src/loslib.o \
|
||||
deps/lua/src/lstrlib.o \
|
||||
deps/lua/src/ltablib.o \
|
||||
deps/lua/src/lutf8lib.o \
|
||||
deps/lua/src/loadlib.o \
|
||||
deps/lua/src/linit.o
|
||||
else
|
||||
DEFINES += -DRC_DISABLE_LUA
|
||||
endif
|
||||
|
||||
# if not HAVE_NEW_CHEEVOS
|
||||
ifeq ($(HAVE_LUA), 1)
|
||||
DEFINES += -DHAVE_LUA \
|
||||
-DLUA_32BITS \
|
||||
-Ideps/lua/src
|
||||
OBJ += deps/lua/src/lapi.o \
|
||||
deps/lua/src/lcode.o \
|
||||
deps/lua/src/lctype.o \
|
||||
deps/lua/src/ldebug.o \
|
||||
deps/lua/src/ldo.o \
|
||||
deps/lua/src/ldump.o \
|
||||
deps/lua/src/lfunc.o \
|
||||
deps/lua/src/lgc.o \
|
||||
deps/lua/src/llex.o \
|
||||
deps/lua/src/lmem.o \
|
||||
deps/lua/src/lobject.o \
|
||||
deps/lua/src/lopcodes.o \
|
||||
deps/lua/src/lparser.o \
|
||||
deps/lua/src/lstate.o \
|
||||
deps/lua/src/lstring.o \
|
||||
deps/lua/src/ltable.o \
|
||||
deps/lua/src/ltm.o \
|
||||
deps/lua/src/lundump.o \
|
||||
deps/lua/src/lvm.o \
|
||||
deps/lua/src/lzio.o \
|
||||
deps/lua/src/lauxlib.o \
|
||||
deps/lua/src/lbaselib.o \
|
||||
deps/lua/src/lbitlib.o \
|
||||
deps/lua/src/lcorolib.o \
|
||||
deps/lua/src/ldblib.o \
|
||||
deps/lua/src/liolib.o \
|
||||
deps/lua/src/lmathlib.o \
|
||||
deps/lua/src/loslib.o \
|
||||
deps/lua/src/lstrlib.o \
|
||||
deps/lua/src/ltablib.o \
|
||||
deps/lua/src/lutf8lib.o \
|
||||
deps/lua/src/loadlib.o \
|
||||
deps/lua/src/linit.o
|
||||
else
|
||||
OBJ += cheevos/cheevos.o \
|
||||
cheevos/badges.o \
|
||||
cheevos/var.o \
|
||||
cheevos/cond.o
|
||||
DEFINES += -DRC_DISABLE_LUA
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DISCORD), 1)
|
||||
@@ -1785,18 +1839,9 @@ ifneq ($(findstring Win32,$(OS)),)
|
||||
gfx/display_servers/dispserv_win32.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gdi.o
|
||||
endif
|
||||
LIBS += -lmsimg32 -lhid -lsetupapi
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AVFOUNDATION), 1)
|
||||
ifeq ($(HAVE_COCOA), 1)
|
||||
DEFINES += -DHAVE_AVFOUNDATION
|
||||
LIBS += -framework AVFoundation
|
||||
LIBS += -framework CoreVideo
|
||||
LIBS += -framework CoreMedia
|
||||
OBJ += menu/drivers_display/menu_display_gdi.o
|
||||
endif
|
||||
LIBS += -lmsimg32 -lhid -lsetupapi
|
||||
endif
|
||||
|
||||
# Record
|
||||
|
||||
@@ -40,7 +40,7 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
|
||||
@@ -17,6 +17,7 @@ HAVE_RJPEG = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_EMSCRIPTEN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_WIDGETS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 0
|
||||
|
||||
+14
-12
@@ -89,6 +89,8 @@ else ifeq ($(platform), wii)
|
||||
libogc_platform := 1
|
||||
endif
|
||||
|
||||
HAVE_MENU_WIDGETS := 1
|
||||
|
||||
# PS3
|
||||
ifeq ($(platform), ps3)
|
||||
#TODO
|
||||
@@ -112,7 +114,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/libz -Iwii/libogc/include
|
||||
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
@@ -271,7 +273,7 @@ else ifeq ($(platform), vita)
|
||||
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
|
||||
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
|
||||
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc
|
||||
|
||||
@@ -384,7 +386,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS71COMNTOOLS)../../Vc7/include")
|
||||
@@ -430,9 +432,9 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/include")
|
||||
@@ -479,7 +481,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
|
||||
@@ -550,7 +552,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
|
||||
@@ -625,7 +627,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
|
||||
@@ -700,7 +702,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
|
||||
@@ -766,7 +768,7 @@ else
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
-Ideps/stb
|
||||
endif
|
||||
|
||||
OBJ = griffin/griffin.o $(PLATOBJS)
|
||||
@@ -973,8 +975,8 @@ ifneq (,$(findstring msvc,$(platform)))
|
||||
LINKOUT = -out:
|
||||
LINK = link.exe
|
||||
else
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
endif
|
||||
|
||||
|
||||
+4
-10
@@ -17,12 +17,9 @@ DEBUG ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
OBJ :=
|
||||
|
||||
# For threading we need to overwrite some vars with global defines because devkitPro's includes
|
||||
# make it hard for us. This works for the pthread wrapper
|
||||
DEFINES_THREAD := -Dpthread_t=Thread -Dpthread_mutex_t=Mutex -Dpthread_mutexattr_t='void*' -Dpthread_attr_t=int -Dpthread_cond_t=CondVar -Dpthread_condattr_t='int' -D_SYS__PTHREADTYPES_H_
|
||||
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD) -DHAVE_STB_VORBIS
|
||||
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' -DHAVE_STB_VORBIS
|
||||
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -52,6 +49,7 @@ HAVE_SWITCH = 1
|
||||
HAVE_LIBNX = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_MENU_WIDGETS = 1
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_EGL = 1
|
||||
@@ -121,16 +119,12 @@ ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
# The following line works around an issue in newlib that produces a compilation
|
||||
# error in glm. It will be removed as soon as this issue is resolved.
|
||||
CFLAGS += -D_GLIBCXX_USE_C99_MATH_TR1 -D_LDBL_EQ_DBL
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lstdc++ -lbz2 -lpng -lz -lnx -lm
|
||||
LIBS := -lswresample -lavformat -lavcodec -lavutil -lswscale -lstdc++ -lbz2 -lpng -lz -lnx -lm
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
LIBS := -lEGL -lglapi -ldrm_nouveau $(LIBS)
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ ifneq (,$(findstring Darwin,$(UNAME_S)))
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# path to tools
|
||||
# path to tools
|
||||
#---------------------------------------------------------------------------------
|
||||
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc
|
||||
export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
|
||||
@@ -56,7 +56,7 @@ ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSION
|
||||
#---------------------------------------------------------------------------------
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
@@ -19,6 +19,8 @@ HAVE_D3D11 := 1
|
||||
HAVE_D3D12 := 1
|
||||
HAVE_CG := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_MENU_WIDGETS := 1
|
||||
HAVE_VULKAN := 1
|
||||
HAVE_XAUDIO := 1
|
||||
HAVE_XINPUT := 1
|
||||
|
||||
+5
-4
@@ -33,6 +33,7 @@ else
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_MENU_WIDGETS := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_SOCKET_LEGACY := 0
|
||||
@@ -117,12 +118,12 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
|
||||
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
|
||||
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
@@ -157,10 +158,10 @@ $(TARGET).elf: $(OBJ) libretro_orbis.a
|
||||
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf
|
||||
rm -f $(OBJ) $(TARGET).elf
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
-include $(OBJ:.o=.depend)
|
||||
+1
-1
@@ -36,7 +36,7 @@ retroarch.pnd: install
|
||||
pnd_make -c -p retroarch.pnd -d $(PNDDIR)/ -x $(PNDDIR)/PXML.xml -i $(PNDDIR)/icon.png
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
|
||||
+27
-21
@@ -5,16 +5,19 @@ HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
#Configuration for IRX
|
||||
EE_BIN2O = bin2o
|
||||
IRX_DIR = $(PS2SDK)/iop/irx
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
# Lib CDVD
|
||||
CDVD_DIR = ps2/libcdvd
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
@@ -27,7 +30,7 @@ ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include
|
||||
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
@@ -38,14 +41,10 @@ RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHA
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CDVD_DIR)/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio
|
||||
LIBS += -lcdvdfs -lpatches -lpoweroff
|
||||
|
||||
#IRX modules
|
||||
# IRX modules - modules have to be in IRX_DIR
|
||||
IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
|
||||
IRX_OBJ = $(IRX:.irx=.o)
|
||||
EE_OBJS += $(IRX_OBJ)
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
@@ -65,8 +64,15 @@ endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdvd_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
|
||||
EE_OBJS += ps2/compat_files/fileXio_cdvd.o ps2/compat_files/ps2_descriptor.o
|
||||
|
||||
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
|
||||
EE_OBJS += griffin/griffin.o
|
||||
@@ -77,14 +83,18 @@ EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_IRX_OBJ = $(IRX_OBJ)
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_IRX_OBJ) $(EE_BIN)
|
||||
|
||||
all: irxdir $(EE_BIN)
|
||||
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
@@ -100,12 +110,8 @@ package:
|
||||
|
||||
release: clean all package
|
||||
|
||||
#Specific file name and output per IRX Module
|
||||
$(EE_IRX_OBJ):
|
||||
$(EE_BIN2O) $(EE_GPVAL) $(IRX_DIR)/$(@:.o=.irx) $@ $(@:.o=_irx)
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
||||
#Linking with C++
|
||||
|
||||
+9
-3
@@ -33,7 +33,13 @@ EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Idefines -Ideps/libz -Ilibretro-common/include -Ideps -Ideps/stb
|
||||
INCDIRS = -I. \
|
||||
-Idefines \
|
||||
-Ideps \
|
||||
-Ideps/libz \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -63,7 +69,7 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
DEFINES += -DHAVE_MENU -DHAVE_MENU_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
@@ -159,7 +165,7 @@ create-core:
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ create-core:
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
|
||||
+91
-91
@@ -1,91 +1,91 @@
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz
|
||||
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
|
||||
PPU_SRCS = frontend/frontend_salamander.c \
|
||||
frontend/frontend_driver.c \
|
||||
frontend/drivers/platform_ps3.c \
|
||||
frontend/drivers/platform_null.c \
|
||||
libretro-common/file/file_path.c \
|
||||
libretro-common/lists/dir_list.c \
|
||||
libretro-common/lists/string_list.c \
|
||||
libretro-common/file/retro_dirent.c \
|
||||
libretro-common/hash/rhash.c \
|
||||
libretro-common/string/stdstring.c \
|
||||
libretro-common/encodings/encoding_utf.c \
|
||||
libretro-common/compat/compat_strl.c \
|
||||
libretro-common/compat/compat_strcasestr.c \
|
||||
libretro-common/compat/fopen_utf8.c \
|
||||
libretro-common/streams/file_stream.c \
|
||||
libretro-common/vfs/vfs_implementation.c \
|
||||
libretro-common/file/config_file.c \
|
||||
file_path_str.c \
|
||||
verbosity.c
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
PPU_CFLAGS += -DHAVE_LOGGER
|
||||
PPU_SRCS += network/net_logger.c \
|
||||
libretro-common/net/net_compat.c \
|
||||
libretro-common/net/net_socket.c
|
||||
endif
|
||||
|
||||
PPU_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS),SNC)
|
||||
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
PPU_CFLAGS += -std=gnu99
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
endif
|
||||
|
||||
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz
|
||||
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
|
||||
PPU_SRCS = frontend/frontend_salamander.c \
|
||||
frontend/frontend_driver.c \
|
||||
frontend/drivers/platform_ps3.c \
|
||||
frontend/drivers/platform_null.c \
|
||||
libretro-common/file/file_path.c \
|
||||
libretro-common/lists/dir_list.c \
|
||||
libretro-common/lists/string_list.c \
|
||||
libretro-common/file/retro_dirent.c \
|
||||
libretro-common/hash/rhash.c \
|
||||
libretro-common/string/stdstring.c \
|
||||
libretro-common/encodings/encoding_utf.c \
|
||||
libretro-common/compat/compat_strl.c \
|
||||
libretro-common/compat/compat_strcasestr.c \
|
||||
libretro-common/compat/fopen_utf8.c \
|
||||
libretro-common/streams/file_stream.c \
|
||||
libretro-common/vfs/vfs_implementation.c \
|
||||
libretro-common/file/config_file.c \
|
||||
file_path_str.c \
|
||||
verbosity.c
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
PPU_CFLAGS += -DHAVE_LOGGER
|
||||
PPU_SRCS += network/net_logger.c \
|
||||
libretro-common/net/net_compat.c \
|
||||
libretro-common/net/net_socket.c
|
||||
endif
|
||||
|
||||
PPU_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS),SNC)
|
||||
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
PPU_CFLAGS += -std=gnu99
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
endif
|
||||
|
||||
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
+1
-1
@@ -96,7 +96,7 @@ CXXFLAGS += $(SHARED_FLAGS)
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -O3 -g
|
||||
CFLAGS += -O3 -g
|
||||
CXXFLAGS += -03 -g
|
||||
endif
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EXTRA_TARGETS = EBOOT.PBP
|
||||
PSP_EBOOT_TITLE = RetroArch
|
||||
@@ -51,7 +51,7 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
bootstrap/psp1/kernel_functions.o
|
||||
bootstrap/psp1/kernel_functions.o
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
+2
-2
@@ -17,7 +17,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER -DHAVE_UPDATE_ASSETS
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
@@ -116,7 +116,7 @@ endif
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub \
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub \
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ ELF_TARGET := retroarch-salamander_wii.elf
|
||||
|
||||
INCLUDE := -I. -Ilibretro-common/include -Ideps/libz
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
||||
else
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
LIBDIRS := -Lwii/libogc/libs/wii -L.
|
||||
endif
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ HAVE_FREETYPE := 1
|
||||
HAVE_FFMPEG := 0
|
||||
|
||||
HAVE_CG := 1
|
||||
HAVE_LIBXML2 := 0
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
@@ -46,11 +45,6 @@ FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2
|
||||
FREETYPE_LIBS := -lfreetype
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBXML2), 1)
|
||||
LIBXML2_CFLAGS := -Ilibxml2 -DHAVE_LIBXML2 -DHAVE_GLSL
|
||||
LIBXML2_LIBS := -lxml2 -liconv
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SDL), 1)
|
||||
SDL_LIBS := -lSDL
|
||||
SDL_CFLAGS := -ISDL -DHAVE_SDL
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
USAGE NOTES
|
||||
===========
|
||||
|
||||
This driver is meant for devices with Allwinner SoCs with Mali400 3D block and a
|
||||
This driver is meant for devices with Allwinner SoCs with Mali400 3D block and a
|
||||
good fbdev implementation. It is derived from the old Android GLES driver.
|
||||
|
||||
It was meant to be used on Cubieboard/Cubieboard2/Cubietruck, but it should not
|
||||
@@ -19,7 +19,7 @@ First we will clone and build the kernel:
|
||||
git clone https://github.com/mireq/linux-sunxi.git -b sunxi-3.4 --depth 1
|
||||
|
||||
Now we edit drivers/video/sunxi/disp/dev_fb.c, and uncomment the line 1074:
|
||||
// Fb_wait_for_vsync(info);
|
||||
// Fb_wait_for_vsync(info);
|
||||
|
||||
It is assumed you have a cross-compiler installed, so we configure and build the kernel and modules:
|
||||
|
||||
@@ -50,7 +50,7 @@ Now we need the headers. We can get them from here:
|
||||
|
||||
http://malideveloper.arm.com/develop-for-mali/sdks/opengl-es-sdk-for-linux/#opengl-es-sdk-for-linux-download
|
||||
|
||||
Download whatever version you want. We just get the headers from here, not machine-dependant compiled code.
|
||||
Download whatever version you want. We just get the headers from here, not machine-dependant compiled code.
|
||||
|
||||
Extract the files and copy the directories inside inc to /usr/include .
|
||||
|
||||
@@ -60,27 +60,27 @@ In the end you should have this on your system:
|
||||
|
||||
/usr/include/EGL/
|
||||
eglext.h
|
||||
egl.h
|
||||
eglplatform.h
|
||||
egl.h
|
||||
eglplatform.h
|
||||
fbdev_window.h
|
||||
/usr/include/GLES/
|
||||
glext.h
|
||||
gl.h
|
||||
gl.h
|
||||
glplatform.h
|
||||
/usr/include/GLES2
|
||||
gl2ext.h
|
||||
gl2.h
|
||||
gl2.h
|
||||
gl2platform.h
|
||||
/usr/include/GLES3
|
||||
gl3ext.h
|
||||
gl3.h
|
||||
gl3.h
|
||||
gl3platform.h
|
||||
|
||||
To enable mali_fbdev you must configure RetroArch with --enable-gles and --enable-mali_fbdev.
|
||||
|
||||
This is an example of what you would use on a CubieBoard2 for a lightweight RetroArch:
|
||||
|
||||
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip --disable-libxml2
|
||||
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
|
||||
|
||||
NOTE: A TTY hack is used to auto-clean the console on exit, and the fbdev ioctls are used to retrieve
|
||||
current video mode. Both things work good, but they are not exactly ideal solutions.
|
||||
|
||||
@@ -31,7 +31,7 @@ Latest binaries are currently hosted on the [buildbot](http://buildbot.libretro.
|
||||
|
||||
## Support
|
||||
|
||||
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), chat on [Discord](https://discord.gg/C4amCeV), or visit our IRC channel: #retroarch @ irc.freenode.org.
|
||||
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), chat on [discord](https://discord.gg/C4amCeV), or visit our IRC channel: #retroarch @ irc.freenode.org.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -105,7 +105,6 @@ OSX port of RetroArch requires latest versions of XCode to build.
|
||||
RetroArch can utilize these libraries if enabled:
|
||||
|
||||
- nvidia-cg-toolkit
|
||||
- libxml2 (GLSL XML shaders)
|
||||
- libfreetype2 (TTF font rendering on screen)
|
||||
|
||||
RetroArch needs at least one of these audio driver libraries:
|
||||
@@ -148,7 +147,7 @@ Instructions for compiling and installing RetroArch can be found in the [Libretr
|
||||
|
||||
## CRT 15Khz Resolution Switching
|
||||
|
||||
CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.
|
||||
CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.
|
||||
|
||||
If you are running Windows, before enabling the CRT SwitchRes options please make sure you have installed CRTEmudriver and installed some modelines. The minimum modelines for all games to switch correctly are:
|
||||
|
||||
|
||||
+17
-103
@@ -49,10 +49,6 @@
|
||||
#include "../file_path_special.h"
|
||||
#include "../content.h"
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#include <rthreads/rthreads.h>
|
||||
#endif
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
#define MENU_SOUND_FORMATS "ogg|mod|xm|s3m|mp3|flac"
|
||||
@@ -175,7 +171,6 @@ static bool audio_driver_mixer_mute_enable = false;
|
||||
static bool audio_driver_mute_enable = false;
|
||||
static bool audio_driver_use_float = false;
|
||||
static bool audio_driver_active = false;
|
||||
static bool audio_driver_data_own = false;
|
||||
static bool audio_mixer_active = false;
|
||||
|
||||
static float audio_driver_rate_control_delta = 0.0f;
|
||||
@@ -202,10 +197,6 @@ static void *audio_driver_context_audio_data = NULL;
|
||||
static bool audio_suspended = false;
|
||||
static bool audio_is_threaded = false;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
static slock_t* s_audio_driver_lock = NULL;
|
||||
#endif
|
||||
|
||||
static void audio_mixer_play_stop_sequential_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
static void audio_mixer_play_stop_cb(
|
||||
@@ -213,22 +204,6 @@ static void audio_mixer_play_stop_cb(
|
||||
static void audio_mixer_menu_stop_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#define audio_driver_lock() \
|
||||
if (s_audio_driver_lock) \
|
||||
slock_lock(s_audio_driver_lock)
|
||||
#else
|
||||
#define audio_driver_lock()
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#define audio_driver_unlock() \
|
||||
if (s_audio_driver_lock) \
|
||||
slock_unlock(s_audio_driver_lock)
|
||||
#else
|
||||
#define audio_driver_unlock()
|
||||
#endif
|
||||
|
||||
static enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@@ -278,12 +253,12 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
||||
stats->samples = (unsigned)audio_driver_free_samples_count;
|
||||
|
||||
#ifdef WARPUP
|
||||
/* uint64 to double not implemented, fair chance
|
||||
/* uint64 to double not implemented, fair chance
|
||||
* signed int64 to double doesn't exist either */
|
||||
/* https://forums.libretro.com/t/unsupported-platform-help/13903/ */
|
||||
(void)stddev;
|
||||
#elif defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
/* FIXME: error C2520: conversion from unsigned __int64
|
||||
/* FIXME: error C2520: conversion from unsigned __int64
|
||||
* to double not implemented, use signed __int64 */
|
||||
(void)stddev;
|
||||
#else
|
||||
@@ -301,9 +276,9 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
||||
stddev = (unsigned)
|
||||
sqrt((double)accum_var / (samples - 2));
|
||||
|
||||
stats->average_buffer_saturation = (1.0f - (float)avg
|
||||
stats->average_buffer_saturation = (1.0f - (float)avg
|
||||
/ audio_driver_buffer_size) * 100.0;
|
||||
stats->std_deviation_percentage = ((float)stddev
|
||||
stats->std_deviation_percentage = ((float)stddev
|
||||
/ audio_driver_buffer_size) * 100.0;
|
||||
#endif
|
||||
|
||||
@@ -547,15 +522,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
audio_source_ratio_original = audio_source_ratio_current =
|
||||
(double)settings->uints.audio_out_rate / audio_driver_input;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (s_audio_driver_lock)
|
||||
slock_free(s_audio_driver_lock);
|
||||
s_audio_driver_lock = slock_new();
|
||||
#endif
|
||||
|
||||
audio_resampler_lock_init();
|
||||
audio_resampler_lock();
|
||||
|
||||
if (!retro_resampler_realloc(
|
||||
&audio_driver_resampler_data,
|
||||
&audio_driver_resampler,
|
||||
@@ -568,8 +534,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
audio_driver_active = false;
|
||||
}
|
||||
|
||||
audio_resampler_unlock();
|
||||
|
||||
aud_inp_data = (float*)malloc(max_bufsamples * sizeof(float));
|
||||
retro_assert(aud_inp_data != NULL);
|
||||
|
||||
@@ -640,13 +604,9 @@ void audio_driver_set_nonblocking_state(bool enable)
|
||||
audio_driver_context_audio_data,
|
||||
settings->bools.audio_sync ? enable : true);
|
||||
|
||||
audio_driver_lock();
|
||||
|
||||
audio_driver_chunk_size = enable ?
|
||||
audio_driver_chunk_nonblock_size :
|
||||
audio_driver_chunk_block_size;
|
||||
|
||||
audio_driver_unlock();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -673,13 +633,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
src_data.data_out = NULL;
|
||||
src_data.output_frames = 0;
|
||||
|
||||
recording_driver_lock();
|
||||
|
||||
if (recording_data)
|
||||
recording_push_audio(data, samples);
|
||||
|
||||
recording_driver_unlock();
|
||||
|
||||
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
|
||||
&is_perfcnt_enable);
|
||||
|
||||
@@ -689,13 +645,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
!audio_driver_output_samples_buf)
|
||||
return;
|
||||
|
||||
audio_driver_lock();
|
||||
|
||||
convert_s16_to_float(audio_driver_input_data, data, samples,
|
||||
audio_volume_gain);
|
||||
|
||||
audio_driver_unlock();
|
||||
|
||||
src_data.data_in = audio_driver_input_data;
|
||||
src_data.input_frames = samples >> 1;
|
||||
|
||||
@@ -759,11 +711,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
src_data.ratio *= settings->floats.slowmotion_ratio;
|
||||
}
|
||||
|
||||
audio_driver_lock();
|
||||
|
||||
audio_resampler_lock();
|
||||
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
|
||||
audio_resampler_unlock();
|
||||
|
||||
is_active = audio_mixer_active;
|
||||
|
||||
@@ -777,8 +725,6 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
src_data.output_frames, mixer_gain, override);
|
||||
}
|
||||
|
||||
audio_driver_unlock();
|
||||
|
||||
output_data = audio_driver_output_samples_buf;
|
||||
output_frames = (unsigned)src_data.output_frames;
|
||||
|
||||
@@ -793,13 +739,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
output_frames *= sizeof(int16_t);
|
||||
}
|
||||
|
||||
audio_driver_lock();
|
||||
|
||||
if (current_audio->write(audio_driver_context_audio_data,
|
||||
output_data, output_frames * 2) < 0)
|
||||
audio_driver_active = false;
|
||||
|
||||
audio_driver_unlock();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -811,24 +753,14 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
**/
|
||||
void audio_driver_sample(int16_t left, int16_t right)
|
||||
{
|
||||
audio_driver_lock();
|
||||
|
||||
if (audio_suspended)
|
||||
{
|
||||
audio_driver_unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = left;
|
||||
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = right;
|
||||
|
||||
if (audio_driver_data_ptr < audio_driver_chunk_size)
|
||||
{
|
||||
audio_driver_unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
audio_driver_unlock();
|
||||
|
||||
audio_driver_flush(audio_driver_output_samples_conv_buf,
|
||||
audio_driver_data_ptr);
|
||||
@@ -975,7 +907,7 @@ void audio_driver_monitor_adjust_system_rates(void)
|
||||
float video_refresh_rate = settings->floats.video_refresh_rate;
|
||||
float max_timing_skew = settings->floats.audio_max_timing_skew;
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
const struct retro_system_timing *info =
|
||||
const struct retro_system_timing *info =
|
||||
(const struct retro_system_timing*)&av_info->timing;
|
||||
|
||||
if (info->sample_rate <= 0.0)
|
||||
@@ -1051,13 +983,10 @@ bool audio_driver_find_driver(void)
|
||||
|
||||
void audio_driver_deinit_resampler(void)
|
||||
{
|
||||
audio_resampler_lock();
|
||||
if (audio_driver_resampler && audio_driver_resampler_data)
|
||||
audio_driver_resampler->free(audio_driver_resampler_data);
|
||||
audio_driver_resampler = NULL;
|
||||
audio_driver_resampler_data = NULL;
|
||||
audio_resampler_unlock();
|
||||
audio_resampler_lock_free();
|
||||
}
|
||||
|
||||
bool audio_driver_free_devices_list(void)
|
||||
@@ -1281,7 +1210,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
|
||||
if (params->stream_type == AUDIO_STREAM_TYPE_NONE)
|
||||
return false;
|
||||
|
||||
|
||||
switch (params->slot_selection_type)
|
||||
{
|
||||
case AUDIO_MIXER_SLOT_SELECTION_MANUAL:
|
||||
@@ -1353,8 +1282,6 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
break;
|
||||
}
|
||||
|
||||
audio_driver_lock();
|
||||
|
||||
audio_mixer_active = true;
|
||||
|
||||
audio_mixer_streams[free_slot].name = !string_is_empty(params->basename) ? strdup(params->basename) : NULL;
|
||||
@@ -1367,8 +1294,6 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
audio_mixer_streams[free_slot].volume = params->volume;
|
||||
audio_mixer_streams[free_slot].stop_cb = stop_cb;
|
||||
|
||||
audio_driver_unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1406,7 +1331,8 @@ static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type)
|
||||
audio_mixer_streams[i].state = (enum audio_mixer_state)type;
|
||||
}
|
||||
|
||||
static void audio_driver_load_menu_bgm_callback(void *task_data, void *user_data, const char *error)
|
||||
static void audio_driver_load_menu_bgm_callback(retro_task_t *task,
|
||||
void *task_data, void *user_data, const char *error)
|
||||
{
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
@@ -1428,7 +1354,7 @@ void audio_driver_load_menu_sounds(void)
|
||||
const char *path_bgm = NULL;
|
||||
struct string_list *list = NULL;
|
||||
struct string_list *list_fallback = NULL;
|
||||
int i = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
sounds_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
sounds_fallback_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
@@ -1652,10 +1578,6 @@ bool audio_driver_deinit(void)
|
||||
{
|
||||
audio_driver_mixer_deinit();
|
||||
audio_driver_free_devices_list();
|
||||
#ifdef HAVE_THREADS
|
||||
slock_free(s_audio_driver_lock);
|
||||
s_audio_driver_lock = NULL;
|
||||
#endif
|
||||
|
||||
if (!audio_driver_deinit_internal())
|
||||
return false;
|
||||
@@ -1787,21 +1709,6 @@ void audio_driver_destroy_data(void)
|
||||
audio_driver_context_audio_data = NULL;
|
||||
}
|
||||
|
||||
void audio_driver_set_own_driver(void)
|
||||
{
|
||||
audio_driver_data_own = true;
|
||||
}
|
||||
|
||||
void audio_driver_unset_own_driver(void)
|
||||
{
|
||||
audio_driver_data_own = false;
|
||||
}
|
||||
|
||||
bool audio_driver_owns_driver(void)
|
||||
{
|
||||
return audio_driver_data_own;
|
||||
}
|
||||
|
||||
void audio_driver_suspend(void)
|
||||
{
|
||||
audio_suspended = true;
|
||||
@@ -1830,7 +1737,6 @@ bool audio_driver_is_active(void)
|
||||
void audio_driver_destroy(void)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
audio_driver_data_own = false;
|
||||
current_audio = NULL;
|
||||
}
|
||||
|
||||
@@ -1895,3 +1801,11 @@ bool *audio_get_bool_ptr(enum audio_action action)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* audio_driver_get_ident(void)
|
||||
{
|
||||
if (!current_audio)
|
||||
return NULL;
|
||||
|
||||
return current_audio->ident;
|
||||
}
|
||||
@@ -142,10 +142,6 @@ typedef struct audio_driver
|
||||
|
||||
void audio_driver_destroy_data(void);
|
||||
|
||||
void audio_driver_set_own_driver(void);
|
||||
|
||||
void audio_driver_unset_own_driver(void);
|
||||
|
||||
void audio_driver_suspend(void);
|
||||
|
||||
bool audio_driver_is_suspended(void);
|
||||
@@ -236,8 +232,6 @@ bool audio_driver_start(bool is_shutdown);
|
||||
|
||||
bool audio_driver_stop(void);
|
||||
|
||||
bool audio_driver_owns_driver(void);
|
||||
|
||||
void audio_driver_unset_callback(void);
|
||||
|
||||
void audio_driver_frame_is_reverse(void);
|
||||
@@ -288,6 +282,8 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
void audio_driver_load_menu_sounds(void);
|
||||
|
||||
const char* audio_driver_get_ident(void);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_audioio;
|
||||
extern audio_driver_t audio_oss;
|
||||
|
||||
@@ -180,6 +180,7 @@ error:
|
||||
#define BYTES_TO_FRAMES(bytes, frame_bits) ((bytes) * 8 / frame_bits)
|
||||
#define FRAMES_TO_BYTES(frames, frame_bits) ((frames) * frame_bits / 8)
|
||||
|
||||
static bool alsa_start(void *data, bool is_shutdown);
|
||||
static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
@@ -188,6 +189,12 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
snd_pcm_sframes_t size = BYTES_TO_FRAMES(size_, alsa->frame_bits);
|
||||
size_t frames_size = alsa->has_float ? sizeof(float) : sizeof(int16_t);
|
||||
|
||||
/* Workaround buggy menu code.
|
||||
* If a write happens while we're paused, we might never progress. */
|
||||
if (alsa->is_paused)
|
||||
if (!alsa_start(alsa, false))
|
||||
return -1;
|
||||
|
||||
if (alsa->nonblock)
|
||||
{
|
||||
while (size)
|
||||
@@ -269,6 +276,8 @@ static bool alsa_alive(void *data)
|
||||
static bool alsa_stop(void *data)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
if (alsa->is_paused)
|
||||
return true;
|
||||
|
||||
if (alsa->can_pause
|
||||
&& !alsa->is_paused)
|
||||
@@ -293,6 +302,8 @@ static void alsa_set_nonblock_state(void *data, bool state)
|
||||
static bool alsa_start(void *data, bool is_shutdown)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
if (!alsa->is_paused)
|
||||
return true;
|
||||
|
||||
if (alsa->can_pause
|
||||
&& alsa->is_paused)
|
||||
|
||||
+392
-382
@@ -1,382 +1,392 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2019 - Stuart Carnie
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#pragma mark - ringbuffer
|
||||
|
||||
typedef struct ringbuffer
|
||||
{
|
||||
float *buffer;
|
||||
size_t cap;
|
||||
atomic_int len;
|
||||
size_t writePtr;
|
||||
size_t readPtr;
|
||||
} ringbuffer_t;
|
||||
|
||||
typedef ringbuffer_t * ringbuffer_h;
|
||||
|
||||
static inline size_t rb_len(ringbuffer_h r)
|
||||
{
|
||||
return atomic_load_explicit(&r->len, memory_order_relaxed);
|
||||
}
|
||||
|
||||
static inline size_t rb_cap(ringbuffer_h r)
|
||||
{
|
||||
return (r->readPtr + r->cap - r->writePtr) % r->cap;
|
||||
}
|
||||
|
||||
static inline size_t rb_avail(ringbuffer_h r)
|
||||
{
|
||||
return r->cap - rb_len(r);
|
||||
}
|
||||
|
||||
static inline void rb_advance_write(ringbuffer_h r)
|
||||
{
|
||||
r->writePtr = (r->writePtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
|
||||
{
|
||||
r->writePtr = (r->writePtr + n) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_read(ringbuffer_h r)
|
||||
{
|
||||
r->readPtr = (r->readPtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_len_add(ringbuffer_h r, int n)
|
||||
{
|
||||
atomic_fetch_add(&r->len, n);
|
||||
}
|
||||
|
||||
static inline void rb_len_sub(ringbuffer_h r, int n)
|
||||
{
|
||||
atomic_fetch_sub(&r->len, n);
|
||||
}
|
||||
|
||||
static void rb_init(ringbuffer_h r, size_t cap)
|
||||
{
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
atomic_init(&r->len, 0);
|
||||
r->writePtr = 0;
|
||||
r->readPtr = 0;
|
||||
}
|
||||
|
||||
static void rb_free(ringbuffer_h r)
|
||||
{
|
||||
free(r->buffer);
|
||||
bzero(r, sizeof(*r));
|
||||
}
|
||||
|
||||
#define UNLIKELY(x) __builtin_expect((x), 0)
|
||||
#define LIKELY(x) __builtin_expect((x), 1)
|
||||
|
||||
static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
|
||||
{
|
||||
size_t avail = rb_avail(r);
|
||||
size_t n = MIN(len, avail);
|
||||
size_t first_write = n;
|
||||
size_t rest_write = 0;
|
||||
|
||||
if (r->writePtr + n > r->cap)
|
||||
{
|
||||
first_write = r->cap - r->writePtr;
|
||||
rest_write = n - first_write;
|
||||
}
|
||||
|
||||
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
|
||||
|
||||
rb_advance_write_n(r, n);
|
||||
rb_len_add(r, (int)n);
|
||||
}
|
||||
|
||||
static void rb_read_data(ringbuffer_h r, float *d0, float *d1, size_t len)
|
||||
{
|
||||
size_t need = len*2;
|
||||
|
||||
do {
|
||||
size_t have = rb_len(r);
|
||||
size_t n = MIN(have, need);
|
||||
int i = 0;
|
||||
for (; i < n/2; i++)
|
||||
{
|
||||
d0[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
d1[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
}
|
||||
|
||||
need -= n;
|
||||
rb_len_sub(r, (int)n);
|
||||
|
||||
if (UNLIKELY(need > 0))
|
||||
{
|
||||
/* we got more data */
|
||||
if (rb_len(r) > 0)
|
||||
continue;
|
||||
|
||||
// underflow
|
||||
const float quiet = 0.0f;
|
||||
size_t fill = (need/2)*sizeof(float);
|
||||
memset_pattern4(&d0[i], &quiet, fill);
|
||||
memset_pattern4(&d1[i], &quiet, fill);
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
|
||||
#pragma mark - CoreAudio3
|
||||
|
||||
static bool g_interrupted;
|
||||
|
||||
@interface CoreAudio3 : NSObject {
|
||||
ringbuffer_t _rb;
|
||||
dispatch_semaphore_t _sema;
|
||||
AUAudioUnit *_au;
|
||||
size_t _bufferSize;
|
||||
BOOL _nonBlock;
|
||||
}
|
||||
|
||||
@property (nonatomic, readwrite) BOOL nonBlock;
|
||||
@property (nonatomic, readonly) BOOL paused;
|
||||
@property (nonatomic, readonly) size_t writeAvailableInBytes;
|
||||
@property (nonatomic, readonly) size_t bufferSizeInBytes;
|
||||
|
||||
- (instancetype)initWithRate:(NSUInteger)rate
|
||||
latency:(NSUInteger)latency;
|
||||
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples;
|
||||
- (void)start;
|
||||
- (void)stop;
|
||||
|
||||
@end
|
||||
|
||||
@implementation CoreAudio3
|
||||
|
||||
- (instancetype)initWithRate:(NSUInteger)rate
|
||||
latency:(NSUInteger)latency {
|
||||
if (self = [super init])
|
||||
{
|
||||
_sema = dispatch_semaphore_create(0);
|
||||
|
||||
_bufferSize = (latency * rate) / 1000;
|
||||
_bufferSize *= 2; // stereo
|
||||
rb_init(&_rb, _bufferSize);
|
||||
|
||||
AudioComponentDescription desc = {
|
||||
.componentType = kAudioUnitType_Output,
|
||||
.componentSubType = kAudioUnitSubType_DefaultOutput,
|
||||
.componentManufacturer = kAudioUnitManufacturer_Apple,
|
||||
};
|
||||
|
||||
NSError *err;
|
||||
AUAudioUnit *au = [[AUAudioUnit alloc] initWithComponentDescription:desc error:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
AVAudioFormat *format = au.outputBusses[0].format;
|
||||
if (format.channelCount != 2)
|
||||
return nil;
|
||||
|
||||
AVAudioFormat *renderFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:rate channels:2];
|
||||
[au.inputBusses[0] setFormat:renderFormat error:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
ringbuffer_h rb = &_rb;
|
||||
__block dispatch_semaphore_t sema = _sema;
|
||||
au.outputProvider = ^AUAudioUnitStatus(AudioUnitRenderActionFlags * actionFlags, const AudioTimeStamp * timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber, AudioBufferList * inputData) {
|
||||
rb_read_data(rb, inputData->mBuffers[0].mData, inputData->mBuffers[1].mData, frameCount);
|
||||
dispatch_semaphore_signal(sema);
|
||||
return 0;
|
||||
};
|
||||
|
||||
[au allocateRenderResourcesAndReturnError:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
_au = au;
|
||||
|
||||
RARCH_LOG("[CoreAudio3]: Using buffer size of %u bytes: (latency = %u ms)\n", (unsigned)self.bufferSizeInBytes, latency);
|
||||
|
||||
[self start];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
rb_free(&_rb);
|
||||
}
|
||||
|
||||
- (BOOL)paused {
|
||||
return !_au.running;
|
||||
}
|
||||
|
||||
- (size_t)bufferSizeInBytes {
|
||||
return _bufferSize * sizeof(float);
|
||||
}
|
||||
|
||||
- (size_t)writeAvailableInBytes {
|
||||
return rb_avail(&_rb) * sizeof(float);
|
||||
}
|
||||
|
||||
- (void)start {
|
||||
NSError *err;
|
||||
[_au startHardwareAndReturnError:&err];
|
||||
}
|
||||
|
||||
- (void)stop {
|
||||
[_au stopHardware];
|
||||
}
|
||||
|
||||
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples {
|
||||
size_t written = 0;
|
||||
while (!g_interrupted && samples > 0)
|
||||
{
|
||||
size_t write_avail = rb_avail(&_rb);
|
||||
if (write_avail > samples)
|
||||
write_avail = samples;
|
||||
|
||||
rb_write_data(&_rb, data, write_avail);
|
||||
data += write_avail;
|
||||
written += write_avail;
|
||||
samples -= write_avail;
|
||||
|
||||
if (_nonBlock)
|
||||
break;
|
||||
|
||||
if (write_avail == 0)
|
||||
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
static void coreaudio3_free(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge_transfer CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return;
|
||||
|
||||
[dev stop];
|
||||
dev = nil;
|
||||
}
|
||||
|
||||
static void *coreaudio3_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
CoreAudio3 *dev = [[CoreAudio3 alloc] initWithRate:rate
|
||||
latency:latency];
|
||||
|
||||
*new_rate = rate;
|
||||
|
||||
return (__bridge_retained void *)dev;
|
||||
}
|
||||
|
||||
static ssize_t coreaudio3_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
return [dev writeFloat:(const float *)buf_ samples:size/sizeof(float)] * sizeof(float);
|
||||
}
|
||||
|
||||
static void coreaudio3_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return;
|
||||
|
||||
dev.nonBlock = state;
|
||||
}
|
||||
|
||||
static bool coreaudio3_alive(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
return !dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_stop(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
[dev stop];
|
||||
return dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_start(void *data, bool is_shutdown)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
[dev start];
|
||||
return !dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_use_float(void *data)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
static size_t coreaudio3_write_avail(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return 0;
|
||||
|
||||
return dev.writeAvailableInBytes;
|
||||
}
|
||||
|
||||
static size_t coreaudio3_buffer_size(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return 0;
|
||||
|
||||
return dev.bufferSizeInBytes;
|
||||
}
|
||||
|
||||
audio_driver_t audio_coreaudio3 = {
|
||||
coreaudio3_init,
|
||||
coreaudio3_write,
|
||||
coreaudio3_stop,
|
||||
coreaudio3_start,
|
||||
coreaudio3_alive,
|
||||
coreaudio3_set_nonblock_state,
|
||||
coreaudio3_free,
|
||||
coreaudio3_use_float,
|
||||
"coreaudio3",
|
||||
coreaudio3_write_avail,
|
||||
coreaudio3_buffer_size,
|
||||
};
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2019 - Stuart Carnie
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#pragma mark - ringbuffer
|
||||
|
||||
typedef struct ringbuffer
|
||||
{
|
||||
float *buffer;
|
||||
size_t cap;
|
||||
atomic_int len;
|
||||
size_t writePtr;
|
||||
size_t readPtr;
|
||||
} ringbuffer_t;
|
||||
|
||||
typedef ringbuffer_t * ringbuffer_h;
|
||||
|
||||
static inline size_t rb_len(ringbuffer_h r)
|
||||
{
|
||||
return atomic_load_explicit(&r->len, memory_order_relaxed);
|
||||
}
|
||||
|
||||
static inline size_t rb_cap(ringbuffer_h r)
|
||||
{
|
||||
return (r->readPtr + r->cap - r->writePtr) % r->cap;
|
||||
}
|
||||
|
||||
static inline size_t rb_avail(ringbuffer_h r)
|
||||
{
|
||||
return r->cap - rb_len(r);
|
||||
}
|
||||
|
||||
static inline void rb_advance_write(ringbuffer_h r)
|
||||
{
|
||||
r->writePtr = (r->writePtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
|
||||
{
|
||||
r->writePtr = (r->writePtr + n) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_read(ringbuffer_h r)
|
||||
{
|
||||
r->readPtr = (r->readPtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_len_add(ringbuffer_h r, int n)
|
||||
{
|
||||
atomic_fetch_add(&r->len, n);
|
||||
}
|
||||
|
||||
static inline void rb_len_sub(ringbuffer_h r, int n)
|
||||
{
|
||||
atomic_fetch_sub(&r->len, n);
|
||||
}
|
||||
|
||||
static void rb_init(ringbuffer_h r, size_t cap)
|
||||
{
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
atomic_init(&r->len, 0);
|
||||
r->writePtr = 0;
|
||||
r->readPtr = 0;
|
||||
}
|
||||
|
||||
static void rb_free(ringbuffer_h r)
|
||||
{
|
||||
free(r->buffer);
|
||||
memset(r, 0, sizeof(*r));
|
||||
}
|
||||
|
||||
#define UNLIKELY(x) __builtin_expect((x), 0)
|
||||
#define LIKELY(x) __builtin_expect((x), 1)
|
||||
|
||||
static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
|
||||
{
|
||||
size_t avail = rb_avail(r);
|
||||
size_t n = MIN(len, avail);
|
||||
size_t first_write = n;
|
||||
size_t rest_write = 0;
|
||||
|
||||
if (r->writePtr + n > r->cap)
|
||||
{
|
||||
first_write = r->cap - r->writePtr;
|
||||
rest_write = n - first_write;
|
||||
}
|
||||
|
||||
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
|
||||
|
||||
rb_advance_write_n(r, n);
|
||||
rb_len_add(r, (int)n);
|
||||
}
|
||||
|
||||
static void rb_read_data(ringbuffer_h r,
|
||||
float *d0, float *d1, size_t len)
|
||||
{
|
||||
size_t need = len * 2;
|
||||
|
||||
do {
|
||||
size_t have = rb_len(r);
|
||||
size_t n = MIN(have, need);
|
||||
int i = 0;
|
||||
for (; i < n/2; i++)
|
||||
{
|
||||
d0[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
d1[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
}
|
||||
|
||||
need -= n;
|
||||
rb_len_sub(r, (int)n);
|
||||
|
||||
if (UNLIKELY(need > 0))
|
||||
{
|
||||
const float quiet = 0.0f;
|
||||
size_t fill;
|
||||
|
||||
/* we got more data */
|
||||
if (rb_len(r) > 0)
|
||||
continue;
|
||||
|
||||
/* underflow */
|
||||
fill = (need/2)*sizeof(float);
|
||||
memset_pattern4(&d0[i], &quiet, fill);
|
||||
memset_pattern4(&d1[i], &quiet, fill);
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
|
||||
#pragma mark - CoreAudio3
|
||||
|
||||
static bool g_interrupted;
|
||||
|
||||
@interface CoreAudio3 : NSObject {
|
||||
ringbuffer_t _rb;
|
||||
dispatch_semaphore_t _sema;
|
||||
AUAudioUnit *_au;
|
||||
size_t _bufferSize;
|
||||
BOOL _nonBlock;
|
||||
}
|
||||
|
||||
@property (nonatomic, readwrite) BOOL nonBlock;
|
||||
@property (nonatomic, readonly) BOOL paused;
|
||||
@property (nonatomic, readonly) size_t writeAvailableInBytes;
|
||||
@property (nonatomic, readonly) size_t bufferSizeInBytes;
|
||||
|
||||
- (instancetype)initWithRate:(NSUInteger)rate
|
||||
latency:(NSUInteger)latency;
|
||||
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples;
|
||||
- (void)start;
|
||||
- (void)stop;
|
||||
|
||||
@end
|
||||
|
||||
@implementation CoreAudio3
|
||||
|
||||
- (instancetype)initWithRate:(NSUInteger)rate
|
||||
latency:(NSUInteger)latency {
|
||||
if (self = [super init])
|
||||
{
|
||||
NSError *err;
|
||||
AUAudioUnit *au;
|
||||
AudioComponentDescription desc;
|
||||
AVAudioFormat *format, *renderFormat;
|
||||
|
||||
_sema = dispatch_semaphore_create(0);
|
||||
|
||||
_bufferSize = (latency * rate) / 1000;
|
||||
_bufferSize *= 2; /* stereo */
|
||||
rb_init(&_rb, _bufferSize);
|
||||
|
||||
desc.componentType = kAudioUnitType_Output;
|
||||
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
|
||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||
|
||||
au = [[AUAudioUnit alloc] initWithComponentDescription:desc error:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
format = au.outputBusses[0].format;
|
||||
if (format.channelCount != 2)
|
||||
return nil;
|
||||
|
||||
renderFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:rate channels:2];
|
||||
[au.inputBusses[0] setFormat:renderFormat error:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
ringbuffer_h rb = &_rb;
|
||||
__block dispatch_semaphore_t sema = _sema;
|
||||
au.outputProvider = ^AUAudioUnitStatus(AudioUnitRenderActionFlags * actionFlags, const AudioTimeStamp * timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber, AudioBufferList * inputData)
|
||||
{
|
||||
rb_read_data(rb, inputData->mBuffers[0].mData, inputData->mBuffers[1].mData, frameCount);
|
||||
dispatch_semaphore_signal(sema);
|
||||
return 0;
|
||||
};
|
||||
|
||||
[au allocateRenderResourcesAndReturnError:&err];
|
||||
if (err != nil)
|
||||
return nil;
|
||||
|
||||
_au = au;
|
||||
|
||||
RARCH_LOG("[CoreAudio3]: Using buffer size of %u bytes: (latency = %u ms)\n", (unsigned)self.bufferSizeInBytes, latency);
|
||||
|
||||
[self start];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
rb_free(&_rb);
|
||||
}
|
||||
|
||||
- (BOOL)paused {
|
||||
return !_au.running;
|
||||
}
|
||||
|
||||
- (size_t)bufferSizeInBytes {
|
||||
return _bufferSize * sizeof(float);
|
||||
}
|
||||
|
||||
- (size_t)writeAvailableInBytes {
|
||||
return rb_avail(&_rb) * sizeof(float);
|
||||
}
|
||||
|
||||
- (void)start {
|
||||
NSError *err;
|
||||
[_au startHardwareAndReturnError:&err];
|
||||
}
|
||||
|
||||
- (void)stop {
|
||||
[_au stopHardware];
|
||||
}
|
||||
|
||||
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples {
|
||||
size_t written = 0;
|
||||
while (!g_interrupted && samples > 0)
|
||||
{
|
||||
size_t write_avail = rb_avail(&_rb);
|
||||
if (write_avail > samples)
|
||||
write_avail = samples;
|
||||
|
||||
rb_write_data(&_rb, data, write_avail);
|
||||
data += write_avail;
|
||||
written += write_avail;
|
||||
samples -= write_avail;
|
||||
|
||||
if (_nonBlock)
|
||||
break;
|
||||
|
||||
if (write_avail == 0)
|
||||
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
static void coreaudio3_free(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge_transfer CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return;
|
||||
|
||||
[dev stop];
|
||||
dev = nil;
|
||||
}
|
||||
|
||||
static void *coreaudio3_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
CoreAudio3 *dev = [[CoreAudio3 alloc] initWithRate:rate
|
||||
latency:latency];
|
||||
|
||||
*new_rate = rate;
|
||||
|
||||
return (__bridge_retained void *)dev;
|
||||
}
|
||||
|
||||
static ssize_t coreaudio3_write(void *data,
|
||||
const void *buf_, size_t size)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
return [dev writeFloat:(const float *)
|
||||
buf_ samples:size/sizeof(float)] * sizeof(float);
|
||||
}
|
||||
|
||||
static void coreaudio3_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return;
|
||||
|
||||
dev.nonBlock = state;
|
||||
}
|
||||
|
||||
static bool coreaudio3_alive(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
return !dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_stop(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
[dev stop];
|
||||
return dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_start(void *data, bool is_shutdown)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return NO;
|
||||
|
||||
[dev start];
|
||||
return !dev.paused;
|
||||
}
|
||||
|
||||
static bool coreaudio3_use_float(void *data)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
static size_t coreaudio3_write_avail(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return 0;
|
||||
|
||||
return dev.writeAvailableInBytes;
|
||||
}
|
||||
|
||||
static size_t coreaudio3_buffer_size(void *data)
|
||||
{
|
||||
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
|
||||
if (dev == nil)
|
||||
return 0;
|
||||
|
||||
return dev.bufferSizeInBytes;
|
||||
}
|
||||
|
||||
audio_driver_t audio_coreaudio3 = {
|
||||
coreaudio3_init,
|
||||
coreaudio3_write,
|
||||
coreaudio3_stop,
|
||||
coreaudio3_start,
|
||||
coreaudio3_alive,
|
||||
coreaudio3_set_nonblock_state,
|
||||
coreaudio3_free,
|
||||
coreaudio3_use_float,
|
||||
"coreaudio3",
|
||||
NULL, /* device_list_new */
|
||||
NULL, /* device_list_free */
|
||||
coreaudio3_write_avail,
|
||||
coreaudio3_buffer_size,
|
||||
};
|
||||
+13
-128
@@ -23,83 +23,16 @@
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
typedef struct ps2_audio
|
||||
{
|
||||
fifo_buffer_t* buffer;
|
||||
bool nonblocking;
|
||||
volatile bool running;
|
||||
int worker_thread;
|
||||
int lock;
|
||||
int cond_lock;
|
||||
|
||||
} ps2_audio_t;
|
||||
|
||||
static ps2_audio_t *backup_ps2;
|
||||
static u8 audioThreadStack[4 * 1024] __attribute__ ((aligned(16)));
|
||||
|
||||
#define AUDIO_OUT_BUFFER 2 * 1024
|
||||
#define AUDIO_BUFFER 64 * 1024
|
||||
#define AUDIO_BUFFER 128 * 1024
|
||||
#define AUDIO_CHANNELS 2
|
||||
#define AUDIO_BITS 16
|
||||
#define AUDIO_PRIORITY 0x7F /* LOWER VALUE GRATHER PRIORITY*/
|
||||
|
||||
static void audioMainLoop(void *data)
|
||||
typedef struct ps2_audio
|
||||
{
|
||||
char out_tmp[AUDIO_OUT_BUFFER];
|
||||
ps2_audio_t* ps2 = backup_ps2;
|
||||
bool nonblocking;
|
||||
bool running;
|
||||
|
||||
while (ps2->running)
|
||||
{
|
||||
size_t size;
|
||||
|
||||
WaitSema(ps2->lock);
|
||||
size = MIN(fifo_read_avail(ps2->buffer), sizeof(out_tmp));
|
||||
fifo_read(ps2->buffer, out_tmp, size);
|
||||
iSignalSema(ps2->lock);
|
||||
iSignalSema(ps2->cond_lock);
|
||||
|
||||
audsrv_wait_audio(size);
|
||||
audsrv_play_audio(out_tmp, size);
|
||||
}
|
||||
|
||||
audsrv_stop_audio();
|
||||
ExitDeleteThread();
|
||||
}
|
||||
|
||||
static void audioCreateThread(ps2_audio_t *ps2)
|
||||
{
|
||||
int ret;
|
||||
ee_thread_t thread;
|
||||
|
||||
thread.func=&audioMainLoop;
|
||||
thread.stack=audioThreadStack;
|
||||
thread.stack_size=sizeof(audioThreadStack);
|
||||
thread.gp_reg=&_gp;
|
||||
thread.initial_priority=AUDIO_PRIORITY;
|
||||
thread.attr=thread.option=0;
|
||||
|
||||
/*Backup the PS2 content to be used in the thread */
|
||||
backup_ps2 = ps2;
|
||||
|
||||
ps2->running = true;
|
||||
ps2->worker_thread = CreateThread(&thread);
|
||||
|
||||
if (ps2->worker_thread >= 0)
|
||||
{
|
||||
ret = StartThread(ps2->worker_thread, NULL);
|
||||
if (ret < 0)
|
||||
printf("sound_init: StartThread returned %d\n", ret);
|
||||
}
|
||||
else
|
||||
printf("CreateThread failed: %d\n", ps2->worker_thread);
|
||||
}
|
||||
|
||||
static void audioStopNDeleteThread(ps2_audio_t *ps2)
|
||||
{
|
||||
ps2->running = false;
|
||||
if (ps2->worker_thread)
|
||||
ps2->worker_thread = 0;
|
||||
}
|
||||
} ps2_audio_t;
|
||||
|
||||
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
{
|
||||
@@ -120,23 +53,6 @@ static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
audsrv_set_volume(MAX_VOLUME);
|
||||
}
|
||||
|
||||
static void audioCreateSemas(ps2_audio_t *ps2)
|
||||
{
|
||||
ee_sema_t lock_info;
|
||||
ee_sema_t cond_lock_info;
|
||||
|
||||
lock_info.max_count = 1;
|
||||
lock_info.init_count = 1;
|
||||
lock_info.option = 0;
|
||||
ps2->lock = CreateSema(&lock_info);
|
||||
|
||||
cond_lock_info.init_count = 1;
|
||||
cond_lock_info.max_count = 1;
|
||||
cond_lock_info.option = 0;
|
||||
|
||||
ps2->cond_lock = CreateSema(&cond_lock_info);
|
||||
}
|
||||
|
||||
static void *ps2_audio_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
@@ -147,10 +63,7 @@ static void *ps2_audio_init(const char *device,
|
||||
if (!ps2)
|
||||
return NULL;
|
||||
|
||||
ps2->buffer = fifo_new(AUDIO_BUFFER);
|
||||
audioConfigure(ps2, rate);
|
||||
audioCreateSemas(ps2);
|
||||
audioCreateThread(ps2);
|
||||
|
||||
return ps2;
|
||||
}
|
||||
@@ -161,45 +74,22 @@ static void ps2_audio_free(void *data)
|
||||
if(!ps2)
|
||||
return;
|
||||
|
||||
if(ps2->running){
|
||||
audioStopNDeleteThread(ps2);
|
||||
|
||||
if (ps2->lock){
|
||||
iDeleteSema(ps2->lock);
|
||||
ps2->lock = 0;
|
||||
}
|
||||
|
||||
if (ps2->cond_lock){
|
||||
iDeleteSema(ps2->cond_lock);
|
||||
ps2->cond_lock = 0;
|
||||
}
|
||||
|
||||
}
|
||||
fifo_free(ps2->buffer);
|
||||
ps2->running = false;
|
||||
audsrv_stop_audio();
|
||||
free(ps2);
|
||||
}
|
||||
|
||||
static ssize_t ps2_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
int bytes_sent;
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
|
||||
if (!ps2->running)
|
||||
return -1;
|
||||
|
||||
if (ps2->nonblocking)
|
||||
{
|
||||
if (fifo_write_avail(ps2->buffer) < size)
|
||||
return 0;
|
||||
}
|
||||
bytes_sent = audsrv_play_audio(buf, size);
|
||||
|
||||
while (fifo_write_avail(ps2->buffer) < size)
|
||||
WaitSema(ps2->cond_lock);
|
||||
|
||||
WaitSema(ps2->lock);
|
||||
fifo_write(ps2->buffer, buf, size);
|
||||
iSignalSema(ps2->lock);
|
||||
|
||||
return size;
|
||||
return bytes_sent;
|
||||
}
|
||||
|
||||
static bool ps2_audio_alive(void *data)
|
||||
@@ -220,8 +110,8 @@ static bool ps2_audio_stop(void *data)
|
||||
|
||||
if (ps2)
|
||||
{
|
||||
audioStopNDeleteThread(ps2);
|
||||
audsrv_stop_audio();
|
||||
ps2->running = false;
|
||||
}
|
||||
|
||||
return stop;
|
||||
@@ -234,8 +124,7 @@ static bool ps2_audio_start(void *data, bool is_shutdown)
|
||||
|
||||
if (ps2)
|
||||
{
|
||||
if (!ps2->running && !ps2->worker_thread)
|
||||
audioCreateThread(ps2);
|
||||
ps2->running = true;
|
||||
}
|
||||
|
||||
return start;
|
||||
@@ -260,11 +149,7 @@ static size_t ps2_audio_write_avail(void *data)
|
||||
|
||||
if (ps2 && ps2->running)
|
||||
{
|
||||
size_t size;
|
||||
WaitSema(ps2->lock);
|
||||
size = AUDIO_BUFFER - fifo_read_avail(ps2->buffer);
|
||||
iSignalSema(ps2->lock);
|
||||
return size;
|
||||
return AUDIO_BUFFER;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ static void psp_audio_free(void *data)
|
||||
psp->running = false;
|
||||
sthread_join(psp->worker_thread);
|
||||
}
|
||||
|
||||
|
||||
if (psp->cond)
|
||||
scond_free(psp->cond);
|
||||
if (psp->fifo_lock)
|
||||
@@ -205,7 +205,7 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
uint16_t write_pos = psp->write_pos;
|
||||
uint16_t sampleCount = size / sizeof(uint32_t);
|
||||
|
||||
|
||||
if (!psp->running)
|
||||
return -1;
|
||||
|
||||
@@ -241,7 +241,6 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
slock_unlock(psp->fifo_lock);
|
||||
return size;
|
||||
|
||||
|
||||
}
|
||||
|
||||
static bool psp_audio_alive(void *data)
|
||||
|
||||
@@ -237,12 +237,19 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool pulse_start(void *data, bool is_shutdown);
|
||||
static ssize_t pulse_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
pa_t *pa = (pa_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
size_t written = 0;
|
||||
|
||||
/* Workaround buggy menu code.
|
||||
* If a write happens while we're paused, we might never progress. */
|
||||
if (pa->is_paused)
|
||||
if (!pulse_start(pa, false))
|
||||
return -1;
|
||||
|
||||
pa_threaded_mainloop_lock(pa->mainloop);
|
||||
while (size)
|
||||
{
|
||||
@@ -270,6 +277,8 @@ static bool pulse_stop(void *data)
|
||||
{
|
||||
bool ret;
|
||||
pa_t *pa = (pa_t*)data;
|
||||
if (pa->is_paused)
|
||||
return true;
|
||||
|
||||
RARCH_LOG("[PulseAudio]: Pausing.\n");
|
||||
|
||||
@@ -296,6 +305,8 @@ static bool pulse_start(void *data, bool is_shutdown)
|
||||
{
|
||||
bool ret;
|
||||
pa_t *pa = (pa_t*)data;
|
||||
if (!pa->is_paused)
|
||||
return true;
|
||||
|
||||
RARCH_LOG("[PulseAudio]: Unpausing.\n");
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
|
||||
if (to_write > switch_audio_buffer_size(NULL) - swa->current_buffer->data_size)
|
||||
to_write = switch_audio_buffer_size(NULL) - swa->current_buffer->data_size;
|
||||
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
@@ -137,7 +137,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
}
|
||||
|
||||
swa->last_append = svcGetSystemTick();
|
||||
|
||||
|
||||
return to_write;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ static void *switch_audio_init(const char *device,
|
||||
swa->is_paused = true;
|
||||
|
||||
RARCH_LOG("[Audio]: Audio initialized\n");
|
||||
|
||||
|
||||
return swa;
|
||||
|
||||
fail_audio_output:
|
||||
|
||||
@@ -237,7 +237,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
if (switch_audio_ipc_output_append_buffer(swa, &swa->buffers[i]) != 0)
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
|
||||
compat_mutex_create(&swa->fifoLock);
|
||||
swa->fifo = fifo_new(swa->fifoSize);
|
||||
|
||||
|
||||
@@ -2169,10 +2169,9 @@ static void * tinyalsa_init(const char *devicestr, unsigned rate,
|
||||
unsigned int device = 0;
|
||||
unsigned int frames_per_ms = 0;
|
||||
unsigned int orig_rate = rate;
|
||||
unsigned int max_rate, min_rate;
|
||||
unsigned int max_rate, min_rate, buffer_size;
|
||||
float initial_latency;
|
||||
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
struct pcm_config config;
|
||||
|
||||
tinyalsa_t *tinyalsa = (tinyalsa_t*)calloc(1, sizeof(tinyalsa_t));
|
||||
|
||||
@@ -219,7 +219,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
goto error;
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL, AudioCategory_GameEffects)))
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, (LPCWSTR)(uintptr_t)device, NULL, AudioCategory_GameEffects)))
|
||||
goto error;
|
||||
#else
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL)))
|
||||
@@ -315,7 +315,7 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("XAudio2: Requesting %u ms latency, using %d ms latency.\n",
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
||||
+1285
-1301
File diff suppressed because it is too large.
Load diff
@@ -149,7 +149,7 @@ done:
|
||||
}
|
||||
|
||||
static void *resampler_CC_init(const struct resampler_config *config,
|
||||
double bandwidth_mod,
|
||||
double bandwidth_mod,
|
||||
enum resampler_quality quality,
|
||||
resampler_simd_mask_t mask)
|
||||
{
|
||||
@@ -488,7 +488,7 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
|
||||
}
|
||||
|
||||
static void *resampler_CC_init(const struct resampler_config *config,
|
||||
double bandwidth_mod,
|
||||
double bandwidth_mod,
|
||||
enum resampler_quality quality,
|
||||
resampler_simd_mask_t mask)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
# d23: (temp) # d31: buffer[6]
|
||||
# (temp) # buffer[7]
|
||||
|
||||
|
||||
resampler_CC_downsample_neon:
|
||||
_resampler_CC_downsample_neon:
|
||||
|
||||
@@ -89,7 +88,6 @@ push {r4}
|
||||
|
||||
mov r4, r0
|
||||
|
||||
|
||||
veor q0, q0, q0
|
||||
vmov.f32 s1, #1.0
|
||||
vmov.f32 s2, #2.0
|
||||
@@ -102,18 +100,15 @@ vmov.f32 q5, #1.0
|
||||
vmov.f32 q6, #3.0
|
||||
vmov.f32 q7, #0.25
|
||||
|
||||
|
||||
vldr s5, [r2, #32]
|
||||
vdiv.f32 s6, s20, s4
|
||||
vadd.f32 s7, s6, s8
|
||||
vdup.f32 q4, d2[0]
|
||||
vmin.f32 q4, q4, q5
|
||||
|
||||
|
||||
lsl r3, #3
|
||||
add r3, r3, r1
|
||||
|
||||
|
||||
cmp r3, r1
|
||||
beq 3f
|
||||
1:
|
||||
@@ -199,7 +194,6 @@ vpop {q4,q5,q6,q7}
|
||||
|
||||
bx lr
|
||||
|
||||
|
||||
.align 4
|
||||
.globl resampler_CC_upsample_neon
|
||||
#ifndef __MACH__
|
||||
@@ -256,7 +250,6 @@ bx lr
|
||||
# d23: (temp) # d31: buffer[6]
|
||||
# (temp) # buffer[7]
|
||||
|
||||
|
||||
resampler_CC_upsample_neon:
|
||||
_resampler_CC_upsample_neon:
|
||||
|
||||
@@ -267,7 +260,6 @@ push {r4}
|
||||
|
||||
mov r4, r0
|
||||
|
||||
|
||||
veor q0, q0, q0
|
||||
vmov.f32 s0, #1.0
|
||||
vmov.f32 s2, #-1.0
|
||||
@@ -280,18 +272,15 @@ vmov.f32 q5, #1.0
|
||||
vmov.f32 q6, #3.0
|
||||
vmov.f32 q7, #0.25
|
||||
|
||||
|
||||
vldr s5, [r2, #32]
|
||||
vdiv.f32 s6, s20, s4
|
||||
vadd.f32 s7, s6, s8
|
||||
vdup.f32 q4, d2[0]
|
||||
vmin.f32 q4, q4, q5
|
||||
|
||||
|
||||
lsl r3, #3
|
||||
add r3, r3, r1
|
||||
|
||||
|
||||
cmp r3, r1
|
||||
beq 4f
|
||||
1:
|
||||
@@ -356,7 +345,6 @@ vst1.f32 d20, [r4, :64]!
|
||||
|
||||
vadd.f32 s5, s5, s6
|
||||
|
||||
|
||||
vcmpe.f32 s5, s20
|
||||
vmrs APSR_nzcv, fpscr
|
||||
blt 2b
|
||||
@@ -368,7 +356,6 @@ vsub.f32 s5, s5, s20
|
||||
cmp r3, r1
|
||||
bne 1b
|
||||
|
||||
|
||||
4:
|
||||
vst1.f32 {q14-q15}, [r2, :256]
|
||||
vstr s5, [r2, #32]
|
||||
|
||||
+2
-3
@@ -86,7 +86,7 @@ SECTIONS
|
||||
KEEP (*(.fini))
|
||||
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||
} = 0
|
||||
|
||||
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);
|
||||
PROVIDE (etext = .);
|
||||
@@ -167,7 +167,6 @@ SECTIONS
|
||||
.jcr : { KEEP (*(.jcr)) }
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
|
||||
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
@@ -182,7 +181,7 @@ SECTIONS
|
||||
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
|
||||
.sbss :
|
||||
{
|
||||
__sbss_start = .;
|
||||
|
||||
+2
-3
@@ -97,7 +97,7 @@ SECTIONS
|
||||
KEEP (*(.fini))
|
||||
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||
} = 0
|
||||
|
||||
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);
|
||||
PROVIDE (etext = .);
|
||||
@@ -178,7 +178,6 @@ SECTIONS
|
||||
.jcr : { KEEP (*(.jcr)) }
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
|
||||
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
@@ -193,7 +192,7 @@ SECTIONS
|
||||
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
|
||||
.sbss :
|
||||
{
|
||||
__sbss_start = .;
|
||||
|
||||
@@ -56,7 +56,7 @@ void exitspawn_kernel(const char *fileName, SceSize args, void *argp)
|
||||
game_param.unk5 = 0x10000;
|
||||
|
||||
int k1 = pspSdkSetK1(0);
|
||||
//sceKernelSuspendAllUserThreads();
|
||||
//sceKernelSuspendAllUserThreads();
|
||||
int ret = sceKernelLoadExecVSHMs2(fileName, &game_param);
|
||||
pspSdkSetK1(k1);
|
||||
}
|
||||
|
||||
+2
-16
@@ -37,11 +37,6 @@ static const camera_driver_t *camera_drivers[] = {
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
&camera_android,
|
||||
#endif
|
||||
#if defined(HAVE_AVFOUNDATION)
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
||||
&camera_avfoundation,
|
||||
#endif
|
||||
#endif
|
||||
&camera_null,
|
||||
NULL,
|
||||
@@ -51,7 +46,6 @@ static struct retro_camera_callback camera_cb;
|
||||
static const camera_driver_t *camera_driver = NULL;
|
||||
static void *camera_data = NULL;
|
||||
static bool camera_driver_active = false;
|
||||
static bool camera_driver_data_own = false;
|
||||
|
||||
/**
|
||||
* camera_driver_find_handle:
|
||||
@@ -126,18 +120,9 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
{
|
||||
case RARCH_CAMERA_CTL_DESTROY:
|
||||
camera_driver_active = false;
|
||||
camera_driver_data_own = false;
|
||||
camera_driver = NULL;
|
||||
camera_data = NULL;
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_SET_OWN_DRIVER:
|
||||
camera_driver_data_own = true;
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_UNSET_OWN_DRIVER:
|
||||
camera_driver_data_own = false;
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_OWNS_DRIVER:
|
||||
return camera_driver_data_own;
|
||||
case RARCH_CAMERA_CTL_SET_ACTIVE:
|
||||
camera_driver_active = true;
|
||||
break;
|
||||
@@ -206,7 +191,8 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
return camera_driver->start(camera_data);
|
||||
|
||||
runloop_msg_queue_push(
|
||||
"Camera is explicitly disabled.\n", 1, 180, false);
|
||||
"Camera is explicitly disabled.\n", 1, 180, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_SET_CB:
|
||||
|
||||
@@ -30,9 +30,6 @@ enum rarch_camera_ctl_state
|
||||
RARCH_CAMERA_CTL_NONE = 0,
|
||||
RARCH_CAMERA_CTL_DESTROY,
|
||||
RARCH_CAMERA_CTL_DEINIT,
|
||||
RARCH_CAMERA_CTL_SET_OWN_DRIVER,
|
||||
RARCH_CAMERA_CTL_UNSET_OWN_DRIVER,
|
||||
RARCH_CAMERA_CTL_OWNS_DRIVER,
|
||||
RARCH_CAMERA_CTL_SET_ACTIVE,
|
||||
RARCH_CAMERA_CTL_UNSET_ACTIVE,
|
||||
RARCH_CAMERA_CTL_IS_ACTIVE,
|
||||
|
||||
@@ -34,7 +34,7 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
#ifndef __RARCH_CHEEVOS_BADGE_H
|
||||
#define __RARCH_CHEEVOS_BADGE_H
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define CHEEVOS_BADGE_LIMIT 256
|
||||
|
||||
+452
-419
File diff suppressed because it is too large.
Load diff
+22
-22
@@ -27,49 +27,49 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct cheevos_ctx_desc
|
||||
typedef struct rcheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
char *s;
|
||||
size_t len;
|
||||
} cheevos_ctx_desc_t;
|
||||
} rcheevos_ctx_desc_t;
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
RCHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
RCHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
};
|
||||
|
||||
bool cheevos_load(const void *data);
|
||||
bool rcheevos_load(const void *data);
|
||||
|
||||
void cheevos_reset_game(void);
|
||||
void rcheevos_reset_game(void);
|
||||
|
||||
void cheevos_populate_menu(void *data);
|
||||
void rcheevos_populate_menu(void *data);
|
||||
|
||||
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
|
||||
bool rcheevos_get_description(rcheevos_ctx_desc_t *desc);
|
||||
|
||||
bool cheevos_apply_cheats(bool *data_bool);
|
||||
bool rcheevos_apply_cheats(bool *data_bool);
|
||||
|
||||
bool cheevos_unload(void);
|
||||
bool rcheevos_unload(void);
|
||||
|
||||
bool cheevos_toggle_hardcore_mode(void);
|
||||
bool rcheevos_toggle_hardcore_mode(void);
|
||||
|
||||
void cheevos_test(void);
|
||||
void rcheevos_test(void);
|
||||
|
||||
bool cheevos_set_cheats(void);
|
||||
bool rcheevos_set_cheats(void);
|
||||
|
||||
void cheevos_set_support_cheevos(bool state);
|
||||
void rcheevos_set_support_cheevos(bool state);
|
||||
|
||||
bool cheevos_get_support_cheevos(void);
|
||||
bool rcheevos_get_support_cheevos(void);
|
||||
|
||||
int cheevos_get_console(void);
|
||||
int rcheevos_get_console(void);
|
||||
|
||||
extern bool cheevos_loaded;
|
||||
extern bool cheevos_hardcore_active;
|
||||
extern bool cheevos_hardcore_paused;
|
||||
extern bool cheevos_state_loaded_flag;
|
||||
extern int cheats_are_enabled;
|
||||
extern int cheats_were_enabled;
|
||||
extern bool rcheevos_loaded;
|
||||
extern bool rcheevos_hardcore_active;
|
||||
extern bool rcheevos_hardcore_paused;
|
||||
extern bool rcheevos_state_loaded_flag;
|
||||
extern int rcheevos_cheats_are_enabled;
|
||||
extern int rcheevos_cheats_were_enabled;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
|
||||
/* Use at the beginning of the coroutine, you must have declared a variable rcheevos_coro_t* coro */
|
||||
#define CORO_ENTER() \
|
||||
{ \
|
||||
CORO_again: ; \
|
||||
@@ -67,7 +67,7 @@ Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
return 0; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Add this macro to your coro_t structure containing the variables for the coroutine */
|
||||
/* Add this macro to your rcheevos_coro_t structure containing the variables for the coroutine */
|
||||
#define CORO_FIELDS \
|
||||
int step, sp; \
|
||||
int stack[ 8 ];
|
||||
|
||||
+29
-29
@@ -20,12 +20,12 @@
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
|
||||
#include <rcheevos.h>
|
||||
#include "../deps/rcheevos/include/rcheevos.h"
|
||||
|
||||
static int cheevos_cmpaddr(const void* e1, const void* e2)
|
||||
static int rcheevos_cmpaddr(const void* e1, const void* e2)
|
||||
{
|
||||
const cheevos_fixup_t* f1 = (const cheevos_fixup_t*)e1;
|
||||
const cheevos_fixup_t* f2 = (const cheevos_fixup_t*)e2;
|
||||
const rcheevos_fixup_t* f1 = (const rcheevos_fixup_t*)e1;
|
||||
const rcheevos_fixup_t* f2 = (const rcheevos_fixup_t*)e2;
|
||||
|
||||
if (f1->address < f2->address)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ static int cheevos_cmpaddr(const void* e1, const void* e2)
|
||||
}
|
||||
}
|
||||
|
||||
static size_t cheevos_var_reduce(size_t addr, size_t mask)
|
||||
static size_t rcheevos_var_reduce(size_t addr, size_t mask)
|
||||
{
|
||||
while (mask)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ static size_t cheevos_var_reduce(size_t addr, size_t mask)
|
||||
return addr;
|
||||
}
|
||||
|
||||
static size_t cheevos_var_highest_bit(size_t n)
|
||||
static size_t rcheevos_var_highest_bit(size_t n)
|
||||
{
|
||||
n |= n >> 1;
|
||||
n |= n >> 2;
|
||||
@@ -64,33 +64,33 @@ static size_t cheevos_var_highest_bit(size_t n)
|
||||
return n ^ (n >> 1);
|
||||
}
|
||||
|
||||
void cheevos_fixup_init(cheevos_fixups_t* fixups)
|
||||
void rcheevos_fixup_init(rcheevos_fixups_t* fixups)
|
||||
{
|
||||
fixups->elements = NULL;
|
||||
fixups->capacity = fixups->count = 0;
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
void cheevos_fixup_destroy(cheevos_fixups_t* fixups)
|
||||
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups)
|
||||
{
|
||||
CHEEVOS_FREE(fixups->elements);
|
||||
cheevos_fixup_init(fixups);
|
||||
rcheevos_fixup_init(fixups);
|
||||
}
|
||||
|
||||
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console)
|
||||
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console)
|
||||
{
|
||||
cheevos_fixup_t key;
|
||||
cheevos_fixup_t* found;
|
||||
rcheevos_fixup_t key;
|
||||
rcheevos_fixup_t* found;
|
||||
const uint8_t* location;
|
||||
|
||||
if (fixups->dirty)
|
||||
{
|
||||
qsort(fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
|
||||
qsort(fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
key.address = address;
|
||||
found = (cheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
|
||||
found = (rcheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
|
||||
|
||||
if (found != NULL)
|
||||
{
|
||||
@@ -100,8 +100,8 @@ const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, in
|
||||
if (fixups->count == fixups->capacity)
|
||||
{
|
||||
unsigned new_capacity = fixups->capacity == 0 ? 16 : fixups->capacity * 2;
|
||||
cheevos_fixup_t* new_elements = (cheevos_fixup_t*)
|
||||
realloc(fixups->elements, new_capacity * sizeof(cheevos_fixup_t));
|
||||
rcheevos_fixup_t* new_elements = (rcheevos_fixup_t*)
|
||||
realloc(fixups->elements, new_capacity * sizeof(rcheevos_fixup_t));
|
||||
|
||||
if (new_elements == NULL)
|
||||
{
|
||||
@@ -114,13 +114,13 @@ const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, in
|
||||
|
||||
fixups->elements[fixups->count].address = address;
|
||||
fixups->elements[fixups->count++].location = location =
|
||||
cheevos_patch_address(address, console);
|
||||
rcheevos_patch_address(address, console);
|
||||
fixups->dirty = true;
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
const uint8_t* rcheevos_patch_address(unsigned address, int console)
|
||||
{
|
||||
rarch_system_info_t* system = runloop_get_system_info();
|
||||
const void* pointer = NULL;
|
||||
@@ -130,7 +130,7 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
if (address >= 0x0800 && address < 0x2000)
|
||||
{
|
||||
/* Address in the mirrorred RAM, adjust to real RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", address, address & 0x07ff);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", address, address & 0x07ff);
|
||||
address &= 0x07ff;
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
if (address >= 0xe000 && address <= 0xfdff)
|
||||
{
|
||||
/* Address in the echo RAM, adjust to real RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", address, address - 0x2000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", address, address - 0x2000);
|
||||
address -= 0x2000;
|
||||
}
|
||||
}
|
||||
@@ -156,20 +156,20 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
if (address < 0x8000)
|
||||
{
|
||||
/* Internal RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x3000000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x3000000);
|
||||
address += 0x3000000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Work RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x2000000 - 0x8000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x2000000 - 0x8000);
|
||||
address += 0x2000000 - 0x8000;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_PC_ENGINE)
|
||||
{
|
||||
/* RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1f0000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1f0000);
|
||||
address += 0x1f0000;
|
||||
}
|
||||
else if (console == RC_CONSOLE_SUPER_NINTENDO)
|
||||
@@ -177,13 +177,13 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
if (address < 0x020000)
|
||||
{
|
||||
/* Work RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x7e0000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x7e0000);
|
||||
address += 0x7e0000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Save RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x006000 - 0x020000);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x006000 - 0x020000);
|
||||
address += 0x006000 - 0x020000;
|
||||
}
|
||||
}
|
||||
@@ -197,17 +197,17 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
{
|
||||
unsigned addr = address;
|
||||
pointer = desc->core.ptr;
|
||||
|
||||
address = (unsigned)cheevos_var_reduce(
|
||||
|
||||
address = (unsigned)rcheevos_var_reduce(
|
||||
(addr - desc->core.start) & desc->disconnect_mask,
|
||||
desc->core.disconnect);
|
||||
|
||||
if (address >= desc->core.len)
|
||||
address -= cheevos_var_highest_bit(address);
|
||||
address -= rcheevos_var_highest_bit(address);
|
||||
|
||||
address += desc->core.offset;
|
||||
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, (int)((desc - system->mmaps.descriptors) + 1), address);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, (int)((desc - system->mmaps.descriptors) + 1), address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -27,21 +27,21 @@ typedef struct
|
||||
{
|
||||
unsigned address;
|
||||
const uint8_t* location;
|
||||
} cheevos_fixup_t;
|
||||
} rcheevos_fixup_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_fixup_t* elements;
|
||||
rcheevos_fixup_t* elements;
|
||||
unsigned capacity, count;
|
||||
bool dirty;
|
||||
} cheevos_fixups_t;
|
||||
} rcheevos_fixups_t;
|
||||
|
||||
void cheevos_fixup_init(cheevos_fixups_t* fixups);
|
||||
void cheevos_fixup_destroy(cheevos_fixups_t* fixups);
|
||||
void rcheevos_fixup_init(rcheevos_fixups_t* fixups);
|
||||
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups);
|
||||
|
||||
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console);
|
||||
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console);
|
||||
|
||||
const uint8_t* cheevos_patch_address(unsigned address, int console);
|
||||
const uint8_t* rcheevos_patch_address(unsigned address, int console);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include "hash.h"
|
||||
|
||||
uint32_t cheevos_djb2(const char* str, size_t length)
|
||||
uint32_t rcheevos_djb2(const char* str, size_t length)
|
||||
{
|
||||
const unsigned char* aux = (const unsigned char*)str;
|
||||
uint32_t hash = 5381;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
uint32_t cheevos_djb2(const char* str, size_t length);
|
||||
uint32_t rcheevos_djb2(const char* str, size_t length);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
||||
+95
-95
@@ -38,21 +38,21 @@ typedef struct
|
||||
int is_key;
|
||||
const char* value;
|
||||
size_t length;
|
||||
} cheevos_getvalueud_t;
|
||||
} rcheevos_getvalueud_t;
|
||||
|
||||
static int cheevos_getvalue_key(void* userdata,
|
||||
static int rcheevos_getvalue_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
ud->is_key = cheevos_djb2(name, length) == ud->key_hash;
|
||||
ud->is_key = rcheevos_djb2(name, length) == ud->key_hash;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_string(void* userdata,
|
||||
static int rcheevos_getvalue_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key)
|
||||
{
|
||||
@@ -64,9 +64,9 @@ static int cheevos_getvalue_string(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_boolean(void* userdata, int istrue)
|
||||
static int rcheevos_getvalue_boolean(void* userdata, int istrue)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key)
|
||||
{
|
||||
@@ -87,9 +87,9 @@ static int cheevos_getvalue_boolean(void* userdata, int istrue)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_null(void* userdata)
|
||||
static int rcheevos_getvalue_null(void* userdata)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key )
|
||||
{
|
||||
@@ -101,7 +101,7 @@ static int cheevos_getvalue_null(void* userdata)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_get_value(const char* json, unsigned key_hash,
|
||||
static int rcheevos_get_value(const char* json, unsigned key_hash,
|
||||
char* value, size_t length)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
@@ -112,15 +112,15 @@ static int cheevos_get_value(const char* json, unsigned key_hash,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_getvalue_key,
|
||||
rcheevos_getvalue_key,
|
||||
NULL,
|
||||
cheevos_getvalue_string,
|
||||
cheevos_getvalue_string, /* number */
|
||||
cheevos_getvalue_boolean,
|
||||
cheevos_getvalue_null
|
||||
rcheevos_getvalue_string,
|
||||
rcheevos_getvalue_string, /* number */
|
||||
rcheevos_getvalue_boolean,
|
||||
rcheevos_getvalue_null
|
||||
};
|
||||
|
||||
cheevos_getvalueud_t ud;
|
||||
rcheevos_getvalueud_t ud;
|
||||
|
||||
ud.key_hash = key_hash;
|
||||
ud.is_key = 0;
|
||||
@@ -142,14 +142,14 @@ static int cheevos_get_value(const char* json, unsigned key_hash,
|
||||
Returns the token of the error message
|
||||
*****************************************************************************/
|
||||
|
||||
int cheevos_get_token(const char* json, char* token, size_t length)
|
||||
int rcheevos_get_token(const char* json, char* token, size_t length)
|
||||
{
|
||||
cheevos_get_value(json, CHEEVOS_JSON_KEY_ERROR, token, length);
|
||||
rcheevos_get_value(json, CHEEVOS_JSON_KEY_ERROR, token, length);
|
||||
|
||||
if (!string_is_empty(token))
|
||||
return -1;
|
||||
|
||||
return cheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length);
|
||||
|
||||
return rcheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -164,23 +164,23 @@ typedef struct
|
||||
unsigned core_count;
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
} cheevos_countud_t;
|
||||
} rcheevos_countud_t;
|
||||
|
||||
static int cheevos_count_end_array(void* userdata)
|
||||
static int rcheevos_count_end_array(void* userdata)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_key(void* userdata,
|
||||
static int rcheevos_count_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
|
||||
ud->field_hash = cheevos_djb2(name, length);
|
||||
ud->field_hash = rcheevos_djb2(name, length);
|
||||
|
||||
if (ud->field_hash == CHEEVOS_JSON_KEY_ACHIEVEMENTS)
|
||||
ud->in_cheevos = 1;
|
||||
@@ -190,10 +190,10 @@ static int cheevos_count_key(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_number(void* userdata,
|
||||
static int rcheevos_count_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
|
||||
if (ud->in_cheevos && ud->field_hash == CHEEVOS_JSON_KEY_FLAGS)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ static int cheevos_count_number(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_cheevos(const char* json,
|
||||
static int rcheevos_count_cheevos(const char* json,
|
||||
unsigned* core_count, unsigned* unofficial_count,
|
||||
unsigned* lboard_count)
|
||||
{
|
||||
@@ -221,17 +221,17 @@ static int cheevos_count_cheevos(const char* json,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_count_end_array,
|
||||
cheevos_count_key,
|
||||
rcheevos_count_end_array,
|
||||
rcheevos_count_key,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_count_number,
|
||||
rcheevos_count_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
int res;
|
||||
cheevos_countud_t ud;
|
||||
rcheevos_countud_t ud;
|
||||
ud.in_cheevos = 0;
|
||||
ud.in_lboards = 0;
|
||||
ud.core_count = 0;
|
||||
@@ -255,7 +255,7 @@ typedef struct
|
||||
{
|
||||
const char* string;
|
||||
size_t length;
|
||||
} cheevos_field_t;
|
||||
} rcheevos_field_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -266,14 +266,14 @@ typedef struct
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
|
||||
cheevos_field_t* field;
|
||||
cheevos_field_t id, memaddr, title, desc, points, author;
|
||||
cheevos_field_t modified, created, badge, flags, format;
|
||||
rcheevos_field_t* field;
|
||||
rcheevos_field_t id, memaddr, title, desc, points, author;
|
||||
rcheevos_field_t modified, created, badge, flags, format;
|
||||
|
||||
cheevos_rapatchdata_t* patchdata;
|
||||
} cheevos_readud_t;
|
||||
rcheevos_rapatchdata_t* patchdata;
|
||||
} rcheevos_readud_t;
|
||||
|
||||
static const char* cheevos_dupstr(const cheevos_field_t* field)
|
||||
static const char* rcheevos_dupstr(const rcheevos_field_t* field)
|
||||
{
|
||||
char* string = (char*)malloc(field->length + 1);
|
||||
|
||||
@@ -285,9 +285,9 @@ static const char* cheevos_dupstr(const cheevos_field_t* field)
|
||||
return string;
|
||||
}
|
||||
|
||||
static int cheevos_new_cheevo(cheevos_readud_t* ud)
|
||||
static int rcheevos_new_cheevo(rcheevos_readud_t* ud)
|
||||
{
|
||||
cheevos_racheevo_t* cheevo = NULL;
|
||||
rcheevos_racheevo_t* cheevo = NULL;
|
||||
unsigned flags = (unsigned)strtol(ud->flags.string, NULL, 10);
|
||||
|
||||
if (flags == 3)
|
||||
@@ -297,10 +297,10 @@ static int cheevos_new_cheevo(cheevos_readud_t* ud)
|
||||
else
|
||||
return 0;
|
||||
|
||||
cheevo->title = cheevos_dupstr(&ud->title);
|
||||
cheevo->description = cheevos_dupstr(&ud->desc);
|
||||
cheevo->badge = cheevos_dupstr(&ud->badge);
|
||||
cheevo->memaddr = cheevos_dupstr(&ud->memaddr);
|
||||
cheevo->title = rcheevos_dupstr(&ud->title);
|
||||
cheevo->description = rcheevos_dupstr(&ud->desc);
|
||||
cheevo->badge = rcheevos_dupstr(&ud->badge);
|
||||
cheevo->memaddr = rcheevos_dupstr(&ud->memaddr);
|
||||
cheevo->points = (unsigned)strtol(ud->points.string, NULL, 10);
|
||||
cheevo->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
@@ -319,14 +319,14 @@ static int cheevos_new_cheevo(cheevos_readud_t* ud)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_new_lboard(cheevos_readud_t* ud)
|
||||
static int rcheevos_new_lboard(rcheevos_readud_t* ud)
|
||||
{
|
||||
cheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
|
||||
rcheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
|
||||
|
||||
lboard->title = cheevos_dupstr(&ud->title);
|
||||
lboard->description = cheevos_dupstr(&ud->desc);
|
||||
lboard->format = cheevos_dupstr(&ud->format);
|
||||
lboard->mem = cheevos_dupstr(&ud->memaddr);
|
||||
lboard->title = rcheevos_dupstr(&ud->title);
|
||||
lboard->description = rcheevos_dupstr(&ud->desc);
|
||||
lboard->format = rcheevos_dupstr(&ud->format);
|
||||
lboard->mem = rcheevos_dupstr(&ud->memaddr);
|
||||
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
if ( !lboard->title
|
||||
@@ -344,35 +344,35 @@ static int cheevos_new_lboard(cheevos_readud_t* ud)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_end_object(void* userdata)
|
||||
static int rcheevos_read_end_object(void* userdata)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->in_cheevos)
|
||||
return cheevos_new_cheevo(ud);
|
||||
return rcheevos_new_cheevo(ud);
|
||||
|
||||
if (ud->in_lboards)
|
||||
return cheevos_new_lboard(ud);
|
||||
return rcheevos_new_lboard(ud);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_end_array(void* userdata)
|
||||
static int rcheevos_read_end_array(void* userdata)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_key(void* userdata,
|
||||
static int rcheevos_read_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
int common = ud->in_cheevos || ud->in_lboards;
|
||||
uint32_t hash = cheevos_djb2(name, length);
|
||||
uint32_t hash = rcheevos_djb2(name, length);
|
||||
ud->field = NULL;
|
||||
|
||||
switch (hash)
|
||||
@@ -441,10 +441,10 @@ static int cheevos_read_key(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_string(void* userdata,
|
||||
static int rcheevos_read_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field)
|
||||
{
|
||||
@@ -455,10 +455,10 @@ static int cheevos_read_string(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_number(void* userdata,
|
||||
static int rcheevos_read_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field)
|
||||
{
|
||||
@@ -474,29 +474,29 @@ static int cheevos_read_number(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
|
||||
int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_read_end_object,
|
||||
rcheevos_read_end_object,
|
||||
NULL,
|
||||
cheevos_read_end_array,
|
||||
cheevos_read_key,
|
||||
rcheevos_read_end_array,
|
||||
rcheevos_read_key,
|
||||
NULL,
|
||||
cheevos_read_string,
|
||||
cheevos_read_number,
|
||||
rcheevos_read_string,
|
||||
rcheevos_read_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
cheevos_readud_t ud;
|
||||
rcheevos_readud_t ud;
|
||||
int res;
|
||||
|
||||
/* Count the number of achievements in the JSON file. */
|
||||
res = cheevos_count_cheevos(json, &patchdata->core_count,
|
||||
res = rcheevos_count_cheevos(json, &patchdata->core_count,
|
||||
&patchdata->unofficial_count, &patchdata->lboard_count);
|
||||
|
||||
if (res != JSONSAX_OK)
|
||||
@@ -504,14 +504,14 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
|
||||
|
||||
/* Allocate the achievements. */
|
||||
|
||||
patchdata->core = (cheevos_racheevo_t*)
|
||||
calloc(patchdata->core_count, sizeof(cheevos_racheevo_t));
|
||||
patchdata->core = (rcheevos_racheevo_t*)
|
||||
calloc(patchdata->core_count, sizeof(rcheevos_racheevo_t));
|
||||
|
||||
patchdata->unofficial = (cheevos_racheevo_t*)
|
||||
calloc(patchdata->unofficial_count, sizeof(cheevos_racheevo_t));
|
||||
patchdata->unofficial = (rcheevos_racheevo_t*)
|
||||
calloc(patchdata->unofficial_count, sizeof(rcheevos_racheevo_t));
|
||||
|
||||
patchdata->lboards = (cheevos_ralboard_t*)
|
||||
calloc(patchdata->lboard_count, sizeof(cheevos_ralboard_t));
|
||||
patchdata->lboards = (rcheevos_ralboard_t*)
|
||||
calloc(patchdata->lboard_count, sizeof(rcheevos_ralboard_t));
|
||||
|
||||
if (!patchdata->core ||
|
||||
!patchdata->unofficial ||
|
||||
@@ -536,7 +536,7 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
|
||||
|
||||
if (jsonsax_parse(json, &handlers, (void*)&ud) != JSONSAX_OK)
|
||||
{
|
||||
cheevos_free_patchdata(patchdata);
|
||||
rcheevos_free_patchdata(patchdata);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -547,11 +547,11 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
|
||||
Frees the patchdata
|
||||
*****************************************************************************/
|
||||
|
||||
void cheevos_free_patchdata(cheevos_rapatchdata_t* patchdata)
|
||||
void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
unsigned i = 0, count = 0;
|
||||
const cheevos_racheevo_t* cheevo = NULL;
|
||||
const cheevos_ralboard_t* lboard = NULL;
|
||||
const rcheevos_racheevo_t* cheevo = NULL;
|
||||
const rcheevos_ralboard_t* lboard = NULL;
|
||||
|
||||
cheevo = patchdata->core;
|
||||
|
||||
@@ -603,22 +603,22 @@ Deactivates unlocked cheevos
|
||||
typedef struct
|
||||
{
|
||||
int is_element;
|
||||
cheevos_unlock_cb_t unlock_cb;
|
||||
rcheevos_unlock_cb_t unlock_cb;
|
||||
void* userdata;
|
||||
} cheevos_deactivate_t;
|
||||
} rcheevos_deactivate_t;
|
||||
|
||||
static int cheevos_deactivate_index(void* userdata, unsigned int index)
|
||||
static int rcheevos_deactivate_index(void* userdata, unsigned int index)
|
||||
{
|
||||
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
|
||||
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
|
||||
|
||||
ud->is_element = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_deactivate_number(void* userdata,
|
||||
static int rcheevos_deactivate_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
|
||||
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
|
||||
unsigned id = 0;
|
||||
|
||||
if (ud->is_element)
|
||||
@@ -632,7 +632,7 @@ static int cheevos_deactivate_number(void* userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata)
|
||||
void rcheevos_deactivate_unlocks(const char* json, rcheevos_unlock_cb_t unlock_cb, void* userdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
@@ -643,14 +643,14 @@ void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_deactivate_index,
|
||||
rcheevos_deactivate_index,
|
||||
NULL,
|
||||
cheevos_deactivate_number,
|
||||
rcheevos_deactivate_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
cheevos_deactivate_t ud;
|
||||
rcheevos_deactivate_t ud;
|
||||
|
||||
ud.is_element = 0;
|
||||
ud.unlock_cb = unlock_cb;
|
||||
@@ -667,7 +667,7 @@ unsigned chevos_get_gameid(const char* json)
|
||||
{
|
||||
char gameid[32];
|
||||
|
||||
if (cheevos_get_value(json, CHEEVOS_JSON_KEY_GAMEID, gameid, sizeof(gameid)) != 0)
|
||||
if (rcheevos_get_value(json, CHEEVOS_JSON_KEY_GAMEID, gameid, sizeof(gameid)) != 0)
|
||||
return 0;
|
||||
|
||||
return (unsigned)strtol(gameid, NULL, 10);
|
||||
|
||||
+11
-11
@@ -31,7 +31,7 @@ typedef struct {
|
||||
const char* memaddr;
|
||||
unsigned points;
|
||||
unsigned id;
|
||||
} cheevos_racheevo_t;
|
||||
} rcheevos_racheevo_t;
|
||||
|
||||
typedef struct {
|
||||
const char* title;
|
||||
@@ -39,28 +39,28 @@ typedef struct {
|
||||
const char* format;
|
||||
const char* mem;
|
||||
unsigned id;
|
||||
} cheevos_ralboard_t;
|
||||
} rcheevos_ralboard_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned console_id;
|
||||
|
||||
cheevos_racheevo_t* core;
|
||||
cheevos_racheevo_t* unofficial;
|
||||
cheevos_ralboard_t* lboards;
|
||||
rcheevos_racheevo_t* core;
|
||||
rcheevos_racheevo_t* unofficial;
|
||||
rcheevos_ralboard_t* lboards;
|
||||
|
||||
unsigned core_count;
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
} cheevos_rapatchdata_t;
|
||||
} rcheevos_rapatchdata_t;
|
||||
|
||||
typedef void (*cheevos_unlock_cb_t)(unsigned id, void* userdata);
|
||||
typedef void (*rcheevos_unlock_cb_t)(unsigned id, void* userdata);
|
||||
|
||||
int cheevos_get_token(const char* json, char* token, size_t length);
|
||||
int rcheevos_get_token(const char* json, char* token, size_t length);
|
||||
|
||||
int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata);
|
||||
void cheevos_free_patchdata(cheevos_rapatchdata_t* patchdata);
|
||||
int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata);
|
||||
void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata);
|
||||
|
||||
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata);
|
||||
void rcheevos_deactivate_unlocks(const char* json, rcheevos_unlock_cb_t unlock_cb, void* userdata);
|
||||
|
||||
unsigned chevos_get_gameid(const char* json);
|
||||
|
||||
|
||||
+4
-4
@@ -25,13 +25,13 @@ Setup - mainly for debugging
|
||||
*****************************************************************************/
|
||||
|
||||
/* Define this macro to get extra-verbose log for cheevos. */
|
||||
#undef CHEEVOS_VERBOSE
|
||||
#define CHEEVOS_VERBOSE
|
||||
|
||||
/*****************************************************************************
|
||||
End of setup
|
||||
*****************************************************************************/
|
||||
|
||||
#define CHEEVOS_TAG "[CHEEVOS]: "
|
||||
#define RCHEEVOS_TAG "[RCHEEVOS]: "
|
||||
#define CHEEVOS_FREE(p) do { void* q = (void*)p; if (q != NULL) free(q); } while (0)
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
@@ -41,10 +41,10 @@ End of setup
|
||||
|
||||
#else
|
||||
|
||||
#define CHEEVOS_LOG cheevos_log
|
||||
#define CHEEVOS_LOG rcheevos_log
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
void cheevos_log(const char *fmt, ...);
|
||||
void rcheevos_log(const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -47,9 +47,9 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(HAVE_MENU) || defined(HAVE_MENU_WIDGETS)
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#ifndef __RARCH_CHEEVOS_OLD_BADGE_H
|
||||
#define __RARCH_CHEEVOS_OLD_BADGE_H
|
||||
|
||||
#ifdef HAVE_NEW_CHEEVOS
|
||||
#include "../cheevos-new/badges.h"
|
||||
#else
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
@@ -46,5 +42,3 @@ static badges_ctx_t new_badges_ctx;
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+59
-39
@@ -36,6 +36,9 @@
|
||||
#ifdef HAVE_MENU
|
||||
#include "../menu/menu_driver.h"
|
||||
#include "../menu/menu_entries.h"
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
#include "../menu/widgets/menu_widgets.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
@@ -1589,7 +1592,8 @@ static void cheevos_make_unlock_url(const cheevo_t *cheevo,
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cheevos_unlocked(void *task_data, void *user_data,
|
||||
static void cheevos_unlocked(retro_task_t *task,
|
||||
void *task_data, void *user_data,
|
||||
const char *error)
|
||||
{
|
||||
cheevo_t *cheevo = (cheevo_t *)user_data;
|
||||
@@ -1642,9 +1646,8 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||
}
|
||||
else if (valid)
|
||||
{
|
||||
char msg[256];
|
||||
char url[256];
|
||||
msg[0] = url[0] = '\0';
|
||||
url[0] = '\0';
|
||||
|
||||
cheevo->active &= ~mode;
|
||||
|
||||
@@ -1654,11 +1657,18 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||
CHEEVOS_LOG("[CHEEVOS]: awarding cheevo %u: %s (%s).\n",
|
||||
cheevo->id, cheevo->title, cheevo->description);
|
||||
|
||||
snprintf(msg, sizeof(msg), "Achievement Unlocked: %s",
|
||||
cheevo->title);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false);
|
||||
runloop_msg_queue_push(cheevo->description, 0, 3 * 60, false);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_push_achievement(cheevo->title, cheevo->badge))
|
||||
#endif
|
||||
{
|
||||
char msg[256];
|
||||
msg[0] = '\0';
|
||||
snprintf(msg, sizeof(msg), "Achievement Unlocked: %s",
|
||||
cheevo->title);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
runloop_msg_queue_push(cheevo->description, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
cheevos_make_unlock_url(cheevo, url, sizeof(url));
|
||||
task_push_http_transfer(url, true, NULL,
|
||||
@@ -1818,7 +1828,8 @@ static void cheevos_make_lboard_url(const cheevos_leaderboard_t *lboard,
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cheevos_lboard_submit(void *task_data, void *user_data,
|
||||
static void cheevos_lboard_submit(retro_task_t *task,
|
||||
void *task_data, void *user_data,
|
||||
const char *error)
|
||||
{
|
||||
cheevos_leaderboard_t *lboard = (cheevos_leaderboard_t *)user_data;
|
||||
@@ -1851,8 +1862,6 @@ static void cheevos_test_leaderboards(void)
|
||||
|
||||
if (value != lboard->last_value)
|
||||
{
|
||||
CHEEVOS_LOG("[CHEEVOS]: value lboard %s %u\n",
|
||||
lboard->title, value);
|
||||
lboard->last_value = value;
|
||||
}
|
||||
|
||||
@@ -1866,7 +1875,8 @@ static void cheevos_test_leaderboards(void)
|
||||
CHEEVOS_LOG("[CHEEVOS]: error: lboard %s tried to submit 0\n",
|
||||
lboard->title);
|
||||
runloop_msg_queue_push("Leaderboard attempt cancelled!",
|
||||
0, 2 * 60, false);
|
||||
0, 2 * 60, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1884,7 +1894,7 @@ static void cheevos_test_leaderboards(void)
|
||||
snprintf(msg, sizeof(msg), "Submitted %s for %s",
|
||||
formatted_value, lboard->title);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false);
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1893,7 +1903,8 @@ static void cheevos_test_leaderboards(void)
|
||||
CHEEVOS_LOG("[CHEEVOS]: cancel lboard %s\n", lboard->title);
|
||||
lboard->active = 0;
|
||||
runloop_msg_queue_push("Leaderboard attempt cancelled!",
|
||||
0, 2 * 60, false);
|
||||
0, 2 * 60, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1909,8 +1920,8 @@ static void cheevos_test_leaderboards(void)
|
||||
snprintf(msg, sizeof(msg),
|
||||
"Leaderboard Active: %s", lboard->title);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false);
|
||||
runloop_msg_queue_push(lboard->description, 0, 3*60, false);
|
||||
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
runloop_msg_queue_push(lboard->description, 0, 3*60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2052,22 +2063,21 @@ static int cheevos_deactivate_unlocks(const char* json, unsigned mode)
|
||||
|
||||
void cheevos_reset_game(void)
|
||||
{
|
||||
cheevo_t *end = NULL;
|
||||
cheevo_t *cheevo = cheevos_locals.core.cheevos;
|
||||
cheevo_t *cheevo;
|
||||
cheevos_leaderboard_t *lboard;
|
||||
unsigned i;
|
||||
|
||||
if (!cheevo)
|
||||
return;
|
||||
|
||||
end = cheevo + cheevos_locals.core.count;
|
||||
|
||||
for (; cheevo < end; cheevo++)
|
||||
cheevo = cheevos_locals.core.cheevos;
|
||||
for (i = 0; i < cheevos_locals.core.count; i++, cheevo++)
|
||||
cheevo->last = 1;
|
||||
|
||||
cheevo = cheevos_locals.unofficial.cheevos;
|
||||
end = cheevo + cheevos_locals.unofficial.count;
|
||||
|
||||
for (; cheevo < end; cheevo++)
|
||||
cheevo = cheevos_locals.unofficial.cheevos;
|
||||
for (i = 0; i < cheevos_locals.unofficial.count; i++, cheevo++)
|
||||
cheevo->last = 1;
|
||||
|
||||
lboard = cheevos_locals.leaderboards;
|
||||
for (i = 0; i < cheevos_locals.lboard_count; i++, lboard++)
|
||||
lboard->active = 0;
|
||||
}
|
||||
|
||||
void cheevos_populate_menu(void *data)
|
||||
@@ -2279,7 +2289,7 @@ bool cheevos_toggle_hardcore_mode(void)
|
||||
command_event(CMD_EVENT_REWIND_DEINIT, NULL);
|
||||
|
||||
CHEEVOS_LOG("%s\n", msg);
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, true);
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2810,7 +2820,7 @@ found:
|
||||
|
||||
if (!coro->json)
|
||||
{
|
||||
runloop_msg_queue_push("Error loading achievements.", 0, 5 * 60, false);
|
||||
runloop_msg_queue_push("Error loading achievements.", 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
CHEEVOS_ERR("[CHEEVOS]: error loading achievements.\n");
|
||||
CORO_STOP();
|
||||
}
|
||||
@@ -2839,7 +2849,8 @@ found:
|
||||
{
|
||||
runloop_msg_queue_push(
|
||||
"This game has no achievements.",
|
||||
0, 5 * 60, false);
|
||||
0, 5 * 60, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
cheevos_free_cheevo_set(&cheevos_locals.core);
|
||||
cheevos_free_cheevo_set(&cheevos_locals.unofficial);
|
||||
@@ -2876,6 +2887,10 @@ found:
|
||||
const cheevo_t* end = cheevo + cheevos_locals.core.count;
|
||||
int number_of_unlocked = cheevos_locals.core.count;
|
||||
|
||||
snprintf(msg, sizeof(msg), "cheevos: using the old implementation.");
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
if (coro->settings->bools.cheevos_hardcore_mode_enable && !cheevos_hardcore_paused)
|
||||
mode = CHEEVOS_ACTIVE_HARDCORE;
|
||||
|
||||
@@ -2887,7 +2902,7 @@ found:
|
||||
"You have %d of %d achievements unlocked.",
|
||||
number_of_unlocked, cheevos_locals.core.count);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 6 * 60, false);
|
||||
runloop_msg_queue_push(msg, 0, 6 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
CORO_GOSUB(GET_BADGES);
|
||||
@@ -2959,7 +2974,7 @@ found:
|
||||
/* Checks for the existence of a headered Lynx file.
|
||||
Unheadered files fall back to GENERIC_MD5. */
|
||||
|
||||
if (coro->len <= lynx_header_len ||
|
||||
if (coro->len <= (unsigned)lynx_header_len ||
|
||||
memcmp("LYNX", (void *)coro->data, 5) != 0)
|
||||
{
|
||||
coro->gameid = 0;
|
||||
@@ -3191,6 +3206,9 @@ found:
|
||||
|
||||
badges_ctx = new_badges_ctx;
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (false) /* we always want badges if menu widgets are enabled */
|
||||
#endif
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!(
|
||||
@@ -3292,10 +3310,12 @@ found:
|
||||
{
|
||||
runloop_msg_queue_push(
|
||||
"Missing RetroAchievements account information.",
|
||||
0, 5 * 60, false);
|
||||
0, 5 * 60, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
runloop_msg_queue_push(
|
||||
"Please fill in your account information in Settings.",
|
||||
0, 5 * 60, false);
|
||||
0, 5 * 60, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
CHEEVOS_ERR("[CHEEVOS]: login info not informed.\n");
|
||||
CORO_STOP();
|
||||
}
|
||||
@@ -3352,7 +3372,7 @@ found:
|
||||
"RetroAchievements: Logged in as \"%s\".",
|
||||
coro->settings->arrays.cheevos_username);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, false);
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
/* Save token to config and clear pass on success */
|
||||
@@ -3373,13 +3393,13 @@ found:
|
||||
"RetroAchievements: %s",
|
||||
error_response);
|
||||
error_message[sizeof(error_message) - 1] = 0;
|
||||
runloop_msg_queue_push(error_message, 0, 5 * 60, false);
|
||||
runloop_msg_queue_push(error_message, 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
*coro->settings->arrays.cheevos_token = '\0';
|
||||
|
||||
CORO_STOP();
|
||||
}
|
||||
|
||||
runloop_msg_queue_push("RetroAchievements: Error contacting server.", 0, 5 * 60, false);
|
||||
runloop_msg_queue_push("RetroAchievements: Error contacting server.", 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
CHEEVOS_ERR("[CHEEVOS]: error getting user token.\n");
|
||||
|
||||
CORO_STOP();
|
||||
@@ -3636,7 +3656,7 @@ bool cheevos_load(const void *data)
|
||||
if (!coro)
|
||||
return false;
|
||||
|
||||
task = (retro_task_t*)calloc(1, sizeof(*task));
|
||||
task = task_init();
|
||||
|
||||
if (!task)
|
||||
{
|
||||
|
||||
+165
-171
@@ -1,171 +1,165 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_OLD_H
|
||||
#define __RARCH_CHEEVOS_OLD_H
|
||||
|
||||
#ifdef HAVE_NEW_CHEEVOS
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/*****************************************************************************
|
||||
Setup - mainly for debugging
|
||||
*****************************************************************************/
|
||||
|
||||
/* Define this macro to get extra-verbose log for cheevos. */
|
||||
#undef CHEEVOS_VERBOSE
|
||||
|
||||
/*****************************************************************************
|
||||
End of setup
|
||||
*****************************************************************************/
|
||||
|
||||
#define CHEEVOS_TAG "[CHEEVOS]: "
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
|
||||
#define CHEEVOS_LOG RARCH_LOG
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
#else
|
||||
|
||||
void cheevos_log(const char *fmt, ...);
|
||||
|
||||
#define CHEEVOS_LOG cheevos_log
|
||||
#define CHEEVOS_ERR cheevos_log
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct cheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
char *s;
|
||||
size_t len;
|
||||
} cheevos_ctx_desc_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_CONSOLE_NONE = 0,
|
||||
/* Don't change those, the values match the console IDs
|
||||
* at retroachievements.org. */
|
||||
CHEEVOS_CONSOLE_MEGA_DRIVE = 1,
|
||||
CHEEVOS_CONSOLE_NINTENDO_64 = 2,
|
||||
CHEEVOS_CONSOLE_SUPER_NINTENDO = 3,
|
||||
CHEEVOS_CONSOLE_GAMEBOY = 4,
|
||||
CHEEVOS_CONSOLE_GAMEBOY_ADVANCE = 5,
|
||||
CHEEVOS_CONSOLE_GAMEBOY_COLOR = 6,
|
||||
CHEEVOS_CONSOLE_NINTENDO = 7,
|
||||
CHEEVOS_CONSOLE_PC_ENGINE = 8,
|
||||
CHEEVOS_CONSOLE_SEGA_CD = 9,
|
||||
CHEEVOS_CONSOLE_SEGA_32X = 10,
|
||||
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
|
||||
CHEEVOS_CONSOLE_PLAYSTATION = 12,
|
||||
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
|
||||
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
|
||||
CHEEVOS_CONSOLE_GAME_GEAR = 15,
|
||||
CHEEVOS_CONSOLE_GAMECUBE = 16,
|
||||
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
|
||||
CHEEVOS_CONSOLE_NINTENDO_DS = 18,
|
||||
CHEEVOS_CONSOLE_WII = 19,
|
||||
CHEEVOS_CONSOLE_WII_U = 20,
|
||||
CHEEVOS_CONSOLE_PLAYSTATION_2 = 21,
|
||||
CHEEVOS_CONSOLE_XBOX = 22,
|
||||
CHEEVOS_CONSOLE_SKYNET = 23,
|
||||
CHEEVOS_CONSOLE_XBOX_ONE = 24,
|
||||
CHEEVOS_CONSOLE_ATARI_2600 = 25,
|
||||
CHEEVOS_CONSOLE_MS_DOS = 26,
|
||||
CHEEVOS_CONSOLE_ARCADE = 27,
|
||||
CHEEVOS_CONSOLE_VIRTUAL_BOY = 28,
|
||||
CHEEVOS_CONSOLE_MSX = 29,
|
||||
CHEEVOS_CONSOLE_COMMODORE_64 = 30,
|
||||
CHEEVOS_CONSOLE_ZX81 = 31,
|
||||
CHEEVOS_CONSOLE_ATARI_7800 = 51
|
||||
} cheevos_console_t;
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_DIRTY_TITLE = 1 << 0,
|
||||
CHEEVOS_DIRTY_DESC = 1 << 1,
|
||||
CHEEVOS_DIRTY_POINTS = 1 << 2,
|
||||
CHEEVOS_DIRTY_AUTHOR = 1 << 3,
|
||||
CHEEVOS_DIRTY_ID = 1 << 4,
|
||||
CHEEVOS_DIRTY_BADGE = 1 << 5,
|
||||
CHEEVOS_DIRTY_CONDITIONS = 1 << 6,
|
||||
CHEEVOS_DIRTY_VOTES = 1 << 7,
|
||||
CHEEVOS_DIRTY_DESCRIPTION = 1 << 8,
|
||||
|
||||
CHEEVOS_DIRTY_ALL = (1 << 9) - 1
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_FORMAT_FRAMES = 0,
|
||||
CHEEVOS_FORMAT_SECS,
|
||||
CHEEVOS_FORMAT_MILLIS,
|
||||
CHEEVOS_FORMAT_SCORE,
|
||||
CHEEVOS_FORMAT_VALUE,
|
||||
CHEEVOS_FORMAT_OTHER
|
||||
};
|
||||
|
||||
bool cheevos_load(const void *data);
|
||||
|
||||
void cheevos_reset_game(void);
|
||||
|
||||
void cheevos_populate_menu(void *data);
|
||||
|
||||
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
|
||||
|
||||
bool cheevos_apply_cheats(bool *data_bool);
|
||||
|
||||
bool cheevos_unload(void);
|
||||
|
||||
bool cheevos_toggle_hardcore_mode(void);
|
||||
|
||||
void cheevos_test(void);
|
||||
|
||||
bool cheevos_set_cheats(void);
|
||||
|
||||
void cheevos_set_support_cheevos(bool state);
|
||||
|
||||
bool cheevos_get_support_cheevos(void);
|
||||
|
||||
cheevos_console_t cheevos_get_console(void);
|
||||
|
||||
extern bool cheevos_loaded;
|
||||
extern bool cheevos_hardcore_active;
|
||||
extern bool cheevos_hardcore_paused;
|
||||
extern bool cheevos_state_loaded_flag;
|
||||
extern int cheats_are_enabled;
|
||||
extern int cheats_were_enabled;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_H */
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_OLD_H
|
||||
#define __RARCH_CHEEVOS_OLD_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/*****************************************************************************
|
||||
Setup - mainly for debugging
|
||||
*****************************************************************************/
|
||||
|
||||
/* Define this macro to get extra-verbose log for cheevos. */
|
||||
#define CHEEVOS_VERBOSE
|
||||
|
||||
/*****************************************************************************
|
||||
End of setup
|
||||
*****************************************************************************/
|
||||
|
||||
#define CHEEVOS_TAG "[CHEEVOS]: "
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
|
||||
#define CHEEVOS_LOG RARCH_LOG
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
#else
|
||||
|
||||
void cheevos_log(const char *fmt, ...);
|
||||
|
||||
#define CHEEVOS_LOG cheevos_log
|
||||
#define CHEEVOS_ERR cheevos_log
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct cheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
char *s;
|
||||
size_t len;
|
||||
} cheevos_ctx_desc_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_CONSOLE_NONE = 0,
|
||||
/* Don't change those, the values match the console IDs
|
||||
* at retroachievements.org. */
|
||||
CHEEVOS_CONSOLE_MEGA_DRIVE = 1,
|
||||
CHEEVOS_CONSOLE_NINTENDO_64 = 2,
|
||||
CHEEVOS_CONSOLE_SUPER_NINTENDO = 3,
|
||||
CHEEVOS_CONSOLE_GAMEBOY = 4,
|
||||
CHEEVOS_CONSOLE_GAMEBOY_ADVANCE = 5,
|
||||
CHEEVOS_CONSOLE_GAMEBOY_COLOR = 6,
|
||||
CHEEVOS_CONSOLE_NINTENDO = 7,
|
||||
CHEEVOS_CONSOLE_PC_ENGINE = 8,
|
||||
CHEEVOS_CONSOLE_SEGA_CD = 9,
|
||||
CHEEVOS_CONSOLE_SEGA_32X = 10,
|
||||
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
|
||||
CHEEVOS_CONSOLE_PLAYSTATION = 12,
|
||||
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
|
||||
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
|
||||
CHEEVOS_CONSOLE_GAME_GEAR = 15,
|
||||
CHEEVOS_CONSOLE_GAMECUBE = 16,
|
||||
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
|
||||
CHEEVOS_CONSOLE_NINTENDO_DS = 18,
|
||||
CHEEVOS_CONSOLE_WII = 19,
|
||||
CHEEVOS_CONSOLE_WII_U = 20,
|
||||
CHEEVOS_CONSOLE_PLAYSTATION_2 = 21,
|
||||
CHEEVOS_CONSOLE_XBOX = 22,
|
||||
CHEEVOS_CONSOLE_SKYNET = 23,
|
||||
CHEEVOS_CONSOLE_XBOX_ONE = 24,
|
||||
CHEEVOS_CONSOLE_ATARI_2600 = 25,
|
||||
CHEEVOS_CONSOLE_MS_DOS = 26,
|
||||
CHEEVOS_CONSOLE_ARCADE = 27,
|
||||
CHEEVOS_CONSOLE_VIRTUAL_BOY = 28,
|
||||
CHEEVOS_CONSOLE_MSX = 29,
|
||||
CHEEVOS_CONSOLE_COMMODORE_64 = 30,
|
||||
CHEEVOS_CONSOLE_ZX81 = 31,
|
||||
CHEEVOS_CONSOLE_ATARI_7800 = 51
|
||||
} cheevos_console_t;
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_DIRTY_TITLE = 1 << 0,
|
||||
CHEEVOS_DIRTY_DESC = 1 << 1,
|
||||
CHEEVOS_DIRTY_POINTS = 1 << 2,
|
||||
CHEEVOS_DIRTY_AUTHOR = 1 << 3,
|
||||
CHEEVOS_DIRTY_ID = 1 << 4,
|
||||
CHEEVOS_DIRTY_BADGE = 1 << 5,
|
||||
CHEEVOS_DIRTY_CONDITIONS = 1 << 6,
|
||||
CHEEVOS_DIRTY_VOTES = 1 << 7,
|
||||
CHEEVOS_DIRTY_DESCRIPTION = 1 << 8,
|
||||
|
||||
CHEEVOS_DIRTY_ALL = (1 << 9) - 1
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_FORMAT_FRAMES = 0,
|
||||
CHEEVOS_FORMAT_SECS,
|
||||
CHEEVOS_FORMAT_MILLIS,
|
||||
CHEEVOS_FORMAT_SCORE,
|
||||
CHEEVOS_FORMAT_VALUE,
|
||||
CHEEVOS_FORMAT_OTHER
|
||||
};
|
||||
|
||||
bool cheevos_load(const void *data);
|
||||
|
||||
void cheevos_reset_game(void);
|
||||
|
||||
void cheevos_populate_menu(void *data);
|
||||
|
||||
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
|
||||
|
||||
bool cheevos_apply_cheats(bool *data_bool);
|
||||
|
||||
bool cheevos_unload(void);
|
||||
|
||||
bool cheevos_toggle_hardcore_mode(void);
|
||||
|
||||
void cheevos_test(void);
|
||||
|
||||
bool cheevos_set_cheats(void);
|
||||
|
||||
void cheevos_set_support_cheevos(bool state);
|
||||
|
||||
bool cheevos_get_support_cheevos(void);
|
||||
|
||||
cheevos_console_t cheevos_get_console(void);
|
||||
|
||||
extern bool cheevos_loaded;
|
||||
extern bool cheevos_hardcore_active;
|
||||
extern bool cheevos_hardcore_paused;
|
||||
extern bool cheevos_state_loaded_flag;
|
||||
extern int cheats_are_enabled;
|
||||
extern int cheats_were_enabled;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_H */
|
||||
+189
-189
@@ -1,189 +1,189 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "cond.h"
|
||||
#include "var.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
/*****************************************************************************
|
||||
Parsing
|
||||
*****************************************************************************/
|
||||
|
||||
static cheevos_cond_op_t cheevos_cond_parse_operator(const char** memaddr)
|
||||
{
|
||||
const char *str = *memaddr;
|
||||
cheevos_cond_op_t op;
|
||||
|
||||
if (*str == '=' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
str++;
|
||||
}
|
||||
else if (*str == '!' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_NOT_EQUAL_TO;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '<' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '<')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_LESS_THAN;
|
||||
str++;
|
||||
}
|
||||
else if (*str == '>' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '>')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_GREATER_THAN;
|
||||
str++;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
}
|
||||
|
||||
*memaddr = str;
|
||||
return op;
|
||||
}
|
||||
|
||||
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr)
|
||||
{
|
||||
const char* str = *memaddr;
|
||||
cond->type = CHEEVOS_COND_TYPE_STANDARD;
|
||||
|
||||
if (*str != 0 && str[1] == ':')
|
||||
{
|
||||
int skip = 2;
|
||||
|
||||
switch (*str)
|
||||
{
|
||||
case 'R':
|
||||
cond->type = CHEEVOS_COND_TYPE_RESET_IF;
|
||||
break;
|
||||
case 'P':
|
||||
cond->type = CHEEVOS_COND_TYPE_PAUSE_IF;
|
||||
break;
|
||||
case 'A':
|
||||
cond->type = CHEEVOS_COND_TYPE_ADD_SOURCE;
|
||||
break;
|
||||
case 'B':
|
||||
cond->type = CHEEVOS_COND_TYPE_SUB_SOURCE;
|
||||
break;
|
||||
case 'C':
|
||||
cond->type = CHEEVOS_COND_TYPE_ADD_HITS;
|
||||
break;
|
||||
default:
|
||||
skip = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
str += skip;
|
||||
}
|
||||
|
||||
cheevos_var_parse(&cond->source, &str);
|
||||
cond->op = cheevos_cond_parse_operator(&str);
|
||||
cheevos_var_parse(&cond->target, &str);
|
||||
cond->curr_hits = 0;
|
||||
|
||||
if (*str == '(' || *str == '.')
|
||||
{
|
||||
char* end;
|
||||
cond->req_hits = (unsigned)strtol(str + 1, &end, 10);
|
||||
str = end + (*end == ')' || *end == '.');
|
||||
}
|
||||
else
|
||||
cond->req_hits = 0;
|
||||
|
||||
*memaddr = str;
|
||||
}
|
||||
|
||||
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which)
|
||||
{
|
||||
cheevos_cond_t dummy;
|
||||
unsigned index = 0;
|
||||
unsigned count = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
cheevos_cond_parse(&dummy, &memaddr);
|
||||
|
||||
if (index == which)
|
||||
count++;
|
||||
|
||||
if (*memaddr != '_')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (*memaddr != 'S')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which)
|
||||
{
|
||||
cheevos_cond_t dummy;
|
||||
unsigned index = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
if (index == which)
|
||||
{
|
||||
cheevos_cond_parse(cond, &memaddr);
|
||||
cond++;
|
||||
}
|
||||
else
|
||||
cheevos_cond_parse(&dummy, &memaddr);
|
||||
|
||||
if (*memaddr != '_')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (*memaddr != 'S')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
}
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "cond.h"
|
||||
#include "var.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
/*****************************************************************************
|
||||
Parsing
|
||||
*****************************************************************************/
|
||||
|
||||
static cheevos_cond_op_t cheevos_cond_parse_operator(const char** memaddr)
|
||||
{
|
||||
const char *str = *memaddr;
|
||||
cheevos_cond_op_t op;
|
||||
|
||||
if (*str == '=' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
str++;
|
||||
}
|
||||
else if (*str == '!' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_NOT_EQUAL_TO;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '<' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '<')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_LESS_THAN;
|
||||
str++;
|
||||
}
|
||||
else if (*str == '>' && str[1] == '=')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL;
|
||||
str += 2;
|
||||
}
|
||||
else if (*str == '>')
|
||||
{
|
||||
op = CHEEVOS_COND_OP_GREATER_THAN;
|
||||
str++;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
}
|
||||
|
||||
*memaddr = str;
|
||||
return op;
|
||||
}
|
||||
|
||||
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr)
|
||||
{
|
||||
const char* str = *memaddr;
|
||||
cond->type = CHEEVOS_COND_TYPE_STANDARD;
|
||||
|
||||
if (*str != 0 && str[1] == ':')
|
||||
{
|
||||
int skip = 2;
|
||||
|
||||
switch (*str)
|
||||
{
|
||||
case 'R':
|
||||
cond->type = CHEEVOS_COND_TYPE_RESET_IF;
|
||||
break;
|
||||
case 'P':
|
||||
cond->type = CHEEVOS_COND_TYPE_PAUSE_IF;
|
||||
break;
|
||||
case 'A':
|
||||
cond->type = CHEEVOS_COND_TYPE_ADD_SOURCE;
|
||||
break;
|
||||
case 'B':
|
||||
cond->type = CHEEVOS_COND_TYPE_SUB_SOURCE;
|
||||
break;
|
||||
case 'C':
|
||||
cond->type = CHEEVOS_COND_TYPE_ADD_HITS;
|
||||
break;
|
||||
default:
|
||||
skip = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
str += skip;
|
||||
}
|
||||
|
||||
cheevos_var_parse(&cond->source, &str);
|
||||
cond->op = cheevos_cond_parse_operator(&str);
|
||||
cheevos_var_parse(&cond->target, &str);
|
||||
cond->curr_hits = 0;
|
||||
|
||||
if (*str == '(' || *str == '.')
|
||||
{
|
||||
char* end;
|
||||
cond->req_hits = (unsigned)strtol(str + 1, &end, 10);
|
||||
str = end + (*end == ')' || *end == '.');
|
||||
}
|
||||
else
|
||||
cond->req_hits = 0;
|
||||
|
||||
*memaddr = str;
|
||||
}
|
||||
|
||||
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which)
|
||||
{
|
||||
cheevos_cond_t dummy;
|
||||
unsigned index = 0;
|
||||
unsigned count = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
cheevos_cond_parse(&dummy, &memaddr);
|
||||
|
||||
if (index == which)
|
||||
count++;
|
||||
|
||||
if (*memaddr != '_')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (*memaddr != 'S')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which)
|
||||
{
|
||||
cheevos_cond_t dummy;
|
||||
unsigned index = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
if (index == which)
|
||||
{
|
||||
cheevos_cond_parse(cond, &memaddr);
|
||||
cond++;
|
||||
}
|
||||
else
|
||||
cheevos_cond_parse(&dummy, &memaddr);
|
||||
|
||||
if (*memaddr != '_')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (*memaddr != 'S')
|
||||
break;
|
||||
|
||||
memaddr++;
|
||||
}
|
||||
}
|
||||
+63
-63
@@ -1,63 +1,63 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_COND_H
|
||||
#define __RARCH_CHEEVOS_COND_H
|
||||
|
||||
#include "var.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_COND_TYPE_STANDARD,
|
||||
CHEEVOS_COND_TYPE_PAUSE_IF,
|
||||
CHEEVOS_COND_TYPE_RESET_IF,
|
||||
CHEEVOS_COND_TYPE_ADD_SOURCE,
|
||||
CHEEVOS_COND_TYPE_SUB_SOURCE,
|
||||
CHEEVOS_COND_TYPE_ADD_HITS
|
||||
} cheevos_cond_type_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_COND_OP_EQUALS,
|
||||
CHEEVOS_COND_OP_LESS_THAN,
|
||||
CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL,
|
||||
CHEEVOS_COND_OP_GREATER_THAN,
|
||||
CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL,
|
||||
CHEEVOS_COND_OP_NOT_EQUAL_TO
|
||||
} cheevos_cond_op_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_cond_type_t type;
|
||||
unsigned req_hits;
|
||||
unsigned curr_hits;
|
||||
char pause;
|
||||
|
||||
cheevos_var_t source;
|
||||
cheevos_cond_op_t op;
|
||||
cheevos_var_t target;
|
||||
} cheevos_cond_t;
|
||||
|
||||
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr);
|
||||
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which);
|
||||
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_COND_H */
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_COND_H
|
||||
#define __RARCH_CHEEVOS_COND_H
|
||||
|
||||
#include "var.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_COND_TYPE_STANDARD,
|
||||
CHEEVOS_COND_TYPE_PAUSE_IF,
|
||||
CHEEVOS_COND_TYPE_RESET_IF,
|
||||
CHEEVOS_COND_TYPE_ADD_SOURCE,
|
||||
CHEEVOS_COND_TYPE_SUB_SOURCE,
|
||||
CHEEVOS_COND_TYPE_ADD_HITS
|
||||
} cheevos_cond_type_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_COND_OP_EQUALS,
|
||||
CHEEVOS_COND_OP_LESS_THAN,
|
||||
CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL,
|
||||
CHEEVOS_COND_OP_GREATER_THAN,
|
||||
CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL,
|
||||
CHEEVOS_COND_OP_NOT_EQUAL_TO
|
||||
} cheevos_cond_op_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_cond_type_t type;
|
||||
unsigned req_hits;
|
||||
unsigned curr_hits;
|
||||
char pause;
|
||||
|
||||
cheevos_var_t source;
|
||||
cheevos_cond_op_t op;
|
||||
cheevos_var_t target;
|
||||
} cheevos_cond_t;
|
||||
|
||||
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr);
|
||||
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which);
|
||||
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_COND_H */
|
||||
+75
-75
@@ -1,75 +1,75 @@
|
||||
#ifndef CORO_H
|
||||
#define CORO_H
|
||||
|
||||
/*
|
||||
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
|
||||
#define CORO_ENTER() \
|
||||
{ \
|
||||
CORO_again: ; \
|
||||
switch ( coro->step ) { \
|
||||
case CORO_BEGIN: ;
|
||||
|
||||
/* Use to define labels which are targets to GOTO and GOSUB */
|
||||
#define CORO_SUB( x ) \
|
||||
case x: ;
|
||||
|
||||
/* Use at the end of the coroutine */
|
||||
#define CORO_LEAVE() \
|
||||
} } \
|
||||
do { return 0; } while ( 0 )
|
||||
|
||||
/* Go to the x label */
|
||||
#define CORO_GOTO( x ) \
|
||||
do { \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Go to a subroutine, execution continues until the subroutine returns via RET */
|
||||
#define CORO_GOSUB( x ) \
|
||||
do { \
|
||||
coro->stack[ coro->sp++ ] = __LINE__; \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Returns from a subroutine */
|
||||
#define CORO_RET() \
|
||||
do { \
|
||||
coro->step = coro->stack[ --coro->sp ]; \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Yields to the caller, execution continues from this point when the coroutine is resumed */
|
||||
#define CORO_YIELD() \
|
||||
do { \
|
||||
coro->step = __LINE__; \
|
||||
return 1; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* The coroutine entry point, never use 0 as a label */
|
||||
#define CORO_BEGIN 0
|
||||
|
||||
/* Sets up the coroutine */
|
||||
#define CORO_SETUP() \
|
||||
do { \
|
||||
coro->step = CORO_BEGIN; \
|
||||
coro->sp = 0; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_STOP() \
|
||||
do { \
|
||||
return 0; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Add this macro to your coro_t structure containing the variables for the coroutine */
|
||||
#define CORO_FIELDS \
|
||||
int step, sp; \
|
||||
int stack[ 8 ];
|
||||
|
||||
#endif /* CORO_H */
|
||||
#ifndef CORO_H
|
||||
#define CORO_H
|
||||
|
||||
/*
|
||||
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
|
||||
#define CORO_ENTER() \
|
||||
{ \
|
||||
CORO_again: ; \
|
||||
switch ( coro->step ) { \
|
||||
case CORO_BEGIN: ;
|
||||
|
||||
/* Use to define labels which are targets to GOTO and GOSUB */
|
||||
#define CORO_SUB( x ) \
|
||||
case x: ;
|
||||
|
||||
/* Use at the end of the coroutine */
|
||||
#define CORO_LEAVE() \
|
||||
} } \
|
||||
do { return 0; } while ( 0 )
|
||||
|
||||
/* Go to the x label */
|
||||
#define CORO_GOTO( x ) \
|
||||
do { \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Go to a subroutine, execution continues until the subroutine returns via RET */
|
||||
#define CORO_GOSUB( x ) \
|
||||
do { \
|
||||
coro->stack[ coro->sp++ ] = __LINE__; \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Returns from a subroutine */
|
||||
#define CORO_RET() \
|
||||
do { \
|
||||
coro->step = coro->stack[ --coro->sp ]; \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Yields to the caller, execution continues from this point when the coroutine is resumed */
|
||||
#define CORO_YIELD() \
|
||||
do { \
|
||||
coro->step = __LINE__; \
|
||||
return 1; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* The coroutine entry point, never use 0 as a label */
|
||||
#define CORO_BEGIN 0
|
||||
|
||||
/* Sets up the coroutine */
|
||||
#define CORO_SETUP() \
|
||||
do { \
|
||||
coro->step = CORO_BEGIN; \
|
||||
coro->sp = 0; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_STOP() \
|
||||
do { \
|
||||
return 0; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Add this macro to your coro_t structure containing the variables for the coroutine */
|
||||
#define CORO_FIELDS \
|
||||
int step, sp; \
|
||||
int stack[ 8 ];
|
||||
|
||||
#endif /* CORO_H */
|
||||
+422
-415
@@ -1,415 +1,422 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
#include "var.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
/*****************************************************************************
|
||||
Parsing
|
||||
*****************************************************************************/
|
||||
|
||||
static cheevos_var_size_t cheevos_var_parse_prefix(const char** memaddr)
|
||||
{
|
||||
/* Careful not to use ABCDEF here, this denotes part of an actual variable! */
|
||||
const char* str = *memaddr;
|
||||
cheevos_var_size_t size;
|
||||
|
||||
switch (toupper((unsigned char)*str++))
|
||||
{
|
||||
case 'M':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_0;
|
||||
break;
|
||||
case 'N':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_1;
|
||||
break;
|
||||
case 'O':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_2;
|
||||
break;
|
||||
case 'P':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_3;
|
||||
break;
|
||||
case 'Q':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_4;
|
||||
break;
|
||||
case 'R':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_5;
|
||||
break;
|
||||
case 'S':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_6;
|
||||
break;
|
||||
case 'T':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_7;
|
||||
break;
|
||||
case 'L':
|
||||
size = CHEEVOS_VAR_SIZE_NIBBLE_LOWER;
|
||||
break;
|
||||
case 'U':
|
||||
size = CHEEVOS_VAR_SIZE_NIBBLE_UPPER;
|
||||
break;
|
||||
case 'H':
|
||||
size = CHEEVOS_VAR_SIZE_EIGHT_BITS;
|
||||
break;
|
||||
case 'X':
|
||||
size = CHEEVOS_VAR_SIZE_THIRTYTWO_BITS;
|
||||
break;
|
||||
default:
|
||||
str--;
|
||||
/* fall through */
|
||||
case ' ':
|
||||
size = CHEEVOS_VAR_SIZE_SIXTEEN_BITS;
|
||||
break;
|
||||
}
|
||||
|
||||
*memaddr = str;
|
||||
return size;
|
||||
}
|
||||
|
||||
static size_t cheevos_var_reduce(size_t addr, size_t mask)
|
||||
{
|
||||
while (mask)
|
||||
{
|
||||
size_t tmp = (mask - 1) & ~mask;
|
||||
addr = (addr & tmp) | ((addr >> 1) & ~tmp);
|
||||
mask = (mask & (mask - 1)) >> 1;
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static size_t cheevos_var_highest_bit(size_t n)
|
||||
{
|
||||
n |= n >> 1;
|
||||
n |= n >> 2;
|
||||
n |= n >> 4;
|
||||
n |= n >> 8;
|
||||
n |= n >> 16;
|
||||
|
||||
return n ^ (n >> 1);
|
||||
}
|
||||
|
||||
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr)
|
||||
{
|
||||
char *end = NULL;
|
||||
const char *str = *memaddr;
|
||||
unsigned base = 16;
|
||||
|
||||
var->is_bcd = false;
|
||||
|
||||
if (toupper((unsigned char)*str) == 'D' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* d0x + 4 hex digits */
|
||||
str += 3;
|
||||
var->type = CHEEVOS_VAR_TYPE_DELTA_MEM;
|
||||
}
|
||||
else if (toupper((unsigned char)*str) == 'B' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* b0x (binary-coded decimal) */
|
||||
str += 3;
|
||||
var->is_bcd = true;
|
||||
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
|
||||
}
|
||||
else if (*str == '0' && toupper((unsigned char)str[1]) == 'X')
|
||||
{
|
||||
/* 0x + 4 hex digits */
|
||||
str += 2;
|
||||
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
var->type = CHEEVOS_VAR_TYPE_VALUE_COMP;
|
||||
|
||||
if (toupper((unsigned char)*str) == 'H')
|
||||
str++;
|
||||
else
|
||||
{
|
||||
if (toupper((unsigned char)*str) == 'V')
|
||||
str++;
|
||||
|
||||
base = 10;
|
||||
}
|
||||
}
|
||||
|
||||
if (var->type != CHEEVOS_VAR_TYPE_VALUE_COMP)
|
||||
{
|
||||
var->size = cheevos_var_parse_prefix(&str);
|
||||
}
|
||||
|
||||
var->value = (unsigned)strtol(str, &end, base);
|
||||
*memaddr = end;
|
||||
}
|
||||
|
||||
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
|
||||
var->bank_id = -1;
|
||||
|
||||
if (console == CHEEVOS_CONSOLE_NINTENDO)
|
||||
{
|
||||
if (var->value >= 0x0800 && var->value < 0x2000)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", var->value, var->value & 0x07ff);
|
||||
var->value &= 0x07ff;
|
||||
}
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_GAMEBOY_COLOR)
|
||||
{
|
||||
if (var->value >= 0xe000 && var->value <= 0xfdff)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", var->value, var->value - 0x2000);
|
||||
var->value -= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
const rarch_memory_descriptor_t *desc = NULL;
|
||||
const rarch_memory_descriptor_t *end = NULL;
|
||||
|
||||
/* Patch the address to correctly map it to the mmaps */
|
||||
if (console == CHEEVOS_CONSOLE_GAMEBOY_ADVANCE)
|
||||
{
|
||||
if (var->value < 0x8000) /* Internal RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x3000000);
|
||||
var->value += 0x3000000;
|
||||
}
|
||||
else /* Work RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x2000000 - 0x8000);
|
||||
var->value += 0x2000000 - 0x8000;
|
||||
}
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_PC_ENGINE)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", var->value, var->value + 0x1f0000);
|
||||
var->value += 0x1f0000;
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_SUPER_NINTENDO)
|
||||
{
|
||||
if (var->value < 0x020000) /* Work RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x7e0000);
|
||||
var->value += 0x7e0000;
|
||||
}
|
||||
else /* Save RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x006000 - 0x020000);
|
||||
var->value += 0x006000 - 0x020000;
|
||||
}
|
||||
}
|
||||
|
||||
desc = system->mmaps.descriptors;
|
||||
end = desc + system->mmaps.num_descriptors;
|
||||
|
||||
for (; desc < end; desc++)
|
||||
{
|
||||
if (((desc->core.start ^ var->value) & desc->core.select) == 0)
|
||||
{
|
||||
unsigned addr = var->value;
|
||||
var->bank_id = (int)(desc - system->mmaps.descriptors);
|
||||
var->value = (unsigned)cheevos_var_reduce(
|
||||
(addr - desc->core.start) & desc->disconnect_mask,
|
||||
desc->core.disconnect);
|
||||
|
||||
if (var->value >= desc->core.len)
|
||||
var->value -= cheevos_var_highest_bit(var->value);
|
||||
|
||||
var->value += desc->core.offset;
|
||||
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, var->bank_id + 1, var->value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
break;
|
||||
case 1:
|
||||
meminfo.id = RETRO_MEMORY_SAVE_RAM;
|
||||
break;
|
||||
case 2:
|
||||
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
break;
|
||||
case 3:
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
}
|
||||
|
||||
core_get_memory(&meminfo);
|
||||
|
||||
if (var->value < meminfo.size)
|
||||
{
|
||||
var->bank_id = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* HACK subtract the correct amount of bytes to reach the save RAM */
|
||||
if (i == 0 && console == CHEEVOS_CONSOLE_NINTENDO)
|
||||
var->value -= 0x6000;
|
||||
else
|
||||
var->value -= meminfo.size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Testing
|
||||
*****************************************************************************/
|
||||
|
||||
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var)
|
||||
{
|
||||
uint8_t* memory = NULL;
|
||||
|
||||
if (var->bank_id >= 0)
|
||||
{
|
||||
rarch_system_info_t* system = runloop_get_system_info();
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
memory = (uint8_t*)system->mmaps.descriptors[var->bank_id].core.ptr;
|
||||
else
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo = {NULL, 0, 0};
|
||||
|
||||
switch (var->bank_id)
|
||||
{
|
||||
case 0:
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
break;
|
||||
case 1:
|
||||
meminfo.id = RETRO_MEMORY_SAVE_RAM;
|
||||
break;
|
||||
case 2:
|
||||
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
break;
|
||||
case 3:
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
default:
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "invalid bank id: %s\n", var->bank_id);
|
||||
break;
|
||||
}
|
||||
|
||||
core_get_memory(&meminfo);
|
||||
memory = (uint8_t*)meminfo.data;
|
||||
}
|
||||
|
||||
if (memory)
|
||||
memory += var->value;
|
||||
}
|
||||
|
||||
return memory;
|
||||
}
|
||||
|
||||
unsigned cheevos_var_get_value(cheevos_var_t* var)
|
||||
{
|
||||
const uint8_t* memory = NULL;
|
||||
unsigned value = 0;
|
||||
|
||||
switch (var->type)
|
||||
{
|
||||
case CHEEVOS_VAR_TYPE_VALUE_COMP:
|
||||
value = var->value;
|
||||
break;
|
||||
|
||||
case CHEEVOS_VAR_TYPE_ADDRESS:
|
||||
case CHEEVOS_VAR_TYPE_DELTA_MEM:
|
||||
memory = cheevos_var_get_memory(var);
|
||||
|
||||
if (memory)
|
||||
{
|
||||
value = memory[0];
|
||||
|
||||
switch (var->size)
|
||||
{
|
||||
case CHEEVOS_VAR_SIZE_BIT_0:
|
||||
value &= 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_1:
|
||||
value = (value >> 1) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_2:
|
||||
value = (value >> 2) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_3:
|
||||
value = (value >> 3) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_4:
|
||||
value = (value >> 4) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_5:
|
||||
value = (value >> 5) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_6:
|
||||
value = (value >> 6) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_7:
|
||||
value = (value >> 7) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_NIBBLE_LOWER:
|
||||
value &= 0x0f;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_NIBBLE_UPPER:
|
||||
value = (value >> 4) & 0x0f;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_EIGHT_BITS:
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_SIXTEEN_BITS:
|
||||
value |= memory[1] << 8;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_THIRTYTWO_BITS:
|
||||
value |= memory[1] << 8;
|
||||
value |= memory[2] << 16;
|
||||
value |= memory[3] << 24;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
|
||||
{
|
||||
unsigned previous = var->previous;
|
||||
var->previous = value;
|
||||
value = previous;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CHEEVOS_VAR_TYPE_DYNAMIC_VAR:
|
||||
/* We shouldn't get here... */
|
||||
break;
|
||||
}
|
||||
|
||||
if(var->is_bcd)
|
||||
return (((value >> 4) & 0xf) * 10) + (value & 0xf);
|
||||
return value;
|
||||
}
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2017 - Andre Leiradella
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
#include "var.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
/*****************************************************************************
|
||||
Parsing
|
||||
*****************************************************************************/
|
||||
|
||||
static cheevos_var_size_t cheevos_var_parse_prefix(const char** memaddr)
|
||||
{
|
||||
/* Careful not to use ABCDEF here, this denotes part of an actual variable! */
|
||||
const char* str = *memaddr;
|
||||
cheevos_var_size_t size;
|
||||
|
||||
switch (toupper((unsigned char)*str++))
|
||||
{
|
||||
case 'M':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_0;
|
||||
break;
|
||||
case 'N':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_1;
|
||||
break;
|
||||
case 'O':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_2;
|
||||
break;
|
||||
case 'P':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_3;
|
||||
break;
|
||||
case 'Q':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_4;
|
||||
break;
|
||||
case 'R':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_5;
|
||||
break;
|
||||
case 'S':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_6;
|
||||
break;
|
||||
case 'T':
|
||||
size = CHEEVOS_VAR_SIZE_BIT_7;
|
||||
break;
|
||||
case 'L':
|
||||
size = CHEEVOS_VAR_SIZE_NIBBLE_LOWER;
|
||||
break;
|
||||
case 'U':
|
||||
size = CHEEVOS_VAR_SIZE_NIBBLE_UPPER;
|
||||
break;
|
||||
case 'H':
|
||||
size = CHEEVOS_VAR_SIZE_EIGHT_BITS;
|
||||
break;
|
||||
case 'X':
|
||||
size = CHEEVOS_VAR_SIZE_THIRTYTWO_BITS;
|
||||
break;
|
||||
default:
|
||||
str--;
|
||||
/* fall through */
|
||||
case ' ':
|
||||
size = CHEEVOS_VAR_SIZE_SIXTEEN_BITS;
|
||||
break;
|
||||
}
|
||||
|
||||
*memaddr = str;
|
||||
return size;
|
||||
}
|
||||
|
||||
static size_t cheevos_var_reduce(size_t addr, size_t mask)
|
||||
{
|
||||
while (mask)
|
||||
{
|
||||
size_t tmp = (mask - 1) & ~mask;
|
||||
addr = (addr & tmp) | ((addr >> 1) & ~tmp);
|
||||
mask = (mask & (mask - 1)) >> 1;
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static size_t cheevos_var_highest_bit(size_t n)
|
||||
{
|
||||
n |= n >> 1;
|
||||
n |= n >> 2;
|
||||
n |= n >> 4;
|
||||
n |= n >> 8;
|
||||
n |= n >> 16;
|
||||
|
||||
return n ^ (n >> 1);
|
||||
}
|
||||
|
||||
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr)
|
||||
{
|
||||
char *end = NULL;
|
||||
const char *str = *memaddr;
|
||||
unsigned base = 16;
|
||||
|
||||
var->is_bcd = false;
|
||||
|
||||
if (toupper((unsigned char)*str) == 'D' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* d0x + 4 hex digits */
|
||||
str += 3;
|
||||
var->type = CHEEVOS_VAR_TYPE_DELTA_MEM;
|
||||
}
|
||||
else if (toupper((unsigned char)*str) == 'B' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* b0x (binary-coded decimal) */
|
||||
str += 3;
|
||||
var->is_bcd = true;
|
||||
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
|
||||
}
|
||||
else if (*str == '0' && toupper((unsigned char)str[1]) == 'X')
|
||||
{
|
||||
/* 0x + 4 hex digits */
|
||||
str += 2;
|
||||
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
var->type = CHEEVOS_VAR_TYPE_VALUE_COMP;
|
||||
|
||||
if (toupper((unsigned char)*str) == 'H')
|
||||
str++;
|
||||
else
|
||||
{
|
||||
if (toupper((unsigned char)*str) == 'V')
|
||||
str++;
|
||||
|
||||
base = 10;
|
||||
}
|
||||
}
|
||||
|
||||
if (var->type != CHEEVOS_VAR_TYPE_VALUE_COMP)
|
||||
{
|
||||
var->size = cheevos_var_parse_prefix(&str);
|
||||
}
|
||||
|
||||
var->value = (unsigned)strtol(str, &end, base);
|
||||
*memaddr = end;
|
||||
}
|
||||
|
||||
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
|
||||
var->bank_id = -1;
|
||||
|
||||
if (console == CHEEVOS_CONSOLE_NINTENDO)
|
||||
{
|
||||
if (var->value >= 0x0800 && var->value < 0x2000)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", var->value, var->value & 0x07ff);
|
||||
var->value &= 0x07ff;
|
||||
}
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_GAMEBOY_COLOR)
|
||||
{
|
||||
if (var->value >= 0xe000 && var->value <= 0xfdff)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", var->value, var->value - 0x2000);
|
||||
var->value -= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
const rarch_memory_descriptor_t *desc = NULL;
|
||||
const rarch_memory_descriptor_t *end = NULL;
|
||||
|
||||
/* Patch the address to correctly map it to the mmaps */
|
||||
if (console == CHEEVOS_CONSOLE_GAMEBOY_ADVANCE)
|
||||
{
|
||||
if (var->value < 0x8000) /* Internal RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x3000000);
|
||||
var->value += 0x3000000;
|
||||
}
|
||||
else /* Work RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x2000000 - 0x8000);
|
||||
var->value += 0x2000000 - 0x8000;
|
||||
}
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_PC_ENGINE)
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", var->value, var->value + 0x1f0000);
|
||||
var->value += 0x1f0000;
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_SUPER_NINTENDO)
|
||||
{
|
||||
if (var->value < 0x020000) /* Work RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x7e0000);
|
||||
var->value += 0x7e0000;
|
||||
}
|
||||
else /* Save RAM */
|
||||
{
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x006000 - 0x020000);
|
||||
var->value += 0x006000 - 0x020000;
|
||||
}
|
||||
}
|
||||
|
||||
desc = system->mmaps.descriptors;
|
||||
end = desc + system->mmaps.num_descriptors;
|
||||
|
||||
for (; desc < end; desc++)
|
||||
{
|
||||
if (((desc->core.start ^ var->value) & desc->core.select) == 0)
|
||||
{
|
||||
unsigned addr = var->value;
|
||||
var->bank_id = (int)(desc - system->mmaps.descriptors);
|
||||
var->value = (unsigned)cheevos_var_reduce(
|
||||
(addr - desc->core.start) & desc->disconnect_mask,
|
||||
desc->core.disconnect);
|
||||
|
||||
if (var->value >= desc->core.len)
|
||||
var->value -= cheevos_var_highest_bit(var->value);
|
||||
|
||||
var->value += desc->core.offset;
|
||||
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, var->bank_id + 1, var->value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
break;
|
||||
case 1:
|
||||
meminfo.id = RETRO_MEMORY_SAVE_RAM;
|
||||
break;
|
||||
case 2:
|
||||
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
break;
|
||||
case 3:
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
}
|
||||
|
||||
core_get_memory(&meminfo);
|
||||
|
||||
if (var->value < meminfo.size)
|
||||
{
|
||||
var->bank_id = i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* HACK subtract the correct amount of bytes to reach the save RAM */
|
||||
if (i == 0 && console == CHEEVOS_CONSOLE_NINTENDO)
|
||||
var->value -= 0x6000;
|
||||
else
|
||||
var->value -= meminfo.size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Testing
|
||||
*****************************************************************************/
|
||||
|
||||
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var)
|
||||
{
|
||||
rarch_system_info_t *system = NULL;
|
||||
uint8_t *memory = NULL;
|
||||
size_t length = 0;
|
||||
|
||||
if (var->bank_id < 0)
|
||||
return NULL;
|
||||
|
||||
system = runloop_get_system_info();
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
memory = (uint8_t*)system->mmaps.descriptors[var->bank_id].core.ptr;
|
||||
length = system->mmaps.descriptors[var->bank_id].core.len;
|
||||
}
|
||||
else
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo = {NULL, 0, 0};
|
||||
|
||||
switch (var->bank_id)
|
||||
{
|
||||
case 0:
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
break;
|
||||
case 1:
|
||||
meminfo.id = RETRO_MEMORY_SAVE_RAM;
|
||||
break;
|
||||
case 2:
|
||||
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
break;
|
||||
case 3:
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
default:
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "invalid bank id: %d\n", var->bank_id);
|
||||
break;
|
||||
}
|
||||
|
||||
core_get_memory(&meminfo);
|
||||
|
||||
memory = (uint8_t*)meminfo.data;
|
||||
length = meminfo.size;
|
||||
}
|
||||
|
||||
if (memory == NULL || var->value >= length)
|
||||
return NULL;
|
||||
|
||||
return memory + var->value;
|
||||
}
|
||||
|
||||
unsigned cheevos_var_get_value(cheevos_var_t* var)
|
||||
{
|
||||
const uint8_t* memory = NULL;
|
||||
unsigned value = 0;
|
||||
|
||||
switch (var->type)
|
||||
{
|
||||
case CHEEVOS_VAR_TYPE_VALUE_COMP:
|
||||
value = var->value;
|
||||
break;
|
||||
|
||||
case CHEEVOS_VAR_TYPE_ADDRESS:
|
||||
case CHEEVOS_VAR_TYPE_DELTA_MEM:
|
||||
memory = cheevos_var_get_memory(var);
|
||||
|
||||
if (memory)
|
||||
{
|
||||
value = memory[0];
|
||||
|
||||
switch (var->size)
|
||||
{
|
||||
case CHEEVOS_VAR_SIZE_BIT_0:
|
||||
value &= 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_1:
|
||||
value = (value >> 1) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_2:
|
||||
value = (value >> 2) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_3:
|
||||
value = (value >> 3) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_4:
|
||||
value = (value >> 4) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_5:
|
||||
value = (value >> 5) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_6:
|
||||
value = (value >> 6) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_7:
|
||||
value = (value >> 7) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_NIBBLE_LOWER:
|
||||
value &= 0x0f;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_NIBBLE_UPPER:
|
||||
value = (value >> 4) & 0x0f;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_EIGHT_BITS:
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_SIXTEEN_BITS:
|
||||
value |= memory[1] << 8;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_THIRTYTWO_BITS:
|
||||
value |= memory[1] << 8;
|
||||
value |= memory[2] << 16;
|
||||
value |= memory[3] << 24;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
|
||||
{
|
||||
unsigned previous = var->previous;
|
||||
var->previous = value;
|
||||
value = previous;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CHEEVOS_VAR_TYPE_DYNAMIC_VAR:
|
||||
/* We shouldn't get here... */
|
||||
break;
|
||||
}
|
||||
|
||||
if(var->is_bcd)
|
||||
return (((value >> 4) & 0xf) * 10) + (value & 0xf);
|
||||
return value;
|
||||
}
|
||||
+78
-78
@@ -1,78 +1,78 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_VAR_H
|
||||
#define __RARCH_CHEEVOS_VAR_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cheevos.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_VAR_SIZE_BIT_0 = 0,
|
||||
CHEEVOS_VAR_SIZE_BIT_1,
|
||||
CHEEVOS_VAR_SIZE_BIT_2,
|
||||
CHEEVOS_VAR_SIZE_BIT_3,
|
||||
CHEEVOS_VAR_SIZE_BIT_4,
|
||||
CHEEVOS_VAR_SIZE_BIT_5,
|
||||
CHEEVOS_VAR_SIZE_BIT_6,
|
||||
CHEEVOS_VAR_SIZE_BIT_7,
|
||||
CHEEVOS_VAR_SIZE_NIBBLE_LOWER,
|
||||
CHEEVOS_VAR_SIZE_NIBBLE_UPPER,
|
||||
/* Byte, */
|
||||
CHEEVOS_VAR_SIZE_EIGHT_BITS, /* =Byte, */
|
||||
CHEEVOS_VAR_SIZE_SIXTEEN_BITS,
|
||||
CHEEVOS_VAR_SIZE_THIRTYTWO_BITS
|
||||
} cheevos_var_size_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* compare to the value of a live address in RAM */
|
||||
CHEEVOS_VAR_TYPE_ADDRESS = 0,
|
||||
|
||||
/* a number. assume 32 bit */
|
||||
CHEEVOS_VAR_TYPE_VALUE_COMP,
|
||||
|
||||
/* the value last known at this address. */
|
||||
CHEEVOS_VAR_TYPE_DELTA_MEM,
|
||||
|
||||
/* a custom user-set variable */
|
||||
CHEEVOS_VAR_TYPE_DYNAMIC_VAR
|
||||
} cheevos_var_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_var_size_t size;
|
||||
cheevos_var_type_t type;
|
||||
int bank_id;
|
||||
bool is_bcd;
|
||||
unsigned value;
|
||||
unsigned previous;
|
||||
} cheevos_var_t;
|
||||
|
||||
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr);
|
||||
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console);
|
||||
|
||||
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var);
|
||||
unsigned cheevos_var_get_value(cheevos_var_t* var);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_VAR_H */
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_VAR_H
|
||||
#define __RARCH_CHEEVOS_VAR_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cheevos.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHEEVOS_VAR_SIZE_BIT_0 = 0,
|
||||
CHEEVOS_VAR_SIZE_BIT_1,
|
||||
CHEEVOS_VAR_SIZE_BIT_2,
|
||||
CHEEVOS_VAR_SIZE_BIT_3,
|
||||
CHEEVOS_VAR_SIZE_BIT_4,
|
||||
CHEEVOS_VAR_SIZE_BIT_5,
|
||||
CHEEVOS_VAR_SIZE_BIT_6,
|
||||
CHEEVOS_VAR_SIZE_BIT_7,
|
||||
CHEEVOS_VAR_SIZE_NIBBLE_LOWER,
|
||||
CHEEVOS_VAR_SIZE_NIBBLE_UPPER,
|
||||
/* Byte, */
|
||||
CHEEVOS_VAR_SIZE_EIGHT_BITS, /* =Byte, */
|
||||
CHEEVOS_VAR_SIZE_SIXTEEN_BITS,
|
||||
CHEEVOS_VAR_SIZE_THIRTYTWO_BITS
|
||||
} cheevos_var_size_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* compare to the value of a live address in RAM */
|
||||
CHEEVOS_VAR_TYPE_ADDRESS = 0,
|
||||
|
||||
/* a number. assume 32 bit */
|
||||
CHEEVOS_VAR_TYPE_VALUE_COMP,
|
||||
|
||||
/* the value last known at this address. */
|
||||
CHEEVOS_VAR_TYPE_DELTA_MEM,
|
||||
|
||||
/* a custom user-set variable */
|
||||
CHEEVOS_VAR_TYPE_DYNAMIC_VAR
|
||||
} cheevos_var_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_var_size_t size;
|
||||
cheevos_var_type_t type;
|
||||
int bank_id;
|
||||
bool is_bcd;
|
||||
unsigned value;
|
||||
unsigned previous;
|
||||
} cheevos_var_t;
|
||||
|
||||
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr);
|
||||
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console);
|
||||
|
||||
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var);
|
||||
unsigned cheevos_var_get_value(cheevos_var_t* var);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_VAR_H */
|
||||
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2015-2017 - Andres Suarez
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -41,11 +41,9 @@
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#ifdef HAVE_NEW_CHEEVOS
|
||||
#include "cheevos-new/fixup.h"
|
||||
#else
|
||||
#include "cheevos/var.h"
|
||||
#endif
|
||||
#include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove lines */
|
||||
#include "cheevos-new/fixup.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
@@ -59,6 +57,9 @@
|
||||
#include "menu/menu_content.h"
|
||||
#include "menu/menu_shader.h"
|
||||
#include "menu/widgets/menu_dialog.h"
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
#include "menu/widgets/menu_widgets.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -91,6 +92,7 @@
|
||||
#include "ui/ui_companion_driver.h"
|
||||
#include "tasks/task_content.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
#include "gfx/video_driver.h"
|
||||
#include "list_special.h"
|
||||
|
||||
#include "core.h"
|
||||
@@ -222,6 +224,8 @@ static const struct cmd_map map[] = {
|
||||
{ "MUTE", RARCH_MUTE },
|
||||
{ "OSK", RARCH_OSK },
|
||||
{ "FPS_TOGGLE", RARCH_FPS_TOGGLE },
|
||||
{ "SEND_DEBUG_INFO", RARCH_SEND_DEBUG_INFO },
|
||||
{ "NETPLAY_HOST_TOGGLE", RARCH_NETPLAY_HOST_TOGGLE },
|
||||
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
|
||||
{ "VOLUME_UP", RARCH_VOLUME_UP },
|
||||
{ "VOLUME_DOWN", RARCH_VOLUME_DOWN },
|
||||
@@ -249,112 +253,110 @@ bool command_set_shader(const char *arg)
|
||||
{
|
||||
char msg[256];
|
||||
bool is_preset = false;
|
||||
settings_t *settings = NULL;
|
||||
enum rarch_shader_type type = video_shader_get_type_from_ext(
|
||||
path_get_extension(arg), &is_preset);
|
||||
#ifdef HAVE_MENU
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
#endif
|
||||
|
||||
if (type == RARCH_SHADER_NONE)
|
||||
return false;
|
||||
|
||||
snprintf(msg, sizeof(msg), "Shader: \"%s\"", arg);
|
||||
runloop_msg_queue_push(msg, 1, 120, true);
|
||||
snprintf(msg, sizeof(msg),
|
||||
"Shader: \"%s\"", arg ? path_basename(arg) : "null");
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (!menu_widgets_set_message(msg))
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_APPLYING_SHADER),
|
||||
arg);
|
||||
|
||||
retroarch_set_shader_preset(arg);
|
||||
#ifdef HAVE_MENU
|
||||
return menu_shader_manager_set_preset(shader, type, arg);
|
||||
#else
|
||||
return true;
|
||||
if (!menu_shader_manager_set_preset(menu_shader_get(), type, arg))
|
||||
return false;
|
||||
#endif
|
||||
settings = config_get_ptr();
|
||||
if (settings && !settings->bools.video_shader_enable)
|
||||
settings->bools.video_shader_enable = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#define SMY_CMD_STR "READ_CORE_RAM"
|
||||
static bool command_read_ram(const char *arg)
|
||||
{
|
||||
#if defined(HAVE_NEW_CHEEVOS)
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
cheevos_var_t var;
|
||||
|
||||
unsigned i;
|
||||
char *reply = NULL;
|
||||
const uint8_t * data = NULL;
|
||||
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 addr = -1;
|
||||
|
||||
if (sscanf(arg, "%x %d", &addr, &nbytes) != 2)
|
||||
if (sscanf(arg, "%x %u", &addr, &nbytes) != 2)
|
||||
return true;
|
||||
alloc_size = 40 + nbytes * 3; /* We alloc more than needed, saving 20 bytes is not really relevant */
|
||||
reply = (char*) malloc(alloc_size);
|
||||
reply[0] = '\0';
|
||||
reply_at = reply + snprintf(reply, alloc_size - 1, SMY_CMD_STR " %x", addr);
|
||||
|
||||
data = cheevos_patch_address(addr, cheevos_get_console());
|
||||
/* RCHEEVOS TODO: remove if condition below */
|
||||
if (!settings->bools.cheevos_old_enable)
|
||||
data = rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
/* RCHEEVOS TODO: remove whole else block below */
|
||||
else
|
||||
{
|
||||
var.value = addr;
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
data = cheevos_var_get_memory(&var);
|
||||
}
|
||||
|
||||
if (data)
|
||||
{
|
||||
for (i = 0; i < nbytes; i++)
|
||||
sprintf(reply_at+3*i, " %.2X", data[i]);
|
||||
reply_at[3*nbytes] = '\n';
|
||||
command_reply(reply, reply_at+3*nbytes+1 - reply);
|
||||
snprintf(reply_at + 3 * i, 4, " %.2X", data[i]);
|
||||
reply_at[3 * nbytes] = '\n';
|
||||
command_reply(reply, reply_at + 3 * nbytes + 1 - reply);
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply)-strlen(reply));
|
||||
command_reply(reply, reply_at+strlen(" -1\n") - reply);
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply) - strlen(reply));
|
||||
command_reply(reply, reply_at + STRLEN_CONST(" -1\n") - reply);
|
||||
}
|
||||
free(reply);
|
||||
#else
|
||||
cheevos_var_t var;
|
||||
unsigned i;
|
||||
char reply[256] = {0};
|
||||
const uint8_t * data = NULL;
|
||||
char *reply_at = NULL;
|
||||
|
||||
reply[0] = '\0';
|
||||
|
||||
strlcpy(reply, "READ_CORE_RAM ", sizeof(reply));
|
||||
reply_at = reply + strlen("READ_CORE_RAM ");
|
||||
strlcpy(reply_at, arg, sizeof(reply)-strlen(reply));
|
||||
|
||||
var.value = strtoul(reply_at, (char**)&reply_at, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
data = cheevos_var_get_memory(&var);
|
||||
|
||||
if (data)
|
||||
{
|
||||
unsigned nbytes = strtol(reply_at, NULL, 10);
|
||||
|
||||
for (i = 0; i < nbytes; i++)
|
||||
sprintf(reply_at+3*i, " %.2X", data[i]);
|
||||
reply_at[3*nbytes] = '\n';
|
||||
command_reply(reply, reply_at+3*nbytes+1 - reply);
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply)-strlen(reply));
|
||||
command_reply(reply, reply_at+strlen(" -1\n") - reply);
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
#undef SMY_CMD_STR
|
||||
|
||||
static bool command_write_ram(const char *arg)
|
||||
{
|
||||
unsigned nbytes = 0;
|
||||
#if defined(HAVE_NEW_CHEEVOS)
|
||||
unsigned int addr = strtoul(arg, (char**)&arg, 16);
|
||||
uint8_t *data = (uint8_t *)cheevos_patch_address(addr, cheevos_get_console());
|
||||
#else
|
||||
cheevos_var_t var;
|
||||
uint8_t *data = NULL;
|
||||
unsigned nbytes = 0;
|
||||
uint8_t *data = NULL;
|
||||
unsigned int addr = 0;
|
||||
|
||||
var.value = strtoul(arg, (char**)&arg, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
#endif
|
||||
if (!settings->bools.cheevos_old_enable)
|
||||
{
|
||||
addr = strtoul(arg, (char**)&arg, 16);
|
||||
data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
}
|
||||
/* RCHEEVOS TODO: remove the whole else block below */
|
||||
else
|
||||
{
|
||||
cheevos_var_t var;
|
||||
|
||||
var.value = strtoul(arg, (char**)&arg, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
}
|
||||
|
||||
if (data)
|
||||
{
|
||||
@@ -370,7 +372,7 @@ static bool command_write_ram(const char *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||
static bool command_get_arg(const char *tok,
|
||||
const char **arg, unsigned *index)
|
||||
{
|
||||
@@ -411,9 +413,7 @@ static bool command_get_arg(const char *tok,
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||
static bool command_network_init(command_t *handle, uint16_t port)
|
||||
{
|
||||
struct addrinfo *res = NULL;
|
||||
@@ -466,7 +466,6 @@ static bool command_verify(const char *cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
static void command_parse_sub_msg(command_t *handle, const char *tok)
|
||||
{
|
||||
const char *arg = NULL;
|
||||
@@ -544,7 +543,6 @@ static void command_network_poll(command_t *handle)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool command_network_send(const char *cmd_)
|
||||
{
|
||||
@@ -787,7 +785,7 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)
|
||||
|
||||
/* Only noise in menu. */
|
||||
if (print_log)
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,7 +843,7 @@ static void command_event_disk_control_set_index(unsigned idx)
|
||||
RARCH_ERR("%s\n", msg);
|
||||
else
|
||||
RARCH_LOG("%s\n", msg);
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,7 +884,7 @@ static bool command_event_disk_control_append_image(const char *path)
|
||||
snprintf(msg, sizeof(msg), "%s: ", msg_hash_to_str(MSG_APPENDED_DISK));
|
||||
strlcat(msg, path, sizeof(msg));
|
||||
RARCH_LOG("%s\n", msg);
|
||||
runloop_msg_queue_push(msg, 0, 180, true);
|
||||
runloop_msg_queue_push(msg, 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL);
|
||||
|
||||
@@ -995,7 +993,12 @@ static void command_event_set_volume(float gain)
|
||||
snprintf(msg, sizeof(msg), "%s: %.1f dB",
|
||||
msg_hash_to_str(MSG_AUDIO_VOLUME),
|
||||
new_volume);
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_volume_update_and_show())
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
|
||||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
|
||||
@@ -1022,7 +1025,7 @@ static void command_event_set_mixer_volume(float gain)
|
||||
snprintf(msg, sizeof(msg), "%s: %.1f dB",
|
||||
msg_hash_to_str(MSG_AUDIO_VOLUME),
|
||||
new_volume);
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
|
||||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
|
||||
@@ -1112,7 +1115,9 @@ static void command_event_init_controllers(void)
|
||||
static void command_event_deinit_core(bool reinit)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_unload();
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_unload() : cheevos_unload();
|
||||
#endif
|
||||
|
||||
RARCH_LOG("Unloading game..\n");
|
||||
@@ -1167,7 +1172,8 @@ static void command_event_load_auto_state(void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
@@ -1366,6 +1372,7 @@ static bool command_event_init_core(enum rarch_core_type *data)
|
||||
return false;
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
|
||||
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_INIT, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1417,7 +1424,8 @@ static bool command_event_save_auto_state(void)
|
||||
goto error;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
@@ -1443,16 +1451,18 @@ static bool command_event_save_config(
|
||||
const char *config_path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
char log[PATH_MAX_LENGTH];
|
||||
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, "[Config]: %s \"%s\".",
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
config_path);
|
||||
RARCH_LOG("%s\n", s);
|
||||
snprintf(log, PATH_MAX_LENGTH, "[config] %s", s);
|
||||
RARCH_LOG("%s\n", log);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1461,7 +1471,8 @@ static bool command_event_save_config(
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
|
||||
str);
|
||||
RARCH_ERR("%s\n", s);
|
||||
snprintf(log, PATH_MAX_LENGTH, "[config] %s", s);
|
||||
RARCH_ERR("%s\n", log);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1501,8 +1512,8 @@ static bool command_event_save_core_config(void)
|
||||
|
||||
if (string_is_empty(config_dir))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true);
|
||||
RARCH_ERR("[Config]: %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[config] %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
|
||||
free (config_dir);
|
||||
return false;
|
||||
}
|
||||
@@ -1553,7 +1564,7 @@ static bool command_event_save_core_config(void)
|
||||
if (!found_path)
|
||||
{
|
||||
/* Fallback to system time... */
|
||||
RARCH_WARN("[Config]: %s\n",
|
||||
RARCH_WARN("[config] %s\n",
|
||||
msg_hash_to_str(MSG_CANNOT_INFER_NEW_CONFIG_PATH));
|
||||
fill_dated_filename(config_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
@@ -1574,7 +1585,7 @@ static bool command_event_save_core_config(void)
|
||||
command_event_save_config(config_path, msg, sizeof(msg));
|
||||
|
||||
if (!string_is_empty(msg))
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
if (overrides_active)
|
||||
rarch_ctl(RARCH_CTL_SET_OVERRIDES_ACTIVE, NULL);
|
||||
@@ -1603,7 +1614,7 @@ static void command_event_save_current_config(enum override_type type)
|
||||
{
|
||||
case OVERRIDE_NONE:
|
||||
if (path_is_empty(RARCH_PATH_CONFIG))
|
||||
strlcpy(msg, "[Config]: Config directory not set, cannot save configuration.",
|
||||
strlcpy(msg, "[config] Config directory not set, cannot save configuration.",
|
||||
sizeof(msg));
|
||||
else
|
||||
command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg));
|
||||
@@ -1614,7 +1625,7 @@ static void command_event_save_current_config(enum override_type type)
|
||||
if (config_save_overrides(type))
|
||||
{
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_SAVED_SUCCESSFULLY), sizeof(msg));
|
||||
RARCH_LOG("[Config]: [overrides] %s\n", msg);
|
||||
RARCH_LOG("[config] [overrides] %s\n", msg);
|
||||
|
||||
/* set overrides to active so the original config can be
|
||||
restored after closing content */
|
||||
@@ -1623,13 +1634,13 @@ static void command_event_save_current_config(enum override_type type)
|
||||
else
|
||||
{
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ERROR_SAVING), sizeof(msg));
|
||||
RARCH_ERR("[Config]: [overrides] %s\n", msg);
|
||||
RARCH_ERR("[config] [overrides] %s\n", msg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!string_is_empty(msg))
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
static void command_event_undo_save_state(char *s, size_t len)
|
||||
@@ -1714,7 +1725,8 @@ static bool command_event_main_state(unsigned cmd)
|
||||
if (content_load_state(state_path, false, false))
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_state_loaded_flag = true;
|
||||
/* RCHEEVOS TODO: remove duplication below */
|
||||
rcheevos_state_loaded_flag = cheevos_state_loaded_flag = true;
|
||||
#endif
|
||||
ret = true;
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -1738,7 +1750,7 @@ static bool command_event_main_state(unsigned cmd)
|
||||
MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES), sizeof(msg));
|
||||
|
||||
if (push_msg)
|
||||
runloop_msg_queue_push(msg, 2, 180, true);
|
||||
runloop_msg_queue_push(msg, 2, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
|
||||
free(state_path);
|
||||
@@ -1801,7 +1813,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
snprintf(msg, sizeof(msg),"%s: %dx%d",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION),
|
||||
width, height);
|
||||
runloop_msg_queue_push(msg, 1, 100, true);
|
||||
runloop_msg_queue_push(msg, 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1840,7 +1852,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_LOAD_CORE:
|
||||
{
|
||||
bool success = false;
|
||||
bool success = false;
|
||||
subsystem_current_count = 0;
|
||||
content_clear_subsystem();
|
||||
success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
@@ -1861,7 +1873,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
if (!command_event_main_state(cmd))
|
||||
@@ -1891,29 +1904,34 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event_init_controllers();
|
||||
break;
|
||||
case CMD_EVENT_RESET:
|
||||
/* RCHEEVOS TODO: remove starting block bracket, settings init and tests */
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_state_loaded_flag = false;
|
||||
cheevos_hardcore_paused = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rcheevos_state_loaded_flag = cheevos_state_loaded_flag = false;
|
||||
rcheevos_hardcore_paused = cheevos_hardcore_paused = false;
|
||||
#endif
|
||||
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true);
|
||||
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_set_cheats();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_set_cheats() : cheevos_set_cheats();
|
||||
#endif
|
||||
core_reset();
|
||||
core_reset();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_reset_game();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_reset_game() : cheevos_reset_game();
|
||||
#endif
|
||||
#if HAVE_NETWORKING
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
|
||||
#endif
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
case CMD_EVENT_SAVE_STATE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -1957,6 +1975,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL);
|
||||
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
|
||||
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
||||
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
||||
@@ -1967,18 +1986,19 @@ bool command_event(enum event_command cmd, void *data)
|
||||
if (!task_push_start_dummy_core(&content_info))
|
||||
return false;
|
||||
}
|
||||
#ifdef HAVE_DYNAMIC
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
||||
#endif
|
||||
#ifdef HAVE_DISCORD
|
||||
if (discord_is_inited)
|
||||
{
|
||||
discord_userdata_t userdata;
|
||||
userdata.status = DISCORD_PRESENCE_NETPLAY_NETPLAY_STOPPED;
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
userdata.status = DISCORD_PRESENCE_MENU;
|
||||
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_DYNAMIC
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
||||
#endif
|
||||
if (is_inited)
|
||||
{
|
||||
@@ -1993,7 +2013,11 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_toggle_hardcore_mode();
|
||||
/* RCHEEVOS TODO: remove starting block bracket, settings init and test */
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_toggle_hardcore_mode() : cheevos_toggle_hardcore_mode();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
/* this fallthrough is on purpose, it should do
|
||||
@@ -2034,7 +2058,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_REWIND_DEINIT:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
state_manager_event_deinit();
|
||||
@@ -2043,7 +2068,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_hardcore_active)
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
if (settings->bools.rewind_enable)
|
||||
@@ -2121,10 +2147,16 @@ TODO: Add a setting for these tweaks */
|
||||
return false;
|
||||
}
|
||||
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_volume_update_and_show())
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_SEND_DEBUG_INFO:
|
||||
rarch_send_debug_info();
|
||||
break;
|
||||
case CMD_EVENT_FPS_TOGGLE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@@ -2139,6 +2171,12 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_OVERLAY_INIT:
|
||||
{
|
||||
#if defined(GEKKO)
|
||||
/* Avoid a crash at startup or even when toggling overlay in rgui */
|
||||
uint64_t memory_used = frontend_driver_get_used_memory();
|
||||
if(memory_used > (72 * 1024 * 1024))
|
||||
break;
|
||||
#endif
|
||||
settings_t *settings = config_get_ptr();
|
||||
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
|
||||
#ifdef HAVE_OVERLAY
|
||||
@@ -2306,6 +2344,7 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_CORE_DEINIT:
|
||||
{
|
||||
struct retro_hw_render_callback *hwr = NULL;
|
||||
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL);
|
||||
content_reset_savestate_backups();
|
||||
hwr = video_driver_get_hw_context();
|
||||
command_event_deinit_core(true);
|
||||
@@ -2378,7 +2417,7 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_SHUTDOWN:
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
system("shutdown -P now");
|
||||
@@ -2386,7 +2425,7 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_REBOOT:
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
system("shutdown -r now");
|
||||
@@ -2399,44 +2438,49 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_ADD_TO_FAVORITES:
|
||||
{
|
||||
/* TODO/FIXME - does path_get(RARCH_PATH_CORE) depend on the system info struct? Investigate */
|
||||
global_t *global = global_get_ptr();
|
||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
||||
const char *label = NULL;
|
||||
const char *core_path = system ? path_get(RARCH_PATH_CORE) : NULL;
|
||||
const char *core_name = system ? system->library_name : NULL;
|
||||
struct string_list *str_list = (struct string_list*)data;
|
||||
|
||||
if (!string_is_empty(global->name.label))
|
||||
label = global->name.label;
|
||||
if (str_list)
|
||||
{
|
||||
if (str_list->size >= 6)
|
||||
{
|
||||
struct playlist_entry entry = {0};
|
||||
|
||||
entry.path = str_list->elems[0].data; /* content_path */
|
||||
entry.label = str_list->elems[1].data; /* content_label */
|
||||
entry.core_path = str_list->elems[2].data; /* core_path */
|
||||
entry.core_name = str_list->elems[3].data; /* core_name */
|
||||
entry.crc32 = str_list->elems[4].data; /* crc32 */
|
||||
entry.db_name = str_list->elems[5].data; /* db_name */
|
||||
|
||||
/* Write playlist entry */
|
||||
command_playlist_push_write(
|
||||
g_defaults.content_favorites,
|
||||
&entry
|
||||
);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
command_playlist_push_write(
|
||||
g_defaults.content_favorites,
|
||||
(const char*)data,
|
||||
label,
|
||||
core_path,
|
||||
core_name
|
||||
);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true);
|
||||
break;
|
||||
|
||||
}
|
||||
case CMD_EVENT_RESET_CORE_ASSOCIATION:
|
||||
{
|
||||
const char *core_name = "DETECT";
|
||||
const char *core_path = "DETECT";
|
||||
size_t *playlist_index = (size_t*)data;
|
||||
struct playlist_entry entry = {0};
|
||||
|
||||
/* the update function reads our entry as const, so these casts are safe */
|
||||
entry.core_path = (char*)core_path;
|
||||
entry.core_name = (char*)core_name;
|
||||
|
||||
command_playlist_update_write(
|
||||
NULL,
|
||||
*playlist_index,
|
||||
NULL,
|
||||
NULL,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL);
|
||||
&entry);
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -2481,6 +2525,9 @@ TODO: Add a setting for these tweaks */
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
bool is_perfcnt_enable = false;
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_userdata_t userdata;
|
||||
#endif
|
||||
|
||||
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
|
||||
&is_perfcnt_enable);
|
||||
@@ -2490,21 +2537,26 @@ TODO: Add a setting for these tweaks */
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
||||
1, true);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_set_paused(is_paused))
|
||||
#endif
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
||||
1, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
if (!is_idle)
|
||||
video_driver_cached_frame();
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_userdata_t userdata;
|
||||
userdata.status = DISCORD_PRESENCE_GAME_PAUSED;
|
||||
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
menu_widgets_set_paused(is_paused);
|
||||
#endif
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_UNPAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_START, NULL);
|
||||
}
|
||||
@@ -2600,14 +2652,17 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT:
|
||||
{
|
||||
/* buf is expected to be address|port */
|
||||
char *buf = (char *)data;
|
||||
static struct string_list *hostname = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
hostname = string_split(buf, "|");
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *buf = (char *)data;
|
||||
|
||||
RARCH_LOG("[netplay] buf %s\n", buf);
|
||||
|
||||
hostname = string_split(buf, "|");
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
|
||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||
RARCH_LOG("[netplay] connecting to %s:%d (direct)\n",
|
||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
|
||||
|
||||
@@ -2633,15 +2688,18 @@ TODO: Add a setting for these tweaks */
|
||||
/* init netplay via lobby when content is not loaded */
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED:
|
||||
{
|
||||
/* buf is expected to be address|port */
|
||||
char *buf = (char *)data;
|
||||
static struct string_list *hostname = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
hostname = string_split(buf, "|");
|
||||
/* buf is expected to be address|port */
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *buf = (char *)data;
|
||||
|
||||
RARCH_LOG("[netplay] buf %s\n", buf);
|
||||
|
||||
hostname = string_split(buf, "|");
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
|
||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||
RARCH_LOG("[netplay] connecting to %s:%d (deferred)\n",
|
||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
|
||||
|
||||
@@ -2667,6 +2725,62 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_NETPLAY_GAME_WATCH:
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_GAME_WATCH, NULL);
|
||||
break;
|
||||
case CMD_EVENT_NETPLAY_ENABLE_HOST:
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_SERVER, NULL);
|
||||
|
||||
/* If we haven't yet started, this will load on its own */
|
||||
if (!is_inited)
|
||||
{
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED),
|
||||
1, 480, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Enable Netplay itself */
|
||||
if (!command_event(CMD_EVENT_NETPLAY_INIT, NULL))
|
||||
return false;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case CMD_EVENT_NETPLAY_DISCONNECT:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISCONNECT, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISABLE, NULL);
|
||||
|
||||
/* Re-enable rewind if it was enabled
|
||||
TODO: Add a setting for these tweaks */
|
||||
if (settings->bools.rewind_enable)
|
||||
command_event(CMD_EVENT_REWIND_INIT, NULL);
|
||||
if (settings->uints.autosave_interval != 0)
|
||||
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
|
||||
|
||||
break;
|
||||
}
|
||||
case CMD_EVENT_NETPLAY_HOST_TOGGLE:
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) &&
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_SERVER, NULL))
|
||||
command_event(CMD_EVENT_NETPLAY_DISCONNECT, NULL);
|
||||
else if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) &&
|
||||
!netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_SERVER, NULL) &&
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_CONNECTED, NULL))
|
||||
command_event(CMD_EVENT_NETPLAY_DISCONNECT, NULL);
|
||||
else
|
||||
command_event(CMD_EVENT_NETPLAY_ENABLE_HOST, NULL);
|
||||
|
||||
break;
|
||||
#else
|
||||
case CMD_EVENT_NETPLAY_DEINIT:
|
||||
case CMD_EVENT_NETWORK_DEINIT:
|
||||
@@ -2675,6 +2789,9 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT:
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED:
|
||||
case CMD_EVENT_NETPLAY_GAME_WATCH:
|
||||
case CMD_EVENT_NETPLAY_HOST_TOGGLE:
|
||||
case CMD_EVENT_NETPLAY_DISCONNECT:
|
||||
case CMD_EVENT_NETPLAY_ENABLE_HOST:
|
||||
return false;
|
||||
#endif
|
||||
case CMD_EVENT_FULLSCREEN_TOGGLE:
|
||||
@@ -2759,7 +2876,8 @@ TODO: Add a setting for these tweaks */
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
|
||||
1, 120, true);
|
||||
1, 120, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_DISK_NEXT:
|
||||
@@ -2783,7 +2901,8 @@ TODO: Add a setting for these tweaks */
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
|
||||
1, 120, true);
|
||||
1, 120, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_DISK_PREV:
|
||||
@@ -2807,7 +2926,8 @@ TODO: Add a setting for these tweaks */
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
|
||||
1, 120, true);
|
||||
1, 120, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_RUMBLE_STOP:
|
||||
@@ -2874,7 +2994,8 @@ TODO: Add a setting for these tweaks */
|
||||
input_driver_keyboard_mapping_set_block(1);
|
||||
if (mode != -1)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
|
||||
1, 120, true);
|
||||
1, 120, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2884,7 +3005,8 @@ TODO: Add a setting for these tweaks */
|
||||
input_driver_keyboard_mapping_set_block(0);
|
||||
if (mode != -1)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
|
||||
1, 120, true);
|
||||
1, 120, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -85,6 +85,10 @@ enum event_command
|
||||
CMD_EVENT_AUDIO_MUTE_TOGGLE,
|
||||
/* Toggles FPS counter. */
|
||||
CMD_EVENT_FPS_TOGGLE,
|
||||
/* Gathers diagnostic info about the system and RetroArch configuration, then sends it to our servers. */
|
||||
CMD_EVENT_SEND_DEBUG_INFO,
|
||||
/* Toggles netplay hosting. */
|
||||
CMD_EVENT_NETPLAY_HOST_TOGGLE,
|
||||
/* Initializes overlay. */
|
||||
CMD_EVENT_OVERLAY_INIT,
|
||||
/* Deinitializes overlay. */
|
||||
@@ -188,6 +192,10 @@ enum event_command
|
||||
CMD_EVENT_NETPLAY_DEINIT,
|
||||
/* Switch between netplay gaming and watching. */
|
||||
CMD_EVENT_NETPLAY_GAME_WATCH,
|
||||
/* Start hosting netplay. */
|
||||
CMD_EVENT_NETPLAY_ENABLE_HOST,
|
||||
/* Disconnect from the netplay host. */
|
||||
CMD_EVENT_NETPLAY_DISCONNECT,
|
||||
/* Initializes BSV movie. */
|
||||
CMD_EVENT_BSV_MOVIE_INIT,
|
||||
/* Deinitializes BSV movie. */
|
||||
|
||||
+84
-12
@@ -32,6 +32,11 @@
|
||||
#include "network/netplay/netplay.h"
|
||||
#endif
|
||||
|
||||
/* Required for 3DS display mode setting */
|
||||
#if defined(_3DS)
|
||||
#include "gfx/common/ctr_common.h"
|
||||
#endif
|
||||
|
||||
#if defined(HW_RVL)
|
||||
#define MAX_GAMMA_SETTING 30
|
||||
#elif defined(GEKKO)
|
||||
@@ -68,8 +73,8 @@ static bool bundle_assets_extract_enable = false;
|
||||
static bool materialui_icons_enable = true;
|
||||
#endif
|
||||
|
||||
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
|
||||
static const int crt_switch_resolution_super = 2560;
|
||||
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
|
||||
static const int crt_switch_resolution_super = 2560;
|
||||
static const int crt_switch_center_adjust = 0;
|
||||
|
||||
static const bool def_history_list_enable = true;
|
||||
@@ -272,6 +277,7 @@ static const float default_input_overlay_opacity = 0.7f;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
#include "menu/menu_animation.h"
|
||||
|
||||
static bool default_block_config_read = true;
|
||||
|
||||
@@ -281,6 +287,10 @@ static bool menu_use_preferred_system_color_theme = true;
|
||||
static bool menu_use_preferred_system_color_theme = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OZONE
|
||||
static bool ozone_collapse_sidebar = false;
|
||||
#endif
|
||||
|
||||
static bool quick_menu_show_take_screenshot = true;
|
||||
static bool quick_menu_show_save_load_state = true;
|
||||
static bool quick_menu_show_undo_save_load_state = true;
|
||||
@@ -321,6 +331,10 @@ static bool menu_show_core_updater = false;
|
||||
#else
|
||||
static bool menu_show_core_updater = true;
|
||||
#endif
|
||||
static bool menu_show_sublabels = true;
|
||||
|
||||
static unsigned menu_ticker_type = TICKER_TYPE_BOUNCE;
|
||||
static float menu_ticker_speed = 1.0f;
|
||||
|
||||
static bool content_show_settings = true;
|
||||
static bool content_show_favorites = true;
|
||||
@@ -372,8 +386,20 @@ static unsigned menu_shader_pipeline = 1;
|
||||
static unsigned menu_shader_pipeline = 2;
|
||||
#endif
|
||||
|
||||
static bool show_advanced_settings = false;
|
||||
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
|
||||
static bool show_advanced_settings = false;
|
||||
|
||||
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
|
||||
static bool rgui_inline_thumbnails = false;
|
||||
static bool rgui_swap_thumbnails = false;
|
||||
static unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT;
|
||||
static unsigned rgui_thumbnail_delay = 0;
|
||||
static unsigned rgui_internal_upscale_level = RGUI_UPSCALE_NONE;
|
||||
static bool rgui_full_width_layout = true;
|
||||
static unsigned rgui_aspect = RGUI_ASPECT_RATIO_4_3;
|
||||
static unsigned rgui_aspect_lock = RGUI_ASPECT_RATIO_LOCK_NONE;
|
||||
static bool rgui_shadows = false;
|
||||
static unsigned rgui_particle_effect = RGUI_PARTICLE_EFFECT_NONE;
|
||||
static bool rgui_extended_ascii = false;
|
||||
|
||||
#else
|
||||
static bool default_block_config_read = false;
|
||||
@@ -422,6 +448,11 @@ static bool menu_swap_ok_cancel_buttons = true;
|
||||
static bool menu_swap_ok_cancel_buttons = false;
|
||||
#endif
|
||||
|
||||
static bool quit_press_twice = false;
|
||||
|
||||
static bool default_log_to_file = false;
|
||||
static bool log_to_file_timestamp = false;
|
||||
|
||||
/* Crop overscanned frames. */
|
||||
static const bool crop_overscan = true;
|
||||
|
||||
@@ -493,9 +524,11 @@ static const float crt_refresh_rate = 60/1.001;
|
||||
* Used for setups where one manually rotates the monitor. */
|
||||
static const bool allow_rotate = true;
|
||||
|
||||
#ifdef _3DS
|
||||
#if defined(_3DS)
|
||||
/* Enable bottom LCD screen */
|
||||
static const bool video_3ds_lcd_bottom = true;
|
||||
/* Sets video display mode (3D, 2D, etc.) */
|
||||
static const unsigned video_3ds_display_mode = CTR_VIDEO_MODE_3D;
|
||||
#endif
|
||||
|
||||
/* AUDIO */
|
||||
@@ -504,11 +537,17 @@ static const bool video_3ds_lcd_bottom = true;
|
||||
static const bool audio_enable = true;
|
||||
|
||||
/* Enable menu audio sounds. */
|
||||
static const bool audio_enable_menu = false;
|
||||
static const bool audio_enable_menu_ok = false;
|
||||
static const bool audio_enable_menu = false;
|
||||
static const bool audio_enable_menu_ok = false;
|
||||
static const bool audio_enable_menu_cancel = false;
|
||||
static const bool audio_enable_menu_notice = false;
|
||||
static const bool audio_enable_menu_bgm = false;
|
||||
static const bool audio_enable_menu_bgm = false;
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
static const bool menu_enable_widgets = true;
|
||||
#else
|
||||
static const bool menu_enable_widgets = false;
|
||||
#endif
|
||||
|
||||
/* Output samplerate. */
|
||||
#ifdef GEKKO
|
||||
@@ -573,6 +612,9 @@ static const bool framecount_show = false;
|
||||
/* Includes displaying the current memory usage/total with FPS/Frames. */
|
||||
static const bool memory_show = false;
|
||||
|
||||
/* Enables displaying various timing statistics. */
|
||||
static const bool statistics_show = false;
|
||||
|
||||
/* Enables use of rewind. This will incur some memory footprint
|
||||
* depending on the save state buffer. */
|
||||
static const bool rewind_enable = false;
|
||||
@@ -691,9 +733,26 @@ static const uint16_t network_remote_base_port = 55400;
|
||||
/* Number of entries that will be kept in content history playlist file. */
|
||||
static const unsigned default_content_history_size = 100;
|
||||
|
||||
/* Sort all playlists (apart from histories) alphabetically */
|
||||
static const bool playlist_sort_alphabetical = true;
|
||||
|
||||
/* File format to use when writing playlists to disk */
|
||||
static const bool playlist_use_old_format = false;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
/* Specify when to display 'core name' inline on playlist entries */
|
||||
static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV;
|
||||
|
||||
/* Specifies which runtime record to use on playlist sublabels */
|
||||
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
||||
#endif
|
||||
|
||||
static const bool scan_without_core_match = false;
|
||||
|
||||
static const bool playlist_show_sublabels = false;
|
||||
|
||||
static const bool playlist_fuzzy_archive_match = false;
|
||||
|
||||
/* Show Menu start-up screen on boot. */
|
||||
static const bool default_menu_show_start_screen = true;
|
||||
|
||||
@@ -722,7 +781,11 @@ static const unsigned libretro_log_level = 1;
|
||||
|
||||
/* Axis threshold (between 0.0 and 1.0)
|
||||
* How far an axis must be tilted to result in a button press. */
|
||||
static const float axis_threshold = 0.5;
|
||||
static const float axis_threshold = 0.5f;
|
||||
|
||||
static const float analog_deadzone = 0.0f;
|
||||
|
||||
static const float analog_sensitivity = 1.0f;
|
||||
|
||||
/* Describes speed of which turbo-enabled buttons toggle. */
|
||||
static const unsigned turbo_period = 6;
|
||||
@@ -744,7 +807,7 @@ static const unsigned input_poll_type_behavior = 2;
|
||||
|
||||
static const unsigned input_bind_timeout = 5;
|
||||
|
||||
static const unsigned input_bind_hold = 2;
|
||||
static const unsigned input_bind_hold = 1;
|
||||
|
||||
static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
@@ -754,8 +817,6 @@ static const unsigned menu_timedate_style = 5;
|
||||
|
||||
static const bool xmb_vertical_thumbnails = false;
|
||||
|
||||
static unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT;
|
||||
|
||||
#ifdef IOS
|
||||
static const bool ui_companion_start_on_boot = false;
|
||||
#else
|
||||
@@ -770,6 +831,12 @@ static const bool ui_companion_toggle = false;
|
||||
/* Only init the WIMP UI for this session if this is enabled */
|
||||
static const bool desktop_menu_enable = true;
|
||||
|
||||
/* Keep track of how long each core+content has been running for over time */
|
||||
static const bool content_runtime_log = false;
|
||||
|
||||
/* Keep track of how long each content has been running for over time (ignores core) */
|
||||
static const bool content_runtime_log_aggregate = false;
|
||||
|
||||
#if defined(__QNX__) || defined(_XBOX1) || defined(_XBOX360) || defined(__CELLOS_LV2__) || (defined(__MACH__) && defined(IOS)) || defined(ANDROID) || defined(WIIU) || defined(HAVE_NEON) || defined(GEKKO) || defined(__ARM_NEON__)
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWER;
|
||||
#elif defined(PSP) || defined(_3DS) || defined(VITA) || defined(PS2)
|
||||
@@ -786,6 +853,9 @@ static const unsigned midi_volume = 100;
|
||||
/* Only applies to Android 7.0 (API 24) and up */
|
||||
static const bool sustained_performance_mode = false;
|
||||
|
||||
static const bool vibrate_on_keypress = false;
|
||||
static const bool enable_device_vibration = false;
|
||||
|
||||
#if defined(HAKCHI)
|
||||
static char buildbot_server_url[] = "http://hakchicloud.com/Libretro_Cores/";
|
||||
#elif defined(ANDROID)
|
||||
@@ -821,6 +891,8 @@ static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86/latest/";
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/arm/latest/";
|
||||
#endif
|
||||
#else
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -88,6 +88,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -167,6 +169,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_F3, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_F10, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
@@ -260,12 +260,6 @@ static const bool _hlsl_supp = true;
|
||||
static const bool _hlsl_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
static const bool _libxml2_supp = true;
|
||||
#else
|
||||
static const bool _libxml2_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SDL_IMAGE
|
||||
static const bool _sdl_image_supp = true;
|
||||
#else
|
||||
@@ -356,12 +350,6 @@ static const bool _coretext_supp = true;
|
||||
static const bool _coretext_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
static const bool _avfoundation_supp = true;
|
||||
#else
|
||||
static const bool _avfoundation_supp = false;
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(GLOBAL_CONFIG_DIR)
|
||||
#if defined(__HAIKU__)
|
||||
#define GLOBAL_CONFIG_DIR "/system/settings"
|
||||
|
||||
+274
-669
File diff suppressed because it is too large.
Load diff
@@ -137,11 +137,13 @@ typedef struct settings
|
||||
|
||||
/* Menu */
|
||||
bool filter_by_current_core;
|
||||
bool menu_enable_widgets;
|
||||
bool menu_show_start_screen;
|
||||
bool menu_pause_libretro;
|
||||
bool menu_timedate_enable;
|
||||
bool menu_battery_level_enable;
|
||||
bool menu_core_enable;
|
||||
bool menu_show_sublabels;
|
||||
bool menu_dynamic_wallpaper_enable;
|
||||
bool menu_throttle;
|
||||
bool menu_mouse_enable;
|
||||
@@ -170,6 +172,11 @@ typedef struct settings
|
||||
bool menu_rgui_background_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_enable;
|
||||
bool menu_rgui_full_width_layout;
|
||||
bool menu_rgui_shadows;
|
||||
bool menu_rgui_inline_thumbnails;
|
||||
bool menu_rgui_swap_thumbnails;
|
||||
bool menu_rgui_extended_ascii;
|
||||
bool menu_xmb_shadows_enable;
|
||||
bool menu_xmb_vertical_thumbnails;
|
||||
bool menu_content_show_settings;
|
||||
@@ -234,6 +241,7 @@ typedef struct settings
|
||||
bool cheevos_badges_enable;
|
||||
bool cheevos_verbose_enable;
|
||||
bool cheevos_auto_screenshot;
|
||||
bool cheevos_old_enable; /* RCHEEVOS TODO: remove line */
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
@@ -305,6 +313,23 @@ typedef struct settings
|
||||
|
||||
bool sustained_performance_mode;
|
||||
bool playlist_use_old_format;
|
||||
bool content_runtime_log;
|
||||
bool content_runtime_log_aggregate;
|
||||
|
||||
bool playlist_sort_alphabetical;
|
||||
bool playlist_show_sublabels;
|
||||
bool playlist_fuzzy_archive_match;
|
||||
|
||||
bool quit_press_twice;
|
||||
bool vibrate_on_keypress;
|
||||
bool enable_device_vibration;
|
||||
bool ozone_collapse_sidebar;
|
||||
|
||||
|
||||
bool log_to_file;
|
||||
bool log_to_file_timestamp;
|
||||
|
||||
bool scan_without_core_match;
|
||||
} bools;
|
||||
|
||||
struct
|
||||
@@ -326,6 +351,7 @@ typedef struct settings
|
||||
float menu_framebuffer_opacity;
|
||||
float menu_footer_opacity;
|
||||
float menu_header_opacity;
|
||||
float menu_ticker_speed;
|
||||
|
||||
float audio_max_timing_skew;
|
||||
float audio_volume; /* dB scale. */
|
||||
@@ -336,6 +362,8 @@ typedef struct settings
|
||||
|
||||
float slowmotion_ratio;
|
||||
float fastforward_ratio;
|
||||
float input_analog_deadzone;
|
||||
float input_analog_sensitivity;
|
||||
} floats;
|
||||
|
||||
struct
|
||||
@@ -356,6 +384,8 @@ typedef struct settings
|
||||
unsigned audio_block_frames;
|
||||
unsigned audio_latency;
|
||||
|
||||
unsigned input_block_timeout;
|
||||
|
||||
unsigned audio_resampler_quality;
|
||||
|
||||
unsigned input_turbo_period;
|
||||
@@ -395,6 +425,7 @@ typedef struct settings
|
||||
unsigned video_viwidth;
|
||||
unsigned video_aspect_ratio_idx;
|
||||
unsigned video_rotation;
|
||||
unsigned screen_orientation;
|
||||
unsigned video_msg_bgcolor_red;
|
||||
unsigned video_msg_bgcolor_green;
|
||||
unsigned video_msg_bgcolor_blue;
|
||||
@@ -403,11 +434,13 @@ typedef struct settings
|
||||
unsigned video_stream_quality;
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
unsigned video_3ds_display_mode;
|
||||
|
||||
unsigned menu_timedate_style;
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
unsigned menu_rgui_thumbnail_downscaler;
|
||||
unsigned menu_rgui_thumbnail_delay;
|
||||
unsigned menu_dpi_override_value;
|
||||
unsigned menu_rgui_color_theme;
|
||||
unsigned menu_xmb_layout;
|
||||
@@ -421,6 +454,14 @@ typedef struct settings
|
||||
unsigned menu_font_color_red;
|
||||
unsigned menu_font_color_green;
|
||||
unsigned menu_font_color_blue;
|
||||
unsigned menu_rgui_internal_upscale_level;
|
||||
unsigned menu_rgui_aspect_ratio;
|
||||
unsigned menu_rgui_aspect_ratio_lock;
|
||||
unsigned menu_rgui_particle_effect;
|
||||
unsigned menu_ticker_type;
|
||||
|
||||
unsigned playlist_show_inline_core_name;
|
||||
unsigned playlist_sublabel_runtime_type;
|
||||
|
||||
unsigned camera_width;
|
||||
unsigned camera_height;
|
||||
@@ -557,6 +598,7 @@ typedef struct settings
|
||||
char directory_system[PATH_MAX_LENGTH];
|
||||
char directory_cache[PATH_MAX_LENGTH];
|
||||
char directory_playlist[PATH_MAX_LENGTH];
|
||||
char directory_runtime_log[PATH_MAX_LENGTH];
|
||||
char directory_core_assets[PATH_MAX_LENGTH];
|
||||
char directory_assets[PATH_MAX_LENGTH];
|
||||
char directory_dynamic_wallpapers[PATH_MAX_LENGTH];
|
||||
@@ -564,6 +606,8 @@ typedef struct settings
|
||||
char directory_menu_config[PATH_MAX_LENGTH];
|
||||
char directory_menu_content[PATH_MAX_LENGTH];
|
||||
char streaming_title[PATH_MAX_LENGTH];
|
||||
|
||||
char log_dir[PATH_MAX_LENGTH];
|
||||
} paths;
|
||||
|
||||
bool modified;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -112,6 +112,9 @@ char* content_get_subsystem_rom(unsigned index);
|
||||
/* Sets the subsystem by name */
|
||||
bool content_set_subsystem_by_name(const char* subsystem_name);
|
||||
|
||||
/* Get the current subsystem "friendly name" */
|
||||
void content_get_subsystem_friendly_name(const char* subsystem_name, char* subsystem_friendly_name, size_t len);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2015 - Michael Lelli
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
|
||||
+73
-162
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -45,25 +45,8 @@ static void core_info_list_resolve_all_extensions(
|
||||
core_info_list_t *core_info_list)
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t all_ext_len = 0;
|
||||
char *all_ext = NULL;
|
||||
|
||||
for (i = 0; i < core_info_list->count; i++)
|
||||
{
|
||||
if (core_info_list->list[i].supported_extensions)
|
||||
all_ext_len +=
|
||||
(strlen(core_info_list->list[i].supported_extensions) + 2);
|
||||
}
|
||||
|
||||
all_ext_len += strlen("7z|") + strlen("zip|");
|
||||
|
||||
if (all_ext_len)
|
||||
all_ext = (char*)calloc(1, all_ext_len);
|
||||
|
||||
if (!all_ext)
|
||||
return;
|
||||
|
||||
core_info_list->all_ext = all_ext;
|
||||
core_info_list->all_ext[0] = '\0';
|
||||
|
||||
for (i = 0; i < core_info_list->count; i++)
|
||||
{
|
||||
@@ -71,14 +54,15 @@ static void core_info_list_resolve_all_extensions(
|
||||
continue;
|
||||
|
||||
strlcat(core_info_list->all_ext,
|
||||
core_info_list->list[i].supported_extensions, all_ext_len);
|
||||
strlcat(core_info_list->all_ext, "|", all_ext_len);
|
||||
core_info_list->list[i].supported_extensions,
|
||||
sizeof(core_info_list->all_ext));
|
||||
string_concat(core_info_list->all_ext, "|");
|
||||
}
|
||||
#ifdef HAVE_7ZIP
|
||||
strlcat(core_info_list->all_ext, "7z|", all_ext_len);
|
||||
string_concat(core_info_list->all_ext, "7z|");
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
strlcat(core_info_list->all_ext, "zip|", all_ext_len);
|
||||
string_concat(core_info_list->all_ext, "zip|");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -181,25 +165,21 @@ static void core_info_list_free(core_info_list_t *core_info_list)
|
||||
free(info->firmware);
|
||||
}
|
||||
|
||||
free(core_info_list->all_ext);
|
||||
free(core_info_list->list);
|
||||
free(core_info_list);
|
||||
}
|
||||
|
||||
static bool core_info_list_iterate(
|
||||
char *s, size_t len,
|
||||
const char *path_basedir,
|
||||
struct string_list *contents, size_t i)
|
||||
static config_file_t *core_info_list_iterate(
|
||||
const char *current_path,
|
||||
const char *path_basedir)
|
||||
{
|
||||
size_t info_path_base_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *info_path_base = NULL;
|
||||
char *substr = NULL;
|
||||
const char *current_path = contents ? contents->elems[i].data : NULL;
|
||||
|
||||
(void)substr;
|
||||
char *info_path = NULL;
|
||||
config_file_t *conf = NULL;
|
||||
|
||||
if (!current_path)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
info_path_base = (char*)malloc(info_path_base_size);
|
||||
|
||||
@@ -210,21 +190,29 @@ static bool core_info_list_iterate(
|
||||
info_path_base_size);
|
||||
|
||||
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP) && !defined(_3DS) && !defined(VITA) && !defined(PS2) && !defined(HW_WUP))
|
||||
substr = strrchr(info_path_base, '_');
|
||||
if (substr)
|
||||
*substr = '\0';
|
||||
{
|
||||
char *substr = strrchr(info_path_base, '_');
|
||||
if (substr)
|
||||
*substr = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
strlcat(info_path_base,
|
||||
file_path_str(FILE_PATH_CORE_INFO_EXTENSION),
|
||||
info_path_base_size);
|
||||
|
||||
fill_pathname_join(s,
|
||||
info_path = (char*)malloc(info_path_base_size);
|
||||
fill_pathname_join(info_path,
|
||||
path_basedir,
|
||||
info_path_base, len);
|
||||
|
||||
info_path_base, info_path_base_size);
|
||||
free(info_path_base);
|
||||
return true;
|
||||
info_path_base = NULL;
|
||||
|
||||
if (path_is_valid(info_path))
|
||||
conf = config_file_new(info_path);
|
||||
free(info_path);
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
static core_info_list_t *core_info_list_new(const char *path,
|
||||
@@ -245,17 +233,15 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
struct string_list *core_packages = string_list_new();
|
||||
uwp_fill_installed_core_packages(core_packages);
|
||||
for (i = 0; i < core_packages->size; i++)
|
||||
{
|
||||
dir_list_append(contents, core_packages->elems[i].data, exts,
|
||||
false, dir_show_hidden_files, false, false);
|
||||
}
|
||||
string_list_free(core_packages);
|
||||
#else
|
||||
/* Keep the old 'directory not found' behavior */
|
||||
if (!ok)
|
||||
{
|
||||
string_list_free(contents);
|
||||
contents = NULL;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -264,36 +250,31 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
|
||||
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
|
||||
if (!core_info_list)
|
||||
goto error;
|
||||
{
|
||||
string_list_free(contents);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
core_info = (core_info_t*)calloc(contents->size, sizeof(*core_info));
|
||||
if (!core_info)
|
||||
goto error;
|
||||
{
|
||||
core_info_list_free(core_info_list);
|
||||
string_list_free(contents);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
core_info_list->list = core_info;
|
||||
core_info_list->count = contents->size;
|
||||
|
||||
for (i = 0; i < contents->size; i++)
|
||||
{
|
||||
size_t info_path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
const char *path = contents->elems[i].data;
|
||||
config_file_t *conf = core_info_list_iterate(path,
|
||||
path_basedir);
|
||||
|
||||
info_path[0] = '\0';
|
||||
|
||||
if (
|
||||
core_info_list_iterate(info_path, info_path_size,
|
||||
path_basedir, contents, i)
|
||||
&& path_is_valid(info_path))
|
||||
if (conf)
|
||||
{
|
||||
char *tmp = NULL;
|
||||
bool tmp_bool = false;
|
||||
unsigned count = 0;
|
||||
config_file_t *conf = config_file_new(info_path);
|
||||
|
||||
free(info_path);
|
||||
|
||||
if (!conf)
|
||||
continue;
|
||||
|
||||
if (config_get_string(conf, "display_name", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
@@ -341,9 +322,11 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
config_get_uint(conf, "firmware_count", &count);
|
||||
|
||||
core_info[i].firmware_count = count;
|
||||
{
|
||||
unsigned count = 0;
|
||||
config_get_uint(conf, "firmware_count", &count);
|
||||
core_info[i].firmware_count = count;
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "supported_extensions", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
@@ -425,21 +408,22 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
|
||||
if (config_get_bool(conf, "supports_no_game",
|
||||
&tmp_bool))
|
||||
core_info[i].supports_no_game = tmp_bool;
|
||||
{
|
||||
bool tmp_bool = false;
|
||||
if (config_get_bool(conf, "supports_no_game",
|
||||
&tmp_bool))
|
||||
core_info[i].supports_no_game = tmp_bool;
|
||||
|
||||
if (config_get_bool(conf, "database_match_archive_member",
|
||||
&tmp_bool))
|
||||
core_info[i].database_match_archive_member = tmp_bool;
|
||||
if (config_get_bool(conf, "database_match_archive_member",
|
||||
&tmp_bool))
|
||||
core_info[i].database_match_archive_member = tmp_bool;
|
||||
}
|
||||
|
||||
core_info[i].config_data = conf;
|
||||
}
|
||||
else
|
||||
free(info_path);
|
||||
|
||||
if (!string_is_empty(contents->elems[i].data))
|
||||
core_info[i].path = strdup(contents->elems[i].data);
|
||||
if (!string_is_empty(path))
|
||||
core_info[i].path = strdup(path);
|
||||
|
||||
if (!core_info[i].display_name)
|
||||
core_info[i].display_name =
|
||||
@@ -454,12 +438,6 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
|
||||
string_list_free(contents);
|
||||
return core_info_list;
|
||||
|
||||
error:
|
||||
if (contents)
|
||||
string_list_free(contents);
|
||||
core_info_list_free(core_info_list);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Shallow-copies internal state.
|
||||
@@ -539,6 +517,7 @@ static core_info_t *core_info_find_internal(
|
||||
const char *core)
|
||||
{
|
||||
size_t i;
|
||||
const char *core_path_basename = path_basename(core);
|
||||
|
||||
for (i = 0; i < list->count; i++)
|
||||
{
|
||||
@@ -546,7 +525,7 @@ static core_info_t *core_info_find_internal(
|
||||
|
||||
if (!info || !info->path)
|
||||
continue;
|
||||
if (string_is_equal(info->path, core))
|
||||
if (string_is_equal(path_basename(info->path), core_path_basename))
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -586,7 +565,7 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
|
||||
fill_pathname_join(path, systemdir,
|
||||
info->firmware[i].path, path_size);
|
||||
info->firmware[i].missing = !filestream_exists(path);
|
||||
info->firmware[i].missing = !path_is_valid(path);
|
||||
if (info->firmware[i].missing && !info->firmware[i].optional)
|
||||
{
|
||||
*set_missing_bios = true;
|
||||
@@ -598,55 +577,6 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int core_info_firmware_cmp(const void *a_, const void *b_)
|
||||
{
|
||||
const core_info_firmware_t *a = (const core_info_firmware_t*)a_;
|
||||
const core_info_firmware_t *b = (const core_info_firmware_t*)b_;
|
||||
int order = b->missing - a->missing;
|
||||
|
||||
if (order)
|
||||
return order;
|
||||
return strcasecmp(a->path, b->path);
|
||||
}
|
||||
|
||||
/* Non-reentrant, does not allocate. Returns pointer to internal state. */
|
||||
|
||||
static void core_info_list_get_missing_firmware(
|
||||
core_info_list_t *core_info_list,
|
||||
const char *core, const char *systemdir,
|
||||
const core_info_firmware_t **firmware, size_t *num_firmware)
|
||||
{
|
||||
size_t i;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
core_info_t *info = NULL;
|
||||
|
||||
if (!core_info_list || !core)
|
||||
return;
|
||||
|
||||
path[0] = '\0';
|
||||
*firmware = NULL;
|
||||
*num_firmware = 0;
|
||||
info = core_info_find_internal(core_info_list, core);
|
||||
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
*firmware = info->firmware;
|
||||
|
||||
for (i = 1; i < info->firmware_count; i++)
|
||||
{
|
||||
fill_pathname_join(path, systemdir,
|
||||
info->firmware[i].path, sizeof(path));
|
||||
info->firmware[i].missing = !filestream_exists(path);
|
||||
*num_firmware += info->firmware[i].missing;
|
||||
}
|
||||
|
||||
qsort(info->firmware, info->firmware_count, sizeof(*info->firmware),
|
||||
core_info_firmware_cmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
void core_info_free_current_core(void)
|
||||
{
|
||||
if (core_info_current)
|
||||
@@ -799,47 +729,36 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len,
|
||||
const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool dir_show_hidden_files)
|
||||
const char *exts, bool dir_show_hidden_files,
|
||||
bool get_display_name)
|
||||
{
|
||||
size_t i;
|
||||
const char *path_basedir = !string_is_empty(path_info) ?
|
||||
path_info : dir_cores;
|
||||
struct string_list *contents = dir_list_new(
|
||||
dir_cores, exts, false, dir_show_hidden_files, false, false);
|
||||
const char *core_path_basename = path_basename(path);
|
||||
|
||||
if (!contents)
|
||||
return;
|
||||
|
||||
for (i = 0; i < contents->size; i++)
|
||||
{
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *info_path = NULL;
|
||||
config_file_t *conf = NULL;
|
||||
char *new_core_name = NULL;
|
||||
const char *current_path = contents->elems[i].data;
|
||||
|
||||
if (!string_is_equal(current_path, path))
|
||||
if (!string_is_equal(path_basename(current_path), core_path_basename))
|
||||
continue;
|
||||
|
||||
info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
info_path[0] = '\0';
|
||||
|
||||
if (!core_info_list_iterate(info_path,
|
||||
path_size, path_basedir, contents, i)
|
||||
&& path_is_valid(info_path))
|
||||
{
|
||||
free(info_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
conf = config_file_new(info_path);
|
||||
conf = core_info_list_iterate(contents->elems[i].data,
|
||||
path_basedir);
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
free(info_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "corename",
|
||||
if (config_get_string(conf, get_display_name
|
||||
? "display_name" : "corename",
|
||||
&new_core_name))
|
||||
{
|
||||
strlcpy(s, new_core_name, len);
|
||||
@@ -847,12 +766,10 @@ void core_info_get_name(const char *path, char *s, size_t len,
|
||||
}
|
||||
|
||||
config_file_free(conf);
|
||||
free(info_path);
|
||||
break;
|
||||
}
|
||||
|
||||
if (contents)
|
||||
dir_list_free(contents);
|
||||
dir_list_free(contents);
|
||||
contents = NULL;
|
||||
}
|
||||
|
||||
@@ -981,15 +898,11 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list,
|
||||
|
||||
bool core_info_get_display_name(const char *path, char *s, size_t len)
|
||||
{
|
||||
bool ret = true;
|
||||
char *tmp = NULL;
|
||||
config_file_t *conf = config_file_new(path);
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
ret = false;
|
||||
goto error;
|
||||
}
|
||||
return false;
|
||||
|
||||
if (config_get_string(conf, "display_name", &tmp))
|
||||
{
|
||||
@@ -997,8 +910,6 @@ bool core_info_get_display_name(const char *path, char *s, size_t len)
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
error:
|
||||
config_file_free(conf);
|
||||
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
+5
-3
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <lists/string_list.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
@@ -70,7 +71,7 @@ typedef struct
|
||||
{
|
||||
core_info_t *list;
|
||||
size_t count;
|
||||
char *all_ext;
|
||||
char all_ext[PATH_MAX_LENGTH];
|
||||
} core_info_list_t;
|
||||
|
||||
typedef struct core_info_ctx_firmware
|
||||
@@ -101,7 +102,8 @@ bool core_info_get_display_name(const char *path, char *s, size_t len);
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len,
|
||||
const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files);
|
||||
const char *exts, bool show_hidden_files,
|
||||
bool get_display_name);
|
||||
|
||||
core_info_t *core_info_get(core_info_list_t *list, size_t i);
|
||||
|
||||
|
||||
+58
-17
@@ -21,10 +21,19 @@
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
#include <string/stdstring.h>
|
||||
#include "../configuration.h"
|
||||
#include "../menu/menu_defines.h"
|
||||
#endif
|
||||
|
||||
#include "internal_cores.h"
|
||||
|
||||
static uint16_t *dummy_frame_buf;
|
||||
|
||||
static uint16_t frame_buf_width;
|
||||
static uint16_t frame_buf_height;
|
||||
|
||||
#if defined(HAVE_LIBNX) && defined(HAVE_STATIC_DUMMY)
|
||||
void retro_init(void) { libretro_dummy_retro_init(); }
|
||||
void retro_deinit(void) { libretro_dummy_retro_deinit(); }
|
||||
@@ -55,10 +64,38 @@ void retro_cheat_set(unsigned idx, bool enabled, const char *code) { libretro_du
|
||||
|
||||
void libretro_dummy_retro_init(void)
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
settings_t *settings = config_get_ptr();
|
||||
#endif
|
||||
unsigned i;
|
||||
|
||||
dummy_frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
|
||||
for (i = 0; i < 320 * 240; i++)
|
||||
/* Sensible defaults */
|
||||
frame_buf_width = 320;
|
||||
frame_buf_height = 240;
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
|
||||
{
|
||||
switch (settings->uints.menu_rgui_aspect_ratio)
|
||||
{
|
||||
case RGUI_ASPECT_RATIO_16_9:
|
||||
case RGUI_ASPECT_RATIO_16_9_CENTRE:
|
||||
frame_buf_width = 426;
|
||||
break;
|
||||
case RGUI_ASPECT_RATIO_16_10:
|
||||
case RGUI_ASPECT_RATIO_16_10_CENTRE:
|
||||
frame_buf_width = 384;
|
||||
break;
|
||||
default:
|
||||
/* 4:3 */
|
||||
frame_buf_width = 320;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
dummy_frame_buf = (uint16_t*)calloc(frame_buf_width * frame_buf_height, sizeof(uint16_t));
|
||||
for (i = 0; i < (unsigned)(frame_buf_width * frame_buf_height); i++)
|
||||
dummy_frame_buf[i] = 4 << 5;
|
||||
}
|
||||
|
||||
@@ -91,20 +128,6 @@ void libretro_dummy_retro_get_system_info(
|
||||
info->valid_extensions = ""; /* Nothing. */
|
||||
}
|
||||
|
||||
/* Doesn't really matter, but need something sane. */
|
||||
void libretro_dummy_retro_get_system_av_info(
|
||||
struct retro_system_av_info *info)
|
||||
{
|
||||
info->timing.fps = 60.0;
|
||||
info->timing.sample_rate = 30000.0;
|
||||
|
||||
info->geometry.base_width = 320;
|
||||
info->geometry.base_height = 240;
|
||||
info->geometry.max_width = 320;
|
||||
info->geometry.max_height = 240;
|
||||
info->geometry.aspect_ratio = 4.0 / 3.0;
|
||||
}
|
||||
|
||||
static retro_video_refresh_t dummy_video_cb;
|
||||
static retro_audio_sample_t dummy_audio_cb;
|
||||
static retro_audio_sample_batch_t dummy_audio_batch_cb;
|
||||
@@ -112,6 +135,24 @@ static retro_environment_t dummy_environ_cb;
|
||||
static retro_input_poll_t dummy_input_poll_cb;
|
||||
static retro_input_state_t dummy_input_state_cb;
|
||||
|
||||
/* Doesn't really matter, but need something sane. */
|
||||
void libretro_dummy_retro_get_system_av_info(
|
||||
struct retro_system_av_info *info)
|
||||
{
|
||||
float refresh_rate = 0.0;
|
||||
if (!dummy_environ_cb(RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &refresh_rate))
|
||||
refresh_rate = 60.0;
|
||||
|
||||
info->timing.fps = refresh_rate;
|
||||
info->timing.sample_rate = 30000.0;
|
||||
|
||||
info->geometry.base_width = frame_buf_width;
|
||||
info->geometry.base_height = frame_buf_height;
|
||||
info->geometry.max_width = frame_buf_width;
|
||||
info->geometry.max_height = frame_buf_height;
|
||||
info->geometry.aspect_ratio = (float)frame_buf_width / (float)frame_buf_height;
|
||||
}
|
||||
|
||||
void libretro_dummy_retro_set_environment(retro_environment_t cb)
|
||||
{
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
|
||||
@@ -154,7 +195,7 @@ void libretro_dummy_retro_reset(void)
|
||||
void libretro_dummy_retro_run(void)
|
||||
{
|
||||
dummy_input_poll_cb();
|
||||
dummy_video_cb(dummy_frame_buf, 320, 240, 640);
|
||||
dummy_video_cb(dummy_frame_buf, frame_buf_width, frame_buf_height, 2 * frame_buf_width);
|
||||
}
|
||||
|
||||
/* This should never be called, it's only used as a placeholder. */
|
||||
|
||||
@@ -12,7 +12,7 @@ INTERNAL_LIBLAME = 0
|
||||
INTERNAL_LIBFAAC = 0
|
||||
INTERNAL_LIBSPEEX = 0
|
||||
INTERNAL_LIBTHEORA = 0
|
||||
INTERNAL_LIBOPUS = 0
|
||||
INTERNAL_LIBOPUS = 0
|
||||
INTERNAL_LIBVORBIS = 0
|
||||
INTERNAL_WEBP = 0
|
||||
INTERNAL_ZLIB = 0
|
||||
|
||||
@@ -3,7 +3,7 @@ LIBAVFORMAT_SOURCE :=
|
||||
LIBAVUTIL_SOURCE :=
|
||||
DEPS_SOURCE :=
|
||||
DEFINES := -DHAVE_SWRESAMPLE
|
||||
LIBRETRO_SOURCE :=
|
||||
LIBRETRO_SOURCE :=
|
||||
GL_SOURCE :=
|
||||
|
||||
CPUOPTS :=
|
||||
|
||||
@@ -368,7 +368,7 @@ endif
|
||||
ifeq ($(HAVE_NVENC),1)
|
||||
DEFINES += -DCONFIG_NVENC_ENCODER=1 \
|
||||
-DCONFIG_NVENC_H264_ENCODER=1 \
|
||||
-DCONFIG_NVENC_HEVC_ENCODER=1
|
||||
-DCONFIG_NVENC_HEVC_ENCODER=1
|
||||
else
|
||||
DEFINES += -DCONFIG_NVENC_ENCODER=0 \
|
||||
-DCONFIG_NVENC_H264_ENCODER=0 \
|
||||
@@ -424,7 +424,7 @@ endif
|
||||
ifeq ($(HAVE_ZLIB),1)
|
||||
DEFINES += -DCONFIG_ZLIB=1
|
||||
else
|
||||
DEFINES += -DCONFIG_ZLIB=0
|
||||
DEFINES += -DCONFIG_ZLIB=0
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBDCADEC),1)
|
||||
@@ -1205,7 +1205,7 @@ DEFINES += \
|
||||
-DCONFIG_LIBZVBI_TELETEXT_DECODER=0 \
|
||||
-DCONFIG_BINTEXT_DECODER=1 \
|
||||
-DCONFIG_XBIN_DECODER=1 \
|
||||
-DCONFIG_IDF_DECODER=1
|
||||
-DCONFIG_IDF_DECODER=1
|
||||
|
||||
ifeq ($(HAVE_ZLIB),1)
|
||||
DEFINES += -DCONFIG_ZLIB_DECODER=1
|
||||
@@ -1644,7 +1644,7 @@ ifeq ($(INTERNAL_LIBAVUTIL),1)
|
||||
AVCODEC_BLACKLIST += $(AVCODEC_DIR)/file_open.c
|
||||
endif
|
||||
|
||||
#Codec HW Acceleration flags - all disabled for now - not sure if
|
||||
#Codec HW Acceleration flags - all disabled for now - not sure if
|
||||
# libretro will ever support this
|
||||
|
||||
ifeq ($(HAVE_MMAL),1)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
gong.so: gong.c
|
||||
gcc \
|
||||
-std=c89 \
|
||||
-pedantic \
|
||||
-Wall \
|
||||
-Wno-unused-variable \
|
||||
-g \
|
||||
gong.c \
|
||||
-I../../libretro-common/include/ \
|
||||
-shared \
|
||||
-fPIC \
|
||||
-Wl,--no-undefined \
|
||||
-lm \
|
||||
-o gong.so
|
||||
|
||||
clean:
|
||||
rm -f gong.so
|
||||
+414
-170
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2018 - Brad Parker
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* 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-
|
||||
@@ -22,9 +22,11 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_math.h>
|
||||
#include <retro_inline.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include "internal_cores.h"
|
||||
@@ -35,7 +37,8 @@
|
||||
|
||||
#define WIDTH 356
|
||||
#define HEIGHT 200
|
||||
#define FPS (60000.0f / 1000.0f)
|
||||
#define MAX_PLAYERS 2
|
||||
#define STATE_SIZE 4096 /* can be anything as long as it's large enough to hold everything */
|
||||
|
||||
static retro_log_printf_t GONG_CORE_PREFIX(log_cb);
|
||||
static retro_video_refresh_t GONG_CORE_PREFIX(video_cb);
|
||||
@@ -47,21 +50,6 @@ static retro_environment_t GONG_CORE_PREFIX(environ_cb);
|
||||
|
||||
static const char *GONG_CORE_PREFIX(valid_extensions) = "gong";
|
||||
|
||||
static float player1_py = 0.0f;
|
||||
static float player1_dpy = 0.0f;
|
||||
static float player2_py = 0.0f;
|
||||
static float player2_dpy = 0.0f;
|
||||
static float player2_speed = 0.0f;
|
||||
static float ball_px = 0.0f;
|
||||
static float ball_py = 0.0f;
|
||||
static float ball_dpx = 0.0f;
|
||||
static float ball_dpy = 0.0f;
|
||||
static float ball_speed = 0.0f;
|
||||
static bool is_initialized = 0;
|
||||
static unsigned player1_score = 0;
|
||||
static unsigned player2_score = 0;
|
||||
static float current_play_points = 0.0f;
|
||||
|
||||
static unsigned char *video_buf = NULL;
|
||||
|
||||
enum
|
||||
@@ -72,19 +60,56 @@ enum
|
||||
B_COUNT /* This should always be in the bottom */
|
||||
};
|
||||
|
||||
/* any changes here must be handled in serialization code too */
|
||||
typedef struct
|
||||
{
|
||||
union { float f; unsigned u; } py;
|
||||
union { float f; unsigned u; } dpy;
|
||||
} Player;
|
||||
|
||||
/* any changes here must be handled in serialization code too */
|
||||
typedef struct
|
||||
{
|
||||
int half_transition_count;
|
||||
bool ended_down;
|
||||
} Game_Button_State;
|
||||
|
||||
/* any changes here must be handled in serialization code too */
|
||||
typedef struct
|
||||
{
|
||||
Game_Button_State buttons[B_COUNT];
|
||||
float last_dt;
|
||||
float last_dt; /* not in savestate */
|
||||
} Game_Input;
|
||||
|
||||
static Game_Input g_input = {0};
|
||||
typedef struct
|
||||
{
|
||||
uint16_t input;
|
||||
uint16_t not_input;
|
||||
uint16_t realinput;
|
||||
int16_t analogYLeft;
|
||||
int16_t analogYRight;
|
||||
} retro_inputs;
|
||||
|
||||
/* any changes here must be handled in serialization code too */
|
||||
typedef struct
|
||||
{
|
||||
unsigned version;
|
||||
unsigned player1_score;
|
||||
unsigned player2_score;
|
||||
union { float f; unsigned u; } player2_speed;
|
||||
union { float f; unsigned u; } ball_px;
|
||||
union { float f; unsigned u; } ball_py;
|
||||
union { float f; unsigned u; } ball_dpx;
|
||||
union { float f; unsigned u; } ball_dpy;
|
||||
union { float f; unsigned u; } ball_speed;
|
||||
union { float f; unsigned u; } current_play_points;
|
||||
float refresh; /* not in savestate */
|
||||
bool is_initialized;
|
||||
bool player2_human;
|
||||
uint16_t previnput[MAX_PLAYERS];
|
||||
Game_Input g_input[MAX_PLAYERS];
|
||||
Player player[MAX_PLAYERS];
|
||||
} State;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -95,17 +120,23 @@ typedef struct
|
||||
void *memory;
|
||||
} Game_Offscreen_Buffer;
|
||||
|
||||
static State *g_state = NULL;
|
||||
static Game_Offscreen_Buffer game_buffer = {0};
|
||||
|
||||
static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer);
|
||||
|
||||
static const struct retro_controller_description pads[] = {
|
||||
static const struct retro_controller_description pads1[] = {
|
||||
{ "Joypad", RETRO_DEVICE_JOYPAD },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
static const struct retro_controller_description pads2[] = {
|
||||
{ "Joypad", RETRO_DEVICE_JOYPAD },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
static const struct retro_controller_info ports[] = {
|
||||
{ pads, 1 },
|
||||
{ pads1, 1 },
|
||||
{ pads2, 1 },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@@ -118,10 +149,206 @@ struct retro_input_descriptor desc[] = {
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static INLINE bool pressed(Game_Button_State state)
|
||||
static void check_variables(void)
|
||||
{
|
||||
return state.half_transition_count > 1 ||
|
||||
(state.half_transition_count == 1 && state.ended_down);
|
||||
struct retro_variable var = {0};
|
||||
|
||||
var.key = "gong_refresh";
|
||||
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
int i;
|
||||
g_state->refresh = atoi(var.value);
|
||||
|
||||
for (i = 0; i < sizeof(g_state->g_input) / sizeof(g_state->g_input[0]); i++)
|
||||
g_state->g_input[i].last_dt = 1.0f / g_state->refresh;
|
||||
}
|
||||
|
||||
var.key = "gong_player2";
|
||||
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
if (!strncmp(var.value, "CPU", 3))
|
||||
g_state->player2_human = false;
|
||||
else if (!strncmp(var.value, "Human", 5))
|
||||
g_state->player2_human = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void save_state(void *data, size_t size)
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
unsigned char *buf = (unsigned char*)data;
|
||||
unsigned version = swap_if_little32(g_state->version);
|
||||
unsigned player1_score = swap_if_little32(g_state->player1_score);
|
||||
unsigned player2_score = swap_if_little32(g_state->player2_score);
|
||||
unsigned player2_speed = swap_if_little32(g_state->player2_speed.u);
|
||||
unsigned ball_px = swap_if_little32(g_state->ball_px.u);
|
||||
unsigned ball_py = swap_if_little32(g_state->ball_py.u);
|
||||
unsigned ball_dpx = swap_if_little32(g_state->ball_dpx.u);
|
||||
unsigned ball_dpy = swap_if_little32(g_state->ball_dpy.u);
|
||||
unsigned ball_speed = swap_if_little32(g_state->ball_speed.u);
|
||||
unsigned current_play_points = swap_if_little32(g_state->current_play_points.u);
|
||||
unsigned is_initialized = g_state->is_initialized;
|
||||
unsigned player2_human = g_state->player2_human;
|
||||
|
||||
(void)size;
|
||||
|
||||
memcpy(buf, &version, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &player1_score, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &player2_score, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &player2_speed, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &ball_px, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &ball_py, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &ball_dpx, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &ball_dpy, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &ball_speed, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, ¤t_play_points, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &is_initialized, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
memcpy(buf, &player2_human, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
/* previnput */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
uint16_t previnput = swap_if_little16(g_state->previnput[i]);
|
||||
memcpy(buf, &previnput, sizeof(uint16_t));
|
||||
buf += sizeof(uint16_t);
|
||||
}
|
||||
|
||||
/* g_input */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
for (j = 0; j < B_COUNT; j++)
|
||||
{
|
||||
int half_transition_count = swap_if_little32(g_state->g_input[i].buttons[j].half_transition_count);
|
||||
unsigned ended_down = g_state->g_input[i].buttons[j].ended_down;
|
||||
|
||||
memcpy(buf, &half_transition_count, sizeof(int));
|
||||
buf += sizeof(int);
|
||||
|
||||
memcpy(buf, &ended_down, sizeof(unsigned));
|
||||
buf += sizeof(unsigned);
|
||||
}
|
||||
}
|
||||
|
||||
/* player */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
unsigned py = swap_if_little32((unsigned)g_state->player[i].py.u);
|
||||
unsigned dpy = swap_if_little32((unsigned)g_state->player[i].dpy.u);
|
||||
|
||||
memcpy(buf, &py, sizeof(unsigned));
|
||||
buf += sizeof(uint16_t);
|
||||
}
|
||||
}
|
||||
|
||||
static void load_state(const void *data, size_t size)
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
const unsigned char *buf = (const unsigned char*)data;
|
||||
|
||||
(void)size;
|
||||
|
||||
memset(g_state, 0, sizeof(*g_state));
|
||||
|
||||
g_state->version = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->player1_score = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->player2_score = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->player2_speed.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->ball_px.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->ball_py.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->ball_dpx.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->ball_dpy.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->ball_speed.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->current_play_points.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->is_initialized = (bool)swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->player2_human = (bool)swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
/* previnput */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
uint16_t previnput = swap_if_little16(*(uint16_t*)buf);
|
||||
g_state->previnput[i] = previnput;
|
||||
buf += sizeof(uint16_t);
|
||||
}
|
||||
|
||||
/* g_input */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
for (j = 0; j < B_COUNT; j++)
|
||||
{
|
||||
int half_transition_count;
|
||||
bool ended_down;
|
||||
|
||||
half_transition_count = (int)swap_if_little32(*(unsigned*)buf);
|
||||
|
||||
g_state->g_input[i].buttons[j].half_transition_count = half_transition_count;
|
||||
buf += sizeof(int);
|
||||
|
||||
ended_down = (bool)swap_if_little32(*(unsigned*)buf);
|
||||
|
||||
g_state->g_input[i].buttons[j].ended_down = ended_down;
|
||||
buf += sizeof(unsigned);
|
||||
}
|
||||
}
|
||||
|
||||
/* player */
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
g_state->player[i].py.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
|
||||
g_state->player[i].dpy.u = swap_if_little32(*(unsigned*)buf);
|
||||
buf += sizeof(unsigned);
|
||||
}
|
||||
|
||||
check_variables();
|
||||
}
|
||||
|
||||
static INLINE bool is_down(Game_Button_State state)
|
||||
@@ -145,7 +372,7 @@ void GONG_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *inf
|
||||
info->geometry.max_width = WIDTH;
|
||||
info->geometry.max_height = HEIGHT;
|
||||
info->geometry.aspect_ratio = 16.0f / 9.0f;
|
||||
info->timing.fps = FPS;
|
||||
info->timing.fps = g_state->refresh;
|
||||
info->timing.sample_rate = 44100.0;
|
||||
}
|
||||
|
||||
@@ -153,19 +380,19 @@ void GONG_CORE_PREFIX(retro_init)(void)
|
||||
{
|
||||
struct retro_log_callback log;
|
||||
|
||||
g_state = (State*)calloc(1, sizeof(*g_state));
|
||||
|
||||
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log))
|
||||
GONG_CORE_PREFIX(log_cb) = log.log;
|
||||
else
|
||||
GONG_CORE_PREFIX(log_cb) = NULL;
|
||||
|
||||
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned));
|
||||
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned char));
|
||||
|
||||
game_buffer.width = WIDTH;
|
||||
game_buffer.width = WIDTH;
|
||||
game_buffer.height = HEIGHT;
|
||||
game_buffer.pitch = WIDTH * sizeof(unsigned);
|
||||
game_buffer.pitch = WIDTH * sizeof(unsigned);
|
||||
game_buffer.memory = video_buf;
|
||||
|
||||
g_input.last_dt = 1.0f / FPS;
|
||||
}
|
||||
|
||||
void GONG_CORE_PREFIX(retro_deinit)(void)
|
||||
@@ -175,6 +402,9 @@ void GONG_CORE_PREFIX(retro_deinit)(void)
|
||||
|
||||
video_buf = NULL;
|
||||
game_buffer.memory = NULL;
|
||||
|
||||
if (g_state)
|
||||
free(g_state);
|
||||
}
|
||||
|
||||
void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
|
||||
@@ -182,6 +412,8 @@ void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
|
||||
bool no_content = true;
|
||||
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "gong_player2", "Player 2; CPU|Human" },
|
||||
{ "gong_refresh", "Video Refresh Rate (restart); 60|70|72|75|100|119|120|140|144" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
@@ -223,33 +455,31 @@ void GONG_CORE_PREFIX(retro_set_controller_port_device)(unsigned a, unsigned b)
|
||||
|
||||
void GONG_CORE_PREFIX(retro_reset)(void)
|
||||
{
|
||||
player1_py = 0.0f;
|
||||
player1_dpy = 0.0f;
|
||||
player2_py = 0.0f;
|
||||
player2_dpy = 0.0f;
|
||||
player2_speed = 0.0f;
|
||||
player1_score = 0;
|
||||
player2_score = 0;
|
||||
is_initialized = 0;
|
||||
memset(g_state, 0, sizeof(*g_state));
|
||||
check_variables();
|
||||
}
|
||||
|
||||
size_t GONG_CORE_PREFIX(retro_serialize_size)(void)
|
||||
{
|
||||
return 0;
|
||||
return STATE_SIZE;
|
||||
}
|
||||
|
||||
bool GONG_CORE_PREFIX(retro_serialize)(void *data, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
(void)size;
|
||||
return false;
|
||||
if (size != STATE_SIZE)
|
||||
return false;
|
||||
|
||||
save_state(data, size);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GONG_CORE_PREFIX(retro_unserialize)(const void *data, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
(void)size;
|
||||
return false;
|
||||
if (size != STATE_SIZE)
|
||||
return false;
|
||||
|
||||
load_state(data, size);
|
||||
return true;
|
||||
}
|
||||
|
||||
void GONG_CORE_PREFIX(retro_cheat_reset)(void)
|
||||
@@ -264,6 +494,8 @@ bool GONG_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
|
||||
{
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
|
||||
|
||||
check_variables();
|
||||
|
||||
if (!GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
|
||||
{
|
||||
if (GONG_CORE_PREFIX(log_cb))
|
||||
@@ -317,59 +549,62 @@ static bool is_key_up_or_down(int16_t input, int16_t not_input, int key)
|
||||
|
||||
void GONG_CORE_PREFIX(retro_run)(void)
|
||||
{
|
||||
uint16_t input = 0;
|
||||
uint16_t not_input = 0;
|
||||
static uint16_t previnput = 0;
|
||||
uint16_t realinput = 0;
|
||||
int i = 0;
|
||||
int16_t analogYLeft1 = 0;
|
||||
int16_t analogYRight1 = 0;
|
||||
int port = 0;
|
||||
bool updated = false;
|
||||
retro_inputs inputs[MAX_PLAYERS] = {{0}};
|
||||
|
||||
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated)
|
||||
check_variables();
|
||||
|
||||
GONG_CORE_PREFIX(input_poll_cb)();
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
for (port = 0; port < MAX_PLAYERS; port++)
|
||||
{
|
||||
if (GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, i))
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
realinput |= 1 << i;
|
||||
if (GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_JOYPAD, 0, i))
|
||||
{
|
||||
inputs[port].realinput |= 1 << i;
|
||||
}
|
||||
}
|
||||
|
||||
inputs[port].analogYLeft = GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
|
||||
inputs[port].analogYRight = GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
|
||||
|
||||
if (inputs[port].analogYLeft > 0)
|
||||
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
else if (inputs[port].analogYRight > 0)
|
||||
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
|
||||
if (inputs[port].analogYLeft < 0)
|
||||
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
else if (inputs[port].analogYRight < 0)
|
||||
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
|
||||
inputs[port].input = inputs[port].realinput & ~g_state->previnput[port];
|
||||
inputs[port].not_input = g_state->previnput[port] & ~inputs[port].realinput;
|
||||
|
||||
if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_MOVE_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP));
|
||||
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_MOVE_DOWN], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
|
||||
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_MOVE_DOWN], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
|
||||
|
||||
if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_A))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A));
|
||||
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_B))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B));
|
||||
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_X))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X));
|
||||
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_Y))
|
||||
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y));
|
||||
|
||||
g_state->previnput[port] = inputs[port].realinput;
|
||||
}
|
||||
|
||||
analogYLeft1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
|
||||
analogYRight1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
|
||||
|
||||
if (analogYLeft1 > 0)
|
||||
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
else if (analogYRight1 > 0)
|
||||
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
|
||||
if (analogYLeft1 < 0)
|
||||
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
else if (analogYRight1 < 0)
|
||||
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
|
||||
input = realinput & ~previnput;
|
||||
not_input = previnput & ~realinput;
|
||||
|
||||
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
process_joypad(&g_input.buttons[B_MOVE_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP));
|
||||
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
|
||||
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
|
||||
|
||||
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_A))
|
||||
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A));
|
||||
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_B))
|
||||
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B));
|
||||
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_X))
|
||||
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X));
|
||||
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_Y))
|
||||
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y));
|
||||
|
||||
previnput = realinput;
|
||||
|
||||
game_update_and_render(&g_input, &game_buffer);
|
||||
game_update_and_render(g_state->g_input, &game_buffer);
|
||||
|
||||
GONG_CORE_PREFIX(video_cb)(video_buf, WIDTH, HEIGHT, WIDTH * sizeof(uint32_t));
|
||||
}
|
||||
@@ -460,7 +695,7 @@ static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned
|
||||
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 2:
|
||||
{
|
||||
draw_rect(buffer, color, at_x - 2.f, y - 2.f, .5f, 2.f);
|
||||
@@ -470,7 +705,7 @@ static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned
|
||||
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 3:
|
||||
{
|
||||
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
|
||||
@@ -550,147 +785,156 @@ static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *dra
|
||||
float playing_field_y = 48.f;
|
||||
float player_size_x = 2.5f;
|
||||
float player_size_y = 10.f;
|
||||
int i;
|
||||
|
||||
if (!is_initialized)
|
||||
if (!g_state->is_initialized)
|
||||
{
|
||||
is_initialized = 1;
|
||||
ball_px = 0;
|
||||
ball_py = 0;
|
||||
ball_dpx = initial_ball_speed;
|
||||
ball_dpy = 0;
|
||||
current_play_points = 10.f;
|
||||
player2_speed = 80.f;
|
||||
g_state->is_initialized = 1;
|
||||
g_state->ball_px.f = 0;
|
||||
g_state->ball_py.f = 0;
|
||||
g_state->ball_dpx.f = initial_ball_speed;
|
||||
g_state->ball_dpy.f = 0;
|
||||
g_state->current_play_points.f = 10.f;
|
||||
g_state->player2_speed.f = 80.f;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
{
|
||||
float speed = 80.f;
|
||||
player1_dpy = 0.f;
|
||||
|
||||
if (is_down(input->buttons[B_SPEED_UP]))
|
||||
|
||||
if (i == 1 && !g_state->player2_human)
|
||||
break;
|
||||
|
||||
g_state->player[i].dpy.f = 0.f;
|
||||
|
||||
if (is_down(input[i].buttons[B_SPEED_UP]))
|
||||
speed = 150.f;
|
||||
|
||||
if (is_down(input->buttons[B_MOVE_UP]))
|
||||
if (is_down(input[i].buttons[B_MOVE_UP]))
|
||||
{
|
||||
if (player1_py < playing_field_y - player_size_y)
|
||||
if (g_state->player[i].py.f < playing_field_y - player_size_y)
|
||||
{
|
||||
player1_dpy = speed;
|
||||
g_state->player[i].dpy.f = speed;
|
||||
}
|
||||
|
||||
if (player1_py < -playing_field_y + player_size_y)
|
||||
if (g_state->player[i].py.f < -playing_field_y + player_size_y)
|
||||
{
|
||||
player1_py = -playing_field_y + player_size_y;
|
||||
player1_dpy = 0.f;
|
||||
g_state->player[i].py.f = -playing_field_y + player_size_y;
|
||||
g_state->player[i].dpy.f = 0.f;
|
||||
}
|
||||
}
|
||||
if (is_down(input->buttons[B_MOVE_DOWN]))
|
||||
if (is_down(input[i].buttons[B_MOVE_DOWN]))
|
||||
{
|
||||
if (player1_py > -playing_field_y + player_size_y)
|
||||
if (g_state->player[i].py.f > -playing_field_y + player_size_y)
|
||||
{
|
||||
player1_dpy = -speed;
|
||||
g_state->player[i].dpy.f = -speed;
|
||||
}
|
||||
|
||||
if (player1_py < -playing_field_y + player_size_y)
|
||||
if (g_state->player[i].py.f < -playing_field_y + player_size_y)
|
||||
{
|
||||
player1_py = -playing_field_y + player_size_y;
|
||||
player1_dpy = 0.f;
|
||||
g_state->player[i].py.f = -playing_field_y + player_size_y;
|
||||
g_state->player[i].dpy.f = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
player1_py += player1_dpy * input->last_dt;
|
||||
g_state->player[i].py.f += g_state->player[i].dpy.f * input->last_dt;
|
||||
}
|
||||
|
||||
if (!g_state->player2_human)
|
||||
{
|
||||
player2_dpy = (ball_py - player2_py) * 100.f;
|
||||
player2_dpy = MIN(player2_dpy, player2_speed);
|
||||
player2_dpy = MAX(player2_dpy, -player2_speed);
|
||||
player2_py += player2_dpy * input->last_dt;
|
||||
g_state->player[1].dpy.f = (g_state->ball_py.f - g_state->player[1].py.f) * 100.f;
|
||||
g_state->player[1].dpy.f = MIN(g_state->player[1].dpy.f, g_state->player2_speed.f);
|
||||
g_state->player[1].dpy.f = MAX(g_state->player[1].dpy.f, -g_state->player2_speed.f);
|
||||
g_state->player[1].py.f += g_state->player[1].dpy.f * input->last_dt;
|
||||
|
||||
if (player2_py < -playing_field_y + player_size_y)
|
||||
if (g_state->player[1].py.f < -playing_field_y + player_size_y)
|
||||
{
|
||||
player2_py = -playing_field_y + player_size_y;
|
||||
player2_dpy = 0.f;
|
||||
g_state->player[1].py.f = -playing_field_y + player_size_y;
|
||||
g_state->player[1].dpy.f = 0.f;
|
||||
}
|
||||
|
||||
if (player2_py > playing_field_y - player_size_y)
|
||||
if (g_state->player[1].py.f > playing_field_y - player_size_y)
|
||||
{
|
||||
player2_py = playing_field_y - player_size_y;
|
||||
player2_dpy = 0.f;
|
||||
g_state->player[1].py.f = playing_field_y - player_size_y;
|
||||
g_state->player[1].dpy.f = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
ball_px += ball_dpx * input->last_dt;
|
||||
g_state->ball_px.f += g_state->ball_dpx.f * input->last_dt;
|
||||
|
||||
if (ball_dpx > 0)
|
||||
if (g_state->ball_dpx.f > 0)
|
||||
{
|
||||
ball_dpx += 10.f * input->last_dt;
|
||||
g_state->ball_dpx.f += 10.f * input->last_dt;
|
||||
}
|
||||
else
|
||||
{
|
||||
ball_dpx -= 10.f * input->last_dt;
|
||||
g_state->ball_dpx.f -= 10.f * input->last_dt;
|
||||
}
|
||||
|
||||
ball_py += ball_dpy * input->last_dt;
|
||||
g_state->ball_py.f += g_state->ball_dpy.f * input->last_dt;
|
||||
|
||||
if (ball_py > playing_field_y - 1.f)
|
||||
if (g_state->ball_py.f > playing_field_y - 1.f)
|
||||
{
|
||||
ball_py = playing_field_y - 1.f;
|
||||
ball_dpy *= -1.f;
|
||||
g_state->ball_py.f = playing_field_y - 1.f;
|
||||
g_state->ball_dpy.f *= -1.f;
|
||||
}
|
||||
else if (ball_py < -playing_field_y + 1)
|
||||
else if (g_state->ball_py.f < -playing_field_y + 1)
|
||||
{
|
||||
ball_py = -playing_field_y + 1.f;
|
||||
ball_dpy *= -1;
|
||||
g_state->ball_py.f = -playing_field_y + 1.f;
|
||||
g_state->ball_dpy.f *= -1;
|
||||
}
|
||||
|
||||
if (ball_px > 80.f - 2.5f - 1.f) /* @Hardcoded */
|
||||
if (g_state->ball_px.f > 80.f - 2.5f - 1.f) /* @Hardcoded */
|
||||
{
|
||||
if ((ball_py >= (player2_py - 10.f)) && (ball_py <= (player2_py + 10.f)))
|
||||
if ((g_state->ball_py.f >= (g_state->player[1].py.f - 10.f)) && (g_state->ball_py.f <= (g_state->player[1].py.f + 10.f)))
|
||||
{
|
||||
ball_dpx *= -1.f;
|
||||
ball_px = 80.f - 2.5f - 1.f; /* @Hardcoded */
|
||||
ball_dpy = (ball_py - player2_py) + player2_dpy;
|
||||
++current_play_points;
|
||||
g_state->ball_dpx.f *= -1.f;
|
||||
g_state->ball_px.f = 80.f - 2.5f - 1.f; /* @Hardcoded */
|
||||
g_state->ball_dpy.f = (g_state->ball_py.f - g_state->player[1].py.f) + g_state->player[1].dpy.f;
|
||||
++g_state->current_play_points.f;
|
||||
}
|
||||
else if (ball_px >= playing_field_x - 1)
|
||||
else if (g_state->ball_px.f >= playing_field_x - 1)
|
||||
{
|
||||
ball_px = 0;
|
||||
ball_py = 0;
|
||||
ball_dpy = 0;
|
||||
ball_dpx = -initial_ball_speed;
|
||||
player2_score += (unsigned)current_play_points;
|
||||
current_play_points = 10.f;
|
||||
g_state->ball_px.f = 0;
|
||||
g_state->ball_py.f = 0;
|
||||
g_state->ball_dpy.f = 0;
|
||||
g_state->ball_dpx.f = -initial_ball_speed;
|
||||
g_state->player2_score += (unsigned)g_state->current_play_points.f;
|
||||
g_state->current_play_points.f = 10.f;
|
||||
}
|
||||
}
|
||||
else if (ball_px < -80 + 2.5f + 1.f) /* @Hardcoded */
|
||||
else if (g_state->ball_px.f < -80 + 2.5f + 1.f) /* @Hardcoded */
|
||||
{
|
||||
if ((ball_py >= (player1_py - 10.f)) && (ball_py <= (player1_py + 10.f)))
|
||||
if ((g_state->ball_py.f >= (g_state->player[0].py.f - 10.f)) && (g_state->ball_py.f <= (g_state->player[0].py.f + 10.f)))
|
||||
{
|
||||
ball_dpx *= -1.f;
|
||||
ball_px = -80 + 2.5f + 1.f; /* @Hardcoded */
|
||||
ball_dpy = (ball_py - player1_py) + player1_dpy;
|
||||
++current_play_points;
|
||||
g_state->ball_dpx.f *= -1.f;
|
||||
g_state->ball_px.f = -80 + 2.5f + 1.f; /* @Hardcoded */
|
||||
g_state->ball_dpy.f = (g_state->ball_py.f - g_state->player[0].py.f) + g_state->player[0].dpy.f;
|
||||
++g_state->current_play_points.f;
|
||||
}
|
||||
else if (ball_px <= -playing_field_x + 1)
|
||||
else if (g_state->ball_px.f <= -playing_field_x + 1)
|
||||
{
|
||||
ball_px = 0;
|
||||
ball_py = 0;
|
||||
ball_dpy = 0;
|
||||
ball_dpx = initial_ball_speed;
|
||||
player1_score += (unsigned)current_play_points;
|
||||
current_play_points = 10.f;
|
||||
player2_speed += current_play_points * 0.01f;
|
||||
g_state->ball_px.f = 0;
|
||||
g_state->ball_py.f = 0;
|
||||
g_state->ball_dpy.f = 0;
|
||||
g_state->ball_dpx.f = initial_ball_speed;
|
||||
g_state->player1_score += (unsigned)g_state->current_play_points.f;
|
||||
g_state->current_play_points.f = 10.f;
|
||||
|
||||
if (!g_state->player2_human)
|
||||
g_state->player2_speed.f += g_state->current_play_points.f * 0.01f;
|
||||
}
|
||||
}
|
||||
|
||||
clear(draw_buffer, 0x021077);
|
||||
draw_rect(draw_buffer, 0x000530, 0.f, 0.f, playing_field_x, playing_field_y);
|
||||
|
||||
draw_rect(draw_buffer, 0x00ffff, -80.f, player1_py, player_size_x, player_size_y);
|
||||
draw_rect(draw_buffer, 0x00ffff, 80.f, player2_py, player_size_x, player_size_y);
|
||||
draw_rect(draw_buffer, 0x00ffff, -80.f, g_state->player[0].py.f, player_size_x, player_size_y);
|
||||
draw_rect(draw_buffer, 0x00ffff, 80.f, g_state->player[1].py.f, player_size_x, player_size_y);
|
||||
|
||||
draw_rect(draw_buffer, 0xffff00, ball_px, ball_py, 1.f, 1.f);
|
||||
draw_rect(draw_buffer, 0xffff00, g_state->ball_px.f, g_state->ball_py.f, 1.f, 1.f);
|
||||
|
||||
draw_number(draw_buffer, (unsigned)current_play_points, 0xaaaaaa, 0.f, 38.f);
|
||||
draw_number(draw_buffer, player1_score, 0xff6611, 20.f, 38.f);
|
||||
draw_number(draw_buffer, player2_score, 0xff6611, -20.f, 38.f);
|
||||
draw_number(draw_buffer, (unsigned)g_state->current_play_points.f, 0xaaaaaa, 0.f, 38.f);
|
||||
draw_number(draw_buffer, g_state->player1_score, 0xff6611, 20.f, 38.f);
|
||||
draw_number(draw_buffer, g_state->player2_score, 0xff6611, -20.f, 38.f);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void IMAGE_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
|
||||
IMAGE_CORE_PREFIX(environ_cb) = cb;
|
||||
|
||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
||||
|
||||
|
||||
#ifndef RARCH_INTERNAL
|
||||
/* I don't trust filestream_vfs_init to work inside rarch */
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VFS_INTERFACE, &vfs_iface_info))
|
||||
@@ -254,7 +254,7 @@ static bool imageviewer_load(const char *path, int image_index)
|
||||
buf = malloc(len);
|
||||
filestream_read(f, buf, len);
|
||||
filestream_close(f);
|
||||
|
||||
|
||||
image_buffer = (uint32_t*)stbi_load_from_memory(
|
||||
buf, len,
|
||||
&image_width, &image_height,
|
||||
|
||||
@@ -21,5 +21,4 @@ endif
|
||||
LOCAL_SRC_FILES += ../libretro-test.c
|
||||
LOCAL_CFLAGS += -O3 -std=gnu99 -ffast-math -funroll-loops
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -33,7 +33,7 @@ TARGET_NAME := video_processor
|
||||
LIBV4L2 = -lv4l2
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
CFLAGS += -DHAVE_UDEV
|
||||
CFLAGS += -DHAVE_UDEV
|
||||
LIBUDEV = -ludev
|
||||
CFLAGS += -DHAVE_ALSA
|
||||
LIBASOUND = -lasound
|
||||
|
||||
@@ -3,7 +3,6 @@ Libretro core for V4L2 capture devices
|
||||
|
||||
The basic idea is this -- plug your legacy console into a capture device and use RetroArch to upscale it and apply shaders to taste.
|
||||
|
||||
|
||||
## Raspberry Pi specific config
|
||||
|
||||
Add to /boot/config.txt:
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <libretro.h>
|
||||
#include <clamping.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
@@ -86,7 +87,7 @@ static struct v4l2_capbuf v4l2_capbuf[VIDEO_BUFFERS_MAX];
|
||||
|
||||
static float dummy_pos=0;
|
||||
|
||||
static int video_half_feed_rate=0; // for interlaced captures
|
||||
static int video_half_feed_rate=0; /* for interlaced captures */
|
||||
static uint32_t video_cap_width;
|
||||
static uint32_t video_cap_height;
|
||||
static uint32_t video_out_height;
|
||||
@@ -102,7 +103,7 @@ static uint32_t *frame_prev2;
|
||||
static uint32_t *frame_prev3;
|
||||
static uint32_t *frame_curr;
|
||||
|
||||
// Frametime debug messages
|
||||
/* Frametime debug messages */
|
||||
struct timeval ft_prevtime = { 0 }, ft_prevtime2 = { 0 };
|
||||
char *ft_info = NULL, *ft_info2 = NULL;
|
||||
double ft_favg, ft_ftime;
|
||||
@@ -282,17 +283,17 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_set_environment)(retro_environment_t
|
||||
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb) = cb;
|
||||
|
||||
// Allows retroarch to seed the previous values
|
||||
/* Allows retroarch to seed the previous values */
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_SET_VARIABLES, envvars);
|
||||
|
||||
// Enumerate all real devices
|
||||
/* Enumerate all real devices */
|
||||
enumerate_video_devices(video_devices, sizeof(video_devices));
|
||||
enumerate_audio_devices(audio_devices, sizeof(audio_devices));
|
||||
|
||||
// Add the dummy device
|
||||
/* Add the dummy device */
|
||||
appendstr(video_devices, "|dummy", ENVVAR_BUFLEN);
|
||||
|
||||
// Registers available devices list (still respects saved device if it exists)
|
||||
/* Registers available devices list (still respects saved device if it exists) */
|
||||
envvars[0].key = "videoproc_videodev";
|
||||
envvars[0].value = video_devices;
|
||||
envvars[1].key = "videoproc_audiodev";
|
||||
@@ -503,7 +504,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
|
||||
if (strcmp(videodev.value, "dummy") == 0) {
|
||||
info->geometry.aspect_ratio = 4.0/3.0;
|
||||
info->geometry.base_width = info->geometry.max_width = video_cap_width;
|
||||
info->geometry.base_height = video_cap_height; //out?
|
||||
info->geometry.base_height = video_cap_height; /* out? */
|
||||
info->geometry.max_height = video_out_height;
|
||||
info->timing.fps = 60;
|
||||
info->timing.sample_rate = AUDIO_SAMPLE_RATE;
|
||||
@@ -517,16 +518,17 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
|
||||
|
||||
info->geometry.base_width = info->geometry.max_width = video_format.fmt.pix.width;
|
||||
info->geometry.base_height = video_format.fmt.pix.height;
|
||||
//TODO Only double if frames are NOT fields (interlaced, full resolution)
|
||||
/* TODO Only double if frames are NOT fields (interlaced, full resolution) */
|
||||
info->geometry.max_height = video_format.fmt.pix.height * 2;
|
||||
//TODO Only double if frames ARE fields (progressive or deinterlaced, full framerate)
|
||||
// *2 for fields
|
||||
/* TODO Only double if frames ARE fields (progressive or deinterlaced, full framerate)
|
||||
* *2 for fields
|
||||
*/
|
||||
info->timing.fps = ((double)(video_standard.frameperiod.denominator*2)) /
|
||||
(double)video_standard.frameperiod.numerator;
|
||||
info->timing.sample_rate = AUDIO_SAMPLE_RATE;
|
||||
|
||||
if (error == 0) {
|
||||
//TODO Allow for fixed 4:3 and 16:9 modes
|
||||
/* TODO Allow for fixed 4:3 and 16:9 modes */
|
||||
info->geometry.aspect_ratio = (double)info->geometry.base_width / (double)info->geometry.max_height /\
|
||||
((double)cc.pixelaspect.numerator / (double)cc.pixelaspect.denominator);
|
||||
}
|
||||
@@ -535,7 +537,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
|
||||
printf("Aspect ratio: %f\n",info->geometry.aspect_ratio);
|
||||
printf("Buffer Resolution %ux%u %f fps\n", info->geometry.base_width,
|
||||
info->geometry.base_height, info->timing.fps);
|
||||
printf("Buffer Max Resolution %ux%u\n", info->geometry.max_width,
|
||||
printf("Buffer Max Resolution %ux%u\n", info->geometry.max_width,
|
||||
info->geometry.max_height);
|
||||
}
|
||||
|
||||
@@ -549,13 +551,13 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_reset)(void)
|
||||
open_devices();
|
||||
}
|
||||
|
||||
//TODO improve this mess and make it generic enough for use with dummy mode
|
||||
/* TODO improve this mess and make it generic enough for use with dummy mode */
|
||||
void v4l2_frame_times(struct v4l2_buffer buf) {
|
||||
if (strcmp("Off", video_frame_times) == 0)
|
||||
return;
|
||||
return;
|
||||
|
||||
if (ft_info == NULL)
|
||||
ft_info = calloc(5000, sizeof(char));
|
||||
ft_info = (char*)calloc(5000, sizeof(char));
|
||||
|
||||
if ( (buf.timestamp.tv_sec - ft_prevtime.tv_sec >= 1) && \
|
||||
(buf.timestamp.tv_usec + 1000000 - ft_prevtime2.tv_usec) >= 1000000) {
|
||||
@@ -565,7 +567,7 @@ void v4l2_frame_times(struct v4l2_buffer buf) {
|
||||
printf("Average frame times: %.3fms\n", ft_favg/(1000*ft_fcount));
|
||||
printf("Fields timestampdiffs last second:\n%s\n", ft_info);
|
||||
free(ft_info);
|
||||
ft_info = calloc(5000, sizeof(char));
|
||||
ft_info = (char*)calloc(5000, sizeof(char));
|
||||
ft_fcount = 0;
|
||||
ft_favg = 0;
|
||||
ft_prevtime = buf.timestamp;
|
||||
@@ -593,7 +595,8 @@ void source_dummy(int width, int height) {
|
||||
}
|
||||
|
||||
dummy_pos += step;
|
||||
//dummy_pos = M_PI/4; step = 0; // no animation
|
||||
/* no animation */
|
||||
/* dummy_pos = M_PI/4; step = 0; */
|
||||
triangpos = (sinf(dummy_pos)+1)/2*width;
|
||||
if (video_buf.field == V4L2_FIELD_INTERLACED) {
|
||||
if (video_half_feed_rate == 0)
|
||||
@@ -609,9 +612,9 @@ void source_dummy(int width, int height) {
|
||||
src[1] = 0x10 + color*0xE0;
|
||||
src[2] = 0x10 + color*0xE0;
|
||||
|
||||
// End of a line
|
||||
/* End of a line */
|
||||
if ( ((i+1) % width) == 0 ) {
|
||||
triangpos -= 2; //offset should be half of this?
|
||||
triangpos -= 2; /* offset should be half of this? */
|
||||
triangpos_t -= 1;
|
||||
triangpos_b -= 1;
|
||||
if (video_buf.field == V4L2_FIELD_INTERLACED) {
|
||||
@@ -626,18 +629,18 @@ void source_dummy(int width, int height) {
|
||||
}
|
||||
}
|
||||
|
||||
if(video_buf.field == V4L2_FIELD_TOP)
|
||||
if(video_buf.field == V4L2_FIELD_TOP)
|
||||
video_buf.field = V4L2_FIELD_BOTTOM;
|
||||
else if (video_buf.field == V4L2_FIELD_BOTTOM)
|
||||
else if (video_buf.field == V4L2_FIELD_BOTTOM)
|
||||
video_buf.field = V4L2_FIELD_TOP;
|
||||
}
|
||||
|
||||
void source_v4l2_normal(int width, int height) {
|
||||
struct v4l2_buffer bufcp;
|
||||
|
||||
|
||||
int error;
|
||||
|
||||
// Wait until v4l2 dequees a buffer
|
||||
/* Wait until v4l2 dequees a buffer */
|
||||
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
|
||||
video_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
video_buf.memory = V4L2_MEMORY_MMAP;
|
||||
@@ -651,7 +654,7 @@ void source_v4l2_normal(int width, int height) {
|
||||
|
||||
bufcp = video_buf;
|
||||
memcpy( (uint32_t*) frame_cap, (uint8_t*) v4l2_capbuf[video_buf.index].start, video_format.fmt.pix.width * video_format.fmt.pix.height * 3);
|
||||
|
||||
|
||||
error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
|
||||
if (error != 0)
|
||||
printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
|
||||
@@ -664,11 +667,11 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
struct v4l2_format fmt;
|
||||
struct v4l2_requestbuffers reqbufs;
|
||||
enum v4l2_buf_type type;
|
||||
|
||||
|
||||
int error;
|
||||
uint32_t index;
|
||||
|
||||
// For later, saving time
|
||||
/* For later, saving time */
|
||||
memset(&fmt, 0, sizeof(fmt));
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
error = v4l2_ioctl(video_device_fd, VIDIOC_G_FMT, &fmt);
|
||||
@@ -677,7 +680,7 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
printf("VIDIOC_G_FMT failed: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
// Wait until v4l2 dequees a buffer
|
||||
/* Wait until v4l2 dequees a buffer */
|
||||
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
|
||||
video_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
video_buf.memory = V4L2_MEMORY_MMAP;
|
||||
@@ -692,7 +695,7 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
v4l2_ioctl(video_device_fd, VIDIOC_STREAMOFF, &type);
|
||||
|
||||
//Let's get the data as fast as possible!
|
||||
/* Let's get the data as fast as possible! */
|
||||
bufcp = video_buf;
|
||||
memcpy( (uint32_t*) frame_cap, (uint8_t*) v4l2_capbuf[video_buf.index].start, video_format.fmt.pix.width * video_format.fmt.pix.height * 3);
|
||||
|
||||
@@ -722,7 +725,7 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
printf("VIDIOC_REQBUFS failed: %s\n", strerror(errno));
|
||||
}
|
||||
v4l2_ncapbuf = reqbufs.count;
|
||||
//printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf);
|
||||
/* printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf); */
|
||||
|
||||
index = 0;
|
||||
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
|
||||
@@ -742,9 +745,11 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
|
||||
v4l2_ioctl(video_device_fd, VIDIOC_QBUF,& video_buf);
|
||||
|
||||
//error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
|
||||
//if (error != 0)
|
||||
// printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
|
||||
#if 0
|
||||
error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
|
||||
if (error != 0)
|
||||
printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
|
||||
#endif
|
||||
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
error = v4l2_ioctl(video_device_fd, VIDIOC_STREAMON, &type);
|
||||
@@ -758,10 +763,12 @@ void source_v4l2_alternate_hack(int width, int height) {
|
||||
|
||||
void processing_heal(uint8_t *src, int width, int height) {
|
||||
uint32_t *fp1 = frame_prev1;
|
||||
for (int i = 0; i < width * height; i+=1, src += 3, ++fp1) {
|
||||
// Tries to filter a bunch of blanked out scanline sections my capture cards spits out with this crazy hack
|
||||
// Since the blanked out scanlines are set to a black value bellow anything that can be captued, it's quite
|
||||
//easy to select the scanlines...
|
||||
int i;
|
||||
for (i = 0; i < width * height; i+=1, src += 3, ++fp1) {
|
||||
/* Tries to filter a bunch of blanked out scanline sections my capture cards spits out with this crazy hack
|
||||
* Since the blanked out scanlines are set to a black value bellow anything that can be captued, it's quite
|
||||
* easy to select the scanlines...
|
||||
*/
|
||||
if (src[0] <= 0 && src[1] <= 0 && src[2] <= 0 && i >= width && i <= width * height - width) {
|
||||
if (*(src + 0 - width*3) >= ((*fp1>> 0&0xFF)-6) && \
|
||||
*(src + 1 - width*3) >= ((*fp1>> 8&0xFF)-6) && \
|
||||
@@ -786,15 +793,16 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
|
||||
uint32_t pixacul=0;
|
||||
uint32_t *fp1 = frame_prev1, *fp2 = frame_prev2, *fp3 = frame_prev3;
|
||||
|
||||
// Helps pointing to the pixel in the adjacent row
|
||||
/* Helps pointing to the pixel in the adjacent row */
|
||||
if (field == V4L2_FIELD_TOP)
|
||||
targetrow = width;
|
||||
else
|
||||
targetrow = width*-1;
|
||||
|
||||
// Starts from the even scanline if frame contains bottom fields
|
||||
//On progressive sources, should only skip the destination lines, since all lines the source are the same fields
|
||||
//On interlaced sources, should skip both the source and the destination lines, since only half the lines in the source are the same fields (must also skip fields later)
|
||||
/* Starts from the even scanline if frame contains bottom fields
|
||||
* On progressive sources, should only skip the destination lines, since all lines the source are the same fields
|
||||
* On interlaced sources, should skip both the source and the destination lines, since only half the lines in the source are the same fields (must also skip fields later)
|
||||
*/
|
||||
if (field == V4L2_FIELD_BOTTOM) {
|
||||
dst += width;
|
||||
if (skip_lines_src == 1) {
|
||||
@@ -806,13 +814,14 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
|
||||
}
|
||||
|
||||
for (i = 0; i < width * height; i+=1, src += 1, dst += 1, ++fp1, ++fp2, ++fp3) {
|
||||
// Will fill the current destination line with current field
|
||||
//The masking is used to prserve some information set by the
|
||||
//deinterlacing process, uses the alpha channel to tell if a
|
||||
//pixel needs further processing...
|
||||
/* Will fill the current destination line with current field
|
||||
* The masking is used to prserve some information set by the
|
||||
* deinterlacing process, uses the alpha channel to tell if a
|
||||
* pixel needs further processing...
|
||||
*/
|
||||
*(dst) = (*(src) & 0x00FFFFFF) | (*dst & 0xFF000000);
|
||||
|
||||
// Crappy deinterlacing
|
||||
/* Crappy deinterlacing */
|
||||
if (i >= width && i <= (width*height-width)) {
|
||||
pixacul=((((*(dst)>> 0&0xFF) + (pixacul>> 0&0xFF))>>1<<0 |\
|
||||
((*(dst)>> 8&0xFF) + (pixacul>> 8&0xFF))>>1<<8 |\
|
||||
@@ -842,9 +851,10 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
|
||||
}
|
||||
}
|
||||
|
||||
// Skips a scanline if we reach the end of the current one
|
||||
//On progressive sources, should only skip the destination lines,
|
||||
//On interlaced sources, should skip both the source and the destination lines
|
||||
/* Skips a scanline if we reach the end of the current one
|
||||
* On progressive sources, should only skip the destination lines,
|
||||
* On interlaced sources, should skip both the source and the destination lines
|
||||
*/
|
||||
if ( ((i+1) % width) == 0 ) {
|
||||
dst += width;
|
||||
if (skip_lines_src == 1) {
|
||||
@@ -859,7 +869,8 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
|
||||
|
||||
void processing_bgr_xrgb(uint8_t *src, uint32_t *dst, int width, int height) {
|
||||
/* BGR24 to XRGB8888 conversion */
|
||||
for (int i = 0; i < width * height; i+=1, src += 3, dst += 1) {
|
||||
int i;
|
||||
for (i = 0; i < width * height; i+=1, src += 3, dst += 1) {
|
||||
*dst = 0xFF << 24 | src[2] << 16 | src[1] << 8 | src[0] << 0;
|
||||
}
|
||||
}
|
||||
@@ -880,15 +891,16 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &capturemode);
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &outputmode);
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &frametimes);
|
||||
// Video or Audio device(s) has(ve) been changed
|
||||
//TODO We may get away without reseting devices when changing output mode...
|
||||
/* Video or Audio device(s) has(ve) been changed
|
||||
* TODO We may get away without reseting devices when changing output mode...
|
||||
*/
|
||||
if ((videodev.value && (strcmp(video_device, videodev.value) != 0)) ||\
|
||||
(audiodev.value && (strcmp(audio_device, audiodev.value) != 0)) ||\
|
||||
(capturemode.value && (strcmp(video_capture_mode, capturemode.value) != 0)) ||\
|
||||
(outputmode.value && (strcmp(video_output_mode, outputmode.value) != 0))) {
|
||||
VIDEOPROC_CORE_PREFIX(retro_unload_game)();
|
||||
// This core does not cares for the retro_game_info * argument?
|
||||
VIDEOPROC_CORE_PREFIX(retro_load_game)(NULL);
|
||||
/* This core does not cares for the retro_game_info * argument? */
|
||||
VIDEOPROC_CORE_PREFIX(retro_load_game)(NULL);
|
||||
}
|
||||
|
||||
if (frametimes.value != NULL) {
|
||||
@@ -898,12 +910,13 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
|
||||
|
||||
VIDEOPROC_CORE_PREFIX(input_poll_cb)();
|
||||
|
||||
//printf("%d %d %d %s\n", video_cap_width, video_cap_height, video_buf.field, video_output_mode);
|
||||
//TODO pass frame_curr to source_* functions
|
||||
//half_feed_rate allows interlaced intput to be fed at half the calls to this function
|
||||
//where the same frame is then read by the deinterlacer twice, for each field
|
||||
/* printf("%d %d %d %s\n", video_cap_width, video_cap_height, video_buf.field, video_output_mode);
|
||||
* TODO pass frame_curr to source_* functions
|
||||
* half_feed_rate allows interlaced intput to be fed at half the calls to this function
|
||||
* where the same frame is then read by the deinterlacer twice, for each field
|
||||
*/
|
||||
if (video_half_feed_rate == 0) {
|
||||
// Capture
|
||||
/* Capture */
|
||||
if (strcmp(video_device, "dummy") == 0) {
|
||||
source_dummy(video_cap_width, video_cap_height);
|
||||
} else {
|
||||
@@ -915,31 +928,34 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (video_buf.field == V4L2_FIELD_INTERLACED)
|
||||
if (video_buf.field == V4L2_FIELD_INTERLACED)
|
||||
video_half_feed_rate = 1;
|
||||
} else {
|
||||
video_half_feed_rate = 0;
|
||||
}
|
||||
|
||||
// Converts from bgr to xrgb, deinterlacing, final copy to the outpuit buffer (frame_out)
|
||||
//Every frame except frame_cap shall be encoded in xrgb
|
||||
//Every frame except frame_out shall have the same height
|
||||
/* Converts from bgr to xrgb, deinterlacing, final copy to the outpuit buffer (frame_out)
|
||||
* Every frame except frame_cap shall be encoded in xrgb
|
||||
* Every frame except frame_out shall have the same height
|
||||
*/
|
||||
if (strcmp(video_output_mode, "deinterlaced") == 0) {
|
||||
processing_bgr_xrgb(frame_cap, frame_curr, video_cap_width, video_cap_height);
|
||||
// When deinterlacing a interlaced intput, we need to process both fields of a frame,
|
||||
//one at a time (retro_run needs to be called twice, vide_half_feed_rate prevents the
|
||||
//source from being read twice...
|
||||
/* When deinterlacing a interlaced intput, we need to process both fields of a frame,
|
||||
* one at a time (retro_run needs to be called twice, vide_half_feed_rate prevents the
|
||||
* source from being read twice...
|
||||
*/
|
||||
if (strcmp(video_capture_mode, "interlaced") == 0) {
|
||||
enum v4l2_field field_read;
|
||||
if (video_half_feed_rate == 0)
|
||||
field_read = V4L2_FIELD_TOP;
|
||||
else
|
||||
field_read = V4L2_FIELD_BOTTOM;
|
||||
//video_half_feed_rate will allow us to capture the interlaced frame once and run the
|
||||
//deinterlacing algo twice, extracting a given field for each run.
|
||||
/* video_half_feed_rate will allow us to capture the interlaced frame once and run the
|
||||
* deinterlacing algo twice, extracting a given field for each run.
|
||||
*/
|
||||
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height/2, field_read, 1);
|
||||
} else {
|
||||
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height, video_buf.field, 0);
|
||||
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height, (enum v4l2_field)video_buf.field, 0);
|
||||
}
|
||||
aux = frame_prev3;
|
||||
frame_prev3 = frame_prev2;
|
||||
@@ -950,7 +966,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
|
||||
VIDEOPROC_CORE_PREFIX(video_refresh_cb)(frame_out, video_cap_width,
|
||||
video_out_height, video_cap_width * sizeof(uint32_t));
|
||||
} else if (strcmp(video_capture_mode, "alternate_hack") == 0) {
|
||||
// Case where alternate_hack without deinterlacing would not generate previous frame for processing_heal
|
||||
/* Case where alternate_hack without deinterlacing would not generate previous frame for processing_heal */
|
||||
processing_bgr_xrgb(frame_cap, frame_curr, video_cap_width, video_cap_height);
|
||||
aux = frame_prev3;
|
||||
frame_prev3 = frame_prev2;
|
||||
@@ -996,18 +1012,20 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_cheat_set)(unsigned index, bool enabl
|
||||
{
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void videoinput_set_control_v4l2( uint32_t id, double val )
|
||||
{
|
||||
//struct v4l2_queryctrl query;
|
||||
struct v4l2_queryctrl query;
|
||||
|
||||
//query.id = id;
|
||||
//if( ioctl( video_device_fd, VIDIOC_QUERYCTRL, &query ) >= 0 && !(query.flags & V4L2_CTRL_FLAG_DISABLED) ) {
|
||||
// struct v4l2_control control;
|
||||
// control.id = id;
|
||||
// control.value = query.minimum + ((int) ((val * ((double) (query.maximum - query.minimum))) + 0.5));
|
||||
// ioctl( video_device_fd, VIDIOC_S_CTRL, &control );
|
||||
//}
|
||||
query.id = id;
|
||||
if( ioctl( video_device_fd, VIDIOC_QUERYCTRL, &query ) >= 0 && !(query.flags & V4L2_CTRL_FLAG_DISABLED) ) {
|
||||
struct v4l2_control control;
|
||||
control.id = id;
|
||||
control.value = query.minimum + ((int) ((val * ((double) (query.maximum - query.minimum))) + 0.5));
|
||||
ioctl( video_device_fd, VIDIOC_S_CTRL, &control );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_info *game)
|
||||
{
|
||||
@@ -1050,7 +1068,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
}
|
||||
strncpy(video_device, videodev.value, ENVVAR_BUFLEN-1);
|
||||
|
||||
// Audio device is optional...
|
||||
/* Audio device is optional... */
|
||||
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &audiodev);
|
||||
if (audiodev.value != NULL) {
|
||||
strncpy(audio_device, audiodev.value, ENVVAR_BUFLEN-1);
|
||||
@@ -1106,8 +1124,8 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
|
||||
fmt.fmt.pix.height = 240;
|
||||
fmt.fmt.pix.field = V4L2_FIELD_TOP;
|
||||
|
||||
//TODO Query the size and FPS
|
||||
|
||||
/* TODO Query the size and FPS */
|
||||
if (strcmp(video_capture_mode, "interlaced") == 0) {
|
||||
v4l2_ncapbuf_target = 2;
|
||||
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
|
||||
@@ -1166,7 +1184,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
}
|
||||
|
||||
video_format = fmt;
|
||||
//TODO Check if what we got is indeed what we asked for
|
||||
/* TODO Check if what we got is indeed what we asked for */
|
||||
|
||||
memset(&reqbufs, 0, sizeof(reqbufs));
|
||||
reqbufs.count = v4l2_ncapbuf_target;
|
||||
@@ -1180,7 +1198,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
return false;
|
||||
}
|
||||
v4l2_ncapbuf = reqbufs.count;
|
||||
printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf);
|
||||
printf("GOT v4l2_ncapbuf=%" PRI_SIZET "\n", v4l2_ncapbuf);
|
||||
|
||||
for (index = 0; index < v4l2_ncapbuf; index++)
|
||||
{
|
||||
@@ -1229,11 +1247,12 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
return false;
|
||||
}
|
||||
|
||||
//videoinput_set_control_v4l2(V4L2_CID_HUE, (double) 0.4f);
|
||||
/* videoinput_set_control_v4l2(V4L2_CID_HUE, (double) 0.4f); */
|
||||
}
|
||||
|
||||
//TODO Framerates?
|
||||
// Each frame should combine both fields into a full frame (if not already captured interlaced), half frame-rate
|
||||
/* TODO Framerates?
|
||||
* Each frame should combine both fields into a full frame (if not already captured interlaced), half frame-rate
|
||||
*/
|
||||
if (strcmp(video_output_mode, "interlaced") == 0) {
|
||||
if (strcmp(video_capture_mode, "interlaced") == 0) {
|
||||
video_out_height = video_cap_height;
|
||||
@@ -1242,43 +1261,43 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
video_capture_mode, video_output_mode);
|
||||
video_out_height = video_cap_height*2;
|
||||
}
|
||||
// Each frame has one field, full frame-rate
|
||||
/* Each frame has one field, full frame-rate */
|
||||
} else if (strcmp(video_output_mode, "progressive") == 0) {
|
||||
video_out_height = video_cap_height;
|
||||
// Each frame has one or both field to be deinterlaced into a full frame (double the lines if one field), full frame-rate
|
||||
video_out_height = video_cap_height;
|
||||
/* Each frame has one or both field to be deinterlaced into a full frame (double the lines if one field), full frame-rate */
|
||||
} else if (strcmp(video_output_mode, "deinterlaced") == 0) {
|
||||
if (strcmp(video_capture_mode, "interlaced") == 0)
|
||||
video_out_height = video_cap_height;
|
||||
else
|
||||
video_out_height = video_cap_height*2;
|
||||
} else
|
||||
video_out_height = video_cap_height;
|
||||
video_out_height = video_cap_height;
|
||||
|
||||
printf("Capture Resolution %ux%u\n", video_cap_width, video_cap_height);
|
||||
printf("Output Resolution %ux%u\n", video_cap_width, video_out_height);
|
||||
|
||||
frame_cap = calloc(1, video_cap_width * video_cap_height * sizeof(uint8_t) * 3);
|
||||
frame_out = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
//TODO: Only allocate frames if we are going to use it (for deinterlacing or other filters?)
|
||||
frames[0] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[1] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[2] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[3] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frame_cap = (uint8_t*)calloc(1, video_cap_width * video_cap_height * sizeof(uint8_t) * 3);
|
||||
frame_out = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
/* TODO: Only allocate frames if we are going to use it (for deinterlacing or other filters?) */
|
||||
frames[0] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[1] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[2] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
frames[3] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
|
||||
|
||||
frame_curr = frames[0];
|
||||
frame_prev1 = frames[1];
|
||||
frame_prev2 = frames[2];
|
||||
frame_prev3 = frames[3];
|
||||
|
||||
//TODO: Check frames[] allocation
|
||||
/* TODO: Check frames[] allocation */
|
||||
if (!frame_out || !frame_cap)
|
||||
{
|
||||
printf("Cannot allocate buffers\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
printf("Allocated %lu byte conversion buffer\n",
|
||||
video_cap_width * video_cap_height * sizeof(uint32_t));
|
||||
printf("Allocated %" PRI_SIZET " byte conversion buffer\n",
|
||||
(size_t)(video_cap_width * video_cap_height) * sizeof(uint32_t));
|
||||
|
||||
pixel_format = RETRO_PIXEL_FORMAT_XRGB8888;
|
||||
if (!VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &pixel_format))
|
||||
@@ -1293,6 +1312,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
|
||||
RETRO_API void VIDEOPROC_CORE_PREFIX(retro_unload_game)(void)
|
||||
{
|
||||
struct v4l2_requestbuffers reqbufs;
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
if (audio_handle != NULL) {
|
||||
@@ -1328,7 +1348,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_unload_game)(void)
|
||||
free(frame_cap);
|
||||
frame_cap = NULL;
|
||||
|
||||
for (int i=0; i<4; ++i) {
|
||||
for (i = 0; i<4; ++i) {
|
||||
if (frames[i])
|
||||
free(frames[i]);
|
||||
frames[i] = NULL;
|
||||
|
||||
@@ -12,18 +12,18 @@ extern const loaderFuncs_s loader_Rosalina;
|
||||
static void (*launch_3dsx)(const char* path, argData_s* args, executableMetadata_s* em);
|
||||
|
||||
static int exec_3dsx_actual(const char* path, const char** args, bool appendPath){
|
||||
struct stat sBuff;
|
||||
struct stat sBuff;
|
||||
argData_s newProgramArgs;
|
||||
unsigned int argChars = 0;
|
||||
unsigned int argNum = 0;
|
||||
bool fileExists;
|
||||
bool inited;
|
||||
|
||||
|
||||
if(path == NULL || path[0] == '\0'){
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
fileExists = stat(path, &sBuff) == 0;
|
||||
if(!fileExists){
|
||||
errno = ENOENT;
|
||||
@@ -41,7 +41,7 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
|
||||
strcpy(newProgramArgs.dst, path);
|
||||
newProgramArgs.dst += strlen(path) + 1;
|
||||
newProgramArgs.buf[0]++;
|
||||
|
||||
|
||||
}
|
||||
while(args[argNum] != NULL){
|
||||
strcpy(newProgramArgs.dst, args[argNum]);
|
||||
@@ -49,10 +49,10 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
|
||||
newProgramArgs.buf[0]++;
|
||||
argNum++;
|
||||
}
|
||||
|
||||
|
||||
inited = loader_Rosalina.init();
|
||||
launch_3dsx = loader_Rosalina.launchFile;
|
||||
|
||||
|
||||
if(!inited){
|
||||
inited = loader_Ninjhax2.init();
|
||||
launch_3dsx = loader_Ninjhax2.launchFile;
|
||||
@@ -62,13 +62,13 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
|
||||
inited = loader_Ninjhax1.init();
|
||||
launch_3dsx = loader_Ninjhax1.launchFile;
|
||||
}
|
||||
|
||||
|
||||
if(inited){
|
||||
osSetSpeedupEnable(false);
|
||||
launch_3dsx(path, &newProgramArgs, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
//should never be reached
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef EXEC_3DSX_H
|
||||
#define EXEC_3DSX_H
|
||||
|
||||
//since 3dsx programs are not guaranteed access to the OS, the 3dsx bootloader run by the exploit must run the next program
|
||||
//your program must have no extra threads running when this is called, these limits do not apply to exec_cia
|
||||
int exec_3dsx_no_path_in_args(const char* path, const char** args);
|
||||
int exec_3dsx(const char* path, const char** args);
|
||||
|
||||
#ifndef EXEC_3DSX_H
|
||||
#define EXEC_3DSX_H
|
||||
|
||||
//since 3dsx programs are not guaranteed access to the OS, the 3dsx bootloader run by the exploit must run the next program
|
||||
//your program must have no extra threads running when this is called, these limits do not apply to exec_cia
|
||||
int exec_3dsx_no_path_in_args(const char* path, const char** args);
|
||||
int exec_3dsx(const char* path, const char** args);
|
||||
|
||||
#endif
|
||||
+31
-32
@@ -13,7 +13,6 @@ typedef struct{
|
||||
|
||||
char argvHmac[0x20] = {0x1d, 0x78, 0xff, 0xb9, 0xc5, 0xbc, 0x78, 0xb7, 0xac, 0x29, 0x1d, 0x3e, 0x16, 0xd0, 0xcf, 0x53, 0xef, 0x12, 0x58, 0x83, 0xb6, 0x9e, 0x2f, 0x79, 0x47, 0xf9, 0x35, 0x61, 0xeb, 0x50, 0xd7, 0x67};
|
||||
|
||||
|
||||
static void errorAndQuit(const char* errorStr){
|
||||
errorConf error;
|
||||
|
||||
@@ -30,37 +29,37 @@ static int isCiaInstalled(u64 titleId, u16 version){
|
||||
bool titleExists = false;
|
||||
AM_TitleEntry titleInfo;
|
||||
Result failed;
|
||||
|
||||
|
||||
failed = AM_GetTitleCount(MEDIATYPE_SD, &titlesToRetrieve);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
titleIds = malloc(titlesToRetrieve * sizeof(uint64_t));
|
||||
if(titleIds == NULL)
|
||||
return -1;
|
||||
|
||||
|
||||
failed = AM_GetTitleList(&titlesRetrieved, MEDIATYPE_SD, titlesToRetrieve, titleIds);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
for(u32 titlesToCheck = 0; titlesToCheck < titlesRetrieved; titlesToCheck++){
|
||||
if(titleIds[titlesToCheck] == titleId){
|
||||
titleExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free(titleIds);
|
||||
|
||||
|
||||
if(titleExists){
|
||||
failed = AM_GetTitleInfo(MEDIATYPE_SD, 1 /*titleCount*/, &titleId, &titleInfo);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
if(titleInfo.version == version)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -72,15 +71,15 @@ static int installCia(Handle ciaFile){
|
||||
u32 bytesRead;
|
||||
u32 bytesWritten;
|
||||
u8 transferBuffer[FILE_CHUNK_SIZE];
|
||||
|
||||
|
||||
failed = AM_StartCiaInstall(MEDIATYPE_SD, &outputHandle);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
failed = FSFILE_GetSize(ciaFile, &fileSize);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
while(fileOffset < fileSize){
|
||||
u64 bytesRemaining = fileSize - fileOffset;
|
||||
failed = FSFILE_Read(ciaFile, &bytesRead, fileOffset, transferBuffer, bytesRemaining < FILE_CHUNK_SIZE ? bytesRemaining : FILE_CHUNK_SIZE);
|
||||
@@ -88,7 +87,7 @@ static int installCia(Handle ciaFile){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
failed = FSFILE_Write(outputHandle, &bytesWritten, fileOffset, transferBuffer, bytesRead, 0);
|
||||
if(R_FAILED(failed)){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
@@ -96,32 +95,32 @@ static int installCia(Handle ciaFile){
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if(bytesWritten != bytesRead){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
fileOffset += bytesWritten;
|
||||
}
|
||||
|
||||
|
||||
failed = AM_FinishCiaInstall(outputHandle);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int exec_cia(const char* path, const char** args){
|
||||
struct stat sBuff;
|
||||
struct stat sBuff;
|
||||
bool fileExists;
|
||||
bool inited;
|
||||
|
||||
|
||||
if(path == NULL || path[0] == '\0'){
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
fileExists = stat(path, &sBuff) == 0;
|
||||
if(!fileExists){
|
||||
errno = ENOENT;
|
||||
@@ -131,7 +130,7 @@ int exec_cia(const char* path, const char** args){
|
||||
errno = EINVAL;;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
inited = R_SUCCEEDED(amInit()) && R_SUCCEEDED(fsInit());
|
||||
if(inited){
|
||||
Result res;
|
||||
@@ -141,20 +140,20 @@ int exec_cia(const char* path, const char** args){
|
||||
int ciaInstalled;
|
||||
ciaParam param;
|
||||
int argsLength;
|
||||
|
||||
|
||||
//open cia file
|
||||
res = FSUSER_OpenArchive(&ciaArchive, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""));
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant open SD FS archive.");
|
||||
|
||||
|
||||
res = FSUSER_OpenFile(&ciaFile, ciaArchive, fsMakePath(PATH_ASCII, path + 5/*skip "sdmc:"*/), FS_OPEN_READ, 0);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant open CIA file.");
|
||||
|
||||
|
||||
res = AM_GetCiaFileInfo(MEDIATYPE_SD, &ciaInfo, ciaFile);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant get CIA file info.");
|
||||
|
||||
|
||||
ciaInstalled = isCiaInstalled(ciaInfo.titleID, ciaInfo.version);
|
||||
if(ciaInstalled == -1){
|
||||
//error
|
||||
@@ -166,10 +165,10 @@ int exec_cia(const char* path, const char** args){
|
||||
if(error == -1)
|
||||
errorAndQuit("Cant install CIA.");
|
||||
}
|
||||
|
||||
|
||||
FSFILE_Close(ciaFile);
|
||||
FSUSER_CloseArchive(ciaArchive);
|
||||
|
||||
|
||||
param.argc = 0;
|
||||
argsLength = 0;
|
||||
char* argLocation = param.args;
|
||||
@@ -179,19 +178,19 @@ int exec_cia(const char* path, const char** args){
|
||||
argsLength += strlen(args[param.argc]) + 1;
|
||||
param.argc++;
|
||||
}
|
||||
|
||||
|
||||
res = APT_PrepareToDoApplicationJump(0, ciaInfo.titleID, 0x1);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("CIA cant run, cant prepare.");
|
||||
|
||||
|
||||
res = APT_DoApplicationJump(¶m, sizeof(param.argc) + argsLength, argvHmac);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("CIA cant run, cant jump.");
|
||||
|
||||
|
||||
//wait for application jump, for some reason its not instant
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
//should never be reached
|
||||
amExit();
|
||||
fsExit();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef EXEC_CIA_H
|
||||
#define EXEC_CIA_H
|
||||
|
||||
int exec_cia(const char* path, const char** args);
|
||||
|
||||
#ifndef EXEC_CIA_H
|
||||
#define EXEC_CIA_H
|
||||
|
||||
int exec_cia(const char* path, const char** args);
|
||||
|
||||
#endif
|
||||
Loaded 100 of 1339 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user