mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
Compare commits
2092
Commits
qt_labeledit
...
v1.7.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9750719074 | ||
|
|
a58a32411f | ||
|
|
04bdc634ba | ||
|
|
6c2ac0bc29 | ||
|
|
1ca3bcf21d | ||
|
|
11bf1e05b1 | ||
|
|
d18ef55aea | ||
|
|
9c0ccccc1c | ||
|
|
4cbbd3470b | ||
|
|
4aadd53d80 | ||
|
|
1eeb58c5dd | ||
|
|
5a45464bb3 | ||
|
|
43884758c5 | ||
|
|
5bab7e4460 | ||
|
|
93ded925d3 | ||
|
|
dd366cd5c5 | ||
|
|
e10eb51f71 | ||
|
|
4554669750 | ||
|
|
256b28fa2a | ||
|
|
85708b7ef8 | ||
|
|
55200644ca | ||
|
|
7fcb2e58a6 | ||
|
|
a9946b7634 | ||
|
|
98f6aecec2 | ||
|
|
67e777767c | ||
|
|
0814cc34ee | ||
|
|
1dd89e1bce | ||
|
|
b7cee0a633 | ||
|
|
add4ac00eb | ||
|
|
af813d9c46 | ||
|
|
0db583c245 | ||
|
|
9a04c4c67b | ||
|
|
000787837e | ||
|
|
9b233f71ac | ||
|
|
7e92468508 | ||
|
|
6f7d67aa77 | ||
|
|
845c8d1757 | ||
|
|
7e81ac4218 | ||
|
|
9aa542b1ae | ||
|
|
92d0b4a237 | ||
|
|
633ad1788d | ||
|
|
91f8e8465a | ||
|
|
97dc77b940 | ||
|
|
d7410b6689 | ||
|
|
af65e36eea | ||
|
|
62bea6ad11 | ||
|
|
1a6d0b2ce4 | ||
|
|
0c0ab19b11 | ||
|
|
350b0dd1a2 | ||
|
|
90f1317498 | ||
|
|
9262effbf9 | ||
|
|
6fe5a134db | ||
|
|
0009c059ac | ||
|
|
9fcf21e3ed | ||
|
|
adc6d21601 | ||
|
|
f76547a96f | ||
|
|
9e74108939 | ||
|
|
79d280e9c3 | ||
|
|
b4bf7c168d | ||
|
|
7b33ba55ca | ||
|
|
31a5f72acf | ||
|
|
2560d1c105 | ||
|
|
6b3fad0f53 | ||
|
|
7c74f0abe8 | ||
|
|
1796d359c5 | ||
|
|
027745d113 | ||
|
|
d54ca53653 | ||
|
|
6879ba3ef8 | ||
|
|
eda11bb99e | ||
|
|
8f449003ec | ||
|
|
f9bb1417b1 | ||
|
|
36fd99910a | ||
|
|
8ff70ecbbb | ||
|
|
a719a096f9 | ||
|
|
5f7de58080 | ||
|
|
b1a20b6ea7 | ||
|
|
23800382bf | ||
|
|
0cad96cf64 | ||
|
|
1d8dd9bb9e | ||
|
|
0413ba7215 | ||
|
|
a9b576979a | ||
|
|
b321753944 | ||
|
|
dd23adb367 | ||
|
|
9d52729e70 | ||
|
|
69e7a2dff2 | ||
|
|
5d56080312 | ||
|
|
ad217bc80c | ||
|
|
5150d96074 | ||
|
|
ba3c7c3fd5 | ||
|
|
2e76e8951e | ||
|
|
cff7aa5785 | ||
|
|
45185d6827 | ||
|
|
0d3dc3fc83 | ||
|
|
b69938078d | ||
|
|
d17b1439e2 | ||
|
|
374b724118 | ||
|
|
7ca7a5e0fc | ||
|
|
db04ac0b2a | ||
|
|
6ff785be59 | ||
|
|
8a3b80a9e5 | ||
|
|
6aca340927 | ||
|
|
9eaa703d4f | ||
|
|
e0091a1f8c | ||
|
|
c62a7e4b5e | ||
|
|
ee36fd54c3 | ||
|
|
f9ee57c40d | ||
|
|
6e1658bb30 | ||
|
|
5d77244334 | ||
|
|
987a91a1ae | ||
|
|
9e6cd04df4 | ||
|
|
fe02db911d | ||
|
|
64460824aa | ||
|
|
37102a8e16 | ||
|
|
9421584772 | ||
|
|
000646e51e | ||
|
|
44a4689847 | ||
|
|
5011360a93 | ||
|
|
88d741a4a2 | ||
|
|
0a068ef871 | ||
|
|
65f8fc7a21 | ||
|
|
9d6b40fff2 | ||
|
|
5ea97cccb9 | ||
|
|
4b0b4e727b | ||
|
|
422e421900 | ||
|
|
ca757d6214 | ||
|
|
d24408730b | ||
|
|
3d092c8394 | ||
|
|
45af07e322 | ||
|
|
ccd234465e | ||
|
|
9176fc30ee | ||
|
|
347519a4d8 | ||
|
|
f23468b8a6 | ||
|
|
0f400b433b | ||
|
|
1b439b7d09 | ||
|
|
6c42d87303 | ||
|
|
86696d3bf3 | ||
|
|
8344b0d049 | ||
|
|
ce6a6c0e21 | ||
|
|
a7814a7601 | ||
|
|
f510efd64e | ||
|
|
257dbd825a | ||
|
|
5afcd020bd | ||
|
|
fac95efaba | ||
|
|
fa8c9d7049 | ||
|
|
22e0560395 | ||
|
|
a4b391d796 | ||
|
|
8fdbdf8b8b | ||
|
|
0726cc425c | ||
|
|
c43a93e544 | ||
|
|
42c25952d4 | ||
|
|
c88456a455 | ||
|
|
cc18bd6023 | ||
|
|
76bf63f905 | ||
|
|
81bca39b53 | ||
|
|
e533dda94a | ||
|
|
ae9acec62d | ||
|
|
e4d8b8445e | ||
|
|
c0dde586a0 | ||
|
|
10cd3b0d2c | ||
|
|
74526ca140 | ||
|
|
e039472300 | ||
|
|
3aeedeb0a3 | ||
|
|
7d106545eb | ||
|
|
9091a53497 | ||
|
|
921104a4fb | ||
|
|
51cfc84b88 | ||
|
|
6dabd46220 | ||
|
|
57c6686a19 | ||
|
|
ef0cfb2504 | ||
|
|
f8ba41d76e | ||
|
|
21f043201d | ||
|
|
8e798405ad | ||
|
|
5302a1e61c | ||
|
|
b3703a1f2e | ||
|
|
a18512375b | ||
|
|
1a28b06935 | ||
|
|
99fa2b54eb | ||
|
|
d357cf9986 | ||
|
|
bf98664b15 | ||
|
|
406d927f6b | ||
|
|
753552bd40 | ||
|
|
bb134d2f66 | ||
|
|
7ac95f724a | ||
|
|
deb35e01a8 | ||
|
|
a80e15f135 | ||
|
|
c455a86545 | ||
|
|
edce9c02d1 | ||
|
|
0f3fcdd311 | ||
|
|
04b2ffcb9e | ||
|
|
fa875692c3 | ||
|
|
0f8de9b3b3 | ||
|
|
e8e384aa4f | ||
|
|
c281435867 | ||
|
|
158cec17fd | ||
|
|
618286d6ef | ||
|
|
1c9cabf249 | ||
|
|
97b8dff0ab | ||
|
|
3c18232448 | ||
|
|
23463408d5 | ||
|
|
d2edf39f11 | ||
|
|
8b958b91f9 | ||
|
|
5330994297 | ||
|
|
67d5bcbb5c | ||
|
|
90db5e7e27 | ||
|
|
556b7b19de | ||
|
|
8b6676e17f | ||
|
|
1546ba05d4 | ||
|
|
ae7b09afae | ||
|
|
29a07895b9 | ||
|
|
d7d5bc58b2 | ||
|
|
b512c0aeb9 | ||
|
|
2bd70abfcd | ||
|
|
b2e8a7add2 | ||
|
|
e5dd7ce738 | ||
|
|
8e26b13578 | ||
|
|
4dbd15381a | ||
|
|
5ee7921b65 | ||
|
|
10d2d13004 | ||
|
|
1ee66d5204 | ||
|
|
63c7abef06 | ||
|
|
677395f05e | ||
|
|
d99f32a5ad | ||
|
|
2cc6505997 | ||
|
|
352fbc7cc7 | ||
|
|
0dc40a2d66 | ||
|
|
c8c23ffcfc | ||
|
|
c99c16363c | ||
|
|
fc6b7d5ddb | ||
|
|
aa2fd6cfed | ||
|
|
ffe65cdad8 | ||
|
|
088860e499 | ||
|
|
997cd88c95 | ||
|
|
15a3df7662 | ||
|
|
4722d41b0b | ||
|
|
9df5a75045 | ||
|
|
f705f0596e | ||
|
|
5fcedc8619 | ||
|
|
6b328ec903 | ||
|
|
4d927528df | ||
|
|
d34e10985e | ||
|
|
4e6659b063 | ||
|
|
a61d295b6f | ||
|
|
f92070e829 | ||
|
|
0d84e0a949 | ||
|
|
39d50591af | ||
|
|
bd56e1e29c | ||
|
|
5102361e2c | ||
|
|
7ba6ffdfbe | ||
|
|
11af72286b | ||
|
|
b216c9f7d6 | ||
|
|
3b24d34545 | ||
|
|
f6481d7f5e | ||
|
|
bd84bb1c8e | ||
|
|
49fa097903 | ||
|
|
58f0bdeaed | ||
|
|
070a447fa8 | ||
|
|
4bf4d28111 | ||
|
|
db46d43224 | ||
|
|
9d0e9632c1 | ||
|
|
10e50bb806 | ||
|
|
32fa63a593 | ||
|
|
26ea9d9f0c | ||
|
|
f5386397bb | ||
|
|
2f0e3680cb | ||
|
|
838ac65184 | ||
|
|
d3f81e8db8 | ||
|
|
56ddc76ebb | ||
|
|
0ac2dc567e | ||
|
|
40e9fe5cf1 | ||
|
|
d2863e2ce6 | ||
|
|
a3928cc8ca | ||
|
|
b0b39a1610 | ||
|
|
cb602c190d | ||
|
|
c538d78626 | ||
|
|
b6e9dbd92c | ||
|
|
c94806ea11 | ||
|
|
2ba90e218f | ||
|
|
b91938ba39 | ||
|
|
7d186f7d2c | ||
|
|
cd35fb9440 | ||
|
|
04ec598b97 | ||
|
|
07ca62915a | ||
|
|
4350073265 | ||
|
|
1a7d69621f | ||
|
|
cf83332b49 | ||
|
|
bd16d5c9dc | ||
|
|
5102911da6 | ||
|
|
b13777e9fc | ||
|
|
cfd7228469 | ||
|
|
7c4fcb4960 | ||
|
|
2e5530b531 | ||
|
|
4f53e14f4f | ||
|
|
0083e10926 | ||
|
|
9bb7132b97 | ||
|
|
8349f9217c | ||
|
|
d3ae2cbd29 | ||
|
|
22e99568ed | ||
|
|
b692474d7c | ||
|
|
b99ad352e3 | ||
|
|
7f327e7154 | ||
|
|
83241ed0b1 | ||
|
|
0abe271909 | ||
|
|
1a0d5030f9 | ||
|
|
46676289d4 | ||
|
|
8e02ebd987 | ||
|
|
8c5f4a842c | ||
|
|
b7acc33bda | ||
|
|
f78f447b12 | ||
|
|
5611977de0 | ||
|
|
159839e353 | ||
|
|
9c7affc2cf | ||
|
|
1f952679a8 | ||
|
|
e5a2221eac | ||
|
|
20cb84189e | ||
|
|
c017271d8a | ||
|
|
71f24f067b | ||
|
|
bd43f19407 | ||
|
|
cb4a87d6b1 | ||
|
|
ae397f2ae5 | ||
|
|
32313b398b | ||
|
|
95a7b8c29b | ||
|
|
afcaccbd05 | ||
|
|
e81ad553ad | ||
|
|
79f8b6281f | ||
|
|
a578146a9f | ||
|
|
8cd85c4f51 | ||
|
|
b4348e3ae1 | ||
|
|
e4731d2b5e | ||
|
|
726a014cb3 | ||
|
|
4b20386b07 | ||
|
|
d8a62d5eab | ||
|
|
6f094a3fdd | ||
|
|
d98962189a | ||
|
|
4b859fd097 | ||
|
|
8787f46c59 | ||
|
|
e062b98088 | ||
|
|
e42c21321b | ||
|
|
db0cb37dc3 | ||
|
|
5182f24711 | ||
|
|
fc57b41ab6 | ||
|
|
f23d1d4901 | ||
|
|
2860d6af08 | ||
|
|
dc6b148b17 | ||
|
|
2d7bb5519b | ||
|
|
4461d32900 | ||
|
|
a116bb908e | ||
|
|
c8510378dc | ||
|
|
9188cc1a73 | ||
|
|
b7cc124070 | ||
|
|
b70683fa08 | ||
|
|
b5d8b8b3bc | ||
|
|
38976150a5 | ||
|
|
6963b1f375 | ||
|
|
65d5de6674 | ||
|
|
ef318533c3 | ||
|
|
16fffd67ea | ||
|
|
30e48b46b3 | ||
|
|
3706aa9904 | ||
|
|
f7c9bc4e61 | ||
|
|
e2df9b52ce | ||
|
|
dd4bf2c41f | ||
|
|
bc09245dee | ||
|
|
fd17970f61 | ||
|
|
f011579c78 | ||
|
|
f93ae772f3 | ||
|
|
5a97738f3e | ||
|
|
e6fc4220fa | ||
|
|
c05be12ff4 | ||
|
|
4f15d4a64c | ||
|
|
d70a49ea6f | ||
|
|
e503f9e922 | ||
|
|
31b1a91c3b | ||
|
|
02382b1cd7 | ||
|
|
874a5258c5 | ||
|
|
a549e28f01 | ||
|
|
5c2d271f9f | ||
|
|
73e78f5135 | ||
|
|
d4b33ac1ad | ||
|
|
4e73be94b7 | ||
|
|
e4bc578466 | ||
|
|
10c7929d55 | ||
|
|
3ec4469455 | ||
|
|
a88277f76d | ||
|
|
0df074db05 | ||
|
|
b1de875551 | ||
|
|
cdbfec7348 | ||
|
|
4260f9ffbc | ||
|
|
82836c5778 | ||
|
|
d3ae49b30b | ||
|
|
dad3fe42db | ||
|
|
9d0472c3ac | ||
|
|
f0b8d2d12e | ||
|
|
c7054a36f2 | ||
|
|
cc7541338c | ||
|
|
8adef3b995 | ||
|
|
0805f4e821 | ||
|
|
0b4f6c1ce4 | ||
|
|
ea027c0b55 | ||
|
|
5c09cf29a4 | ||
|
|
10833fc9ae | ||
|
|
b3157c14e8 | ||
|
|
c1765f0a6c | ||
|
|
f0994a0502 | ||
|
|
7cb84245b7 | ||
|
|
fab4834b82 | ||
|
|
1bb381fd7e | ||
|
|
b93c21091b | ||
|
|
2ef9e5757b | ||
|
|
a0b67424ca | ||
|
|
ff2e3bbbce | ||
|
|
63ba60ae1a | ||
|
|
473bae15c3 | ||
|
|
8f8cec52f2 | ||
|
|
a5d381eced | ||
|
|
39209dd387 | ||
|
|
ba75b1f4b3 | ||
|
|
af7379889d | ||
|
|
034ef10d3f | ||
|
|
e65f87a4ee | ||
|
|
4b2278688b | ||
|
|
5b88685448 | ||
|
|
331a7dedf1 | ||
|
|
cb596aec3a | ||
|
|
2ee8888a65 | ||
|
|
75aa27ab94 | ||
|
|
c4669c3302 | ||
|
|
7a4efedbfe | ||
|
|
109de0bebb | ||
|
|
1b22acd747 | ||
|
|
af74ba90db | ||
|
|
14a22aaadd | ||
|
|
7ad34509e7 | ||
|
|
88750850dc | ||
|
|
dba9781f26 | ||
|
|
6ca9afbd57 | ||
|
|
d86fe8d6e6 | ||
|
|
4c8e5e07c0 | ||
|
|
d412c9f8d4 | ||
|
|
0f8cf1a579 | ||
|
|
6048eba78a | ||
|
|
d95b4b70e7 | ||
|
|
700829b5d7 | ||
|
|
901c712e61 | ||
|
|
fed880bc33 | ||
|
|
ff8e10f014 | ||
|
|
2052e15a08 | ||
|
|
2231e4c821 | ||
|
|
c111b4a7f0 | ||
|
|
e08f79e16b | ||
|
|
3ab7e780d1 | ||
|
|
b52a5ae664 | ||
|
|
58d764ce5d | ||
|
|
52479ad09f | ||
|
|
f0e2f7dcf4 | ||
|
|
78cc8794f7 | ||
|
|
7b175496ce | ||
|
|
39442c7bba | ||
|
|
12bb9e5cb5 | ||
|
|
af48987eb9 | ||
|
|
32586bc316 | ||
|
|
13ccf4d408 | ||
|
|
07c3bff2f8 | ||
|
|
ccec13e64f | ||
|
|
01397f008a | ||
|
|
3ac631c7a3 | ||
|
|
e4f9aebbd3 | ||
|
|
c98b2e2292 | ||
|
|
b9ff2e4de1 | ||
|
|
10723bca01 | ||
|
|
24ce1aee21 | ||
|
|
98c19ac0f5 | ||
|
|
0cff7eefa7 | ||
|
|
d3210b87ae | ||
|
|
5a12ca642c | ||
|
|
6ec2134111 | ||
|
|
cdcadf6237 | ||
|
|
bd2a13e32c | ||
|
|
74312180b9 | ||
|
|
57c5563b3b | ||
|
|
29948c0878 | ||
|
|
402ea3944e | ||
|
|
840da62e20 | ||
|
|
6e1dc5af46 | ||
|
|
e13a142bae | ||
|
|
90ad541413 | ||
|
|
d3f58bb65c | ||
|
|
96b7f9fd9e | ||
|
|
9c507b2433 | ||
|
|
a2db47bead | ||
|
|
9c7c5e0814 | ||
|
|
7cac57a09a | ||
|
|
c7779ff046 | ||
|
|
a7a959ccba | ||
|
|
a331b7420e | ||
|
|
c7041260d7 | ||
|
|
bc2f19a9d7 | ||
|
|
03e25ecb2f | ||
|
|
c26a4aa13a | ||
|
|
f1ba335cb3 | ||
|
|
60533b10b7 | ||
|
|
9231998aa3 | ||
|
|
60a2d5c87c | ||
|
|
7eead5c59f | ||
|
|
c433934415 | ||
|
|
db36f08920 | ||
|
|
9bbbb929f8 | ||
|
|
faaa6e081b | ||
|
|
f500cf19ab | ||
|
|
a3f7588ec5 | ||
|
|
6420ea8f27 | ||
|
|
248c944ff8 | ||
|
|
0c634382f9 | ||
|
|
77c2c7b946 | ||
|
|
01b2b9c3a6 | ||
|
|
cdc0a79508 | ||
|
|
ac04c1bfc5 | ||
|
|
12aaf615a8 | ||
|
|
9caf71df7a | ||
|
|
d2f7853d49 | ||
|
|
ddbb1a4d43 | ||
|
|
ef35cf5ac0 | ||
|
|
9b801aee17 | ||
|
|
6bd4d91038 | ||
|
|
b74b24e648 | ||
|
|
6aa501bc70 | ||
|
|
40997473ed | ||
|
|
19c4fcda88 | ||
|
|
bfc366decc | ||
|
|
93346fed6b | ||
|
|
c2047c8c04 | ||
|
|
3c8ca30b07 | ||
|
|
2c8ca91cf0 | ||
|
|
7493f9cf37 | ||
|
|
1673c73702 | ||
|
|
628fc8a690 | ||
|
|
afc00cf155 | ||
|
|
6a0ac8584c | ||
|
|
3e5237ed72 | ||
|
|
58e192881a | ||
|
|
cb00455f12 | ||
|
|
098dc61ad3 | ||
|
|
cf49f0c050 | ||
|
|
be12b8ff82 | ||
|
|
983e0a900f | ||
|
|
6613421537 | ||
|
|
9370fb604d | ||
|
|
f5f4630133 | ||
|
|
35f6dd640d | ||
|
|
cd764ac37b | ||
|
|
c1d126d3bf | ||
|
|
54a795bfd7 | ||
|
|
d325752183 | ||
|
|
26ce69694f | ||
|
|
8df7540c96 | ||
|
|
017abf4148 | ||
|
|
d37547e6fd | ||
|
|
aa231dca10 | ||
|
|
27d1cc9905 | ||
|
|
462a4b24fd | ||
|
|
6384313279 | ||
|
|
9bd97784a3 | ||
|
|
c44235611d | ||
|
|
c1477c10b9 | ||
|
|
58fa3bc940 | ||
|
|
23c8a31d69 | ||
|
|
459a19be57 | ||
|
|
749e882b58 | ||
|
|
d25b632b88 | ||
|
|
5bedd981ec | ||
|
|
13ee5ccfdf | ||
|
|
161785f588 | ||
|
|
9b46caa6db | ||
|
|
f48ffb9aac | ||
|
|
49776510ce | ||
|
|
b8f20e60c2 | ||
|
|
22598feca3 | ||
|
|
8343cf2680 | ||
|
|
65c6bb69a4 | ||
|
|
65c6caf5a6 | ||
|
|
3bb0c7caa4 | ||
|
|
5428d2a833 | ||
|
|
92e2221c2d | ||
|
|
2686cf1498 | ||
|
|
ad3e66dcb0 | ||
|
|
2ccde34813 | ||
|
|
ced5af9314 | ||
|
|
dcdcc938bf | ||
|
|
0129f7e4ad | ||
|
|
bd9146ed72 | ||
|
|
56c246482e | ||
|
|
d1a65f15cc | ||
|
|
18db7104cc | ||
|
|
c92136015a | ||
|
|
ac8d3d7a51 | ||
|
|
e83b3adc20 | ||
|
|
13d6ff899c | ||
|
|
2b0838ac02 | ||
|
|
34f3eb7277 | ||
|
|
85b560e76b | ||
|
|
714631b38d | ||
|
|
bbfbefa9dd | ||
|
|
f97336ac86 | ||
|
|
2081346358 | ||
|
|
90baac517d | ||
|
|
aadc299cc2 | ||
|
|
fce7ca80c1 | ||
|
|
ec53480a66 | ||
|
|
95a27bc28e | ||
|
|
d5a8c30dfe | ||
|
|
6d0b6da60d | ||
|
|
1db0a280b0 | ||
|
|
e827c3648f | ||
|
|
e70806c51c | ||
|
|
33c777cbfc | ||
|
|
deb5c9b03c | ||
|
|
1398d889cb | ||
|
|
6cd7c49c66 | ||
|
|
6def3b36a8 | ||
|
|
5cef12160a | ||
|
|
74c8c13102 | ||
|
|
a5635eff27 | ||
|
|
5012b27853 | ||
|
|
88d61ddaf3 | ||
|
|
577456e3e7 | ||
|
|
cca9bcc09d | ||
|
|
849259d8f6 | ||
|
|
e36bf32490 | ||
|
|
60c8f51009 | ||
|
|
433ae4d7fc | ||
|
|
056c7fffe1 | ||
|
|
b695e6a867 | ||
|
|
11186dd5e0 | ||
|
|
263d82146c | ||
|
|
967bca8f9d | ||
|
|
1fd88b865e | ||
|
|
d52de24e79 | ||
|
|
66ba53c79b | ||
|
|
63d61b05ca | ||
|
|
d0d49aa581 | ||
|
|
ae0c4bde1e | ||
|
|
dea948e9ed | ||
|
|
b7a13a02cb | ||
|
|
c151ad1bb2 | ||
|
|
d374e8415f | ||
|
|
b5cf8e90c9 | ||
|
|
a164f77c94 | ||
|
|
ab2010c494 | ||
|
|
d5c524c53e | ||
|
|
6f093e8474 | ||
|
|
3c36a27505 | ||
|
|
42d5c0037e | ||
|
|
e53ac5b38b | ||
|
|
24ef966ca3 | ||
|
|
56bf1c53ca | ||
|
|
56207bd08e | ||
|
|
e2ca8aa1b5 | ||
|
|
1591bc2db2 | ||
|
|
8b0f7051ac | ||
|
|
f1fc622e99 | ||
|
|
33ecd40d55 | ||
|
|
5fcec0f561 | ||
|
|
39282915f8 | ||
|
|
0ebf5a2563 | ||
|
|
2a9f6d9d40 | ||
|
|
9c5c0aea58 | ||
|
|
4204bfc67f | ||
|
|
ff1ca99748 | ||
|
|
dc45fbada6 | ||
|
|
8f2fa4527c | ||
|
|
aa75ae5f04 | ||
|
|
6f7e670609 | ||
|
|
7ac080ea50 | ||
|
|
541dc13d64 | ||
|
|
731ef11e2f | ||
|
|
b8129a1381 | ||
|
|
e7befaba37 | ||
|
|
051e5bd262 | ||
|
|
88b4ec61e7 | ||
|
|
e64f713942 | ||
|
|
589d715fbc | ||
|
|
f635bfa35d | ||
|
|
54ac14e205 | ||
|
|
9c75b9cb7f | ||
|
|
0a6df1743c | ||
|
|
2c4d2418d6 | ||
|
|
48d82929ff | ||
|
|
556bcc18e4 | ||
|
|
ac32bff71a | ||
|
|
b31e0324a0 | ||
|
|
a838582b11 | ||
|
|
a1c15b5362 | ||
|
|
f1e516bfaf | ||
|
|
1520f022c5 | ||
|
|
a9a53fdb64 | ||
|
|
6d943e10a6 | ||
|
|
eaef091915 | ||
|
|
2b38e126f4 | ||
|
|
a2eaa6a19d | ||
|
|
c901866864 | ||
|
|
bb5cd1dfeb | ||
|
|
8ca9797a16 | ||
|
|
c095f8bdd2 | ||
|
|
91e05eab21 | ||
|
|
b9c6cdf50f | ||
|
|
d58c71cc3e | ||
|
|
d44ad6abd4 | ||
|
|
f7f602c1f7 | ||
|
|
b5eedbaed7 | ||
|
|
63044b204e | ||
|
|
c9c604a37a | ||
|
|
43b8763fd4 | ||
|
|
5d8585df84 | ||
|
|
13517bc226 | ||
|
|
a7f5fc9431 | ||
|
|
99e5791ae4 | ||
|
|
44ebcbd044 | ||
|
|
fb6fe1a87c | ||
|
|
c6ba5d9ebc | ||
|
|
a1e455d197 | ||
|
|
ea2ed2fb07 | ||
|
|
1b35b75d45 | ||
|
|
6b35e8d4f6 | ||
|
|
87c13a4f5f | ||
|
|
4a81b66c99 | ||
|
|
d7a7d8cb59 | ||
|
|
428011693e | ||
|
|
bcdcdbf2c3 | ||
|
|
aecd532dac | ||
|
|
74f391de9b | ||
|
|
4ae4b6d4d0 | ||
|
|
0b13cba4ea | ||
|
|
c56e9b1ff6 | ||
|
|
4ad083cb97 | ||
|
|
fc8abd7baf | ||
|
|
de6e6a2ef3 | ||
|
|
1c010e3622 | ||
|
|
815c525bb6 | ||
|
|
1cb9f7c1bf | ||
|
|
88e283f0c1 | ||
|
|
9c5a934529 | ||
|
|
22e54dfc6b | ||
|
|
d34b94a661 | ||
|
|
167537ac10 | ||
|
|
3aa8d22238 | ||
|
|
50fcf4c190 | ||
|
|
ad782e6eb4 | ||
|
|
1cb1ea55b1 | ||
|
|
bddcd2d5e5 | ||
|
|
118d155360 | ||
|
|
65cc022c31 | ||
|
|
34cb50f8da | ||
|
|
dd60b5d576 | ||
|
|
8f67cf7384 | ||
|
|
0e5fbbb9e1 | ||
|
|
f82b6e07ba | ||
|
|
9aa7b2bd62 | ||
|
|
3cedc83bfa | ||
|
|
c2e3b5bfbf | ||
|
|
69d020e16d | ||
|
|
f909f98e1a | ||
|
|
87c99a491b | ||
|
|
a6e6ccc244 | ||
|
|
583273d81b | ||
|
|
325d85ed4b | ||
|
|
d4b8e1c4fd | ||
|
|
9c4b307dcb | ||
|
|
4fb06703b3 | ||
|
|
f6c8a0c5c2 | ||
|
|
cc686ba9bc | ||
|
|
6038060cd7 | ||
|
|
b201d669b5 | ||
|
|
671b49afcd | ||
|
|
055f880775 | ||
|
|
9872111dbc | ||
|
|
1e513598d3 | ||
|
|
465b3e5774 | ||
|
|
912060fc4b | ||
|
|
48167d46bc | ||
|
|
d8468c5d8c | ||
|
|
06d0a19e95 | ||
|
|
19549ddccf | ||
|
|
f02ef2e0c6 | ||
|
|
39343f99a7 | ||
|
|
3548956509 | ||
|
|
8cee39bbd3 | ||
|
|
b84b1b083a | ||
|
|
ff63852a7c | ||
|
|
16c56eb9f3 | ||
|
|
9ec293bb5b | ||
|
|
0224bf22b2 | ||
|
|
38397370e6 | ||
|
|
69ad3273b9 | ||
|
|
5b7a71abd3 | ||
|
|
282e688ee6 | ||
|
|
40b028ebce | ||
|
|
90ba2df972 | ||
|
|
1b94483078 | ||
|
|
8845b674fd | ||
|
|
5e1ec17742 | ||
|
|
6e25978be5 | ||
|
|
bcfa332be9 | ||
|
|
a6f097c873 | ||
|
|
80ed61f257 | ||
|
|
fcf75fda17 | ||
|
|
7e2aafa382 | ||
|
|
c9a0b8c42d | ||
|
|
476abf7dad | ||
|
|
3ad6ca75cc | ||
|
|
abc31fa092 | ||
|
|
374384128c | ||
|
|
4bd5e23601 | ||
|
|
1aee59f9f4 | ||
|
|
992d221af9 | ||
|
|
740cf4034e | ||
|
|
d2a2878b2c | ||
|
|
8c4587d83a | ||
|
|
5d0e430c23 | ||
|
|
30fc94ae19 | ||
|
|
90d816f31a | ||
|
|
d51b801221 | ||
|
|
c079a2f953 | ||
|
|
770bd52411 | ||
|
|
80371728e1 | ||
|
|
3c5a391c9e | ||
|
|
6eae0df010 | ||
|
|
0d7cb7edc2 | ||
|
|
2675fa26c0 | ||
|
|
c46e3468e2 | ||
|
|
0f06734d0a | ||
|
|
ab9c235cfa | ||
|
|
0b8e39dd6b | ||
|
|
e484f30af6 | ||
|
|
6382bc48c3 | ||
|
|
45c85aa6fe | ||
|
|
e0c01d658d | ||
|
|
ca9952ceef | ||
|
|
e3235eeef4 | ||
|
|
456b891994 | ||
|
|
f353feba8a | ||
|
|
326395ff17 | ||
|
|
1df95bb28b | ||
|
|
4da7092aff | ||
|
|
c70e322496 | ||
|
|
09deb96397 | ||
|
|
0c01e35c2b | ||
|
|
7e4723e37a | ||
|
|
c2d4b70f8c | ||
|
|
b55ed9e3ce | ||
|
|
c3f2c49e84 | ||
|
|
7ec32337b5 | ||
|
|
e239a46800 | ||
|
|
1721bd07c4 | ||
|
|
3ef9bbb592 | ||
|
|
6c4f0be0a5 | ||
|
|
2ab78dc67b | ||
|
|
970e3515b1 | ||
|
|
1d3874a142 | ||
|
|
3bd1c3fa6a | ||
|
|
e9e917ab29 | ||
|
|
1532b75d26 | ||
|
|
e6eedd05f5 | ||
|
|
5175c67381 | ||
|
|
066bbd1a29 | ||
|
|
f603d4ec30 | ||
|
|
d41bb64d17 | ||
|
|
a0a22a044a | ||
|
|
4f270449f9 | ||
|
|
7bb23d15bd | ||
|
|
458bb9fbb5 | ||
|
|
2c09a6f37b | ||
|
|
fd93e5e26e | ||
|
|
26568a6bc2 | ||
|
|
a7bb1e60aa | ||
|
|
f68d756af3 | ||
|
|
a396008bf6 | ||
|
|
7835d0c54c | ||
|
|
0b0a21b742 | ||
|
|
11a7d34358 | ||
|
|
95ed844d81 | ||
|
|
37acbd1ecf | ||
|
|
22fcd0be67 | ||
|
|
d6741651b7 | ||
|
|
c565bb1b0b | ||
|
|
4b323a45df | ||
|
|
971591fb9c | ||
|
|
13e29308d5 | ||
|
|
af0bf7a992 | ||
|
|
6dcdb843e8 | ||
|
|
d557ab09ce | ||
|
|
14905e33e1 | ||
|
|
169002ef7f | ||
|
|
30e5f1dfef | ||
|
|
26cb223852 | ||
|
|
47666fb4a8 | ||
|
|
9feeaecb12 | ||
|
|
4bc0aacd8b | ||
|
|
3a0c27e753 | ||
|
|
862a4e099b | ||
|
|
fbb095cc06 | ||
|
|
6c936274b7 | ||
|
|
74de0ade03 | ||
|
|
708c9c0774 | ||
|
|
fc6b3b7335 | ||
|
|
16d1cf28f7 | ||
|
|
bfd23150b5 | ||
|
|
319124c7a0 | ||
|
|
d40da6aca3 | ||
|
|
6e95a62fdf | ||
|
|
c0ea6e7574 | ||
|
|
f4a5c3bd55 | ||
|
|
94d5457106 | ||
|
|
e0c634cd76 | ||
|
|
72f32b702f | ||
|
|
7c50dfb397 | ||
|
|
f5840ae6f2 | ||
|
|
3b33edd49e | ||
|
|
c00b6e0750 | ||
|
|
dc020f2569 | ||
|
|
90abb7846a | ||
|
|
d55a27f380 | ||
|
|
9c9d1741b5 | ||
|
|
9be245ad75 | ||
|
|
2ea6d5a060 | ||
|
|
b6f36fcf40 | ||
|
|
20900463f4 | ||
|
|
240856f19c | ||
|
|
638ab39dfb | ||
|
|
2646e49eb4 | ||
|
|
7b9c094052 | ||
|
|
a868ef29e8 | ||
|
|
fd6856ce20 | ||
|
|
1d8dd133b7 | ||
|
|
bd2fb04a47 | ||
|
|
077b108aa1 | ||
|
|
ac536cd28c | ||
|
|
a7e4d8359b | ||
|
|
07b17059f1 | ||
|
|
c7b3b0f784 | ||
|
|
868465ad01 | ||
|
|
669f16c00c | ||
|
|
ced0f09f0e | ||
|
|
e33dfb53cf | ||
|
|
479104ee05 | ||
|
|
7a36190a0e | ||
|
|
45228d0307 | ||
|
|
cad5ae287f | ||
|
|
574972c1be | ||
|
|
048b2df5b0 | ||
|
|
11391d601c | ||
|
|
51c9914cbb | ||
|
|
02ee0112fc | ||
|
|
23bbcdf8ce | ||
|
|
7e49146c91 | ||
|
|
d82987b1b5 | ||
|
|
27f2cc0bff | ||
|
|
830882e296 | ||
|
|
613e3f2655 | ||
|
|
d1c15efc24 | ||
|
|
058a880a8b | ||
|
|
f45154f15c | ||
|
|
d823a18025 | ||
|
|
7ed7b7b436 | ||
|
|
5d7663ce96 | ||
|
|
bfd9141577 | ||
|
|
96840572ef | ||
|
|
d6e96b986f | ||
|
|
39b1883967 | ||
|
|
e27e1114c7 | ||
|
|
7638637518 | ||
|
|
e036470e33 | ||
|
|
5898f3e5d2 | ||
|
|
defe82c9ce | ||
|
|
0735fbcd57 | ||
|
|
e050ca89c7 | ||
|
|
6cf90f739b | ||
|
|
7287f84de4 | ||
|
|
124d9b57d6 | ||
|
|
890a6aac9a | ||
|
|
44cd329125 | ||
|
|
59193b4cd9 | ||
|
|
f953962d08 | ||
|
|
b3e754466c | ||
|
|
f960144212 | ||
|
|
ff9ebb3998 | ||
|
|
5e74115a41 | ||
|
|
dc94886664 | ||
|
|
e12caa94d4 | ||
|
|
dcec570d05 | ||
|
|
b17b226f94 | ||
|
|
a42cacaaf6 | ||
|
|
687fe77cd7 | ||
|
|
fa904de2f2 | ||
|
|
72eb7c4f59 | ||
|
|
2b6fbbdfe0 | ||
|
|
9b0bad5d9f | ||
|
|
be285b6aca | ||
|
|
b027395341 | ||
|
|
eda342262b | ||
|
|
3d159d424e | ||
|
|
67699be3be | ||
|
|
a617f0d436 | ||
|
|
646b24c9fc | ||
|
|
cd2d2f8807 | ||
|
|
0f5729354e | ||
|
|
c749660462 | ||
|
|
05ea7a6225 | ||
|
|
4578b82027 | ||
|
|
d1a760c72e | ||
|
|
0e295716b9 | ||
|
|
c0cada4b55 | ||
|
|
3934cec597 | ||
|
|
1caf10e1e9 | ||
|
|
982b39a8bf | ||
|
|
ab34b21f8d | ||
|
|
8764d7be28 | ||
|
|
6d1655a5c3 | ||
|
|
e37c1c330d | ||
|
|
d52b38eadc | ||
|
|
a24a788e52 | ||
|
|
0e93fade3e | ||
|
|
d794b9069c | ||
|
|
9989cc38d7 | ||
|
|
d81e9a08b2 | ||
|
|
2b2bb0ceb7 | ||
|
|
bdc68b1044 | ||
|
|
9cad7135a9 | ||
|
|
1fa89d67c5 | ||
|
|
ca0bd95c0a | ||
|
|
1c6602e35d | ||
|
|
1e097b0e1d | ||
|
|
af469698da | ||
|
|
2777ee2fa4 | ||
|
|
c24fbb7a12 | ||
|
|
b89410043a | ||
|
|
723ad2ba53 | ||
|
|
8294bf86df | ||
|
|
3d913b8569 | ||
|
|
70c4cf0140 | ||
|
|
34fe9205db | ||
|
|
e400c73636 | ||
|
|
4d55c74f29 | ||
|
|
be9d4c63ec | ||
|
|
f3c682186c | ||
|
|
1d14512cb0 | ||
|
|
83c1199403 | ||
|
|
ada21dbe8d | ||
|
|
09698d33a2 | ||
|
|
e15dd10237 | ||
|
|
02e7b16461 | ||
|
|
978b5814e1 | ||
|
|
c2b37e6ffc | ||
|
|
a7b93ff501 | ||
|
|
ffaafbc77c | ||
|
|
803af8a890 | ||
|
|
4ca7ebc9da | ||
|
|
1acad3522e | ||
|
|
c8eaebeb23 | ||
|
|
aab6a86633 | ||
|
|
9d76a6bb00 | ||
|
|
bc0dbffc01 | ||
|
|
2c35f05560 | ||
|
|
c16a3a6b88 | ||
|
|
7a174d290e | ||
|
|
ea180a1775 | ||
|
|
b538786b00 | ||
|
|
e13efbd400 | ||
|
|
0bf3007f0a | ||
|
|
04797d9406 | ||
|
|
6bf35ab6e8 | ||
|
|
098e62067e | ||
|
|
136a9db13f | ||
|
|
afb7ee36c9 | ||
|
|
83bf27ac9b | ||
|
|
48dcd9640e | ||
|
|
c90eda14e5 | ||
|
|
94211bf833 | ||
|
|
9f3efd03ea | ||
|
|
1187df922a | ||
|
|
7caabe3335 | ||
|
|
665be01b6b | ||
|
|
0bf0e355ec | ||
|
|
f9c12866bf | ||
|
|
de903c650d | ||
|
|
3ca4ac2a21 | ||
|
|
fb957f29a8 | ||
|
|
ff4fa3be7a | ||
|
|
b14ff4d504 | ||
|
|
2489313d28 | ||
|
|
0b50328c6f | ||
|
|
77ae2dc0cd | ||
|
|
a4479e6738 | ||
|
|
24b8c99f57 | ||
|
|
c2fc35f2cc | ||
|
|
418f28b57a | ||
|
|
8b86c49b39 | ||
|
|
44ae11ee60 | ||
|
|
4a4a6511e0 | ||
|
|
5313c50b0e | ||
|
|
cc4f834d74 | ||
|
|
e1afdf8c3c | ||
|
|
881a7d571e | ||
|
|
77faf4ac4a | ||
|
|
4e796ae86e | ||
|
|
8be504e5e5 | ||
|
|
0486979bc9 | ||
|
|
006a002f19 | ||
|
|
c9bb537cdd | ||
|
|
80f89479bf | ||
|
|
8ba1b3f20f | ||
|
|
bcb4d61510 | ||
|
|
3a666373b4 | ||
|
|
d04f3c01a1 | ||
|
|
0eb8acd766 | ||
|
|
7d9e564667 | ||
|
|
2945d450f3 | ||
|
|
3d4fc5d38f | ||
|
|
17fd203141 | ||
|
|
1356577c2e | ||
|
|
a561f789e2 | ||
|
|
7730828560 | ||
|
|
ab8e02617d | ||
|
|
0ae3d3873d | ||
|
|
fdb4d2b6ad | ||
|
|
5d8666e226 | ||
|
|
45e075c8fe | ||
|
|
62c6d60c57 | ||
|
|
c5b9352c34 | ||
|
|
08d024ecad | ||
|
|
eef67ee0cd | ||
|
|
03a8bc9875 | ||
|
|
c1de2e5697 | ||
|
|
747bf136f2 | ||
|
|
fbcab67d8b | ||
|
|
cd8bf003d1 | ||
|
|
9d5cb529c1 | ||
|
|
f897b95d09 | ||
|
|
2a67be3a7c | ||
|
|
145f3ca2a6 | ||
|
|
72d9c18837 | ||
|
|
8514d6ccc8 | ||
|
|
129beaefb0 | ||
|
|
350a7477d6 | ||
|
|
3e7328b00a | ||
|
|
e99e1c47cb | ||
|
|
da928a9b41 | ||
|
|
ba435ce22a | ||
|
|
e981afcca8 | ||
|
|
2615ad3f55 | ||
|
|
1372d408eb | ||
|
|
930b1214fd | ||
|
|
d0df92f542 | ||
|
|
b3d38c46aa | ||
|
|
e0658d16d9 | ||
|
|
2a630b6590 | ||
|
|
7aa6311c64 | ||
|
|
d7041f495d | ||
|
|
98cae65974 | ||
|
|
4d550d7f13 | ||
|
|
6677e47fe8 | ||
|
|
2694c2cb11 | ||
|
|
db0d58e337 | ||
|
|
b64f302eb7 | ||
|
|
6044044852 | ||
|
|
6519120379 | ||
|
|
678de3a122 | ||
|
|
33ecec05c5 | ||
|
|
b694608251 | ||
|
|
bca0669833 | ||
|
|
fa96962fa7 | ||
|
|
186cc288bb | ||
|
|
f318f4a1a9 | ||
|
|
3638a876fe | ||
|
|
fbdcb793ac | ||
|
|
390c9a4dde | ||
|
|
94f691e5d2 | ||
|
|
ca5eddf7ff | ||
|
|
4d8defb4c9 | ||
|
|
c0adb18eff | ||
|
|
7d35bd1649 | ||
|
|
0942bc6268 | ||
|
|
c0d5579cf2 | ||
|
|
af0a9712a6 | ||
|
|
ff844a56c4 | ||
|
|
780d77e29e | ||
|
|
cabcf490bd | ||
|
|
2400da6129 | ||
|
|
f4b6dcb6a1 | ||
|
|
c32c98e667 | ||
|
|
438bb2eb24 | ||
|
|
292249b79a | ||
|
|
90f6d34055 | ||
|
|
2a39dc7045 | ||
|
|
6b9dc925b9 | ||
|
|
fe2f9bdcbc | ||
|
|
c421df494b | ||
|
|
ce0195b456 | ||
|
|
1dcca0ea53 | ||
|
|
611f7f47b1 | ||
|
|
04bdca8e1f | ||
|
|
1abab059f9 | ||
|
|
f2d184ead6 | ||
|
|
6f631309cd | ||
|
|
48cdac2a64 | ||
|
|
0aca0afa07 | ||
|
|
1ea3252602 | ||
|
|
460e7481d0 | ||
|
|
b2c2a33389 | ||
|
|
ca13805937 | ||
|
|
c190ceb9f8 | ||
|
|
f7d0a1fcce | ||
|
|
c1f3f79119 | ||
|
|
228f8ca0ef | ||
|
|
f493c114b5 | ||
|
|
ca29032e1b | ||
|
|
fd863e2607 | ||
|
|
6110616c0c | ||
|
|
a8a5f286b9 | ||
|
|
73f6e51892 | ||
|
|
4af4582204 | ||
|
|
d35f747b5a | ||
|
|
2c628860c8 | ||
|
|
8a1afb0a52 | ||
|
|
f9d74ad0e0 | ||
|
|
28b415f9f2 | ||
|
|
eee619f64b | ||
|
|
3b08a377db | ||
|
|
145f4fd712 | ||
|
|
ce2944b09f | ||
|
|
94a4574a7b | ||
|
|
d8483a9dc9 | ||
|
|
5bc8b131b3 | ||
|
|
1ef286ec7c | ||
|
|
e9afbe8651 | ||
|
|
6bf61155bb | ||
|
|
989ddb35a8 | ||
|
|
53e89f6bd1 | ||
|
|
e5c7de8607 | ||
|
|
a20fc528e1 | ||
|
|
62eb7822e0 | ||
|
|
dd869e30d3 | ||
|
|
85a3f952b9 | ||
|
|
f295793c70 | ||
|
|
0634e38ede | ||
|
|
7b4652ac27 | ||
|
|
4c67888671 | ||
|
|
b166ba7810 | ||
|
|
5ebe0fc4a1 | ||
|
|
a811f181e6 | ||
|
|
0d2cd4982d | ||
|
|
1e5192462e | ||
|
|
07677fa85a | ||
|
|
1b1dac7f40 | ||
|
|
e0a411dd24 | ||
|
|
6733eaa330 | ||
|
|
314f9279b8 | ||
|
|
6a93ad0dce | ||
|
|
064eb16ceb | ||
|
|
4c11295c99 | ||
|
|
cce9e343aa | ||
|
|
8065e19cc1 | ||
|
|
4655e15a85 | ||
|
|
801927aaf5 | ||
|
|
7fa7bd32d3 | ||
|
|
52544115db | ||
|
|
4e1624359a | ||
|
|
66159a44e5 | ||
|
|
b4d2c5d85a | ||
|
|
6b5ae4cdd6 | ||
|
|
18dc40117d | ||
|
|
b378ecf26b | ||
|
|
4c77e426fa | ||
|
|
99b77a2c9c | ||
|
|
17d30f9dd5 | ||
|
|
5ba2509e7c | ||
|
|
b4aedc801b | ||
|
|
802c38bd92 | ||
|
|
fc9cd8f639 | ||
|
|
8a0266cf8d | ||
|
|
21587ba2a4 | ||
|
|
f4680b03eb | ||
|
|
1f756533f9 | ||
|
|
d7cc3b7983 | ||
|
|
0880bd00b0 | ||
|
|
43a42d0d13 | ||
|
|
6a66ec9e45 | ||
|
|
abfacf32e7 | ||
|
|
53787c19ca | ||
|
|
139b886abe | ||
|
|
650f9e9e36 | ||
|
|
5406e19c3e | ||
|
|
20a8e1b40f | ||
|
|
d514539867 | ||
|
|
0b29a93bf3 | ||
|
|
d7e7c94a17 | ||
|
|
56b6ef9d74 | ||
|
|
f51ef85f27 | ||
|
|
afcd25a3f8 | ||
|
|
3f344660c0 | ||
|
|
723741fc60 | ||
|
|
b5f869bf25 | ||
|
|
019e6d8e2d | ||
|
|
65d205f431 | ||
|
|
e1f97646ee | ||
|
|
dc0fdd7c68 | ||
|
|
559ae6dfd0 | ||
|
|
59fdd8eabd | ||
|
|
b932d3f031 | ||
|
|
9ceceef2b8 | ||
|
|
ffd709f823 | ||
|
|
265683b0aa | ||
|
|
a1213f372c | ||
|
|
d5bfc4efb2 | ||
|
|
a6485d42dd | ||
|
|
4312868080 | ||
|
|
6fa40df7fd | ||
|
|
2c7f24590a | ||
|
|
f271ea789d | ||
|
|
e4b30eb087 | ||
|
|
03e6ad8831 | ||
|
|
3a47901a90 | ||
|
|
7227e1147e | ||
|
|
1193eda5d9 | ||
|
|
fd2524429d | ||
|
|
b59f05500e | ||
|
|
8569ee79bc | ||
|
|
0485d741a2 | ||
|
|
68760b36f2 | ||
|
|
98e6adcfca | ||
|
|
3919ac7c7d | ||
|
|
9e2db18480 | ||
|
|
7f17c50738 | ||
|
|
c9cccfbd30 | ||
|
|
180bb3bdd2 | ||
|
|
5984d16da9 | ||
|
|
2e8b25a6dc | ||
|
|
c2fc821fad | ||
|
|
165a5d7208 | ||
|
|
fd2d47a9a8 | ||
|
|
07068e5035 | ||
|
|
d34f96866e | ||
|
|
1a575dec7a | ||
|
|
9a15354314 | ||
|
|
3a64ddc287 | ||
|
|
73e7a0760a | ||
|
|
e37f5a2465 | ||
|
|
6c90b63835 | ||
|
|
c55b9c8c22 | ||
|
|
88a71175aa | ||
|
|
70ccbb6fb5 | ||
|
|
1116e9afda | ||
|
|
db1e312da0 | ||
|
|
879a1b7092 | ||
|
|
dde3545600 | ||
|
|
43e8702e12 | ||
|
|
69aae94e5f | ||
|
|
512a681345 | ||
|
|
9a73bae868 | ||
|
|
0db432ca68 | ||
|
|
7880e11ca0 | ||
|
|
04c046e831 | ||
|
|
5c1075127b | ||
|
|
fd65daebbb | ||
|
|
ea736cea19 | ||
|
|
1e7ee00c60 | ||
|
|
6292c8ed2e | ||
|
|
183da9f83a | ||
|
|
1b39b73b61 | ||
|
|
52606fbc8e | ||
|
|
5a506ac16c | ||
|
|
a25ec048d4 | ||
|
|
d59d42b901 | ||
|
|
2a3a8ce849 | ||
|
|
7ec627d41d | ||
|
|
e374061f90 | ||
|
|
7be48c8034 | ||
|
|
1aded41b33 | ||
|
|
ad6f891290 | ||
|
|
62cf1d6c37 | ||
|
|
97c1b20a8b | ||
|
|
f92f5366b1 | ||
|
|
c9c833806b | ||
|
|
01864b4f6e | ||
|
|
af5eef427e | ||
|
|
49082a8c80 | ||
|
|
02e43719bf | ||
|
|
a552f26f76 | ||
|
|
7c93a0934e | ||
|
|
6cec123fc3 | ||
|
|
e2888aa5a2 | ||
|
|
a662b62d19 | ||
|
|
51430e9e5f | ||
|
|
6c51c4458b | ||
|
|
03dac742cb | ||
|
|
e6dfa35f9d | ||
|
|
305a07a3f3 | ||
|
|
e31c4f541a | ||
|
|
d938861f1a | ||
|
|
8f2b91d95e | ||
|
|
32766f0017 | ||
|
|
57e3b313e2 | ||
|
|
7d058e61b5 | ||
|
|
3e04b88113 | ||
|
|
aeeb8e188a | ||
|
|
39df55fec8 | ||
|
|
67ed8d3986 | ||
|
|
efb71fc38e | ||
|
|
c9a5156e5d | ||
|
|
b56da6919c | ||
|
|
4c5c2170b6 | ||
|
|
d7be8c4cf2 | ||
|
|
c00d3e809a | ||
|
|
689e612af8 | ||
|
|
624698d2d9 | ||
|
|
aad127ed2c | ||
|
|
099b04c557 | ||
|
|
52ab4a58a2 | ||
|
|
8e37ad858a | ||
|
|
f50b184149 | ||
|
|
b1c9b4919a | ||
|
|
75d36ebc1f | ||
|
|
622bef1f7a | ||
|
|
9b72a3337c | ||
|
|
199bc744b3 | ||
|
|
2fd2649eb8 | ||
|
|
a4d75e3dd8 | ||
|
|
eb734e4f37 | ||
|
|
158ddc0b2a | ||
|
|
20b9d12914 | ||
|
|
0183361254 | ||
|
|
4a4d7f5e2f | ||
|
|
6b96ff82de | ||
|
|
cff8c7741c | ||
|
|
2a4f42aba0 | ||
|
|
a45f3a2d59 | ||
|
|
e83ccbafe2 | ||
|
|
c3bfab9285 | ||
|
|
5da7494bfc | ||
|
|
75008d0a22 | ||
|
|
86434d8e18 | ||
|
|
ce873906fc | ||
|
|
07c45cadd1 | ||
|
|
183aede716 | ||
|
|
49b657fce2 | ||
|
|
eff5914fa2 | ||
|
|
63d44c0ebc | ||
|
|
a8cb30b9c5 | ||
|
|
93ac62012d | ||
|
|
8d883bda4b | ||
|
|
ccceabc541 | ||
|
|
899da1b87c | ||
|
|
c17135df3e | ||
|
|
805f159154 | ||
|
|
1e6503c0d9 | ||
|
|
e5b9ca5187 | ||
|
|
726de8e447 | ||
|
|
0abb93228e | ||
|
|
35b9167c60 | ||
|
|
83dca0ad0a | ||
|
|
365fb4b4eb | ||
|
|
d5c56e4601 | ||
|
|
82c3103f82 | ||
|
|
882a25326c | ||
|
|
605113a20a | ||
|
|
50880e6435 | ||
|
|
cb7df5a665 | ||
|
|
d2f472ba7a | ||
|
|
e2dd2c2d69 | ||
|
|
7f2e21de81 | ||
|
|
342ae6e68d | ||
|
|
222e5faab8 | ||
|
|
a1bc9805ce | ||
|
|
c55e65c895 | ||
|
|
ab1242f368 | ||
|
|
dc18196844 | ||
|
|
d03c0be71d | ||
|
|
6ad2727835 | ||
|
|
66e7c73193 | ||
|
|
5353e29afa | ||
|
|
edacf67e75 | ||
|
|
ad87112cfc | ||
|
|
ca0c1533e3 | ||
|
|
0957017a32 | ||
|
|
af88f0ccb2 | ||
|
|
9370123133 | ||
|
|
aaafa18235 | ||
|
|
87467be496 | ||
|
|
421e6178e5 | ||
|
|
f11bc8304c | ||
|
|
697d8a3ba4 | ||
|
|
0abe42d9a4 | ||
|
|
3d731aec19 | ||
|
|
63eff7f236 | ||
|
|
4692e95fd8 | ||
|
|
ebd8e5bbc2 | ||
|
|
cf9341f2ea | ||
|
|
e3e4abf846 | ||
|
|
5017063a7e | ||
|
|
131d77875e | ||
|
|
927c65a1ba | ||
|
|
0c3ad40249 | ||
|
|
3f41cd533b | ||
|
|
b804c087fe | ||
|
|
d0e083ac18 | ||
|
|
a92a27a230 | ||
|
|
2aefc7af1c | ||
|
|
6338039ac0 | ||
|
|
778c3fff73 | ||
|
|
9e90316da9 | ||
|
|
7717631909 | ||
|
|
9f74b05b13 | ||
|
|
9e2d688e1d | ||
|
|
d854ba5c05 | ||
|
|
cabb39fc2c | ||
|
|
1dcc292f41 | ||
|
|
b48768c023 | ||
|
|
aea73403ce | ||
|
|
35620ffe47 | ||
|
|
6b03a95b8d | ||
|
|
454761a6ed | ||
|
|
2edd03361c | ||
|
|
d58dc3186d | ||
|
|
d4861e0952 | ||
|
|
4e99132e23 | ||
|
|
c73d13d4bc | ||
|
|
448d2d333c | ||
|
|
e661cf3cfd | ||
|
|
2bca74bbaa | ||
|
|
24e18fcce6 | ||
|
|
4d6dfd163d | ||
|
|
2e67f4f02c | ||
|
|
bf7c3f17b3 | ||
|
|
f0494a5645 | ||
|
|
32c346a3e7 | ||
|
|
6662456e02 | ||
|
|
b38f21dcc3 | ||
|
|
8c9e6a7c4e | ||
|
|
dbe35078dd | ||
|
|
84948c9b8b | ||
|
|
4a67dd8d02 | ||
|
|
bd7656a80f | ||
|
|
81fdcff708 | ||
|
|
56a69b073f | ||
|
|
ba020720db | ||
|
|
264c1ee381 | ||
|
|
eac0d603f4 | ||
|
|
92eb209c6f | ||
|
|
7dd05d4750 | ||
|
|
75485e79a0 | ||
|
|
8daff7e3da | ||
|
|
e1227b2d68 | ||
|
|
b8cb3fd4a7 | ||
|
|
9e03e396ab | ||
|
|
58f8c2eddb | ||
|
|
58443cafe5 | ||
|
|
50682c9a46 | ||
|
|
c5f9fc0a34 | ||
|
|
8509132ebd | ||
|
|
7d0b041bfa | ||
|
|
7059f2b645 | ||
|
|
85c1de7d3a | ||
|
|
21e39c0389 | ||
|
|
5d6c4c3a46 | ||
|
|
75f8e2e7a1 | ||
|
|
08e8fa3144 | ||
|
|
49a3514147 | ||
|
|
c443d6b475 | ||
|
|
0782c3c820 | ||
|
|
77f508dccb | ||
|
|
454efe03dc | ||
|
|
2517670f80 | ||
|
|
7d0dba3007 | ||
|
|
9862579610 | ||
|
|
e9752fb546 | ||
|
|
d3f8d8a08d | ||
|
|
d32b08b0f4 | ||
|
|
192d1f6dd4 | ||
|
|
c2112c4cbf | ||
|
|
f00f2e3ccf | ||
|
|
6aba49f60f | ||
|
|
eddf441a2a | ||
|
|
1bda769fab | ||
|
|
5b4473b948 | ||
|
|
c3c169aeab | ||
|
|
8c845a249e | ||
|
|
b61c67b5c6 | ||
|
|
46d147ee95 | ||
|
|
4c3b06d640 | ||
|
|
230a7fd7b0 | ||
|
|
724e135f27 | ||
|
|
f336fa0337 | ||
|
|
455d0d83f0 | ||
|
|
92075da942 | ||
|
|
04cc181771 | ||
|
|
1fae526337 | ||
|
|
b9699f4780 | ||
|
|
1a55492ff1 | ||
|
|
30d4df7634 | ||
|
|
f53e1ca4b1 | ||
|
|
641d593216 | ||
|
|
4ed151fb35 | ||
|
|
a31cf3c868 | ||
|
|
b46ce0dec9 | ||
|
|
d1022d9040 | ||
|
|
13a0274f57 | ||
|
|
f1c5b268ca | ||
|
|
6dc8862220 | ||
|
|
1b1a0c8d27 | ||
|
|
2a46d73c95 | ||
|
|
304b4f3f57 | ||
|
|
1ffcd2795a | ||
|
|
26e88c6af0 | ||
|
|
fa03a634d0 | ||
|
|
96b8099015 | ||
|
|
c02536af08 | ||
|
|
28b18fe4c2 | ||
|
|
8d586e1a0c | ||
|
|
8bd0c84e03 | ||
|
|
c11e47b08a | ||
|
|
d4815084ec | ||
|
|
a27bce38cd | ||
|
|
f277489efc | ||
|
|
0b3ac4e39d | ||
|
|
d191517ac5 | ||
|
|
1fab4cfd2b | ||
|
|
7f0c73f67a | ||
|
|
a49253cb6e | ||
|
|
262634739c | ||
|
|
0d699208d3 | ||
|
|
521b978d31 | ||
|
|
dc36691f2c | ||
|
|
6cf0f1b08c | ||
|
|
0309d62bc9 | ||
|
|
a6cd8abb90 | ||
|
|
4468671cef | ||
|
|
1bd91193fd | ||
|
|
57adfe0141 | ||
|
|
4c8e0c808a | ||
|
|
2ef314e27d | ||
|
|
508e5efdd7 | ||
|
|
509ecab3fe | ||
|
|
22dafd6251 | ||
|
|
57db04b389 | ||
|
|
a2548288b3 | ||
|
|
6748efe020 | ||
|
|
ec793c7955 | ||
|
|
4abc718f05 | ||
|
|
247b21b151 | ||
|
|
f35ee6c0c1 | ||
|
|
58dac5c0a5 | ||
|
|
7771b0db10 | ||
|
|
5b92570f50 | ||
|
|
cb9ff15cc4 | ||
|
|
4d8a3db02f | ||
|
|
c29654b504 | ||
|
|
8269d6837c | ||
|
|
4240c895bf | ||
|
|
c496657556 | ||
|
|
7260e52a23 | ||
|
|
50eb4adc4b | ||
|
|
cf5b8a5fca | ||
|
|
31ba215c94 | ||
|
|
9b68aa23a9 | ||
|
|
d628e01247 | ||
|
|
8250007b8e | ||
|
|
f1e7e0c5f7 | ||
|
|
22424fce0f | ||
|
|
1cb4a0a34f | ||
|
|
088a7ed60d | ||
|
|
f11bb03825 | ||
|
|
09c8e52387 | ||
|
|
f94d7e07af | ||
|
|
653544d4c3 | ||
|
|
944ca22d76 | ||
|
|
61285cfd4b | ||
|
|
41de006be6 | ||
|
|
7366a46bc2 | ||
|
|
017d1b710e | ||
|
|
75a1ea749b | ||
|
|
1b96d82cf2 | ||
|
|
c1662ded34 | ||
|
|
cdea2a0ba6 | ||
|
|
4206d7ac8a | ||
|
|
57c77a9a28 | ||
|
|
0ba8597041 | ||
|
|
295e39300c | ||
|
|
982c3df480 | ||
|
|
34ed72fcd0 | ||
|
|
532e815e32 | ||
|
|
a4834270fc | ||
|
|
c7b7661340 | ||
|
|
212c3b399d | ||
|
|
827aa4936a | ||
|
|
a7e96cd9d4 | ||
|
|
43bbb5b231 | ||
|
|
748bc6cf4d | ||
|
|
1924673700 | ||
|
|
a5f122a84e | ||
|
|
826c77d523 | ||
|
|
cf939aefe2 | ||
|
|
b6aec689fe | ||
|
|
fc40e6ac85 | ||
|
|
7271cba7f0 | ||
|
|
64b2e6ea5f | ||
|
|
ce8dc3634f | ||
|
|
4d0547adcd | ||
|
|
c204d7b33f | ||
|
|
075a5eff5a | ||
|
|
940a03f552 | ||
|
|
c9c6c5a5a6 | ||
|
|
a70057a5c8 | ||
|
|
bba6f438cf | ||
|
|
8fc474e8c5 | ||
|
|
fef4448ddb | ||
|
|
997ff1968f | ||
|
|
b8ec926078 | ||
|
|
0ed42e2920 | ||
|
|
30ee9d4a3d | ||
|
|
bef0127348 | ||
|
|
eb6d384798 | ||
|
|
983c234a3e | ||
|
|
7a72619eff | ||
|
|
3dcefa9316 | ||
|
|
ac14ea6d01 | ||
|
|
ead5b2c0f7 | ||
|
|
85ed60cf9a | ||
|
|
fa1096a604 | ||
|
|
3ec182110a | ||
|
|
2c546597b4 | ||
|
|
072848445c | ||
|
|
f0c684707f | ||
|
|
1bba09461b | ||
|
|
4ec5197bc9 | ||
|
|
e774faf45d | ||
|
|
b523b9ec22 | ||
|
|
5a870f9190 | ||
|
|
db46d91ec6 | ||
|
|
20cc284d57 | ||
|
|
8548e00503 | ||
|
|
7245cb2732 | ||
|
|
d4d9ec97a7 | ||
|
|
cd40b26c39 | ||
|
|
cbcc1a5ef4 | ||
|
|
f457dea880 | ||
|
|
60eb45c102 | ||
|
|
7367407ee4 | ||
|
|
146f445774 | ||
|
|
a098ce9fdd | ||
|
|
85bf71c0c2 | ||
|
|
527228e571 | ||
|
|
6847bb8845 | ||
|
|
8ad8ec5344 | ||
|
|
c39bc4ecab | ||
|
|
77fba6d58d | ||
|
|
3c8264e9f2 | ||
|
|
4f2c108088 | ||
|
|
c8a764177e | ||
|
|
be85ec4627 | ||
|
|
8cd07ab692 | ||
|
|
97e4687f1b | ||
|
|
a3f98a21f8 | ||
|
|
b3cf7150d5 | ||
|
|
cb21aa91cc | ||
|
|
4d41488963 | ||
|
|
11d2b5c9fb | ||
|
|
adeff434fd | ||
|
|
1f3bdde45c | ||
|
|
9ab3b1715d | ||
|
|
183d722b56 | ||
|
|
908574f3c4 | ||
|
|
2e562d39e7 | ||
|
|
e3eff970f9 | ||
|
|
9387eb559f | ||
|
|
2125f92281 | ||
|
|
2d652663af | ||
|
|
4c23fa02e9 | ||
|
|
ac51c0013c | ||
|
|
d74fd1e0f7 | ||
|
|
373bf932b3 | ||
|
|
bbdf32cf1e | ||
|
|
48056e41fc | ||
|
|
fe8a9d7dc3 | ||
|
|
f4d86ddddc | ||
|
|
d9da21f1ff | ||
|
|
808368b577 | ||
|
|
be4557c277 | ||
|
|
e63b771fd4 | ||
|
|
4c5638f89d | ||
|
|
de02353983 | ||
|
|
c4d0cdc7ea | ||
|
|
b747208a7b | ||
|
|
5b4500141d | ||
|
|
b526e1bff2 | ||
|
|
433f2d8fe6 | ||
|
|
25b5a7e3b8 | ||
|
|
aaf48bdef0 | ||
|
|
fcc4454c9d | ||
|
|
a44c9bf011 | ||
|
|
fb2846f0a2 | ||
|
|
469f6b45bc | ||
|
|
c4a7ac39dc | ||
|
|
3e8bd3473b | ||
|
|
46e621b4a0 | ||
|
|
14afecd700 | ||
|
|
bf2af7cada | ||
|
|
694af39c9c | ||
|
|
78714d92dc | ||
|
|
da5bf9659e | ||
|
|
77df31256d | ||
|
|
3aa200e3ba | ||
|
|
6b24ca4632 | ||
|
|
7a841eae24 | ||
|
|
af21a6ad36 | ||
|
|
0a70d92da5 | ||
|
|
03ad3b5c30 | ||
|
|
7ae781ecc5 | ||
|
|
04ac076927 | ||
|
|
60010b4545 | ||
|
|
67347205d4 | ||
|
|
48e9dd6baf | ||
|
|
dbf7e89a87 | ||
|
|
78fea999a7 | ||
|
|
b4ae829b3f | ||
|
|
41c1b5ce97 | ||
|
|
2bac4a414a | ||
|
|
cca7b55d3f | ||
|
|
f1f2377826 | ||
|
|
1793540218 | ||
|
|
a8555a76c5 | ||
|
|
b0dd64c9f3 | ||
|
|
4a305a8652 | ||
|
|
29b4da6643 | ||
|
|
fcaced91cc | ||
|
|
624ffc98c1 | ||
|
|
b108dafa3e | ||
|
|
1012416b67 | ||
|
|
761644ee57 | ||
|
|
931397671f | ||
|
|
a6836584c7 | ||
|
|
f7e4f440c8 | ||
|
|
ababce6461 | ||
|
|
335230fc24 | ||
|
|
acb9921ab3 | ||
|
|
f62e2f4a9f | ||
|
|
e904fa851e | ||
|
|
a1aec9a870 | ||
|
|
ef736d02c2 | ||
|
|
9be2321c02 | ||
|
|
26eca6bbd6 | ||
|
|
2b564781b6 | ||
|
|
4ad6a5f683 | ||
|
|
6195f6360a | ||
|
|
520f242051 | ||
|
|
0aef172fff | ||
|
|
d67aa83f48 | ||
|
|
793205e457 | ||
|
|
307630722c | ||
|
|
9dfa48395e | ||
|
|
6dc232dd65 | ||
|
|
7a66be2346 | ||
|
|
7c2291cc62 | ||
|
|
be2cba3200 | ||
|
|
519cd84265 | ||
|
|
67fdd53263 | ||
|
|
acd40ff899 | ||
|
|
c9b6df10f2 | ||
|
|
9dde33b5c1 | ||
|
|
a52b6a2c16 | ||
|
|
0a9c78c26d | ||
|
|
3dc303f929 | ||
|
|
ddc256e410 | ||
|
|
ebcf4c5a95 | ||
|
|
1baf58716f | ||
|
|
f588ea8d76 | ||
|
|
c4da97aeed | ||
|
|
c0f9f7b9a9 | ||
|
|
70dcdc7cf0 | ||
|
|
2c59716e77 | ||
|
|
fd155db9cc | ||
|
|
870cd941e3 | ||
|
|
cf097d7f42 | ||
|
|
ef3677633c | ||
|
|
7fc210a0c3 | ||
|
|
72ed1c0b82 | ||
|
|
b328731fe5 | ||
|
|
ad992d227b | ||
|
|
95974f9f3a | ||
|
|
6f0a79acf9 | ||
|
|
1764bfe60f | ||
|
|
cf7eea30cb | ||
|
|
bb0059c721 | ||
|
|
8c101fdfd6 | ||
|
|
d955af64a0 | ||
|
|
76399013a1 | ||
|
|
0a9eb98cc8 | ||
|
|
60d537fa32 | ||
|
|
5d1fff541b | ||
|
|
fb0c816110 | ||
|
|
04cb02cec7 | ||
|
|
7ba7bc3a1d | ||
|
|
e4df100377 | ||
|
|
6ebf4b860b | ||
|
|
7aea66677b | ||
|
|
44a0c70c8a | ||
|
|
bf5879a97f | ||
|
|
8f2cda7388 | ||
|
|
aa89791b60 | ||
|
|
839940b4bb | ||
|
|
1e10ab1ab6 | ||
|
|
b7be322170 | ||
|
|
8a43580e6b | ||
|
|
50bb491ba2 | ||
|
|
a0e218bd44 | ||
|
|
1631577b8e | ||
|
|
390cb578a9 | ||
|
|
a0efad3cc8 | ||
|
|
919a23c442 | ||
|
|
a945b7b985 | ||
|
|
9fd580e5de | ||
|
|
d5a1ce272c | ||
|
|
384b36ac4c | ||
|
|
007e8dbd20 | ||
|
|
0f4f11a70c | ||
|
|
8d484568ad | ||
|
|
e170c3db29 | ||
|
|
70f5f49c33 | ||
|
|
dc83e1162a | ||
|
|
72cf259d49 | ||
|
|
66dcf0f6f7 | ||
|
|
a0e550911a | ||
|
|
393d15ee0d | ||
|
|
0782418a90 | ||
|
|
f071460d7a | ||
|
|
8e06a4233d | ||
|
|
58b7621559 | ||
|
|
554ad5a494 | ||
|
|
0900f08696 | ||
|
|
bcb960d248 | ||
|
|
c427847944 | ||
|
|
8a5ef19de9 | ||
|
|
ba4bb5c98c | ||
|
|
e0f01fd85e | ||
|
|
c9494a922b | ||
|
|
6d16b5fc93 | ||
|
|
2fabcb5b63 | ||
|
|
b3cfe1d337 | ||
|
|
e6b8dcf5b0 | ||
|
|
0241ddb3ba | ||
|
|
c362a6d7f4 | ||
|
|
8140d90ebc | ||
|
|
b62fa8d9ed | ||
|
|
6de2ca7bd8 | ||
|
|
1987b74179 | ||
|
|
badac565da | ||
|
|
0da456e48c | ||
|
|
26775a625a | ||
|
|
0204e28542 | ||
|
|
2001489006 | ||
|
|
76b48e4907 | ||
|
|
a129cffbd6 | ||
|
|
baa909f296 | ||
|
|
3b6f3d027c | ||
|
|
1f864e379b | ||
|
|
c3e1dd0605 | ||
|
|
3e95d3efd4 | ||
|
|
2b7a1c7f3c | ||
|
|
21ac77ced2 | ||
|
|
9671df2b67 | ||
|
|
9b43c1fc21 | ||
|
|
45a1d4d1e4 | ||
|
|
53e3299e6f | ||
|
|
19a2af4ee3 | ||
|
|
962680abb8 | ||
|
|
ff949328d2 | ||
|
|
96340f0d89 | ||
|
|
d2d5ea3508 | ||
|
|
3169dea1cc | ||
|
|
8d4d1b2e38 | ||
|
|
3d051667ce | ||
|
|
cbfb1cb320 | ||
|
|
3f8ec4c067 | ||
|
|
652f25436f | ||
|
|
b3ba9acc25 | ||
|
|
5b6b6b6076 | ||
|
|
3c02608218 | ||
|
|
0c96b51ed4 | ||
|
|
55def68da8 | ||
|
|
51d3ddff6a | ||
|
|
69fbbfb284 | ||
|
|
a67c18f955 | ||
|
|
540270d3ed | ||
|
|
35764a7200 | ||
|
|
67b83d9d5f | ||
|
|
1d962e960b | ||
|
|
e04d3da985 | ||
|
|
991688f35c | ||
|
|
cadb9539b6 | ||
|
|
ba9150f7c0 | ||
|
|
6c3610decc | ||
|
|
242a7eb914 | ||
|
|
e9516827b9 | ||
|
|
f00f73c5ed | ||
|
|
a1d876b44e | ||
|
|
a0339e95ec | ||
|
|
8f40baf7ff | ||
|
|
06d7f717d4 | ||
|
|
cdc0510e1c | ||
|
|
599ed980c6 | ||
|
|
c4d678a1ce | ||
|
|
986a8d3003 | ||
|
|
c07744564a | ||
|
|
baa6330b13 | ||
|
|
244b3bed3d | ||
|
|
c094c8e9e3 | ||
|
|
061c3e5614 | ||
|
|
4ae2f00d45 | ||
|
|
e2c82d9ef8 | ||
|
|
2ee6b75d11 | ||
|
|
e88e8ca614 | ||
|
|
60e57edc6b | ||
|
|
eaeb4cc1b8 | ||
|
|
a1ddb2ecf2 | ||
|
|
c2a09b4d9c | ||
|
|
efb2f31a3b | ||
|
|
329d472ee7 | ||
|
|
e64b371955 | ||
|
|
560d6767f4 | ||
|
|
48e7f7b7fb | ||
|
|
fd9636beb2 | ||
|
|
aebfe95895 | ||
|
|
1c097fbd5b | ||
|
|
a1e3530c77 | ||
|
|
9303cf382f | ||
|
|
7ec2011ccf | ||
|
|
6825cb2cc7 | ||
|
|
765e225f48 | ||
|
|
2b72a9151d | ||
|
|
62b0722ec5 | ||
|
|
11cacad8d9 | ||
|
|
3dd3aae5f1 | ||
|
|
c91fd2aa7e | ||
|
|
099317a2e2 | ||
|
|
0d82c2830f | ||
|
|
203177e440 | ||
|
|
c9dd7db1a0 | ||
|
|
391f972037 | ||
|
|
f0889b668c | ||
|
|
80333e1899 | ||
|
|
4898d733d0 | ||
|
|
b56d4e83ba | ||
|
|
60f4e39092 | ||
|
|
69074f877b | ||
|
|
cfd52f8e73 | ||
|
|
1db4a6822b | ||
|
|
162c0ebf33 | ||
|
|
010fad236a | ||
|
|
bca86728b0 | ||
|
|
dbfcd02b82 | ||
|
|
b4dc1fbb5b | ||
|
|
c2cee6e8f0 | ||
|
|
cb8148878c | ||
|
|
6c84072c3b | ||
|
|
5a1bfe2cfd | ||
|
|
d2ab86f333 | ||
|
|
f3db15b282 | ||
|
|
e012971519 | ||
|
|
356d4e2c5e | ||
|
|
2aed5a34ef | ||
|
|
6351e80946 | ||
|
|
8e41665939 | ||
|
|
1a3259079c | ||
|
|
6bc3cd49d5 | ||
|
|
ab6a46f2ba | ||
|
|
79f26b947d | ||
|
|
a0cab184db | ||
|
|
8351b0481f | ||
|
|
bd0f7002bc | ||
|
|
377d256ce9 | ||
|
|
4c01697d3f | ||
|
|
2d7c4b4f9d | ||
|
|
0f6cdde65b | ||
|
|
ae5ff31b45 | ||
|
|
7b5e317ad0 | ||
|
|
83169e5fcb | ||
|
|
84124fc70c | ||
|
|
720ecaff17 | ||
|
|
613a3e8479 | ||
|
|
7634b1bbb0 | ||
|
|
3f72e1fd96 | ||
|
|
4b2bc29775 | ||
|
|
1c3ae4f01d | ||
|
|
e2fc3c11a6 | ||
|
|
aa0e0de1d9 |
No files matched your search
+13
-2
@@ -11,6 +11,8 @@
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
.moc.h
|
||||
.moc.cpp
|
||||
config.log
|
||||
/.project
|
||||
/.externalToolBuilders/
|
||||
@@ -53,7 +55,6 @@ DerivedData
|
||||
apple/tmp
|
||||
apple/*.mobileprovision
|
||||
apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
menu/driverspzarch.c
|
||||
/Cg/
|
||||
/GL/
|
||||
/SDL/
|
||||
@@ -74,6 +75,7 @@ libretro-super
|
||||
run.sh
|
||||
convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -119,7 +121,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
/media/libretrodb/
|
||||
|
||||
pkg/apple/iOS/build/
|
||||
pkg/apple/iOS/modules/
|
||||
pkg/apple/build/
|
||||
ui/drivers/qt/moc_*
|
||||
ui/drivers/moc_*
|
||||
@@ -163,3 +164,13 @@ retroarch_switch.lst
|
||||
retroarch_switch.nacp
|
||||
retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.c
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.c
|
||||
gfx/common/wayland/xdg-shell.c
|
||||
gfx/common/wayland/xdg-shell.h
|
||||
+26
-28
@@ -10,7 +10,9 @@ matrix:
|
||||
- g++-mingw-w64-i686
|
||||
- mingw-w64-i686-dev
|
||||
script:
|
||||
- CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
|
||||
- make
|
||||
env: CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
|
||||
- compiler: mingw-x64
|
||||
addons:
|
||||
apt:
|
||||
@@ -18,34 +20,33 @@ matrix:
|
||||
- g++-mingw-w64-x86-64
|
||||
- mingw-w64-x86-64-dev
|
||||
script:
|
||||
- CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
|
||||
- make
|
||||
env: 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: clang
|
||||
addons:
|
||||
# Install a more recent clang than the default
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.8
|
||||
packages:
|
||||
- clang-3.8
|
||||
env: COMPILER_NAME=clang-3.8 CXX=clang++-3.8 CC=clang-3.8
|
||||
# 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
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
osx_image: xcode8
|
||||
script:
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- os: osx
|
||||
osx_image: xcode9.3
|
||||
osx_image: xcode10.1
|
||||
script:
|
||||
- cd ~/
|
||||
- brew install --force-bottle qt5
|
||||
- git clone --depth=50 https://github.com/libretro/libretro-super
|
||||
- cd libretro-super/travis
|
||||
- ./build-retroarch-metal.sh
|
||||
- xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: cd ../retroarch; bash travis_metal_deploy.sh
|
||||
script: bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
|
||||
@@ -60,16 +61,13 @@ env:
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- curl
|
||||
- pkg-config
|
||||
- libglu1-mesa-dev
|
||||
- freeglut3-dev
|
||||
- mesa-common-dev
|
||||
- libsdl1.2-dev
|
||||
- libsdl-image1.2-dev
|
||||
- libsdl-mixer1.2-dev
|
||||
- libsdl-ttf2.0-dev
|
||||
- libsdl2-dev
|
||||
- libusb-1.0-0-dev
|
||||
- qtbase5-dev
|
||||
- qtdeclarative5-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-6.0
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "RetroArch"
|
||||
|
||||
Vendored
+5
-2
@@ -29,7 +29,9 @@
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
@@ -50,7 +52,8 @@
|
||||
"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}"
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
|
||||
Vendored
+24
-1
@@ -7,6 +7,7 @@
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"files.associations": {
|
||||
@@ -19,7 +20,29 @@
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c"
|
||||
"ios": "c",
|
||||
"list": "c",
|
||||
"input_driver.h": "c",
|
||||
"video_driver.h": "c",
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
"hash_map": "c",
|
||||
"hash_set": "c",
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c",
|
||||
"menu_input.h": "c",
|
||||
"tasks_internal.h": "c",
|
||||
"ozone.h": "c",
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c"
|
||||
"thread": "c",
|
||||
"xlocale": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
Vendored
+47
-10
@@ -4,12 +4,49 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "msys2-mingw64 build",
|
||||
"label": "linux clean build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean && ./configure && make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux clean",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean"
|
||||
},
|
||||
{
|
||||
"label": "linux build with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 build",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true },
|
||||
"isDefault": true
|
||||
},
|
||||
|
||||
"command": "./configure; make -j2",
|
||||
"options": {
|
||||
@@ -20,9 +57,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 build with debug symbols",
|
||||
"label": "msys2-mingw64 build with debug symbols",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@@ -36,9 +73,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 rebuild",
|
||||
"label": "msys2-mingw64 rebuild",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@@ -52,9 +89,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 clean",
|
||||
"label": "msys2-mingw64 clean",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@@ -68,9 +105,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 run",
|
||||
"label": "msys2-mingw64 run",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
|
||||
index b90a8e40c3..e57c4df194 100644
|
||||
--- a/gfx/drivers_context/wgl_ctx.c
|
||||
+++ b/gfx/drivers_context/wgl_ctx.c
|
||||
@@ -78,6 +78,47 @@
|
||||
#ifndef WGL_CONTEXT_DEBUG_BIT_ARB
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#endif
|
||||
+
|
||||
+#ifndef WGL_ACCELERATION_ARB
|
||||
+#define WGL_ACCELERATION_ARB 0x2003
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_FULL_ACCELERATION_ARB
|
||||
+#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DRAW_TO_WINDOW_ARB
|
||||
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DOUBLE_BUFFER_ARB
|
||||
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_RED_BITS_ARB
|
||||
+#define WGL_RED_BITS_ARB 0x2015
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_GREEN_BITS_ARB
|
||||
+#define WGL_GREEN_BITS_ARB 0x2017
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_BLUE_BITS_ARB
|
||||
+#define WGL_BLUE_BITS_ARB 0x2019
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_ALPHA_BITS_ARB
|
||||
+#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_PIXEL_TYPE_ARB
|
||||
+#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_TYPE_RGBA_ARB
|
||||
+#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
+#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");
|
||||
wgl_adaptive_vsync = true;
|
||||
}
|
||||
+ if (wgl_has_extension("WGL_ARB_pixel_format", extensions))
|
||||
+ {
|
||||
+ BOOL (WINAPI * wglChoosePixelFormatARB)
|
||||
+ (HDC hdc,
|
||||
+ const int *piAttribIList,
|
||||
+ const FLOAT *pfAttribFList,
|
||||
+ UINT nMaxFormats,
|
||||
+ int *piFormats,
|
||||
+ UINT *nNumFormats);
|
||||
+ UINT nMatchingFormats;
|
||||
+ int index = 0;
|
||||
+ int attribsDesired[] = {
|
||||
+ WGL_DRAW_TO_WINDOW_ARB, 1,
|
||||
+ WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
+ WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
|
||||
+ WGL_RED_BITS_ARB, 10,
|
||||
+ WGL_GREEN_BITS_ARB, 10,
|
||||
+ WGL_BLUE_BITS_ARB, 10,
|
||||
+ WGL_ALPHA_BITS_ARB, 2,
|
||||
+ WGL_DOUBLE_BUFFER_ARB, 1,
|
||||
+ 0,0
|
||||
+ };
|
||||
+ wglChoosePixelFormatARB = (BOOL (WINAPI *) (HDC, const int *,
|
||||
+ const FLOAT*, UINT, int*, UINT*))
|
||||
+ gfx_ctx_wgl_get_proc_address("wglChoosePixelFormatARB");
|
||||
+
|
||||
+ RARCH_LOG("[WGL]: ARB pixel format supported.\n");
|
||||
+
|
||||
+ if (wglChoosePixelFormatARB(win32_hdc, attribsDesired,
|
||||
+ NULL, 1, &index, &nMatchingFormats))
|
||||
+ {
|
||||
+ if (nMatchingFormats == 0)
|
||||
+ {
|
||||
+ RARCH_WARN("No 10bpc WGL_ARB_pixel_formats found!\n");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -25,6 +25,7 @@ Amiga1200Gamer (amigagamer)
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
AridRayne
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asako (asakous)
|
||||
@@ -94,6 +95,7 @@ FIX94
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
Francisco José García García (frangarcj)
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gblues
|
||||
@@ -141,6 +143,7 @@ JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
Ken Rossato (rossato)
|
||||
Krzysztof Haładyn (krzys_h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
l3iggs
|
||||
|
||||
+98
-2
@@ -1,22 +1,118 @@
|
||||
# 1.7.5 (future)
|
||||
# 1.7.7 (future)
|
||||
|
||||
# 1.7.6
|
||||
- ANDROID: Fix Xperia Play input binding.
|
||||
- CHEEVOS: Reset when hardcore mode is toggled.
|
||||
- CHEEVOS: Update the hashing methods to identify NES, SNES and Lynx games (more accurate and accepting headerless ROMs).
|
||||
- COMMON: Add new JSON playlist format.
|
||||
- COMMON: Fix playlist corruption when deleting items.
|
||||
- COMMON: Fix archive progress display calculation.
|
||||
- COMMON: Fix playlist entries appearing with previously used names.
|
||||
- COMMON: Fix screenshot filename with no core or content.
|
||||
- COMMON: Allow compiling without menu support.
|
||||
- CORE UPDATER: Allow sideloading cores from the menu.
|
||||
- CPU FILTERS: Add Normal2x filter.
|
||||
- CRT/LINUX: New Linux switching method partially implemented.
|
||||
- CRT/LINUX: Linux restore desktop resolution fixed.
|
||||
- CRT/LINUX: Monitor index switching and auto enumerate for output detection in Linux (still working on the windows method).
|
||||
- CRT/RASPBERRY PI: Initial support.
|
||||
- DATE: Add Date / Time style options.
|
||||
- DEBUGGING: Add an integrated crash handler for debug builds (see https://docs.libretro.com/tech/debugging)
|
||||
- DISCORD: Register the application name properly.
|
||||
- DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster.
|
||||
- INPUT: Add new menu toggle (hold start button for 2 seconds)
|
||||
- INPUT: Fix arrow keys being incorrectly bound as numpad keys
|
||||
- INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver.
|
||||
- LOCALIZATION: Add Greek translation.
|
||||
- LOCALIZATION: Update German translation.
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Simplified Chinese translation.
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- MENU: New "ozone" menu driver.
|
||||
- MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now)
|
||||
- MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly.
|
||||
- MENU: Add option to enable in-menu sound effects.
|
||||
- MENU/D3D: Scissoring support (will be used for Ozone and menu widgets).
|
||||
- MENU/QT/WIMP: Allow building with MSVC2017.
|
||||
- MENU/QT/WIMP: Add detailed file browser table.
|
||||
- MENU/QT/WIMP: New grid view implementation that is faster and loads thumbnails on-demand.
|
||||
- MENU/QT/WIMP: Thumbnail drag and drop support.
|
||||
- MENU/RGUI: Overhaul custom theme interface + add wallpaper support.
|
||||
- MENU/RGUI: Thumbnail support and thumbnail downscaling.
|
||||
- MENU: Hide password values.
|
||||
- MENU/SOUNDS: Implement in-menu sound effects (not enabled by default for now, still experimental).
|
||||
- MIDI: Add a Linux ALSA driver for MIDI.
|
||||
- NETPLAY: Force fast-save-states when netplay is enabled.
|
||||
- NETPLAY: Allow quick joining subsystem lobbies.
|
||||
- OSX: Initial CoreAudio V3 audio driver (not yet used in release builds).
|
||||
- OSX: OpenGL 3.2 Core support for cores.
|
||||
- PS2: Initial PlayStation2 port.
|
||||
- PS4: Initial PlayStation4 port.
|
||||
- RECORDING: Implement recording options in the menu complete with quality profiles, streaming, and proper file naming
|
||||
- SCANNER: Fix GDI disc scanning.
|
||||
- SHADERS: Fix auto shader preset loading on D3D10, D3D11, D3D12
|
||||
- SUBSYSTEM: Allow more than 10 subsystems
|
||||
- SUBSYSTEM: Cores that use subsystem for complex scenarios can now load content without starting a regular content first
|
||||
- SUBSYSTEM: Remember the last used folder to make loading subsystem type content faster
|
||||
- SWITCH/LIBNX: Improve touch scaling calculation.
|
||||
- SWITCH: Proper button labels.
|
||||
- TVOS: Initial tvOS port.
|
||||
- VULKAN: Fix RGUI crashing at startup.
|
||||
- VULKAN/RGUI: Enable 'Menu Linear Filter' option.
|
||||
- VULKAN: Fix secondary screens in overlays not working.
|
||||
- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend).
|
||||
- WAYLAND: Fix fullscreen toggle.
|
||||
- WIIU: Initial netplay peer-to-peer support. Network information working.
|
||||
- WINDOWS/WSA: Network Information info is blank until first network operation.
|
||||
- WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows.
|
||||
- WINDOWS: Remember window size and position if so desired.
|
||||
- WINDOWS: SSL/TLS connections now work properly.
|
||||
- WINDOWS: Fall back to GDI driver if no accelerated graphics driver is found.
|
||||
- UWP: Initial UWP port.
|
||||
- VFS: Update to version 3.
|
||||
- XBONE: Initial Xbox One port.
|
||||
- XMB/OZONE: Add more icons
|
||||
- XMB: Add Automatic Inverted theme
|
||||
- ???: Easter Egg
|
||||
|
||||
# 1.7.5
|
||||
- CAMERA: Fix Video4Linux2 driver that broke years ago.
|
||||
- CHEEVOS: Support headerless NES hashing.
|
||||
- CONFIG: Add 'Reset To Defaults' setting in Configurations. Thi will reset your config file to defaults.
|
||||
- CHEATS: Add support for Rumble when increase or decrease by the rumble value.
|
||||
- CHEATS: Add cheat variables to allow for updating large portions of memory.
|
||||
- CHEEVOS: Prevent loading states before achievements are fully loaded.
|
||||
- CRT: New porches and interlaced bug fix.
|
||||
- CRT: New functionality, ability to switch between 15KHz and 31KHz, etc.
|
||||
- COMMON: Support for "OEM-102" key (usually '\' on Euro keyboards).
|
||||
- DISCORD: Add 'Ask To Join' Feature.
|
||||
- EMSCRIPTEN: Add stb_font support.
|
||||
- INPUT: Add new menu toggle combos 'L3 + R' and 'L + R' (useful for Switch).
|
||||
- IOS: Use safe area to account for notch for iPhone X and adjust main view.
|
||||
- LOCALIZATION: Update Portuguese / Brazilian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- MENU: Add dropdown lists for many settings.
|
||||
- MENU: Fix crash that could happen when changing core's options on Android.
|
||||
- MENU/QT/WIMP: Add option to rename playlists.
|
||||
- MENU/QT/WIMP: Add option to filter extensions inside archives when adding to a playlist.
|
||||
- MENU/QT/WIMP: Rename playlist entries with 2 single clicks.
|
||||
- MENU/QT/WIMP: Fix shader parameter checkboxes not working
|
||||
- METAL: Add screenshot support.
|
||||
- NETPLAY: Save lobby details received back from server after first announcement.
|
||||
- OPENGL/GLX: Implement Adaptive VSync - GLX_EXT_swap_control_tear.
|
||||
- OPENGL/WGL: Implement Adaptive VSync - WGL_EXT_swap_control_tear.
|
||||
- RUNAHEAD: Fix performance degradation that could happen over time (after approx. 30 mins). Fixed input IDs outside of range 0-35 causing slow performance in runahead.
|
||||
- SWITCH: Add stb_font support.
|
||||
- SWITCH: Add Retro Achievements support.
|
||||
- SWITCH: Add networking support.
|
||||
- SWITCH: Add touchscreen support.
|
||||
- SWITCH: Add OpenGL support.
|
||||
- SWITCH: Merging of RetroNX Nintendo Switch port, based on libnx SDK.
|
||||
- VULKAN: Fix race condition in threaded mailbox emulation.
|
||||
- VULKAN: Maintenance fixes.
|
||||
- WIIU: Fix menu lag when built with DevKitPro r32.
|
||||
|
||||
# 1.7.4
|
||||
- ANDROID: Add sustained performance mode, can be turned on/off in Power Management settings menu.
|
||||
|
||||
@@ -16,26 +16,36 @@ include config.mk
|
||||
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEF_FLAGS :=
|
||||
ASFLAGS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
CFLAGS ?= -O0 -g
|
||||
CXXFLAGS ?= -O0 -g
|
||||
DEFINES += -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
CFLAGS ?= -O3
|
||||
CXXFLAGS ?= -O3
|
||||
DEF_FLAGS += -ffast-math
|
||||
endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
CFLAGS += -DBSD
|
||||
DEF_FLAGS += -DBSD
|
||||
LDFLAGS += -L/usr/local/lib
|
||||
UDEV_CFLAGS += -I/usr/local/include/libepoll-shim
|
||||
UDEV_LIBS += -lepoll-shim
|
||||
endif
|
||||
|
||||
ifneq ($(findstring DOS,$(OS)),)
|
||||
CFLAGS += -march=i386
|
||||
DEF_FLAGS += -march=i386
|
||||
LDFLAGS += -lemu
|
||||
endif
|
||||
|
||||
@@ -75,21 +85,19 @@ ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_FLAG = -O0 -g
|
||||
DEFINES += -DDEBUG -D_DEBUG
|
||||
else
|
||||
OPTIMIZE_FLAG = -O3 -ffast-math
|
||||
ifeq ($(HAVE_DRMINGW), 1)
|
||||
DEF_FLAGS += -DHAVE_DRMINGW
|
||||
LDFLAGS += $(DRMINGW_LIBS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
LDFLAGS += -mwindows
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
APPEND_CFLAGS := $(CFLAGS)
|
||||
CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
|
||||
|
||||
ifeq ($(HAVE_CXX), 1)
|
||||
@@ -164,7 +172,7 @@ all: $(TARGET) config.mk
|
||||
$(MOC_SRC):
|
||||
@$(if $(Q), $(shell echo echo MOC $<),)
|
||||
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
|
||||
$(Q)$(MOC) -o $(MOC_TMP) $<
|
||||
$(Q)QT_SELECT=$(QT_VERSION) $(MOC) -o $(MOC_TMP) $<
|
||||
|
||||
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
||||
|
||||
@@ -243,12 +251,18 @@ install: $(TARGET)
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@if test -d media/assets; then \
|
||||
@if test -d media/assets && test $(HAVE_ASSETS); then \
|
||||
echo "Installing media assets..."; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/xmb; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/glui; \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
if test $(HAVE_MATERIALUI) = 1; then \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_XMB) = 1; then \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_OZONE) = 1; then \
|
||||
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
|
||||
echo "Asset copying done."; \
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# 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!
|
||||
|
||||
# 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_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+\)
|
||||
MOD_CREATOR := Libretro + ModMyClassic
|
||||
MOD_CATEGORY := RetroArch
|
||||
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
|
||||
|
||||
# Platform dependant Variables ########
|
||||
HAKCHI_DIR := RA_Platform-Hakchi
|
||||
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
|
||||
#HAVE_C_A7A7 = Classic Armv7 Cortex A7 optimisation override
|
||||
#HAVE_HAKCHI = Hakchi Hook, change default configurations etc (TODO)
|
||||
|
||||
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
|
||||
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...
|
||||
|
||||
#HAKCHI BUILD (NESC, SNESC)
|
||||
#FYI this build was originally known as RetroArch 'Neo' for Hakchi.
|
||||
@echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
rm -fr /tmp/$(HAKCHI_DIR)
|
||||
cd /tmp/; git clone $(HAKCHI_GIT)
|
||||
cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch
|
||||
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md
|
||||
printf "%s\n" \
|
||||
"---" \
|
||||
"Name: $(CLASSIC_MODS_NAME)" \
|
||||
"Creator: $(MOD_CREATOR)" \
|
||||
"Category: $(MOD_CATEGORY)" \
|
||||
"Version: $(CLASSIC_MODS_VER)" \
|
||||
"Built on: $(shell date)" \
|
||||
"Git commit: $(GIT_COMMIT)" \
|
||||
"---" > /tmp/$(HAKCHI_DIR)/readme.md
|
||||
cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md
|
||||
rm /tmp/$(HAKCHI_DIR)/readme_COPY.md
|
||||
@echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" *
|
||||
mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod .
|
||||
@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! ******************"
|
||||
@echo "*********************************************************************"
|
||||
clean:
|
||||
rm -rf obj-unix
|
||||
rm -f *.d
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
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*
|
||||
+735
-587
File diff suppressed because it is too large.
Load diff
+16
-15
@@ -52,8 +52,8 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
@@ -62,23 +62,25 @@ else
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_SSL = 1
|
||||
#HAVE_NETWORKING = 1
|
||||
#HAVE_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
@@ -104,7 +106,6 @@ MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARG
|
||||
INCDIRS := -I$(CTRULIB)/include
|
||||
LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||
|
||||
|
||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft
|
||||
|
||||
CFLAGS += -mword-relocations \
|
||||
@@ -130,7 +131,12 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps -Ideps/libz -Ideps/7zip -Ideps/stb -Ilibretro-common/include
|
||||
CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/libz \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ilibretro-common/include
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
@@ -142,7 +148,6 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
@@ -151,7 +156,6 @@ else
|
||||
LIBS += -lctru
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_3DSX), 1)
|
||||
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
|
||||
endif
|
||||
@@ -261,7 +265,6 @@ $(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
$(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
$(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ)
|
||||
rm -f $(TARGET).3dsx
|
||||
@@ -275,5 +278,3 @@ clean:
|
||||
rm -f ctr/3dsx_custom_crt0.o
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ OBJ := ctr/ctr_system.o \
|
||||
frontend/drivers/platform_null.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
@@ -94,10 +95,8 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
|
||||
LIBS := -lctru -lm
|
||||
|
||||
|
||||
ifeq ($(BUILD_3DSX), 1)
|
||||
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
|
||||
endif
|
||||
@@ -220,5 +219,3 @@ clean:
|
||||
rm -f ctr/3dsx_custom_crt0.o
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
||||
+4
-2
@@ -7,7 +7,7 @@ PTHREAD = 0
|
||||
OS = Emscripten
|
||||
OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN -DHAVE_STB_FONT
|
||||
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
@@ -16,6 +16,7 @@ HAVE_OPENGLES = 1
|
||||
HAVE_RJPEG = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_EMSCRIPTEN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 0
|
||||
@@ -25,6 +26,7 @@ HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
MEMORY = 536870912
|
||||
HAVE_STB_FONT = 1
|
||||
|
||||
PRECISE_F32 = 1
|
||||
|
||||
@@ -56,7 +58,7 @@ endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += -Ideps/libz -Ideps -Ideps/stb
|
||||
CFLAGS += $(DEF_FLAGS) -Ideps/libz -Ideps -Ideps/stb
|
||||
libretro = libretro_emscripten.bc
|
||||
|
||||
ifneq ($(V), 1)
|
||||
|
||||
+21
-11
@@ -158,8 +158,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
@@ -176,6 +174,8 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
@@ -193,7 +193,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
RARCH_CONSOLE = 1
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
HAVE_LANGEXTRA := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
HAVE_RSOUND := 1
|
||||
@@ -250,7 +250,7 @@ else ifeq ($(platform), psp1)
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_KERNEL_PRX := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
RARCH_CONSOLE = 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
@@ -320,6 +320,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -361,6 +362,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -407,6 +409,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -427,8 +430,8 @@ 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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG
|
||||
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")
|
||||
@@ -454,6 +457,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -475,7 +479,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
|
||||
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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
|
||||
@@ -524,6 +528,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -545,7 +550,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
|
||||
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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
|
||||
@@ -598,6 +603,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -619,7 +625,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
|
||||
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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
|
||||
@@ -672,6 +678,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -693,7 +700,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
|
||||
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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
|
||||
@@ -857,6 +864,10 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
CFLAGS += -DHAVE_NETPLAYDISCOVERY
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
@@ -1063,7 +1074,6 @@ overlays-checkout:
|
||||
$(GIT) clone git://github.com/libretro/common-overlays.git $(OVERLAY_DIR); \
|
||||
fi
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(EXT_TARGET)
|
||||
rm -f $(EXT_INTER_TARGET)
|
||||
|
||||
+54
-17
@@ -1,3 +1,5 @@
|
||||
include version.all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -20,7 +22,7 @@ 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 := -U__linux__ -U__linux -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD)
|
||||
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
|
||||
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -28,30 +30,47 @@ HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_THREADS = 1
|
||||
HAVE_PTHREADS = 1
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_SWITCH = 1
|
||||
HAVE_LIBNX = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_EGL = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_OZONE = 1
|
||||
HAVE_OVERLAY = 1
|
||||
else
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
#BLACKLIST += input/input_overlay.o
|
||||
#BLACKLIST += tasks/task_overlay.o
|
||||
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
@@ -84,26 +103,38 @@ EXEFS_SRC := exefs_src
|
||||
#ROMFS := switch/romfs
|
||||
|
||||
APP_TITLE := RetroArch
|
||||
APP_VERSION := 1.0.0
|
||||
APP_VERSION := $(RARCH_VERSION)
|
||||
APP_AUTHOR := libretro Team
|
||||
NO_ICON := 1
|
||||
APP_ICON := pkg/libnx/retroarch.jpg
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBNX)/include -include $(LIBNX)/include/switch.h #$(shell $(DEVKITPRO)/portlibs/switch/bin/freetype-config --cflags)
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
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 := -lnx -lm -lstdc++ -lbz2 -lpng -lz
|
||||
LIBS := -lstdc++ -lbz2 -lpng -lz -lnx -lm
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
LIBS := -lEGL -lglapi -ldrm_nouveau $(LIBS)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
@@ -145,7 +176,12 @@ else
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OFILES := $(OBJ) libretro_switch.a
|
||||
export OFILES := $(OBJ)
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),)
|
||||
OFILES += libretro_libnx.a
|
||||
endif
|
||||
|
||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
@@ -185,7 +221,8 @@ ifneq ($(ROMFS),)
|
||||
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
DEPENDS_TMP := $(OFILES:.o=.d)
|
||||
DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP))
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
@@ -207,7 +244,7 @@ endif
|
||||
$(OUTPUT).elf : $(OBJ)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(OUTPUT).pfs0 $(OUTPUT).nro $(OUTPUT).elf
|
||||
rm -f $(DEPENDS) $(OBJ) $(OUTPUT).pfs0 $(OUTPUT).nro $(OUTPUT).elf
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# you need a rule like this for each extension you use as binary data
|
||||
|
||||
@@ -45,7 +45,6 @@ export CXX := $(PREFIX)g++
|
||||
export AR := $(PREFIX)ar
|
||||
export OBJCOPY := $(PREFIX)objcopy
|
||||
|
||||
|
||||
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -131,7 +130,6 @@ INCLUDES := $(DEFINCS) \
|
||||
|
||||
MACHDEP := -DBIGENDIAN -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float -ffunction-sections -fdata-sections
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),wii)
|
||||
MACHDEP += -DHW_RVL
|
||||
endif
|
||||
@@ -159,7 +157,6 @@ VPATH := $(LWIPDIR) \
|
||||
$(LIBWIIKEYB) \
|
||||
$(STUBSDIR)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
SOURCES_LWIP := $(LWIPDIR)/network.c \
|
||||
$(LWIPDIR)/netio.c \
|
||||
@@ -264,7 +261,6 @@ SOURCES_OGC_ASM := $(OGCDIR)/cache_asm.S \
|
||||
$(OGCDIR)/system_asm.S \
|
||||
$(OGCDIR)/video_asm.S
|
||||
|
||||
|
||||
ifneq ($(BUILD_LITE), 1)
|
||||
SOURCES_OGC += $(OGCDIR)/dvd.c
|
||||
endif
|
||||
|
||||
+2
-11
@@ -7,7 +7,6 @@ ARCH = amd64
|
||||
BUILD_DIR = objs/msvc
|
||||
CXX_BUILD = 0
|
||||
|
||||
|
||||
WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
|
||||
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
|
||||
@@ -30,6 +29,7 @@ HAVE_WINMM := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
@@ -59,7 +59,7 @@ HAVE_IMAGEVIEWER := 1
|
||||
|
||||
include Makefile.common
|
||||
INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS))
|
||||
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS))
|
||||
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(DEF_FLAGS))
|
||||
CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS))
|
||||
LIBS := $(filter-out -lstdc++,$(LIBS))
|
||||
|
||||
@@ -90,14 +90,12 @@ ifeq ($(ARCH),x86)
|
||||
CROSS =
|
||||
endif
|
||||
|
||||
|
||||
INCLUDE := $(VCINSTALLDIR)include;$(VCINSTALLDIR)atlmfc\include;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um;
|
||||
LIB := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\$(TARGET_ARCH2);$(WindowsSdkDir)lib\$(WindowsSDKVersion)um\$(TARGET_ARCH2);C:\Program Files (x86)\NVIDIA Corporation\Cg\lib.$(TARGET_ARCH2);C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Lib\$(TARGET_ARCH2);
|
||||
LIBPATH := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCINSTALLDIR)bin\\$(CROSS)"):$(shell IFS=$$'\n'; cygpath "$(WindowsSdkDir)\bin\\$(ARCH2)"):$(PATH)
|
||||
|
||||
|
||||
export INCLUDE := $(INCLUDE)
|
||||
export LIB := $(LIB)
|
||||
export LIBPATH := $(LIBPATH)
|
||||
@@ -144,7 +142,6 @@ RC = rc.exe
|
||||
LIBS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
LDFLAGS += -nologo -wx -nxcompat -machine:$(TARGET_ARCH2)
|
||||
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
FLAGS += -GS -Gy -Od -RTC1 -D_SECURE_SCL=1 -Zi
|
||||
FLAGS += -MDd
|
||||
@@ -155,7 +152,6 @@ else
|
||||
FLAGS += -MD
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-debug
|
||||
endif
|
||||
@@ -170,7 +166,6 @@ ifneq ($(V), 1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ := griffin/griffin.o griffin/griffin_cpp.o
|
||||
DEFINES += -DHAVE_GRIFFIN -DUSE_MATH_DEFINES
|
||||
@@ -188,9 +183,6 @@ OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
OBJ := $(OBJ:.o=.obj)
|
||||
|
||||
|
||||
|
||||
|
||||
LDFLAGS += -WX -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup
|
||||
|
||||
DEFINES := $(patsubst -f%,,$(DEFINES))
|
||||
@@ -198,7 +190,6 @@ LDFLAGS := $(patsubst -l%,%.lib,$(LDFLAGS))
|
||||
LIBS := $(filter-out -lm,$(LIBS))
|
||||
LIBS := $(patsubst -l%,%.lib,$(LIBS))
|
||||
|
||||
|
||||
#$(info INCLUDE_DIRS : $(INCLUDE_DIRS))
|
||||
#$(info DEFINES : $(DEFINES))
|
||||
#$(info CFLAGS : $(CFLAGS))
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
# Hakchi version added to ease confusion amongst Hakchi community due to messy past...
|
||||
#
|
||||
# Make sure you have readelf installed (sudo apt-get install readelf) to patch the binary
|
||||
# Might not be needed for your build but it's a useful tool and for safety it should be
|
||||
# run anyway to ensure the SDL2 link isn't broken...
|
||||
|
||||
HAKCHI_VER := Hakchi_Retroarch_Neo_v1_7_3b
|
||||
HAKCHI_NAME := "Hakchi RetroArch 'Neo' v1.7.3b
|
||||
MOD_CREATOR := TheOtherGuys
|
||||
MOD_CATEGORY := RetroArch
|
||||
|
||||
HAKCHI_DIR := hakchi
|
||||
TARGET := retroarch
|
||||
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
readelf -v #Check if you have readelf installed... (sudo apt-get install readelf)
|
||||
./configure --host=arm-linux-gnueabihf --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard
|
||||
make -f Makefile -j HAVE_HAKCHI=1
|
||||
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...
|
||||
#/usr/bin/arm-linux-gnueabihf-strip retroarch
|
||||
rm -f $(HAKCHI_DIR)/bin/retroarch
|
||||
cp retroarch $(HAKCHI_DIR)/bin/retroarch
|
||||
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > $(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
cp $(HAKCHI_DIR)/readme.md $(HAKCHI_DIR)/readme_COPY.md
|
||||
printf "%s\n" \
|
||||
"---" \
|
||||
"Name: $(HAKCHI_VER)" \
|
||||
"Creator: $(MOD_CREATOR)" \
|
||||
"Category: $(MOD_CATEGORY)" \
|
||||
"Version: $(HAKCHI_VER)" \
|
||||
"Built on: $(shell date)" \
|
||||
"Git commit: $(GIT_COMMIT)" \
|
||||
"---" > $(HAKCHI_DIR)/readme.md
|
||||
cat $(HAKCHI_DIR)/readme_COPY.md >> $(HAKCHI_DIR)/readme.md
|
||||
rm $(HAKCHI_DIR)/readme_COPY.md
|
||||
@echo "** BUILDING HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
|
||||
cd $(HAKCHI_DIR)/; tar -czvf "$(HAKCHI_VER).hmod" *
|
||||
mv $(HAKCHI_DIR)/$(HAKCHI_VER).hmod .
|
||||
@echo "** BUILT HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
rm -f $(HAKCHI_DIR)/bin/retroarch
|
||||
rm -f $(HAKCHI_VER).hmod
|
||||
rm -f $(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
TARGET := retroarch_orbis
|
||||
DEBUG ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
PS4_TITLE_ID := RETROARCH
|
||||
PS4_TITLE_NAME := RetroArch
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS =
|
||||
PC_DEVELOPMENT_UDP_PORT =
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
else
|
||||
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 0
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_SOCKET_LEGACY := 0
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_RGUI := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
OBJ += input/drivers/ps4_input.o
|
||||
OBJ += input/drivers_joypad/ps4_joypad.o
|
||||
OBJ += audio/drivers/psp_audio.o
|
||||
#OBJ += frontend/drivers/platform_orbis.o
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PS4SDK)),)
|
||||
$(error "Please set PS4SDK in your environment. export PS4SDK=<path to>ps4sdk")
|
||||
endif
|
||||
|
||||
export PATH := $(PATH):$(PS4SDK)/bin
|
||||
|
||||
PREFIX :=
|
||||
|
||||
CC := $(PREFIX)clang
|
||||
CXX := $(PREFIX)clang
|
||||
AS := $(PREFIX)clang
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Ideps/stb
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -m64 -DORBIS
|
||||
CFLAGS += $(ARCHFLAGS) -std=c11 -mcmodel=large -ffreestanding -nostdlib -nostdinc -fno-builtin -fno-stack-protector
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O2 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ASFLAGS := $(ARCHFLAGS) -I$(PS4SDK)/include -target x86_64-scei-ps4-elf -fPIE
|
||||
LDFLAGS := -O3 -Wall -m64 -nostartfiles -nostdlib -L$(PS4SDK)/lib -pie
|
||||
ARFLAGS := rcs
|
||||
|
||||
CRTFILE ?= $(PS4SDK)/crt0.s
|
||||
|
||||
CFLAGS += -Wall -pedantic -Wno-zero-length-array -Wno-format-pedantic
|
||||
CFLAGS += -D__PS4__ -I$(PS4SDK)/include -I $(PS4SDK)/include/sce
|
||||
CFLAGS += -target x86_64-scei-ps4-elf -fPIE
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
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)
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp %.depend
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c %.depend
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.S
|
||||
%.o: %.S %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.s
|
||||
%.o: %.s %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.depend: ;
|
||||
|
||||
$(TARGET).elf: $(OBJ) libretro_orbis.a
|
||||
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
-include $(OBJ:.o=.depend)
|
||||
@@ -52,4 +52,3 @@ clean:
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
BUILD_PRX = 0
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 0
|
||||
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
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O2
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
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
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB
|
||||
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
|
||||
|
||||
#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
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o
|
||||
|
||||
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
|
||||
EE_OBJS += griffin/griffin.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
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)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
ps2client -h $(PS2_IP) netdump
|
||||
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
debug: clean prepare all run
|
||||
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
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.eeglobal
|
||||
|
||||
#Linking with C++
|
||||
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
|
||||
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
|
||||
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
+1
-1
@@ -112,7 +112,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ PPU_SRCS = frontend/frontend_salamander.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 \
|
||||
|
||||
@@ -128,4 +128,3 @@ clean:
|
||||
rm -f $(OBJ)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -49,7 +49,6 @@ endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
|
||||
EXTRA_TARGETS = EBOOT.PBP
|
||||
PSP_EBOOT_TITLE = RetroArch PSP1
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
|
||||
+3
-4
@@ -24,7 +24,6 @@ else
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 0 # enable later?
|
||||
HAVE_XMB = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
@@ -34,13 +33,13 @@ else
|
||||
HAVE_DYNAMIC = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
|
||||
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path/to/libtransistor/dist/>")
|
||||
endif
|
||||
|
||||
+1
-3
@@ -55,6 +55,7 @@ else
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
@@ -64,7 +65,6 @@ else
|
||||
OBJ += frontend/drivers/platform_psp.o
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
$(error "Please set VITASDK in your environment. export VITASDK=<path to>vitasdk")
|
||||
endif
|
||||
@@ -127,7 +127,6 @@ TARGETS := $(TARGET).vpk
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -140,7 +139,6 @@ all: $(TARGETS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
|
||||
%.o: %.S
|
||||
%.o: %.S %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
|
||||
@@ -44,6 +44,7 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
|
||||
@@ -42,12 +42,13 @@ endif
|
||||
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
||||
LIBS := -lwiiuse -logc -lbte
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
LIBS := -lfat
|
||||
endif
|
||||
|
||||
LIBS += -lwiiuse -logc -lbte
|
||||
|
||||
APP_BOOTER_DIR = wii/app_booter
|
||||
|
||||
OBJ = frontend/frontend_salamander.o \
|
||||
@@ -66,6 +67,7 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
|
||||
+4
-7
@@ -64,6 +64,7 @@ ifeq ($(SALAMANDER_BUILD),1)
|
||||
OBJ += frontend/drivers/platform_null.o
|
||||
OBJ += libretro-common/encodings/encoding_utf.o
|
||||
OBJ += libretro-common/compat/compat_strcasestr.o
|
||||
OBJ += libretro-common/compat/fopen_utf8.o
|
||||
OBJ += libretro-common/file/file_path.o
|
||||
OBJ += libretro-common/string/stdstring.o
|
||||
OBJ += libretro-common/lists/string_list.o
|
||||
@@ -105,7 +106,7 @@ endif
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY
|
||||
# DEFINES += -DWANT_IFADDRS
|
||||
# DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
@@ -115,12 +116,12 @@ endif
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STB_FONT = 1
|
||||
@@ -128,6 +129,7 @@ endif
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
# WANT_IFADDRS = 1
|
||||
HAVE_OVERLAY = 1
|
||||
@@ -137,8 +139,6 @@ endif
|
||||
WANT_IOSUHAX = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST := $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
OBJ += gfx/drivers/gx2_gfx.o
|
||||
OBJ += gfx/drivers_font/wiiu_font.o
|
||||
@@ -242,7 +242,6 @@ ifneq ($(WANT_IOSUHAX), 1)
|
||||
LIBS += -liosuhax
|
||||
endif
|
||||
|
||||
|
||||
RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o
|
||||
HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o $(BUILD_DIR)/wiiu/system/stubs_elf.o
|
||||
|
||||
@@ -264,13 +263,11 @@ endif
|
||||
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%: $(BUILD_DIR)/%
|
||||
cp $< $@
|
||||
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp %.depend
|
||||
@$(if $(Q), echo CXX $<,)
|
||||
@mkdir -p $(dir $@)
|
||||
|
||||
+3
-3
@@ -8,9 +8,11 @@ HAVE_OPENGL = 1
|
||||
HAVE_DYLIB = 1
|
||||
HAVE_D3D9 = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_7ZIP = 1
|
||||
@@ -101,7 +103,6 @@ else
|
||||
WINDRES = windres
|
||||
endif
|
||||
|
||||
|
||||
libretro ?= -lretro
|
||||
|
||||
ifeq ($(DYNAMIC), 1)
|
||||
@@ -122,7 +123,7 @@ else
|
||||
CXXFLAGS += -O3 -ffast-math
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps
|
||||
CFLAGS += $(DEF_FLAGS) -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps
|
||||
CXXFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps -std=c++98 -D__STDC_CONSTANT_MACROS
|
||||
ifeq ($(CXX_BUILD), 1)
|
||||
CFLAGS += -std=c++98 -xc++ -D__STDC_CONSTANT_MACROS
|
||||
@@ -171,4 +172,3 @@ clean:
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
@@ -189,46 +189,46 @@ The default super resolution is 2560. It is displayed just under the CRT switch
|
||||
|
||||
If native resolutions are activated you will need a whole new set of modelines:
|
||||
|
||||
- 512 x 240 @ 50.006977 SNESpal
|
||||
- 256 x 240 @ 50.006977 SNESpal
|
||||
- 256 x 448 @ 50.006977 SNESpal
|
||||
- 512 x 224 @ 50.006977 SNESpal
|
||||
- 512 x 240 @ 50.006977 SNESpal
|
||||
- 512 x 448 @ 50.006977 SNESpal
|
||||
- 256 x 240 @ 60.098812 SNESntsc
|
||||
- 256 x 448 @ 60.098812 SNESntsc
|
||||
- 512 x 240 @ 60.098812 SNESntsc
|
||||
- 512 x 224 @ 60.098812 SNESntsc
|
||||
- 512 x 448 @ 60.098812 SNESntsc
|
||||
- 256 x 240 @ 50.006977 SNESpal
|
||||
- 256 x 448 @ 50.006977 SNESpal
|
||||
- 256 x 240 @ 60.098812 SNESntsc
|
||||
- 256 x 448 @ 60.098812 SNESntsc
|
||||
- 320 x 240 @ 59.922745 MDntsc
|
||||
- 320 x 448 @ 59.922745 MDntp
|
||||
- 320 x 480 @ 59.922745 MDntsc
|
||||
- 256 x 192 @ 59.922745 MDntsc
|
||||
- 320 x 224 @ 59.922745 MDntsc
|
||||
- 256 x 224 @ 59.922745 MDntsc
|
||||
- 320 x 288 @ 49.701458 MDpal
|
||||
- 320 x 576 @ 49.701458 MDpal
|
||||
- 320 x 224 @ 59.922745 MDntsc
|
||||
- 320 x 240 @ 59.922745 MDntsc
|
||||
- 320 x 448 @ 59.922745 MDntsc
|
||||
- 320 x 480 @ 59.922745 MDntsc
|
||||
- 256 x 192 @ 49.701458 MDpal
|
||||
- 256 x 224 @ 49.701458 MDpal
|
||||
- 320 x 224 @ 49.701458 MDpal
|
||||
- 320 x 240 @ 49.701458 MDpal
|
||||
- 320 x 288 @ 49.701458 MDpal
|
||||
- 320 x 448 @ 49.701458 MDpal
|
||||
- 320 x 480 @ 49.701458 MDpal
|
||||
- 256 x 224 @ 49.701458 MDpal
|
||||
- 320 x 576 @ 49.701458 MDpal
|
||||
- 256 x 288 @ 49.701458 MSYSpal
|
||||
- 256 x 240 @ 60.098812 NESntsc
|
||||
- 256 x 240 @ 50.006977 NESpal
|
||||
|
||||
- 640 x 480 @ 60.130001 N64ntsc
|
||||
- 640 x 237 @ 60.130001 N64ntsc
|
||||
- 640 x 240 @ 60.130001 N64ntsc
|
||||
- 640 x 480 @ 60.130001 N64ntsc
|
||||
- 640 x 288 @ 50.000000 N64pal
|
||||
- 640 x 480 @ 50.000000 N64pal
|
||||
- 640 x 576 @ 50.000000 n64pal
|
||||
- 640 x 288 @ 50.000000 n64pal
|
||||
- 640 x 576 @ 50.000000 N64pal
|
||||
|
||||
- 256 x 252 @ 49.759998 PSXpal
|
||||
- 384 x 252 @ 49.759998 PSXpal
|
||||
- 640 x 540 @ 49.759998 PSXpal
|
||||
- 320 x 252 @ 49.759998 PSXpal
|
||||
- 384 x 252 @ 49.759998 PSXpal
|
||||
- 640 x 252 @ 49.759998 PSXpal
|
||||
- 640 x 540 @ 49.759998 PSXpal
|
||||
|
||||
- 384 x 240 @ 59.941002 PSXntsc
|
||||
- 256 x 480 @ 59.941002 PSXntsc
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AUDIO_DEFINES__H
|
||||
#define __AUDIO_DEFINES__H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_CHUNK_SIZE_BLOCKING 512
|
||||
|
||||
/* So we don't get complete line-noise when fast-forwarding audio. */
|
||||
#define AUDIO_CHUNK_SIZE_NONBLOCKING 2048
|
||||
|
||||
#define AUDIO_MAX_RATIO 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 4)
|
||||
|
||||
/* do not define more than (MAX_SYSTEM_STREAMS - MAX_STREAMS) */
|
||||
enum audio_mixer_system_slot
|
||||
{
|
||||
AUDIO_MIXER_SYSTEM_SLOT_OK = AUDIO_MIXER_MAX_STREAMS,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_CANCEL,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_NOTICE,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM
|
||||
};
|
||||
|
||||
enum audio_action
|
||||
{
|
||||
AUDIO_ACTION_NONE = 0,
|
||||
AUDIO_ACTION_RATE_CONTROL_DELTA,
|
||||
AUDIO_ACTION_MIXER_MUTE_ENABLE,
|
||||
AUDIO_ACTION_MUTE_ENABLE,
|
||||
AUDIO_ACTION_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER
|
||||
};
|
||||
|
||||
enum audio_mixer_slot_selection_type
|
||||
{
|
||||
AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC = 0,
|
||||
AUDIO_MIXER_SLOT_SELECTION_MANUAL
|
||||
};
|
||||
|
||||
enum audio_mixer_stream_type
|
||||
{
|
||||
AUDIO_STREAM_TYPE_NONE = 0,
|
||||
AUDIO_STREAM_TYPE_USER,
|
||||
AUDIO_STREAM_TYPE_SYSTEM
|
||||
};
|
||||
|
||||
enum audio_mixer_state
|
||||
{
|
||||
AUDIO_STREAM_STATE_NONE = 0,
|
||||
AUDIO_STREAM_STATE_STOPPED,
|
||||
AUDIO_STREAM_STATE_PLAYING,
|
||||
AUDIO_STREAM_STATE_PLAYING_LOOPED,
|
||||
AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL
|
||||
};
|
||||
|
||||
typedef struct audio_statistics
|
||||
{
|
||||
float average_buffer_saturation;
|
||||
float std_deviation_percentage;
|
||||
float close_to_underrun;
|
||||
float close_to_blocking;
|
||||
unsigned samples;
|
||||
} audio_statistics_t;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+303
-37
@@ -21,10 +21,12 @@
|
||||
#include <lists/string_list.h>
|
||||
#include <audio/conversion/float_to_s16.h>
|
||||
#include <audio/conversion/s16_to_float.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include <audio/dsp_filter.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
@@ -35,6 +37,8 @@
|
||||
#include "../gfx/video_driver.h"
|
||||
#include "../record/record_driver.h"
|
||||
#include "../frontend/frontend_driver.h"
|
||||
#include "../tasks/task_audio_mixer.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
|
||||
#include "../command.h"
|
||||
#include "../driver.h"
|
||||
@@ -42,9 +46,17 @@
|
||||
#include "../retroarch.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../list_special.h"
|
||||
#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"
|
||||
|
||||
/**
|
||||
* db_to_gain:
|
||||
* @db : Decibels.
|
||||
@@ -65,6 +77,9 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_TINYALSA
|
||||
&audio_tinyalsa,
|
||||
#endif
|
||||
#if defined(HAVE_AUDIOIO)
|
||||
&audio_audioio,
|
||||
#endif
|
||||
#if defined(HAVE_OSS) || defined(HAVE_OSS_BSD)
|
||||
&audio_oss,
|
||||
#endif
|
||||
@@ -74,6 +89,9 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_COREAUDIO
|
||||
&audio_coreaudio,
|
||||
#endif
|
||||
#ifdef HAVE_COREAUDIO3
|
||||
&audio_coreaudio3,
|
||||
#endif
|
||||
#ifdef HAVE_AL
|
||||
&audio_openal,
|
||||
#endif
|
||||
@@ -116,22 +134,25 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef EMSCRIPTEN
|
||||
&audio_rwebaudio,
|
||||
#endif
|
||||
#if defined(PSP) || defined(VITA)
|
||||
#if defined(PSP) || defined(VITA) || defined(ORBIS)
|
||||
&audio_psp,
|
||||
#endif
|
||||
#if defined(PS2)
|
||||
&audio_ps2,
|
||||
#endif
|
||||
#ifdef _3DS
|
||||
&audio_ctr_csnd,
|
||||
&audio_ctr_dsp,
|
||||
#endif
|
||||
#ifdef SWITCH
|
||||
&audio_switch,
|
||||
&audio_switch_thread,
|
||||
&audio_switch,
|
||||
#endif
|
||||
&audio_null,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}};
|
||||
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS] = {{0}};
|
||||
|
||||
static size_t audio_driver_chunk_size = 0;
|
||||
static size_t audio_driver_chunk_nonblock_size = 0;
|
||||
@@ -179,13 +200,36 @@ static const audio_driver_t *current_audio = NULL;
|
||||
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(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
static void audio_mixer_menu_stop_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
#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();
|
||||
|
||||
@@ -197,14 +241,14 @@ enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i)
|
||||
{
|
||||
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
|
||||
if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1))
|
||||
return NULL;
|
||||
return &audio_mixer_streams[i];
|
||||
}
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i)
|
||||
{
|
||||
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
|
||||
if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1))
|
||||
return "N/A";
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
return audio_mixer_streams[i].name;
|
||||
@@ -386,12 +430,11 @@ static bool audio_driver_deinit_internal(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_init(unsigned out_rate)
|
||||
static void audio_driver_mixer_init(unsigned audio_out_rate)
|
||||
{
|
||||
audio_mixer_init(out_rate);
|
||||
audio_mixer_init(audio_out_rate);
|
||||
}
|
||||
|
||||
|
||||
static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
{
|
||||
unsigned new_rate = 0;
|
||||
@@ -442,6 +485,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
#ifdef HAVE_THREADS
|
||||
if (audio_cb_inited)
|
||||
{
|
||||
audio_is_threaded = true;
|
||||
RARCH_LOG("[Audio]: Starting threaded audio driver ...\n");
|
||||
if (!audio_init_thread(
|
||||
¤t_audio,
|
||||
@@ -460,6 +504,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
audio_is_threaded = false;
|
||||
audio_driver_context_audio_data =
|
||||
current_audio->init(*settings->arrays.audio_device ?
|
||||
settings->arrays.audio_device : NULL,
|
||||
@@ -502,6 +547,15 @@ 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,
|
||||
@@ -514,6 +568,8 @@ 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);
|
||||
|
||||
@@ -584,9 +640,13 @@ 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();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -604,6 +664,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
bool is_active = false;
|
||||
const void *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
float audio_volume_gain = !audio_driver_mute_enable ?
|
||||
@@ -612,9 +673,13 @@ 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);
|
||||
|
||||
@@ -624,13 +689,16 @@ 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;
|
||||
|
||||
|
||||
if (audio_driver_dsp)
|
||||
{
|
||||
struct retro_dsp_data dsp_data;
|
||||
@@ -691,9 +759,15 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
src_data.ratio *= settings->floats.slowmotion_ratio;
|
||||
}
|
||||
|
||||
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
|
||||
audio_driver_lock();
|
||||
|
||||
if (audio_mixer_active)
|
||||
audio_resampler_lock();
|
||||
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
|
||||
audio_resampler_unlock();
|
||||
|
||||
is_active = audio_mixer_active;
|
||||
|
||||
if (is_active)
|
||||
{
|
||||
bool override = audio_driver_mixer_mute_enable ? true :
|
||||
(audio_driver_mixer_volume_gain != 1.0f) ? true : false;
|
||||
@@ -703,6 +777,8 @@ 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;
|
||||
|
||||
@@ -717,9 +793,13 @@ 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();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -731,14 +811,24 @@ 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);
|
||||
@@ -749,9 +839,8 @@ void audio_driver_sample(int16_t left, int16_t right)
|
||||
void audio_driver_menu_sample(void)
|
||||
{
|
||||
static int16_t samples_buf[1024] = {0};
|
||||
struct retro_system_av_info
|
||||
*av_info = video_viewport_get_system_av_info();
|
||||
const struct retro_system_timing *info =
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
const struct retro_system_timing *info =
|
||||
(const struct retro_system_timing*)&av_info->timing;
|
||||
unsigned sample_count = (info->sample_rate / info->fps) * 2;
|
||||
while (sample_count > 1024)
|
||||
@@ -796,6 +885,9 @@ size_t audio_driver_sample_batch(const int16_t *data, size_t frames)
|
||||
**/
|
||||
void audio_driver_sample_rewind(int16_t left, int16_t right)
|
||||
{
|
||||
if (audio_driver_rewind_ptr == 0)
|
||||
return;
|
||||
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] = right;
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] = left;
|
||||
}
|
||||
@@ -819,7 +911,10 @@ size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames)
|
||||
size_t samples = frames << 1;
|
||||
|
||||
for (i = 0; i < samples; i++)
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] = data[i];
|
||||
{
|
||||
if (audio_driver_rewind_ptr > 0)
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] = data[i];
|
||||
}
|
||||
|
||||
return frames;
|
||||
}
|
||||
@@ -905,11 +1000,13 @@ void audio_driver_setup_rewind(void)
|
||||
|
||||
for (i = 0; i < audio_driver_data_ptr; i += 2)
|
||||
{
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] =
|
||||
audio_driver_output_samples_conv_buf[i + 1];
|
||||
if (audio_driver_rewind_ptr > 0)
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] =
|
||||
audio_driver_output_samples_conv_buf[i + 1];
|
||||
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] =
|
||||
audio_driver_output_samples_conv_buf[i + 0];
|
||||
if (audio_driver_rewind_ptr > 0)
|
||||
audio_driver_rewind_buf[--audio_driver_rewind_ptr] =
|
||||
audio_driver_output_samples_conv_buf[i + 0];
|
||||
}
|
||||
|
||||
audio_driver_data_ptr = 0;
|
||||
@@ -954,10 +1051,13 @@ 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)
|
||||
@@ -1041,7 +1141,7 @@ static int audio_mixer_find_index(audio_mixer_sound_t *sound)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
|
||||
{
|
||||
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
|
||||
if (handle == sound)
|
||||
@@ -1083,6 +1183,28 @@ static void audio_mixer_play_stop_cb(
|
||||
}
|
||||
}
|
||||
|
||||
static void audio_mixer_menu_stop_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason)
|
||||
{
|
||||
int idx = audio_mixer_find_index(sound);
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
case AUDIO_MIXER_SOUND_FINISHED:
|
||||
if (idx >= 0)
|
||||
{
|
||||
unsigned i = (unsigned)idx;
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_STOPPED;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
}
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_STOPPED:
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_REPEATED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void audio_mixer_play_stop_sequential_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason)
|
||||
{
|
||||
@@ -1100,6 +1222,11 @@ static void audio_mixer_play_stop_sequential_cb(
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
free(audio_mixer_streams[i].name);
|
||||
|
||||
if (i < AUDIO_MIXER_MAX_STREAMS)
|
||||
audio_mixer_streams[i].stream_type = AUDIO_STREAM_TYPE_USER;
|
||||
else
|
||||
audio_mixer_streams[i].stream_type = AUDIO_STREAM_TYPE_SYSTEM;
|
||||
|
||||
audio_mixer_streams[i].name = NULL;
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
@@ -1110,7 +1237,7 @@ static void audio_mixer_play_stop_sequential_cb(
|
||||
|
||||
i++;
|
||||
|
||||
for (; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
for (; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
|
||||
{
|
||||
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_STOPPED)
|
||||
{
|
||||
@@ -1127,10 +1254,11 @@ static void audio_mixer_play_stop_sequential_cb(
|
||||
}
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_get_free_stream_slot(unsigned *id)
|
||||
static bool audio_driver_mixer_get_free_stream_slot(unsigned *id, enum audio_mixer_stream_type type)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
unsigned i = (type == AUDIO_STREAM_TYPE_USER) ? 0 : AUDIO_MIXER_MAX_STREAMS;
|
||||
unsigned count = (type == AUDIO_STREAM_TYPE_USER) ? AUDIO_MIXER_MAX_STREAMS : AUDIO_MIXER_MAX_SYSTEM_STREAMS;
|
||||
for (; i < count; i++)
|
||||
{
|
||||
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_NONE)
|
||||
{
|
||||
@@ -1150,9 +1278,22 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb;
|
||||
bool looped = false;
|
||||
void *buf = NULL;
|
||||
|
||||
if (!audio_driver_mixer_get_free_stream_slot(&free_slot))
|
||||
|
||||
if (params->stream_type == AUDIO_STREAM_TYPE_NONE)
|
||||
return false;
|
||||
|
||||
switch (params->slot_selection_type)
|
||||
{
|
||||
case AUDIO_MIXER_SLOT_SELECTION_MANUAL:
|
||||
free_slot = params->slot_selection_idx;
|
||||
break;
|
||||
case AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC:
|
||||
default:
|
||||
if (!audio_driver_mixer_get_free_stream_slot(
|
||||
&free_slot, params->stream_type))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (params->state == AUDIO_STREAM_STATE_NONE)
|
||||
return false;
|
||||
@@ -1212,22 +1353,28 @@ 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;
|
||||
audio_mixer_streams[free_slot].name = !string_is_empty(params->basename) ? strdup(params->basename) : NULL;
|
||||
audio_mixer_streams[free_slot].buf = buf;
|
||||
audio_mixer_streams[free_slot].handle = handle;
|
||||
audio_mixer_streams[free_slot].voice = voice;
|
||||
audio_mixer_streams[free_slot].stream_type = params->stream_type;
|
||||
audio_mixer_streams[free_slot].type = params->type;
|
||||
audio_mixer_streams[free_slot].state = params->state;
|
||||
audio_mixer_streams[free_slot].volume = params->volume;
|
||||
audio_mixer_streams[free_slot].stop_cb = stop_cb;
|
||||
|
||||
audio_driver_unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i)
|
||||
{
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return AUDIO_STREAM_STATE_NONE;
|
||||
|
||||
return audio_mixer_streams[i].state;
|
||||
@@ -1237,7 +1384,7 @@ static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type)
|
||||
{
|
||||
bool set_state = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
@@ -1259,12 +1406,128 @@ 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)
|
||||
{
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (!is_inited)
|
||||
audio_driver_mixer_play_menu_sound_looped(AUDIO_MIXER_SYSTEM_SLOT_BGM);
|
||||
}
|
||||
|
||||
void audio_driver_load_menu_sounds(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *sounds_path = NULL;
|
||||
char *sounds_fallback_path = NULL;
|
||||
const char *path_ok = NULL;
|
||||
const char *path_cancel = NULL;
|
||||
const char *path_notice = NULL;
|
||||
const char *path_bgm = NULL;
|
||||
struct string_list *list = NULL;
|
||||
struct string_list *list_fallback = NULL;
|
||||
int i = 0;
|
||||
|
||||
sounds_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
sounds_fallback_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
sounds_path[0] = sounds_fallback_path[0] = '\0';
|
||||
|
||||
fill_pathname_join(
|
||||
sounds_fallback_path,
|
||||
settings->paths.directory_assets,
|
||||
"sounds",
|
||||
PATH_MAX_LENGTH * sizeof(char)
|
||||
);
|
||||
|
||||
fill_pathname_application_special(sounds_path, PATH_MAX_LENGTH * sizeof(char), APPLICATION_SPECIAL_DIRECTORY_ASSETS_SOUNDS);
|
||||
|
||||
list = dir_list_new(sounds_path, MENU_SOUND_FORMATS, false, false, false, false);
|
||||
list_fallback = dir_list_new(sounds_fallback_path, MENU_SOUND_FORMATS, false, false, false, false);
|
||||
|
||||
if (!list)
|
||||
{
|
||||
list = list_fallback;
|
||||
list_fallback = NULL;
|
||||
}
|
||||
|
||||
if (!list || list->size == 0)
|
||||
goto end;
|
||||
|
||||
if (list_fallback && list_fallback->size > 0)
|
||||
{
|
||||
for (i = 0; i < list_fallback->size; i++)
|
||||
{
|
||||
if (list->size == 0 || !string_list_find_elem(list, list_fallback->elems[i].data))
|
||||
{
|
||||
union string_list_elem_attr attr = {0};
|
||||
string_list_append(list, list_fallback->elems[i].data, attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
const char *path = list->elems[i].data;
|
||||
const char *ext = path_get_extension(path);
|
||||
char basename_noext[PATH_MAX_LENGTH];
|
||||
|
||||
basename_noext[0] = '\0';
|
||||
|
||||
fill_pathname_base_noext(basename_noext, path, sizeof(basename_noext));
|
||||
|
||||
if (audio_driver_mixer_extension_supported(ext))
|
||||
{
|
||||
if (string_is_equal_noncase(basename_noext, "ok"))
|
||||
path_ok = path;
|
||||
if (string_is_equal_noncase(basename_noext, "cancel"))
|
||||
path_cancel = path;
|
||||
if (string_is_equal_noncase(basename_noext, "notice"))
|
||||
path_notice = path;
|
||||
if (string_is_equal_noncase(basename_noext, "bgm"))
|
||||
path_bgm = path;
|
||||
}
|
||||
}
|
||||
|
||||
if (path_ok && settings->bools.audio_enable_menu_ok)
|
||||
task_push_audio_mixer_load(path_ok, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_OK);
|
||||
if (path_cancel && settings->bools.audio_enable_menu_cancel)
|
||||
task_push_audio_mixer_load(path_cancel, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_CANCEL);
|
||||
if (path_notice && settings->bools.audio_enable_menu_notice)
|
||||
task_push_audio_mixer_load(path_notice, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_NOTICE);
|
||||
if (path_bgm && settings->bools.audio_enable_menu_bgm)
|
||||
task_push_audio_mixer_load(path_bgm, audio_driver_load_menu_bgm_callback, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_BGM);
|
||||
|
||||
end:
|
||||
if (list)
|
||||
string_list_free(list);
|
||||
if (list_fallback)
|
||||
string_list_free(list_fallback);
|
||||
if (sounds_path)
|
||||
free(sounds_path);
|
||||
if (sounds_fallback_path)
|
||||
free(sounds_fallback_path);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_play_stop_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_menu_sound_looped(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_menu_stop_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING_LOOPED);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_menu_sound(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_menu_stop_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_play_stop_cb;
|
||||
@@ -1279,7 +1542,7 @@ void audio_driver_mixer_play_stream_sequential(unsigned i)
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i)
|
||||
{
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return 0.0f;
|
||||
|
||||
return audio_mixer_streams[i].volume;
|
||||
@@ -1289,7 +1552,7 @@ void audio_driver_mixer_set_stream_volume(unsigned i, float vol)
|
||||
{
|
||||
audio_mixer_voice_t *voice = NULL;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return;
|
||||
|
||||
audio_mixer_streams[i].volume = vol;
|
||||
@@ -1304,7 +1567,7 @@ void audio_driver_mixer_stop_stream(unsigned i)
|
||||
{
|
||||
bool set_state = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
@@ -1334,7 +1597,7 @@ void audio_driver_mixer_remove_stream(unsigned i)
|
||||
{
|
||||
bool destroy = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
@@ -1376,7 +1639,7 @@ static void audio_driver_mixer_deinit(void)
|
||||
|
||||
audio_mixer_active = false;
|
||||
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
|
||||
{
|
||||
audio_driver_mixer_stop_stream(i);
|
||||
audio_driver_mixer_remove_stream(i);
|
||||
@@ -1389,6 +1652,11 @@ 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;
|
||||
return true;
|
||||
@@ -1490,7 +1758,6 @@ error:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool audio_driver_stop(void)
|
||||
{
|
||||
if (!current_audio || !current_audio->stop
|
||||
@@ -1580,7 +1847,6 @@ void audio_set_bool(enum audio_action action, bool val)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void audio_set_float(enum audio_action action, float val)
|
||||
{
|
||||
switch (action)
|
||||
|
||||
+27
-51
@@ -22,46 +22,21 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <audio/audio_mixer.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <audio/audio_mixer.h>
|
||||
|
||||
#include "audio_defines.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_CHUNK_SIZE_BLOCKING 512
|
||||
|
||||
/* So we don't get complete line-noise when fast-forwarding audio. */
|
||||
#define AUDIO_CHUNK_SIZE_NONBLOCKING 2048
|
||||
|
||||
#define AUDIO_MAX_RATIO 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
enum audio_action
|
||||
{
|
||||
AUDIO_ACTION_NONE = 0,
|
||||
AUDIO_ACTION_RATE_CONTROL_DELTA,
|
||||
AUDIO_ACTION_MIXER_MUTE_ENABLE,
|
||||
AUDIO_ACTION_MUTE_ENABLE,
|
||||
AUDIO_ACTION_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER
|
||||
};
|
||||
|
||||
enum audio_mixer_state
|
||||
{
|
||||
AUDIO_STREAM_STATE_NONE = 0,
|
||||
AUDIO_STREAM_STATE_STOPPED,
|
||||
AUDIO_STREAM_STATE_PLAYING,
|
||||
AUDIO_STREAM_STATE_PLAYING_LOOPED,
|
||||
AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL
|
||||
};
|
||||
|
||||
typedef struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
float volume;
|
||||
void *buf;
|
||||
@@ -69,14 +44,19 @@ typedef struct audio_mixer_stream
|
||||
size_t bufsize;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_statistics
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
float average_buffer_saturation;
|
||||
float std_deviation_percentage;
|
||||
float close_to_underrun;
|
||||
float close_to_blocking;
|
||||
unsigned samples;
|
||||
} audio_statistics_t;
|
||||
float volume;
|
||||
enum audio_mixer_slot_selection_type slot_selection_type;
|
||||
unsigned slot_selection_idx;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
void *buf;
|
||||
char *basename;
|
||||
size_t bufsize;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
} audio_mixer_stream_params_t;
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
@@ -160,17 +140,6 @@ typedef struct audio_driver
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
float volume;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
void *buf;
|
||||
char *basename;
|
||||
size_t bufsize;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
} audio_mixer_stream_params_t;
|
||||
|
||||
void audio_driver_destroy_data(void);
|
||||
|
||||
void audio_driver_set_own_driver(void);
|
||||
@@ -295,6 +264,10 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i);
|
||||
@@ -307,15 +280,16 @@ void audio_driver_mixer_set_stream_volume(unsigned i, float vol);
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void);
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||
|
||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
void audio_driver_load_menu_sounds(void);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_audioio;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
extern audio_driver_t audio_alsathread;
|
||||
@@ -330,11 +304,13 @@ extern audio_driver_t audio_pulse;
|
||||
extern audio_driver_t audio_dsound;
|
||||
extern audio_driver_t audio_wasapi;
|
||||
extern audio_driver_t audio_coreaudio;
|
||||
extern audio_driver_t audio_coreaudio3;
|
||||
extern audio_driver_t audio_xenon360;
|
||||
extern audio_driver_t audio_ps3;
|
||||
extern audio_driver_t audio_gx;
|
||||
extern audio_driver_t audio_ax;
|
||||
extern audio_driver_t audio_psp;
|
||||
extern audio_driver_t audio_ps2;
|
||||
extern audio_driver_t audio_ctr_csnd;
|
||||
extern audio_driver_t audio_ctr_dsp;
|
||||
extern audio_driver_t audio_switch;
|
||||
|
||||
@@ -43,4 +43,3 @@ bool audio_init_thread(const audio_driver_t **out_driver, void **out_data,
|
||||
const audio_driver_t *driver);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -219,7 +219,6 @@ static int check_pcm_status(void *data, int channel_type)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static ssize_t alsa_qsa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
@@ -328,7 +327,6 @@ static void alsa_qsa_set_nonblock_state(void *data, bool state)
|
||||
alsa->nonblock = state;
|
||||
}
|
||||
|
||||
|
||||
static bool alsa_qsa_use_float(void *data)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define DEFAULT_DEV "/dev/audio"
|
||||
|
||||
static void *audioio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_out_rate)
|
||||
{
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
const char *audiodev = device ? device : DEFAULT_DEV;
|
||||
struct audio_info info;
|
||||
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
AUDIO_INITINFO(&info);
|
||||
|
||||
#ifdef AUMODE_PLAY_ALL
|
||||
info.mode = AUMODE_PLAY_ALL;
|
||||
#endif
|
||||
info.play.sample_rate = rate;
|
||||
info.play.channels = 2;
|
||||
info.play.precision = 16;
|
||||
#ifdef AUDIO_ENCODING_SLINEAR
|
||||
info.play.encoding = AUDIO_ENCODING_SLINEAR;
|
||||
#else
|
||||
info.play.encoding = AUDIO_ENCODING_LINEAR;
|
||||
#endif
|
||||
|
||||
if ((*fd = open(audiodev, O_WRONLY)) < 0)
|
||||
{
|
||||
free(fd);
|
||||
perror("open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ioctl(*fd, AUDIO_SETINFO, &info) < 0)
|
||||
goto error;
|
||||
|
||||
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
|
||||
goto error;
|
||||
|
||||
*new_out_rate = info.play.sample_rate;
|
||||
|
||||
return fd;
|
||||
error:
|
||||
close(*fd);
|
||||
free(fd);
|
||||
perror("ioctl");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t audioio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (size == 0)
|
||||
return 0;
|
||||
|
||||
if ((ret = write(*fd, buf, size)) < 0)
|
||||
{
|
||||
if (errno == EAGAIN && (fcntl(*fd, F_GETFL) & O_NONBLOCK))
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool audioio_stop(void *data)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(*fd, AUDIO_FLUSH, NULL) < 0)
|
||||
return false;
|
||||
|
||||
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
|
||||
return false;
|
||||
|
||||
info.play.pause = true;
|
||||
|
||||
return ioctl(*fd, AUDIO_SETINFO, &info) == 0;
|
||||
}
|
||||
|
||||
static bool audioio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(*fd, AUDIO_FLUSH, NULL) < 0)
|
||||
return false;
|
||||
|
||||
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
|
||||
return false;
|
||||
|
||||
info.play.pause = false;
|
||||
|
||||
return ioctl(*fd, AUDIO_SETINFO, &info) == 0;
|
||||
}
|
||||
|
||||
static bool audioio_alive(void *data)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
|
||||
return false;
|
||||
|
||||
return !info.play.pause;
|
||||
}
|
||||
|
||||
static void audioio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
int rc;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (state)
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) | O_NONBLOCK);
|
||||
else
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) & (~O_NONBLOCK));
|
||||
if (rc != 0)
|
||||
RARCH_WARN("Could not set nonblocking on audio file descriptor. Will not be able to fast-forward.\n");
|
||||
}
|
||||
|
||||
static void audioio_free(void *data)
|
||||
{
|
||||
int *fd = (int*)data;
|
||||
|
||||
(void)ioctl(*fd, AUDIO_FLUSH, NULL);
|
||||
|
||||
close(*fd);
|
||||
free(fd);
|
||||
}
|
||||
|
||||
static size_t audioio_buffer_size(void *data)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
|
||||
return false;
|
||||
|
||||
return info.play.buffer_size;
|
||||
}
|
||||
|
||||
static size_t audioio_write_avail(void *data)
|
||||
{
|
||||
return audioio_buffer_size(data);
|
||||
}
|
||||
|
||||
static bool audioio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
audio_driver_t audio_audioio = {
|
||||
audioio_init,
|
||||
audioio_write,
|
||||
audioio_stop,
|
||||
audioio_start,
|
||||
audioio_alive,
|
||||
audioio_set_nonblock_state,
|
||||
audioio_free,
|
||||
audioio_use_float,
|
||||
"audioio",
|
||||
NULL,
|
||||
NULL,
|
||||
audioio_write_avail,
|
||||
audioio_buffer_size,
|
||||
};
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#include <AudioToolbox/AudioToolbox.h>
|
||||
#else
|
||||
@@ -126,7 +125,9 @@ static OSStatus audio_write_cb(void *userdata,
|
||||
static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
|
||||
{
|
||||
(void)data;
|
||||
#if TARGET_OS_IOS
|
||||
g_interrupted = (interrupt_state == kAudioSessionBeginInterruption);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||
@@ -219,7 +220,7 @@ static void *coreaudio_init(const char *device,
|
||||
dev->lock = slock_new();
|
||||
dev->cond = scond_new();
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#if TARGET_OS_IOS
|
||||
if (!session_initialized)
|
||||
{
|
||||
session_initialized = true;
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
/* 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,
|
||||
};
|
||||
@@ -56,7 +56,6 @@ static void ctr_csnd_audio_update_playpos(ctr_csnd_audio_t* ctr)
|
||||
ctr->cpu_ticks_last += samples_played * CTR_CSND_CPU_TICKS_PER_SAMPLE;
|
||||
}
|
||||
|
||||
|
||||
Result csndPlaySound_custom(int chn, u32 flags, float vol, float pan,
|
||||
void* data0, void* data1, u32 size)
|
||||
{
|
||||
@@ -289,7 +288,6 @@ static size_t ctr_csnd_audio_buffer_size(void *data)
|
||||
return CTR_CSND_AUDIO_COUNT;
|
||||
}
|
||||
|
||||
|
||||
audio_driver_t audio_ctr_csnd = {
|
||||
ctr_csnd_audio_init,
|
||||
ctr_csnd_audio_write,
|
||||
|
||||
@@ -195,7 +195,6 @@ static size_t ctr_dsp_audio_buffer_size(void *data)
|
||||
return CTR_DSP_AUDIO_COUNT;
|
||||
}
|
||||
|
||||
|
||||
audio_driver_t audio_ctr_dsp = {
|
||||
ctr_dsp_audio_init,
|
||||
ctr_dsp_audio_write,
|
||||
@@ -211,4 +210,3 @@ audio_driver_t audio_ctr_dsp = {
|
||||
ctr_dsp_audio_write_avail,
|
||||
ctr_dsp_audio_buffer_size
|
||||
};
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#pragma comment(lib, "dxguid")
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct dsound
|
||||
{
|
||||
LPDIRECTSOUND ds;
|
||||
@@ -174,7 +173,6 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
/* No space to write, or we don't have data in our fifo,
|
||||
* but we can wait some time before it underruns ... */
|
||||
|
||||
|
||||
/* We could opt for using the notification interface,
|
||||
* but it is not guaranteed to work, so use high
|
||||
* priority sleeping patterns.
|
||||
|
||||
@@ -39,7 +39,6 @@ typedef struct
|
||||
volatile unsigned dma_write;
|
||||
size_t write_ptr;
|
||||
|
||||
OSCond cond;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} gx_audio_t;
|
||||
@@ -63,8 +62,6 @@ static void dma_callback(void)
|
||||
DCFlushRange(wa->data[wa->dma_next], CHUNK_SIZE);
|
||||
|
||||
AIInitDMA((uint32_t)wa->data[wa->dma_next], CHUNK_SIZE);
|
||||
|
||||
OSSignalCond(wa->cond);
|
||||
}
|
||||
|
||||
static void *gx_audio_init(const char *device,
|
||||
@@ -95,8 +92,6 @@ static void *gx_audio_init(const char *device,
|
||||
*new_rate = 48000;
|
||||
}
|
||||
|
||||
OSInitThreadQueue(&wa->cond);
|
||||
|
||||
wa->dma_write = BLOCKS - 1;
|
||||
DCFlushRange(wa->data, sizeof(wa->data));
|
||||
stop_audio = false;
|
||||
@@ -133,8 +128,7 @@ static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
/* FIXME: Nonblocking audio should break out of loop
|
||||
* when it has nothing to write. */
|
||||
while ((wa->dma_write == wa->dma_next ||
|
||||
wa->dma_write == wa->dma_busy) && !wa->nonblock)
|
||||
OSSleepThread(wa->cond);
|
||||
wa->dma_write == wa->dma_busy) && !wa->nonblock);
|
||||
|
||||
copy_swapped(wa->data[wa->dma_write] + wa->write_ptr, buf, to_write);
|
||||
|
||||
@@ -205,10 +199,6 @@ static void gx_audio_free(void *data)
|
||||
AIStopDMA();
|
||||
AIRegisterDMACallback(NULL);
|
||||
|
||||
if (wa->cond)
|
||||
OSCloseThreadQueue(wa->cond);
|
||||
wa->cond = 0;
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ static void *null_audio_init(const char *device, unsigned rate, unsigned latency
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
RARCH_ERR("Using the null audio driver. RetroArch will be silent.");
|
||||
RARCH_ERR("Using the null audio driver. RetroArch will be silent.\n");
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
@@ -232,7 +232,6 @@ static bool sl_start(void *data, bool is_shutdown)
|
||||
return sl->is_paused ? false : true;
|
||||
}
|
||||
|
||||
|
||||
static ssize_t sl_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
sl_t *sl = (sl_t*)data;
|
||||
|
||||
@@ -0,0 +1,292 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2017 - Francisco Javier Trujillo Mata
|
||||
*
|
||||
* 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 <stdint.h>
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <audsrv.h>
|
||||
|
||||
#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_CHANNELS 2
|
||||
#define AUDIO_BITS 16
|
||||
#define AUDIO_PRIORITY 0x7F /* LOWER VALUE GRATHER PRIORITY*/
|
||||
|
||||
static void audioMainLoop(void *data)
|
||||
{
|
||||
char out_tmp[AUDIO_OUT_BUFFER];
|
||||
ps2_audio_t* ps2 = backup_ps2;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
{
|
||||
int err;
|
||||
struct audsrv_fmt_t format;
|
||||
|
||||
format.bits = AUDIO_BITS;
|
||||
format.freq = rate;
|
||||
format.channels = AUDIO_CHANNELS;
|
||||
|
||||
err = audsrv_set_format(&format);
|
||||
|
||||
if (err){
|
||||
printf("set format returned %d\n", err);
|
||||
printf("audsrv returned error string: %s\n", audsrv_get_error_string());
|
||||
}
|
||||
|
||||
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,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
ps2_audio_t *ps2 = (ps2_audio_t*)calloc(1, sizeof(ps2_audio_t));
|
||||
|
||||
if (!ps2)
|
||||
return NULL;
|
||||
|
||||
ps2->buffer = fifo_new(AUDIO_BUFFER);
|
||||
audioConfigure(ps2, rate);
|
||||
audioCreateSemas(ps2);
|
||||
audioCreateThread(ps2);
|
||||
|
||||
return ps2;
|
||||
}
|
||||
|
||||
static void ps2_audio_free(void *data)
|
||||
{
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)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);
|
||||
free(ps2);
|
||||
}
|
||||
|
||||
static ssize_t ps2_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static bool ps2_audio_alive(void *data)
|
||||
{
|
||||
bool alive = false;
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
|
||||
if (ps2)
|
||||
alive = ps2->running;
|
||||
|
||||
return alive;
|
||||
}
|
||||
|
||||
static bool ps2_audio_stop(void *data)
|
||||
{
|
||||
bool stop = true;
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
|
||||
if (ps2)
|
||||
{
|
||||
audioStopNDeleteThread(ps2);
|
||||
audsrv_stop_audio();
|
||||
}
|
||||
|
||||
return stop;
|
||||
}
|
||||
|
||||
static bool ps2_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
bool start = true;
|
||||
|
||||
if (ps2)
|
||||
{
|
||||
if (!ps2->running && !ps2->worker_thread)
|
||||
audioCreateThread(ps2);
|
||||
}
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
static void ps2_audio_set_nonblock_state(void *data, bool toggle)
|
||||
{
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
|
||||
if (ps2)
|
||||
ps2->nonblocking = toggle;
|
||||
}
|
||||
|
||||
static bool ps2_audio_use_float(void *data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t ps2_audio_write_avail(void *data)
|
||||
{
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)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 0;
|
||||
}
|
||||
|
||||
static size_t ps2_audio_buffer_size(void *data)
|
||||
{
|
||||
return AUDIO_BUFFER;
|
||||
}
|
||||
|
||||
audio_driver_t audio_ps2 = {
|
||||
ps2_audio_init,
|
||||
ps2_audio_write,
|
||||
ps2_audio_stop,
|
||||
ps2_audio_start,
|
||||
ps2_audio_alive,
|
||||
ps2_audio_set_nonblock_state,
|
||||
ps2_audio_free,
|
||||
ps2_audio_use_float,
|
||||
"ps2",
|
||||
NULL,
|
||||
NULL,
|
||||
ps2_audio_write_avail,
|
||||
ps2_audio_buffer_size
|
||||
};
|
||||
@@ -16,21 +16,28 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#if defined(VITA) || defined(PSP)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#ifdef VITA
|
||||
#if defined(VITA)
|
||||
#include <psp2/kernel/processmgr.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
#include <psp2/kernel/sysmem.h>
|
||||
#include <psp2/audioout.h>
|
||||
#else
|
||||
#elif defined(PSP)
|
||||
#include <pspkernel.h>
|
||||
#include <pspaudio.h>
|
||||
#elif defined(ORBIS)
|
||||
#include <audioout.h>
|
||||
#define SCE_AUDIO_OUT_PORT_TYPE_MAIN 0
|
||||
#define SCE_AUDIO_OUT_MODE_STEREO 1
|
||||
#define SceUID uint32_t
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
@@ -64,10 +71,14 @@ static void audioMainLoop(void *data)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
#ifdef VITA
|
||||
#if defined(VITA)
|
||||
int port = sceAudioOutOpenPort(
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
||||
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#elif defined(ORBIS)
|
||||
int port = sceAudioOutOpen(0xff,
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT,
|
||||
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#else
|
||||
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
|
||||
#endif
|
||||
@@ -95,7 +106,7 @@ static void audioMainLoop(void *data)
|
||||
scond_signal(psp->cond);
|
||||
slock_unlock(psp->cond_lock);
|
||||
|
||||
#ifdef VITA
|
||||
#if defined(VITA) || defined(ORBIS)
|
||||
sceAudioOutOutput(port,
|
||||
cond ? (psp->zeroBuffer)
|
||||
: (psp->buffer + read_pos_2));
|
||||
@@ -105,8 +116,10 @@ static void audioMainLoop(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef VITA
|
||||
#if defined(VITA)
|
||||
sceAudioOutReleasePort(port);
|
||||
#elif defined(ORBIS)
|
||||
sceAudioOutClose(port);
|
||||
#else
|
||||
sceAudioSRCChRelease();
|
||||
#endif
|
||||
@@ -127,12 +140,23 @@ static void *psp_audio_init(const char *device,
|
||||
(void)device;
|
||||
(void)latency;
|
||||
|
||||
#ifdef ORBIS
|
||||
psp->buffer = (uint32_t*)
|
||||
malloc(AUDIO_BUFFER_SIZE * sizeof(uint32_t));
|
||||
#else
|
||||
/* Cache aligned, not necessary but helpful. */
|
||||
psp->buffer = (uint32_t*)
|
||||
memalign(64, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
|
||||
#endif
|
||||
memset(psp->buffer, 0, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
|
||||
|
||||
#ifdef ORBIS
|
||||
psp->zeroBuffer = (uint32_t*)
|
||||
malloc(AUDIO_OUT_COUNT * sizeof(uint32_t));
|
||||
#else
|
||||
psp->zeroBuffer = (uint32_t*)
|
||||
memalign(64, AUDIO_OUT_COUNT * sizeof(uint32_t));
|
||||
#endif
|
||||
memset(psp->zeroBuffer, 0, AUDIO_OUT_COUNT * sizeof(uint32_t));
|
||||
|
||||
psp->read_pos = 0;
|
||||
@@ -228,7 +252,6 @@ static bool psp_audio_alive(void *data)
|
||||
return psp->running;
|
||||
}
|
||||
|
||||
|
||||
static bool psp_audio_stop(void *data)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
@@ -294,7 +317,6 @@ static size_t psp_buffer_size(void *data)
|
||||
return AUDIO_BUFFER_SIZE /** sizeof(uint32_t)*/;
|
||||
}
|
||||
|
||||
|
||||
audio_driver_t audio_psp = {
|
||||
psp_audio_init,
|
||||
psp_audio_write,
|
||||
@@ -304,8 +326,10 @@ audio_driver_t audio_psp = {
|
||||
psp_audio_set_nonblock_state,
|
||||
psp_audio_free,
|
||||
psp_audio_use_float,
|
||||
#ifdef VITA
|
||||
#if defined(VITA)
|
||||
"vita",
|
||||
#elif defined(ORBIS)
|
||||
"orbis",
|
||||
#else
|
||||
"psp",
|
||||
#endif
|
||||
|
||||
@@ -94,8 +94,6 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
if (swa->blocking)
|
||||
{
|
||||
RARCH_LOG("No buffer, blocking...\n");
|
||||
|
||||
while(swa->current_buffer == NULL)
|
||||
{
|
||||
uint32_t handle_idx = 0;
|
||||
|
||||
@@ -80,7 +80,6 @@ static void mainLoop(void* data)
|
||||
|
||||
RARCH_LOG("[Audio]: start mainLoop cpu %u tid %u\n", svcGetCurrentProcessorNumber(), swa->thread.handle);
|
||||
|
||||
|
||||
while (swa->running)
|
||||
{
|
||||
size_t buf_avail, avail, to_write;
|
||||
|
||||
@@ -296,7 +296,6 @@
|
||||
#define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000
|
||||
#define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000
|
||||
|
||||
|
||||
/** Audio sample format of a PCM.
|
||||
* The first letter specifiers whether the sample is signed or unsigned.
|
||||
* The letter 'S' means signed. The letter 'U' means unsigned.
|
||||
|
||||
@@ -29,6 +29,15 @@
|
||||
#include <mmreg.h>
|
||||
#include <audioclient.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
DEFINE_GUID(IID_IAudioClient, 0x1CB9AD4C, 0xDBFA, 0x4C32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2);
|
||||
DEFINE_GUID(IID_IAudioRenderClient, 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2);
|
||||
DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
|
||||
DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
|
||||
#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
|
||||
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
|
||||
#endif
|
||||
|
||||
#include <lists/string_list.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
@@ -580,7 +589,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
unsigned u1, unsigned *u2)
|
||||
{
|
||||
HRESULT hr;
|
||||
bool com_initialized = false;
|
||||
UINT32 frame_count = 0;
|
||||
REFERENCE_TIME dev_period = 0;
|
||||
BYTE *dest = NULL;
|
||||
@@ -592,11 +600,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
|
||||
WASAPI_CHECK(w, "Out of memory", return NULL);
|
||||
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
WASAPI_HR_CHECK(hr, "CoInitializeEx", goto error);
|
||||
|
||||
com_initialized = true;
|
||||
|
||||
w->device = wasapi_init_device(dev_id);
|
||||
if (!w->device && dev_id)
|
||||
w->device = wasapi_init_device(NULL);
|
||||
@@ -676,8 +679,6 @@ error:
|
||||
if (w->buffer)
|
||||
fifo_free(w->buffer);
|
||||
free(w);
|
||||
if (com_initialized)
|
||||
CoUninitialize();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -889,7 +890,6 @@ static void wasapi_free(void *wh)
|
||||
_IAudioClient_Stop(w->client);
|
||||
WASAPI_RELEASE(w->client);
|
||||
WASAPI_RELEASE(w->device);
|
||||
CoUninitialize();
|
||||
if (w->buffer)
|
||||
fifo_free(w->buffer);
|
||||
free(w);
|
||||
|
||||
@@ -318,7 +318,6 @@ static size_t ax_audio_buffer_size(void* data)
|
||||
return AX_AUDIO_COUNT;
|
||||
}
|
||||
|
||||
|
||||
audio_driver_t audio_ax =
|
||||
{
|
||||
ax_audio_init,
|
||||
|
||||
@@ -202,10 +202,6 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
xaudio2_t *handle = NULL;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
|
||||
#ifndef _XBOX
|
||||
CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
handle = new xaudio2;
|
||||
#else
|
||||
@@ -222,8 +218,13 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
if (FAILED(XAudio2Create(&handle->pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR)))
|
||||
goto error;
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL, AudioCategory_GameEffects)))
|
||||
goto error;
|
||||
#else
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
xaudio2_set_wavefmt(&wfx, channels, samplerate);
|
||||
|
||||
|
||||
+10
-348
@@ -1,7 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2010-2014 - OV2
|
||||
* Copyright (C) 2018 - Krzysztof Haładyn
|
||||
*
|
||||
* 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-
|
||||
@@ -15,350 +13,14 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Kinda stripped down. Only contains the bare essentials used in RetroArch. */
|
||||
|
||||
#ifndef XAUDIO2_STRIPPED_H
|
||||
#define XAUDIO2_STRIPPED_H
|
||||
|
||||
#include <retro_inline.h>
|
||||
#include <retro_environment.h>
|
||||
|
||||
/* All structures defined in this file use tight field packing */
|
||||
#pragma pack(push, 1)
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define X2DEFAULT(x) = (x)
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
/* XAudio 2.7 it part of the old DirectX SDKs. XAudio 2.8+ is part of the
|
||||
* Windows OS itself (starting from Windows 8). Since UWP lets you access
|
||||
* only libraries that are built-in to the OS, the headers had to be
|
||||
* upgraded to the newer version to get audio support working. */
|
||||
#include "xaudio29.h"
|
||||
#else
|
||||
#define X2DEFAULT(x)
|
||||
/* The old version still has to be there since XAudio 2.8 is not available
|
||||
* on Windows 7 and earlier */
|
||||
#include "xaudio27.h"
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define OPAQUE interface
|
||||
#endif
|
||||
#define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
#define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
|
||||
DEFINE_CLSID(XAudio2, 3eda9b49, 2085, 498b, 9b, b2, 39, a6, 77, 84, 93, de);
|
||||
DEFINE_CLSID(XAudio2_Debug, 47199894, 7cc2, 444d, 98, 73, ce, d2, 56, 2c, c6, 0e);
|
||||
DEFINE_IID(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
|
||||
|
||||
#include <audiodefs.h> /* Basic audio data types and constants */
|
||||
|
||||
#else
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <basetyps.h>
|
||||
#include <objbase.h>
|
||||
#include <mmreg.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#undef OPAQUE
|
||||
#define OPAQUE struct
|
||||
#endif
|
||||
|
||||
#define DEFINE_GUID_X(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID_X(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
#define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID_X(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef INTERFACE
|
||||
#define INTERFACE void
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DEFINE_CLSID_X(XAudio2, 5a508685, a254, 4fba, 9b, 82, 9a, 24, b0, 03, 06, af); /* 2.7 */
|
||||
DEFINE_IID_X(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f
|
||||
#else
|
||||
#define XAUDIO2_DEFAULT_FREQ_RATIO 4.0f
|
||||
#endif
|
||||
|
||||
#define XAUDIO2_COMMIT_NOW 0
|
||||
#define XAUDIO2_DEFAULT_CHANNELS 0
|
||||
#define XAUDIO2_DEFAULT_SAMPLERATE 0
|
||||
|
||||
#define XAUDIO2_DEBUG_ENGINE 0x0001
|
||||
#define XAUDIO2_VOICE_NOSRC 0x0004
|
||||
|
||||
typedef enum XAUDIO2_DEVICE_ROLE
|
||||
{
|
||||
NotDefaultDevice = 0x0,
|
||||
DefaultConsoleDevice = 0x1,
|
||||
DefaultMultimediaDevice = 0x2,
|
||||
DefaultCommunicationsDevice = 0x4,
|
||||
DefaultGameDevice = 0x8,
|
||||
GlobalDefaultDevice = 0xf,
|
||||
InvalidDeviceRole = ~GlobalDefaultDevice
|
||||
} XAUDIO2_DEVICE_ROLE;
|
||||
|
||||
#ifdef _XBOX
|
||||
typedef enum XAUDIO2_XBOX_HWTHREAD_SPECIFIER
|
||||
{
|
||||
XboxThread0 = 0x01,
|
||||
XboxThread1 = 0x02,
|
||||
XboxThread2 = 0x04,
|
||||
XboxThread3 = 0x08,
|
||||
XboxThread4 = 0x10,
|
||||
XboxThread5 = 0x20,
|
||||
XAUDIO2_ANY_PROCESSOR = XboxThread4,
|
||||
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
|
||||
} XAUDIO2_XBOX_HWTHREAD_SPECIFIER, XAUDIO2_PROCESSOR;
|
||||
#else
|
||||
typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER
|
||||
{
|
||||
#if defined(__STDC_C89__)
|
||||
XAUDIO2_ANY_PROCESSOR = 0xffff,
|
||||
#else
|
||||
XAUDIO2_ANY_PROCESSOR = 0xffffffff,
|
||||
#endif
|
||||
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
|
||||
} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER, XAUDIO2_PROCESSOR;
|
||||
#endif
|
||||
|
||||
typedef enum XAUDIO2_FILTER_TYPE {
|
||||
LowPassFilter,
|
||||
BandPassFilter,
|
||||
HighPassFilter
|
||||
} XAUDIO2_FILTER_TYPE;
|
||||
|
||||
typedef struct XAUDIO2_DEVICE_DETAILS
|
||||
{
|
||||
WCHAR DeviceID[256];
|
||||
WCHAR DisplayName[256];
|
||||
XAUDIO2_DEVICE_ROLE Role;
|
||||
WAVEFORMATEXTENSIBLE OutputFormat;
|
||||
} XAUDIO2_DEVICE_DETAILS;
|
||||
|
||||
/* Forward declarations. */
|
||||
#ifdef __cplusplus
|
||||
struct XAUDIO2_VOICE_DETAILS;
|
||||
struct XAUDIO2_VOICE_SENDS;
|
||||
struct XAUDIO2_EFFECT_DESCRIPTOR;
|
||||
struct XAUDIO2_EFFECT_CHAIN;
|
||||
struct XAUDIO2_FILTER_PARAMETERS;
|
||||
struct XAUDIO2_BUFFER_WMA;
|
||||
struct XAUDIO2_VOICE_STATE;
|
||||
struct XAUDIO2_PERFORMANCE_DATA;
|
||||
struct XAUDIO2_DEBUG_CONFIGURATION;
|
||||
struct IXAudio2EngineCallback;
|
||||
struct IXAudio2SubmixVoice;
|
||||
#else
|
||||
typedef OPAQUE XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS;
|
||||
typedef OPAQUE XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS;
|
||||
typedef OPAQUE XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR;
|
||||
typedef OPAQUE XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN;
|
||||
typedef OPAQUE XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS;
|
||||
typedef OPAQUE XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA;
|
||||
typedef OPAQUE XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE;
|
||||
typedef OPAQUE XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA;
|
||||
typedef OPAQUE XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION;
|
||||
typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback;
|
||||
typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct XAUDIO2_BUFFER
|
||||
{
|
||||
UINT32 Flags;
|
||||
UINT32 AudioBytes;
|
||||
const BYTE* pAudioData;
|
||||
UINT32 PlayBegin;
|
||||
UINT32 PlayLength;
|
||||
UINT32 LoopBegin;
|
||||
UINT32 LoopLength;
|
||||
UINT32 LoopCount;
|
||||
void *pContext;
|
||||
} XAUDIO2_BUFFER;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2VoiceCallback
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
||||
{
|
||||
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
|
||||
STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE;
|
||||
STDMETHOD_(void, OnStreamEnd) (THIS) PURE;
|
||||
STDMETHOD_(void, OnBufferStart) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnBufferEnd) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnLoopEnd) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2Voice
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2Voice)
|
||||
{
|
||||
#define Declare_IXAudio2Voice_Methods() \
|
||||
STDMETHOD_(void, GetVoiceDetails) (THIS_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \
|
||||
STDMETHOD(SetOutputVoices) (THIS_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \
|
||||
STDMETHOD(SetEffectChain) (THIS_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \
|
||||
STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, BOOL* pEnabled) PURE; \
|
||||
STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \
|
||||
const void *pParameters, \
|
||||
UINT32 ParametersByteSize, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, void *pParameters, \
|
||||
UINT32 ParametersByteSize) PURE; \
|
||||
STDMETHOD(SetFilterParameters) (THIS_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetFilterParameters) (THIS_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
|
||||
STDMETHOD_(void, SetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, const XAUDIO2_FILTER_PARAMETERS* param, \
|
||||
UINT32 op X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, XAUDIO2_FILTER_PARAMETERS* param) PURE; \
|
||||
STDMETHOD(SetVolume) (THIS_ float Volume, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetVolume) (THIS_ float* pVolume) PURE; \
|
||||
STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, const float* pVolumes, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, float* pVolumes) PURE; \
|
||||
STDMETHOD(SetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
|
||||
UINT32 SourceChannels, UINT32 DestinationChannels, \
|
||||
const float* pLevelMatrix, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
|
||||
UINT32 SourceChannels, UINT32 DestinationChannels, \
|
||||
float* pLevelMatrix) PURE; \
|
||||
STDMETHOD_(void, DestroyVoice) (THIS) PURE
|
||||
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2MasteringVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2SourceVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
STDMETHOD(Start) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD(Stop) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD(SubmitSourceBuffer) (THIS_ const XAUDIO2_BUFFER* pBuffer, const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(FlushSourceBuffers) (THIS) PURE;
|
||||
STDMETHOD(Discontinuity) (THIS) PURE;
|
||||
STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD_(void, GetState) (THIS_ XAUDIO2_VOICE_STATE* pVoiceState) PURE;
|
||||
STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio,
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvInterface) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
STDMETHOD(GetDeviceCount) (THIS_ UINT32* pCount) PURE;
|
||||
STDMETHOD(GetDeviceDetails) (THIS_ UINT32 Index, XAUDIO2_DEVICE_DETAILS* pDeviceDetails) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ UINT32 Flags X2DEFAULT(0),
|
||||
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)) PURE;
|
||||
STDMETHOD(RegisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
|
||||
STDMETHOD_(void, UnregisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
|
||||
STDMETHOD(CreateSourceVoice) (THIS_ IXAudio2SourceVoice** ppSourceVoice,
|
||||
const WAVEFORMATEX* pSourceFormat,
|
||||
UINT32 Flags X2DEFAULT(0),
|
||||
float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO),
|
||||
IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL),
|
||||
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(CreateSubmixVoice) (THIS_ IXAudio2SubmixVoice** ppSubmixVoice,
|
||||
UINT32 InputChannels, UINT32 InputSampleRate,
|
||||
UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0),
|
||||
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(CreateMasteringVoice) (THIS_ IXAudio2MasteringVoice** ppMasteringVoice,
|
||||
UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS),
|
||||
UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE),
|
||||
UINT32 Flags X2DEFAULT(0), UINT32 DeviceIndex X2DEFAULT(0),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(StartEngine) (THIS) PURE;
|
||||
STDMETHOD_(void, StopEngine) (THIS) PURE;
|
||||
STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE;
|
||||
STDMETHOD_(void, GetPerformanceData) (THIS_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE;
|
||||
STDMETHOD_(void, SetDebugConfiguration) (THIS_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,
|
||||
void *pReserved X2DEFAULT(NULL)) PURE;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
/* C++ hooks */
|
||||
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
|
||||
#define IXAudio2SourceVoice_Stop(handle, a, b) handle->Stop(a, b)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(handle) handle->DestroyVoice()
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice()
|
||||
#define IXAudio2_Release(handle) handle->Release()
|
||||
#define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g)
|
||||
#define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f)
|
||||
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
||||
#else
|
||||
/* C hooks */
|
||||
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
|
||||
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
|
||||
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
||||
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
||||
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
|
||||
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
|
||||
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
STDAPI XAudio2Create(__deref_out IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0),
|
||||
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR));
|
||||
#else
|
||||
static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_PROCESSOR proc)
|
||||
{
|
||||
IXAudio2 *pXAudio2 = NULL;
|
||||
#ifdef __cplusplus
|
||||
HRESULT hr = CoCreateInstance(CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, IID_IXAudio2, (void**)&pXAudio2);
|
||||
#else
|
||||
HRESULT hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, &IID_IXAudio2, (void**)&pXAudio2);
|
||||
#endif
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IXAudio2_Initialize(pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR);
|
||||
if (SUCCEEDED(hr))
|
||||
*ppXAudio2 = pXAudio2;
|
||||
else
|
||||
IXAudio2_Release(pXAudio2);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Undo the #pragma pack(push, 1) directive at the top of this file */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,362 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2010-2014 - OV2
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* Kinda stripped down. Only contains the bare essentials used in RetroArch. */
|
||||
|
||||
#ifndef XAUDIO2_STRIPPED_H
|
||||
#define XAUDIO2_STRIPPED_H
|
||||
|
||||
#include <retro_inline.h>
|
||||
#include <retro_environment.h>
|
||||
|
||||
/* All structures defined in this file use tight field packing */
|
||||
#pragma pack(push, 1)
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define X2DEFAULT(x) = (x)
|
||||
#else
|
||||
#define X2DEFAULT(x)
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define OPAQUE interface
|
||||
#endif
|
||||
#define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
#define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
|
||||
DEFINE_CLSID(XAudio2, 3eda9b49, 2085, 498b, 9b, b2, 39, a6, 77, 84, 93, de);
|
||||
DEFINE_CLSID(XAudio2_Debug, 47199894, 7cc2, 444d, 98, 73, ce, d2, 56, 2c, c6, 0e);
|
||||
DEFINE_IID(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
|
||||
|
||||
#include <audiodefs.h> /* Basic audio data types and constants */
|
||||
|
||||
#else
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <basetyps.h>
|
||||
#include <objbase.h>
|
||||
#include <mmreg.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#undef OPAQUE
|
||||
#define OPAQUE struct
|
||||
#endif
|
||||
|
||||
#define DEFINE_GUID_X(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID_X(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
#define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
DEFINE_GUID_X(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef INTERFACE
|
||||
#define INTERFACE void
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DEFINE_CLSID_X(XAudio2, 5a508685, a254, 4fba, 9b, 82, 9a, 24, b0, 03, 06, af); /* 2.7 */
|
||||
DEFINE_IID_X(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f
|
||||
#else
|
||||
#define XAUDIO2_DEFAULT_FREQ_RATIO 4.0f
|
||||
#endif
|
||||
|
||||
#define XAUDIO2_COMMIT_NOW 0
|
||||
#define XAUDIO2_DEFAULT_CHANNELS 0
|
||||
#define XAUDIO2_DEFAULT_SAMPLERATE 0
|
||||
|
||||
#define XAUDIO2_DEBUG_ENGINE 0x0001
|
||||
#define XAUDIO2_VOICE_NOSRC 0x0004
|
||||
|
||||
typedef enum XAUDIO2_DEVICE_ROLE
|
||||
{
|
||||
NotDefaultDevice = 0x0,
|
||||
DefaultConsoleDevice = 0x1,
|
||||
DefaultMultimediaDevice = 0x2,
|
||||
DefaultCommunicationsDevice = 0x4,
|
||||
DefaultGameDevice = 0x8,
|
||||
GlobalDefaultDevice = 0xf,
|
||||
InvalidDeviceRole = ~GlobalDefaultDevice
|
||||
} XAUDIO2_DEVICE_ROLE;
|
||||
|
||||
#ifdef _XBOX
|
||||
typedef enum XAUDIO2_XBOX_HWTHREAD_SPECIFIER
|
||||
{
|
||||
XboxThread0 = 0x01,
|
||||
XboxThread1 = 0x02,
|
||||
XboxThread2 = 0x04,
|
||||
XboxThread3 = 0x08,
|
||||
XboxThread4 = 0x10,
|
||||
XboxThread5 = 0x20,
|
||||
XAUDIO2_ANY_PROCESSOR = XboxThread4,
|
||||
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
|
||||
} XAUDIO2_XBOX_HWTHREAD_SPECIFIER, XAUDIO2_PROCESSOR;
|
||||
#else
|
||||
typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER
|
||||
{
|
||||
#if defined(__STDC_C89__)
|
||||
XAUDIO2_ANY_PROCESSOR = 0xffff,
|
||||
#else
|
||||
XAUDIO2_ANY_PROCESSOR = 0xffffffff,
|
||||
#endif
|
||||
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
|
||||
} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER, XAUDIO2_PROCESSOR;
|
||||
#endif
|
||||
|
||||
typedef enum XAUDIO2_FILTER_TYPE {
|
||||
LowPassFilter,
|
||||
BandPassFilter,
|
||||
HighPassFilter
|
||||
} XAUDIO2_FILTER_TYPE;
|
||||
|
||||
typedef struct XAUDIO2_DEVICE_DETAILS
|
||||
{
|
||||
WCHAR DeviceID[256];
|
||||
WCHAR DisplayName[256];
|
||||
XAUDIO2_DEVICE_ROLE Role;
|
||||
WAVEFORMATEXTENSIBLE OutputFormat;
|
||||
} XAUDIO2_DEVICE_DETAILS;
|
||||
|
||||
/* Forward declarations. */
|
||||
#ifdef __cplusplus
|
||||
struct XAUDIO2_VOICE_DETAILS;
|
||||
struct XAUDIO2_VOICE_SENDS;
|
||||
struct XAUDIO2_EFFECT_DESCRIPTOR;
|
||||
struct XAUDIO2_EFFECT_CHAIN;
|
||||
struct XAUDIO2_FILTER_PARAMETERS;
|
||||
struct XAUDIO2_BUFFER_WMA;
|
||||
struct XAUDIO2_VOICE_STATE;
|
||||
struct XAUDIO2_PERFORMANCE_DATA;
|
||||
struct XAUDIO2_DEBUG_CONFIGURATION;
|
||||
struct IXAudio2EngineCallback;
|
||||
struct IXAudio2SubmixVoice;
|
||||
#else
|
||||
typedef OPAQUE XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS;
|
||||
typedef OPAQUE XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS;
|
||||
typedef OPAQUE XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR;
|
||||
typedef OPAQUE XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN;
|
||||
typedef OPAQUE XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS;
|
||||
typedef OPAQUE XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA;
|
||||
typedef OPAQUE XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE;
|
||||
typedef OPAQUE XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA;
|
||||
typedef OPAQUE XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION;
|
||||
typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback;
|
||||
typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice;
|
||||
#endif
|
||||
|
||||
typedef struct XAUDIO2_BUFFER
|
||||
{
|
||||
UINT32 Flags;
|
||||
UINT32 AudioBytes;
|
||||
const BYTE* pAudioData;
|
||||
UINT32 PlayBegin;
|
||||
UINT32 PlayLength;
|
||||
UINT32 LoopBegin;
|
||||
UINT32 LoopLength;
|
||||
UINT32 LoopCount;
|
||||
void *pContext;
|
||||
} XAUDIO2_BUFFER;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2VoiceCallback
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
||||
{
|
||||
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
|
||||
STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE;
|
||||
STDMETHOD_(void, OnStreamEnd) (THIS) PURE;
|
||||
STDMETHOD_(void, OnBufferStart) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnBufferEnd) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnLoopEnd) (THIS_ void *pBufferContext) PURE;
|
||||
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2Voice
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2Voice)
|
||||
{
|
||||
#define Declare_IXAudio2Voice_Methods() \
|
||||
STDMETHOD_(void, GetVoiceDetails) (THIS_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \
|
||||
STDMETHOD(SetOutputVoices) (THIS_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \
|
||||
STDMETHOD(SetEffectChain) (THIS_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \
|
||||
STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, BOOL* pEnabled) PURE; \
|
||||
STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \
|
||||
const void *pParameters, \
|
||||
UINT32 ParametersByteSize, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, void *pParameters, \
|
||||
UINT32 ParametersByteSize) PURE; \
|
||||
STDMETHOD(SetFilterParameters) (THIS_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetFilterParameters) (THIS_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
|
||||
STDMETHOD_(void, SetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, const XAUDIO2_FILTER_PARAMETERS* param, \
|
||||
UINT32 op X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, XAUDIO2_FILTER_PARAMETERS* param) PURE; \
|
||||
STDMETHOD(SetVolume) (THIS_ float Volume, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetVolume) (THIS_ float* pVolume) PURE; \
|
||||
STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, const float* pVolumes, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, float* pVolumes) PURE; \
|
||||
STDMETHOD(SetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
|
||||
UINT32 SourceChannels, UINT32 DestinationChannels, \
|
||||
const float* pLevelMatrix, \
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
|
||||
STDMETHOD_(void, GetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
|
||||
UINT32 SourceChannels, UINT32 DestinationChannels, \
|
||||
float* pLevelMatrix) PURE; \
|
||||
STDMETHOD_(void, DestroyVoice) (THIS) PURE
|
||||
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2MasteringVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2SourceVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
STDMETHOD(Start) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD(Stop) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD(SubmitSourceBuffer) (THIS_ const XAUDIO2_BUFFER* pBuffer, const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(FlushSourceBuffers) (THIS) PURE;
|
||||
STDMETHOD(Discontinuity) (THIS) PURE;
|
||||
STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD_(void, GetState) (THIS_ XAUDIO2_VOICE_STATE* pVoiceState) PURE;
|
||||
STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio,
|
||||
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
|
||||
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvInterface) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
STDMETHOD(GetDeviceCount) (THIS_ UINT32* pCount) PURE;
|
||||
STDMETHOD(GetDeviceDetails) (THIS_ UINT32 Index, XAUDIO2_DEVICE_DETAILS* pDeviceDetails) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ UINT32 Flags X2DEFAULT(0),
|
||||
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)) PURE;
|
||||
STDMETHOD(RegisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
|
||||
STDMETHOD_(void, UnregisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
|
||||
STDMETHOD(CreateSourceVoice) (THIS_ IXAudio2SourceVoice** ppSourceVoice,
|
||||
const WAVEFORMATEX* pSourceFormat,
|
||||
UINT32 Flags X2DEFAULT(0),
|
||||
float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO),
|
||||
IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL),
|
||||
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(CreateSubmixVoice) (THIS_ IXAudio2SubmixVoice** ppSubmixVoice,
|
||||
UINT32 InputChannels, UINT32 InputSampleRate,
|
||||
UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0),
|
||||
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(CreateMasteringVoice) (THIS_ IXAudio2MasteringVoice** ppMasteringVoice,
|
||||
UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS),
|
||||
UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE),
|
||||
UINT32 Flags X2DEFAULT(0), UINT32 DeviceIndex X2DEFAULT(0),
|
||||
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
|
||||
STDMETHOD(StartEngine) (THIS) PURE;
|
||||
STDMETHOD_(void, StopEngine) (THIS) PURE;
|
||||
STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE;
|
||||
STDMETHOD_(void, GetPerformanceData) (THIS_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE;
|
||||
STDMETHOD_(void, SetDebugConfiguration) (THIS_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,
|
||||
void *pReserved X2DEFAULT(NULL)) PURE;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
/* C++ hooks */
|
||||
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
|
||||
#define IXAudio2SourceVoice_Stop(handle, a, b) handle->Stop(a, b)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(handle) handle->DestroyVoice()
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice()
|
||||
#define IXAudio2_Release(handle) handle->Release()
|
||||
#define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g)
|
||||
#define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f)
|
||||
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
||||
#else
|
||||
/* C hooks */
|
||||
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
|
||||
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
|
||||
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
||||
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
||||
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
|
||||
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
|
||||
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
STDAPI XAudio2Create(__deref_out IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0),
|
||||
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR));
|
||||
#else
|
||||
static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_PROCESSOR proc)
|
||||
{
|
||||
IXAudio2 *pXAudio2 = NULL;
|
||||
#ifdef __cplusplus
|
||||
HRESULT hr = CoCreateInstance(CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, IID_IXAudio2, (void**)&pXAudio2);
|
||||
#else
|
||||
HRESULT hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, &IID_IXAudio2, (void**)&pXAudio2);
|
||||
#endif
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IXAudio2_Initialize(pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR);
|
||||
if (SUCCEEDED(hr))
|
||||
*ppXAudio2 = pXAudio2;
|
||||
else
|
||||
IXAudio2_Release(pXAudio2);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Undo the #pragma pack(push, 1) directive at the top of this file */
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -55,7 +55,6 @@ typedef struct rarch_CC_resampler
|
||||
void (*process)(void *re, struct resampler_data *data);
|
||||
} rarch_CC_resampler_t;
|
||||
|
||||
|
||||
#ifdef _MIPS_ARCH_ALLEGREX
|
||||
static void resampler_CC_process(void *re_, struct resampler_data *data)
|
||||
{
|
||||
@@ -115,7 +114,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
|
||||
|
||||
"vadd.q c720, c720, c620 \n"
|
||||
|
||||
|
||||
"vadd.s s730, s730, s730[1] \n"
|
||||
"mfv %0, s730 \n"
|
||||
|
||||
@@ -216,7 +214,6 @@ static void resampler_CC_downsample(void *re_, struct resampler_data *data)
|
||||
vec_ww1 = _mm_mul_ps(vec_w1, vec_w1);
|
||||
vec_ww2 = _mm_mul_ps(vec_w2, vec_w2);
|
||||
|
||||
|
||||
vec_ww1 = _mm_mul_ps(vec_ww1, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww1));
|
||||
vec_ww2 = _mm_mul_ps(vec_ww2, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww2));
|
||||
|
||||
@@ -307,7 +304,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
vec_ww1 = _mm_mul_ps(vec_w1, vec_w1);
|
||||
vec_ww2 = _mm_mul_ps(vec_w2, vec_w2);
|
||||
|
||||
|
||||
vec_ww1 = _mm_mul_ps(vec_ww1,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww1));
|
||||
vec_ww2 = _mm_mul_ps(vec_ww2,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww2));
|
||||
|
||||
@@ -349,7 +345,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
data->output_frames = outp - (audio_frame_float_t*)data->data_out;
|
||||
}
|
||||
|
||||
|
||||
#elif defined (__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
|
||||
|
||||
#define CC_RESAMPLER_IDENT "NEON"
|
||||
@@ -492,7 +487,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
|
||||
re->process(re_, data);
|
||||
}
|
||||
|
||||
|
||||
static void *resampler_CC_init(const struct resampler_config *config,
|
||||
double bandwidth_mod,
|
||||
enum resampler_quality quality,
|
||||
|
||||
+4
-8
@@ -46,14 +46,17 @@
|
||||
#define NETWORK_COMPAT_HEADERS 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NETWORK_COMPAT_HEADERS
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifdef _WIN32
|
||||
@@ -158,7 +161,6 @@ static int rsnd_poll(struct pollfd *fd, int numfd, int timeout);
|
||||
static void rsnd_cb_thread(void *thread_data);
|
||||
static void rsnd_thread(void *thread_data);
|
||||
|
||||
|
||||
/* Determine whether we're running big- or little endian */
|
||||
static INLINE int rsnd_is_little_endian(void)
|
||||
{
|
||||
@@ -242,7 +244,6 @@ static int rsnd_connect_server( rsound_t *rd )
|
||||
|
||||
rd->conn_type = RSD_CONN_TCP;
|
||||
|
||||
|
||||
rd->conn.socket = net_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if ( rd->conn.socket < 0 )
|
||||
goto error;
|
||||
@@ -312,7 +313,6 @@ static int rsnd_send_header_info(rsound_t *rd)
|
||||
#define FRAMESIZE 34
|
||||
#define FORMAT 42
|
||||
|
||||
|
||||
uint32_t temp_rate = rd->rate;
|
||||
uint16_t temp_channels = rd->channels;
|
||||
|
||||
@@ -980,7 +980,6 @@ static int rsnd_close_ctl(rsound_t *rd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Sends delay info request to server on the ctl socket. This code section isn't critical, and will work if it works.
|
||||
// It will never block.
|
||||
static int rsnd_send_info_query(rsound_t *rd)
|
||||
@@ -1296,7 +1295,6 @@ static int rsnd_reset(rsound_t *rd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int rsd_stop(rsound_t *rd)
|
||||
{
|
||||
retro_assert(rd != NULL);
|
||||
@@ -1403,7 +1401,6 @@ int rsd_exec(rsound_t *rsound)
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
/* ioctl()-ish param setting :D */
|
||||
int rsd_set_param(rsound_t *rd, enum rsd_settings option, void* param)
|
||||
{
|
||||
@@ -1493,7 +1490,6 @@ void rsd_delay_wait(rsound_t *rd)
|
||||
/* Latency of stream in ms */
|
||||
int latency_ms = rsd_delay_ms(rd);
|
||||
|
||||
|
||||
/* Should we sleep for a while to keep the latency low? */
|
||||
if ( rd->max_latency < latency_ms )
|
||||
{
|
||||
|
||||
@@ -46,7 +46,6 @@ void _init_vita_heap(void) {
|
||||
_newlib_vm_memblock = 0;
|
||||
}
|
||||
|
||||
|
||||
// Create a mutex to use inside _sbrk_r
|
||||
if (sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)_newlib_sbrk_mutex, "sbrk mutex", 0, 0, 0) < 0) {
|
||||
goto failure;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../network/net_http_special.h"
|
||||
|
||||
#include "badges.h"
|
||||
|
||||
badges_ctx_t badges_ctx;
|
||||
|
||||
bool badge_exists(const char* filepath)
|
||||
{
|
||||
return filestream_exists(filepath);
|
||||
}
|
||||
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
{
|
||||
char badge_file[16];
|
||||
char fullpath[PATH_MAX_LENGTH];
|
||||
|
||||
snprintf(badge_file, sizeof(badge_file), "%s%s", badges->badge_id_list[i],
|
||||
badges->badge_locked[i] ? "_lock.png" : ".png");
|
||||
|
||||
fill_pathname_application_special(fullpath,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||
#endif
|
||||
}
|
||||
|
||||
void set_badge_info (badges_ctx_t *badge_struct, int id,
|
||||
const char *badge_id, bool active)
|
||||
{
|
||||
if (!badge_struct)
|
||||
return;
|
||||
|
||||
badge_struct->badge_id_list[id] = badge_id;
|
||||
badge_struct->badge_locked[id] = active;
|
||||
set_badge_menu_texture(badge_struct, id);
|
||||
}
|
||||
|
||||
menu_texture_item get_badge_texture(int id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings || !settings->bools.cheevos_badges_enable)
|
||||
return (menu_texture_item)NULL;
|
||||
|
||||
return badges_ctx.menu_texture_list[id];
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/* 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_BADGE_H
|
||||
#define __RARCH_CHEEVOS_BADGE_H
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define CHEEVOS_BADGE_LIMIT 256
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool badge_locked[CHEEVOS_BADGE_LIMIT];
|
||||
const char * badge_id_list[CHEEVOS_BADGE_LIMIT];
|
||||
menu_texture_item menu_texture_list[CHEEVOS_BADGE_LIMIT];
|
||||
} badges_ctx_t;
|
||||
|
||||
bool badge_exists(const char* filepath);
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i);
|
||||
extern void set_badge_info (badges_ctx_t *badge_struct, int id, const char *badge_id, bool active);
|
||||
extern menu_texture_item get_badge_texture(int id);
|
||||
|
||||
extern badges_ctx_t badges_ctx;
|
||||
static badges_ctx_t new_badges_ctx;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,76 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2016 - 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_CHEEVOS_H
|
||||
#define __RARCH_CHEEVOS_CHEEVOS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct cheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
char *s;
|
||||
size_t len;
|
||||
} cheevos_ctx_desc_t;
|
||||
|
||||
enum
|
||||
{
|
||||
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
int 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_CHEEVOS_H */
|
||||
@@ -0,0 +1,75 @@
|
||||
#ifndef __RARCH_CHEEVOS_CORO_H
|
||||
#define __RARCH_CHEEVOS_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 /* __RARCH_CHEEVOS_CORO_H */
|
||||
@@ -0,0 +1,264 @@
|
||||
/* 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/>.
|
||||
*/
|
||||
|
||||
#include "fixup.h"
|
||||
#include "cheevos.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
|
||||
#include <rcheevos.h>
|
||||
|
||||
static int cheevos_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;
|
||||
|
||||
if (f1->address < f2->address)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (f1->address > f2->address)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
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_fixup_init(cheevos_fixups_t* fixups)
|
||||
{
|
||||
fixups->elements = NULL;
|
||||
fixups->capacity = fixups->count = 0;
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
void cheevos_fixup_destroy(cheevos_fixups_t* fixups)
|
||||
{
|
||||
CHEEVOS_FREE(fixups->elements);
|
||||
cheevos_fixup_init(fixups);
|
||||
}
|
||||
|
||||
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console)
|
||||
{
|
||||
cheevos_fixup_t key;
|
||||
cheevos_fixup_t* found;
|
||||
const uint8_t* location;
|
||||
|
||||
if (fixups->dirty)
|
||||
{
|
||||
qsort(fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
key.address = address;
|
||||
found = (cheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
|
||||
|
||||
if (found != NULL)
|
||||
{
|
||||
return found->location;
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
if (new_elements == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fixups->elements = new_elements;
|
||||
fixups->capacity = new_capacity;
|
||||
}
|
||||
|
||||
fixups->elements[fixups->count].address = address;
|
||||
fixups->elements[fixups->count++].location = location =
|
||||
cheevos_patch_address(address, console);
|
||||
fixups->dirty = true;
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
const uint8_t* cheevos_patch_address(unsigned address, int console)
|
||||
{
|
||||
rarch_system_info_t* system = runloop_get_system_info();
|
||||
const void* pointer = NULL;
|
||||
|
||||
if (console == RC_CONSOLE_NINTENDO)
|
||||
{
|
||||
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);
|
||||
address &= 0x07ff;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_GAMEBOY_COLOR)
|
||||
{
|
||||
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);
|
||||
address -= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
/* We have memory descriptors, use it. */
|
||||
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 == RC_CONSOLE_GAMEBOY_ADVANCE)
|
||||
{
|
||||
if (address < 0x8000)
|
||||
{
|
||||
/* Internal RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_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);
|
||||
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);
|
||||
address += 0x1f0000;
|
||||
}
|
||||
else if (console == RC_CONSOLE_SUPER_NINTENDO)
|
||||
{
|
||||
if (address < 0x020000)
|
||||
{
|
||||
/* Work RAM. */
|
||||
CHEEVOS_LOG(CHEEVOS_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);
|
||||
address += 0x006000 - 0x020000;
|
||||
}
|
||||
}
|
||||
|
||||
desc = system->mmaps.descriptors;
|
||||
end = desc + system->mmaps.num_descriptors;
|
||||
|
||||
for (; desc < end; desc++)
|
||||
{
|
||||
if (((desc->core.start ^ address) & desc->core.select) == 0)
|
||||
{
|
||||
unsigned addr = address;
|
||||
pointer = desc->core.ptr;
|
||||
|
||||
address = (unsigned)cheevos_var_reduce(
|
||||
(addr - desc->core.start) & desc->disconnect_mask,
|
||||
desc->core.disconnect);
|
||||
|
||||
if (address >= desc->core.len)
|
||||
address -= cheevos_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);
|
||||
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 (address < meminfo.size)
|
||||
{
|
||||
pointer = meminfo.data;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* HACK Subtract the correct amount of bytes to reach the save RAM as
|
||||
* it's size is not always set correctly in the core.
|
||||
*/
|
||||
if (i == 0 && console == RC_CONSOLE_NINTENDO)
|
||||
address -= 0x6000;
|
||||
else
|
||||
address -= meminfo.size;
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (const uint8_t*)pointer + address;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/* 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_FIXUP_H
|
||||
#define __RARCH_CHEEVOS_FIXUP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned address;
|
||||
const uint8_t* location;
|
||||
} cheevos_fixup_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cheevos_fixup_t* elements;
|
||||
unsigned capacity, count;
|
||||
bool dirty;
|
||||
} cheevos_fixups_t;
|
||||
|
||||
void cheevos_fixup_init(cheevos_fixups_t* fixups);
|
||||
void cheevos_fixup_destroy(cheevos_fixups_t* fixups);
|
||||
|
||||
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console);
|
||||
|
||||
const uint8_t* cheevos_patch_address(unsigned address, int console);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "hash.h"
|
||||
|
||||
uint32_t cheevos_djb2(const char* str, size_t length)
|
||||
{
|
||||
const unsigned char* aux = (const unsigned char*)str;
|
||||
uint32_t hash = 5381;
|
||||
|
||||
while (length--)
|
||||
hash = ( hash << 5 ) + hash + *aux++;
|
||||
|
||||
return hash;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/* 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_HASH_H
|
||||
#define __RARCH_CHEEVOS_HASH_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
uint32_t cheevos_djb2(const char* str, size_t length);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,674 @@
|
||||
#include "parser.h"
|
||||
|
||||
#include "hash.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <formats/jsonsax.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <compat/strl.h>
|
||||
|
||||
/* C89 wants only int values in enums. */
|
||||
#define CHEEVOS_JSON_KEY_GAMEID 0xb4960eecU
|
||||
#define CHEEVOS_JSON_KEY_ACHIEVEMENTS 0x69749ae1U
|
||||
#define CHEEVOS_JSON_KEY_ID 0x005973f2U
|
||||
#define CHEEVOS_JSON_KEY_MEMADDR 0x1e76b53fU
|
||||
#define CHEEVOS_JSON_KEY_TITLE 0x0e2a9a07U
|
||||
#define CHEEVOS_JSON_KEY_DESCRIPTION 0xe61a1f69U
|
||||
#define CHEEVOS_JSON_KEY_POINTS 0xca8fce22U
|
||||
#define CHEEVOS_JSON_KEY_AUTHOR 0xa804edb8U
|
||||
#define CHEEVOS_JSON_KEY_MODIFIED 0xdcea4fe6U
|
||||
#define CHEEVOS_JSON_KEY_CREATED 0x3a84721dU
|
||||
#define CHEEVOS_JSON_KEY_BADGENAME 0x887685d9U
|
||||
#define CHEEVOS_JSON_KEY_CONSOLE_ID 0x071656e5U
|
||||
#define CHEEVOS_JSON_KEY_TOKEN 0x0e2dbd26U
|
||||
#define CHEEVOS_JSON_KEY_FLAGS 0x0d2e96b2U
|
||||
#define CHEEVOS_JSON_KEY_LEADERBOARDS 0xf1247d2dU
|
||||
#define CHEEVOS_JSON_KEY_MEM 0x0b8807e4U
|
||||
#define CHEEVOS_JSON_KEY_FORMAT 0xb341208eU
|
||||
#define CHEEVOS_JSON_KEY_SUCCESS 0x110461deU
|
||||
#define CHEEVOS_JSON_KEY_ERROR 0x0d2011cfU
|
||||
|
||||
/*****************************************************************************
|
||||
Gets a value in a JSON
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned key_hash;
|
||||
int is_key;
|
||||
const char* value;
|
||||
size_t length;
|
||||
} cheevos_getvalueud_t;
|
||||
|
||||
static int cheevos_getvalue_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
|
||||
ud->is_key = cheevos_djb2(name, length) == ud->key_hash;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key)
|
||||
{
|
||||
ud->value = string;
|
||||
ud->length = length;
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_boolean(void* userdata, int istrue)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key)
|
||||
{
|
||||
if (istrue)
|
||||
{
|
||||
ud->value = "true";
|
||||
ud->length = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
ud->value = "false";
|
||||
ud->length = 5;
|
||||
}
|
||||
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_getvalue_null(void* userdata)
|
||||
{
|
||||
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key )
|
||||
{
|
||||
ud->value = "null";
|
||||
ud->length = 4;
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_get_value(const char* json, unsigned key_hash,
|
||||
char* value, size_t length)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_getvalue_key,
|
||||
NULL,
|
||||
cheevos_getvalue_string,
|
||||
cheevos_getvalue_string, /* number */
|
||||
cheevos_getvalue_boolean,
|
||||
cheevos_getvalue_null
|
||||
};
|
||||
|
||||
cheevos_getvalueud_t ud;
|
||||
|
||||
ud.key_hash = key_hash;
|
||||
ud.is_key = 0;
|
||||
ud.value = NULL;
|
||||
ud.length = 0;
|
||||
*value = 0;
|
||||
|
||||
if ((jsonsax_parse(json, &handlers, (void*)&ud) == JSONSAX_OK)
|
||||
&& ud.value && ud.length < length)
|
||||
{
|
||||
strlcpy(value, ud.value, ud.length + 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Returns the token of the error message
|
||||
*****************************************************************************/
|
||||
|
||||
int cheevos_get_token(const char* json, char* token, size_t length)
|
||||
{
|
||||
cheevos_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);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Count number of achievements in a JSON file
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int in_cheevos;
|
||||
int in_lboards;
|
||||
uint32_t field_hash;
|
||||
unsigned core_count;
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
} cheevos_countud_t;
|
||||
|
||||
static int cheevos_count_end_array(void* userdata)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
|
||||
ud->field_hash = cheevos_djb2(name, length);
|
||||
|
||||
if (ud->field_hash == CHEEVOS_JSON_KEY_ACHIEVEMENTS)
|
||||
ud->in_cheevos = 1;
|
||||
else if (ud->field_hash == CHEEVOS_JSON_KEY_LEADERBOARDS)
|
||||
ud->in_lboards = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
|
||||
|
||||
if (ud->in_cheevos && ud->field_hash == CHEEVOS_JSON_KEY_FLAGS)
|
||||
{
|
||||
long flags = strtol(number, NULL, 10);
|
||||
|
||||
if (flags == 3)
|
||||
ud->core_count++; /* Core achievements */
|
||||
else if (flags == 5)
|
||||
ud->unofficial_count++; /* Unofficial achievements */
|
||||
}
|
||||
else if (ud->in_lboards && ud->field_hash == CHEEVOS_JSON_KEY_ID)
|
||||
ud->lboard_count++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_count_cheevos(const char* json,
|
||||
unsigned* core_count, unsigned* unofficial_count,
|
||||
unsigned* lboard_count)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_count_end_array,
|
||||
cheevos_count_key,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_count_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
int res;
|
||||
cheevos_countud_t ud;
|
||||
ud.in_cheevos = 0;
|
||||
ud.in_lboards = 0;
|
||||
ud.core_count = 0;
|
||||
ud.unofficial_count = 0;
|
||||
ud.lboard_count = 0;
|
||||
|
||||
res = jsonsax_parse(json, &handlers, (void*)&ud);
|
||||
|
||||
*core_count = ud.core_count;
|
||||
*unofficial_count = ud.unofficial_count;
|
||||
*lboard_count = ud.lboard_count;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Parses the cheevos in the JSON
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char* string;
|
||||
size_t length;
|
||||
} cheevos_field_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int in_cheevos;
|
||||
int in_lboards;
|
||||
int is_console_id;
|
||||
unsigned core_count;
|
||||
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;
|
||||
|
||||
cheevos_rapatchdata_t* patchdata;
|
||||
} cheevos_readud_t;
|
||||
|
||||
static const char* cheevos_dupstr(const cheevos_field_t* field)
|
||||
{
|
||||
char* string = (char*)malloc(field->length + 1);
|
||||
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
memcpy((void*)string, (void*)field->string, field->length);
|
||||
string[field->length] = 0;
|
||||
return string;
|
||||
}
|
||||
|
||||
static int cheevos_new_cheevo(cheevos_readud_t* ud)
|
||||
{
|
||||
cheevos_racheevo_t* cheevo = NULL;
|
||||
unsigned flags = (unsigned)strtol(ud->flags.string, NULL, 10);
|
||||
|
||||
if (flags == 3)
|
||||
cheevo = ud->patchdata->core + ud->core_count++;
|
||||
else if (flags == 5)
|
||||
cheevo = ud->patchdata->unofficial + ud->unofficial_count++;
|
||||
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->points = (unsigned)strtol(ud->points.string, NULL, 10);
|
||||
cheevo->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
if ( !cheevo->title
|
||||
|| !cheevo->description
|
||||
|| !cheevo->badge
|
||||
|| !cheevo->memaddr)
|
||||
{
|
||||
CHEEVOS_FREE(cheevo->title);
|
||||
CHEEVOS_FREE(cheevo->description);
|
||||
CHEEVOS_FREE(cheevo->badge);
|
||||
CHEEVOS_FREE(cheevo->memaddr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_new_lboard(cheevos_readud_t* ud)
|
||||
{
|
||||
cheevos_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->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
if ( !lboard->title
|
||||
|| !lboard->description
|
||||
|| !lboard->format
|
||||
|| !lboard->mem)
|
||||
{
|
||||
CHEEVOS_FREE(lboard->title);
|
||||
CHEEVOS_FREE(lboard->description);
|
||||
CHEEVOS_FREE(lboard->format);
|
||||
CHEEVOS_FREE(lboard->mem);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_end_object(void* userdata)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->in_cheevos)
|
||||
return cheevos_new_cheevo(ud);
|
||||
|
||||
if (ud->in_lboards)
|
||||
return cheevos_new_lboard(ud);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_end_array(void* userdata)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
|
||||
int common = ud->in_cheevos || ud->in_lboards;
|
||||
uint32_t hash = cheevos_djb2(name, length);
|
||||
ud->field = NULL;
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case CHEEVOS_JSON_KEY_ACHIEVEMENTS:
|
||||
ud->in_cheevos = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_LEADERBOARDS:
|
||||
ud->in_lboards = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_CONSOLE_ID:
|
||||
ud->is_console_id = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_ID:
|
||||
if (common)
|
||||
ud->field = &ud->id;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MEMADDR:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->memaddr;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MEM:
|
||||
if (ud->in_lboards)
|
||||
ud->field = &ud->memaddr;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_TITLE:
|
||||
if (common)
|
||||
ud->field = &ud->title;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_DESCRIPTION:
|
||||
if (common)
|
||||
ud->field = &ud->desc;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_POINTS:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->points;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_AUTHOR:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->author;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MODIFIED:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->modified;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_CREATED:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->created;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_BADGENAME:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->badge;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_FLAGS:
|
||||
if (ud->in_cheevos)
|
||||
ud->field = &ud->flags;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_FORMAT:
|
||||
if (ud->in_lboards)
|
||||
ud->field = &ud->format;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field)
|
||||
{
|
||||
ud->field->string = string;
|
||||
ud->field->length = length;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_read_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field)
|
||||
{
|
||||
ud->field->string = number;
|
||||
ud->field->length = length;
|
||||
}
|
||||
else if (ud->is_console_id)
|
||||
{
|
||||
ud->patchdata->console_id = strtol(number, NULL, 10);
|
||||
ud->is_console_id = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_read_end_object,
|
||||
NULL,
|
||||
cheevos_read_end_array,
|
||||
cheevos_read_key,
|
||||
NULL,
|
||||
cheevos_read_string,
|
||||
cheevos_read_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
cheevos_readud_t ud;
|
||||
int res;
|
||||
|
||||
/* Count the number of achievements in the JSON file. */
|
||||
res = cheevos_count_cheevos(json, &patchdata->core_count,
|
||||
&patchdata->unofficial_count, &patchdata->lboard_count);
|
||||
|
||||
if (res != JSONSAX_OK)
|
||||
return -1;
|
||||
|
||||
/* Allocate the achievements. */
|
||||
|
||||
patchdata->core = (cheevos_racheevo_t*)
|
||||
calloc(patchdata->core_count, sizeof(cheevos_racheevo_t));
|
||||
|
||||
patchdata->unofficial = (cheevos_racheevo_t*)
|
||||
calloc(patchdata->unofficial_count, sizeof(cheevos_racheevo_t));
|
||||
|
||||
patchdata->lboards = (cheevos_ralboard_t*)
|
||||
calloc(patchdata->lboard_count, sizeof(cheevos_ralboard_t));
|
||||
|
||||
if (!patchdata->core ||
|
||||
!patchdata->unofficial ||
|
||||
!patchdata->lboards)
|
||||
{
|
||||
CHEEVOS_FREE(patchdata->core);
|
||||
CHEEVOS_FREE(patchdata->unofficial);
|
||||
CHEEVOS_FREE(patchdata->lboards);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Load the achievements. */
|
||||
ud.in_cheevos = 0;
|
||||
ud.in_lboards = 0;
|
||||
ud.is_console_id = 0;
|
||||
ud.field = NULL;
|
||||
ud.core_count = 0;
|
||||
ud.unofficial_count = 0;
|
||||
ud.lboard_count = 0;
|
||||
ud.patchdata = patchdata;
|
||||
|
||||
if (jsonsax_parse(json, &handlers, (void*)&ud) != JSONSAX_OK)
|
||||
{
|
||||
cheevos_free_patchdata(patchdata);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Frees the patchdata
|
||||
*****************************************************************************/
|
||||
|
||||
void cheevos_free_patchdata(cheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
unsigned i = 0, count = 0;
|
||||
const cheevos_racheevo_t* cheevo = NULL;
|
||||
const cheevos_ralboard_t* lboard = NULL;
|
||||
|
||||
cheevo = patchdata->core;
|
||||
|
||||
for (i = 0, count = patchdata->core_count; i < count; i++, cheevo++)
|
||||
{
|
||||
CHEEVOS_FREE(cheevo->title);
|
||||
CHEEVOS_FREE(cheevo->description);
|
||||
CHEEVOS_FREE(cheevo->badge);
|
||||
CHEEVOS_FREE(cheevo->memaddr);
|
||||
}
|
||||
|
||||
cheevo = patchdata->unofficial;
|
||||
|
||||
for (i = 0, count = patchdata->unofficial_count; i < count; i++, cheevo++)
|
||||
{
|
||||
CHEEVOS_FREE(cheevo->title);
|
||||
CHEEVOS_FREE(cheevo->description);
|
||||
CHEEVOS_FREE(cheevo->badge);
|
||||
CHEEVOS_FREE(cheevo->memaddr);
|
||||
}
|
||||
|
||||
lboard = patchdata->lboards;
|
||||
|
||||
for (i = 0, count = patchdata->lboard_count; i < count; i++, lboard++)
|
||||
{
|
||||
CHEEVOS_FREE(lboard->title);
|
||||
CHEEVOS_FREE(lboard->description);
|
||||
CHEEVOS_FREE(lboard->format);
|
||||
CHEEVOS_FREE(lboard->mem);
|
||||
}
|
||||
|
||||
CHEEVOS_FREE(patchdata->core);
|
||||
CHEEVOS_FREE(patchdata->unofficial);
|
||||
CHEEVOS_FREE(patchdata->lboards);
|
||||
|
||||
patchdata->console_id = 0;
|
||||
patchdata->core = NULL;
|
||||
patchdata->unofficial = NULL;
|
||||
patchdata->lboards = NULL;
|
||||
patchdata->core_count = 0;
|
||||
patchdata->unofficial_count = 0;
|
||||
patchdata->lboard_count = 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Deactivates unlocked cheevos
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int is_element;
|
||||
cheevos_unlock_cb_t unlock_cb;
|
||||
void* userdata;
|
||||
} cheevos_deactivate_t;
|
||||
|
||||
static int cheevos_deactivate_index(void* userdata, unsigned int index)
|
||||
{
|
||||
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
|
||||
|
||||
ud->is_element = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cheevos_deactivate_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
|
||||
unsigned id = 0;
|
||||
|
||||
if (ud->is_element)
|
||||
{
|
||||
ud->is_element = 0;
|
||||
id = (unsigned)strtol(number, NULL, 10);
|
||||
|
||||
ud->unlock_cb(id, ud->userdata);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
cheevos_deactivate_index,
|
||||
NULL,
|
||||
cheevos_deactivate_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
cheevos_deactivate_t ud;
|
||||
|
||||
ud.is_element = 0;
|
||||
ud.unlock_cb = unlock_cb;
|
||||
ud.userdata = userdata;
|
||||
|
||||
jsonsax_parse(json, &handlers, (void*)&ud);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Returns the game ID
|
||||
*****************************************************************************/
|
||||
|
||||
unsigned chevos_get_gameid(const char* json)
|
||||
{
|
||||
char gameid[32];
|
||||
|
||||
if (cheevos_get_value(json, CHEEVOS_JSON_KEY_GAMEID, gameid, sizeof(gameid)) != 0)
|
||||
return 0;
|
||||
|
||||
return (unsigned)strtol(gameid, NULL, 10);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/* 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_PARSER_H
|
||||
#define __RARCH_CHEEVOS_PARSER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct {
|
||||
const char* title;
|
||||
const char* description;
|
||||
const char* badge;
|
||||
const char* memaddr;
|
||||
unsigned points;
|
||||
unsigned id;
|
||||
} cheevos_racheevo_t;
|
||||
|
||||
typedef struct {
|
||||
const char* title;
|
||||
const char* description;
|
||||
const char* format;
|
||||
const char* mem;
|
||||
unsigned id;
|
||||
} cheevos_ralboard_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned console_id;
|
||||
|
||||
cheevos_racheevo_t* core;
|
||||
cheevos_racheevo_t* unofficial;
|
||||
cheevos_ralboard_t* lboards;
|
||||
|
||||
unsigned core_count;
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
} cheevos_rapatchdata_t;
|
||||
|
||||
typedef void (*cheevos_unlock_cb_t)(unsigned id, void* userdata);
|
||||
|
||||
int cheevos_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);
|
||||
|
||||
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata);
|
||||
|
||||
unsigned chevos_get_gameid(const char* json);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2016 - 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_UTIL_H
|
||||
#define __RARCH_CHEEVOS_UTIL_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]: "
|
||||
#define CHEEVOS_FREE(p) do { void* q = (void*)p; if (q != NULL) free(q); } while (0)
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
|
||||
#define CHEEVOS_LOG RARCH_LOG
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
#else
|
||||
|
||||
#define CHEEVOS_LOG cheevos_log
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
void cheevos_log(const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_UTIL_H */
|
||||
@@ -1,3 +1,18 @@
|
||||
/* 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/>.
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
+23
-2
@@ -1,5 +1,24 @@
|
||||
#ifndef __RARCH_BADGE_H
|
||||
#define __RARCH_BADGE_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_BADGE_H
|
||||
#define __RARCH_CHEEVOS_OLD_BADGE_H
|
||||
|
||||
#ifdef HAVE_NEW_CHEEVOS
|
||||
#include "../cheevos-new/badges.h"
|
||||
#else
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
@@ -27,3 +46,5 @@ static badges_ctx_t new_badges_ctx;
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+50
-117
@@ -1,5 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2016 - Andre Leiradella
|
||||
* 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-
|
||||
@@ -288,6 +288,7 @@ static cheevos_locals_t cheevos_locals =
|
||||
bool cheevos_loaded = false;
|
||||
bool cheevos_hardcore_active = false;
|
||||
bool cheevos_hardcore_paused = false;
|
||||
bool cheevos_state_loaded_flag = false;
|
||||
int cheats_are_enabled = 0;
|
||||
int cheats_were_enabled = 0;
|
||||
|
||||
@@ -1665,7 +1666,7 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||
|
||||
if (settings && settings->bools.cheevos_auto_screenshot)
|
||||
{
|
||||
char shotname[256];
|
||||
char shotname[4200];
|
||||
|
||||
snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u",
|
||||
settings->paths.directory_screenshot,
|
||||
@@ -2570,10 +2571,12 @@ enum
|
||||
|
||||
static int cheevos_iterate(coro_t *coro)
|
||||
{
|
||||
ssize_t num_read = 0;
|
||||
size_t to_read = 4096;
|
||||
uint8_t *buffer = NULL;
|
||||
const char *end = NULL;
|
||||
const int snes_header_len = 0x200;
|
||||
const int lynx_header_len = 0x40;
|
||||
ssize_t num_read = 0;
|
||||
size_t to_read = 4096;
|
||||
uint8_t *buffer = NULL;
|
||||
const char *end = NULL;
|
||||
|
||||
static const uint32_t genesis_exts[] =
|
||||
{
|
||||
@@ -2611,18 +2614,16 @@ static int cheevos_iterate(coro_t *coro)
|
||||
|
||||
static cheevos_finder_t finders[] =
|
||||
{
|
||||
{SNES_MD5, "SNES (8Mb padding)", snes_exts},
|
||||
{SNES_MD5, "SNES (discards header)", snes_exts},
|
||||
{GENESIS_MD5, "Genesis (6Mb padding)", genesis_exts},
|
||||
{LYNX_MD5, "Atari Lynx (only first 512 bytes)", lynx_exts},
|
||||
{NES_MD5, "NES (discards VROM)", NULL},
|
||||
{LYNX_MD5, "Atari Lynx (discards header)", lynx_exts},
|
||||
{NES_MD5, "NES (discards header)", NULL},
|
||||
{GENERIC_MD5, "Generic (plain content)", NULL},
|
||||
{FILENAME_MD5, "Generic (filename)", NULL}
|
||||
};
|
||||
|
||||
CORO_ENTER();
|
||||
|
||||
|
||||
|
||||
cheevos_locals.addrs_patched = false;
|
||||
|
||||
coro->settings = config_get_ptr();
|
||||
@@ -2901,30 +2902,21 @@ found:
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
coro->offset = 0;
|
||||
/* Checks for the existence of a headered SNES file.
|
||||
Unheadered files fall back to GENERIC_MD5. */
|
||||
|
||||
if (coro->len < 0x2000 || coro->len % 0x2000 != snes_header_len)
|
||||
{
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
coro->offset = 512;
|
||||
coro->count = 0;
|
||||
|
||||
CORO_GOSUB(EVAL_MD5);
|
||||
|
||||
if (coro->count == 0)
|
||||
{
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
if (coro->count < size_in_megabytes(8))
|
||||
{
|
||||
/*
|
||||
* Inputs: CHEEVOS_VAR_MD5, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
|
||||
* Outputs: CHEEVOS_VAR_MD5
|
||||
*/
|
||||
coro->offset = 0;
|
||||
coro->count = size_in_megabytes(8) - coro->count;
|
||||
CORO_GOSUB(FILL_MD5);
|
||||
}
|
||||
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
|
||||
CORO_GOTO(GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
@@ -2964,16 +2956,19 @@ found:
|
||||
*************************************************************************/
|
||||
CORO_SUB(LYNX_MD5)
|
||||
|
||||
if (coro->len < 0x0240)
|
||||
/* Checks for the existence of a headered Lynx file.
|
||||
Unheadered files fall back to GENERIC_MD5. */
|
||||
|
||||
if (coro->len <= lynx_header_len ||
|
||||
memcmp("LYNX", (void *)coro->data, 5) != 0)
|
||||
{
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
coro->offset = 0x0040;
|
||||
coro->count = 0x0200;
|
||||
coro->offset = lynx_header_len;
|
||||
coro->count = coro->len - lynx_header_len;
|
||||
CORO_GOSUB(EVAL_MD5);
|
||||
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
@@ -2986,12 +2981,8 @@ found:
|
||||
*************************************************************************/
|
||||
CORO_SUB(NES_MD5)
|
||||
|
||||
/* Note about the references to the FCEU emulator below. There is no
|
||||
* core-specific code in this function, it's rather Retro Achievements
|
||||
* specific code that must be followed to the letter so we compute
|
||||
* the correct ROM hash. Retro Achievements does indeed use some
|
||||
* FCEU related method to compute the hash, since its NES emulator
|
||||
* is based on it. */
|
||||
/* Checks for the existence of a headered NES file.
|
||||
Unheadered files fall back to GENERIC_MD5. */
|
||||
|
||||
if (coro->len < sizeof(coro->header))
|
||||
{
|
||||
@@ -3001,84 +2992,23 @@ found:
|
||||
|
||||
memcpy((void*)&coro->header, coro->data,
|
||||
sizeof(coro->header));
|
||||
|
||||
if (coro->header.id[0] == 'N'
|
||||
&& coro->header.id[1] == 'E'
|
||||
&& coro->header.id[2] == 'S'
|
||||
&& coro->header.id[3] == 0x1a)
|
||||
|
||||
if ( coro->header.id[0] != 'N'
|
||||
|| coro->header.id[1] != 'E'
|
||||
|| coro->header.id[2] != 'S'
|
||||
|| coro->header.id[3] != 0x1a)
|
||||
{
|
||||
size_t romsize = 256;
|
||||
/* from FCEU core - compute size using the cart mapper */
|
||||
int mapper = (coro->header.rom_type >> 4) | (coro->header.rom_type2 & 0xF0);
|
||||
|
||||
if (coro->header.rom_size)
|
||||
romsize = next_pow2(coro->header.rom_size);
|
||||
|
||||
/* for games not to the power of 2, so we just read enough
|
||||
* PRG rom from it, but we have to keep ROM_size to the power of 2
|
||||
* since PRGCartMapping wants ROM_size to be to the power of 2
|
||||
* so instead if not to power of 2, we just use head.ROM_size when
|
||||
* we use FCEU_read. */
|
||||
coro->round = mapper != 53 && mapper != 198 && mapper != 228;
|
||||
coro->bytes = coro->round ? romsize : coro->header.rom_size;
|
||||
|
||||
coro->offset = sizeof(coro->header) + (coro->header.rom_type & 4
|
||||
? sizeof(coro->header) : 0);
|
||||
|
||||
/* from FCEU core - check if Trainer included in ROM data */
|
||||
MD5_Init(&coro->md5);
|
||||
coro->count = 0x4000 * coro->bytes;
|
||||
CORO_GOSUB(EVAL_MD5);
|
||||
|
||||
if (coro->count < 0x4000 * coro->bytes)
|
||||
{
|
||||
coro->offset = 0xff;
|
||||
coro->count = 0x4000 * coro->bytes - coro->count;
|
||||
CORO_GOSUB(FILL_MD5);
|
||||
}
|
||||
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOTO(GET_GAMEID);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
size_t chunks = coro->len >> 14;
|
||||
size_t chunk_size = 0x4000;
|
||||
|
||||
/* Fall back to headerless hashing
|
||||
* PRG ROM size is unknown, so test by 16KB chunks */
|
||||
MD5_Init(&coro->md5);
|
||||
coro->offset = sizeof(coro->header);
|
||||
coro->count = coro->len - coro->offset;
|
||||
CORO_GOSUB(EVAL_MD5);
|
||||
|
||||
coro->round = 0;
|
||||
coro->offset = 0;
|
||||
|
||||
for (i = 0; i < chunks; i++)
|
||||
{
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
coro->bytes = i + 1;
|
||||
coro->count = coro->bytes * chunk_size;
|
||||
|
||||
CORO_GOSUB(EVAL_MD5);
|
||||
|
||||
if (coro->count < 0x4000 * coro->bytes)
|
||||
{
|
||||
coro->offset = 0xff;
|
||||
coro->count = 0x4000 * coro->bytes - coro->count;
|
||||
CORO_GOSUB(FILL_MD5);
|
||||
}
|
||||
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOSUB(GET_GAMEID);
|
||||
|
||||
if (coro->gameid > 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
CORO_RET();
|
||||
}
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOTO(GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a "generic" game
|
||||
@@ -3263,7 +3193,10 @@ found:
|
||||
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!string_is_equal(settings->arrays.menu_driver, "xmb") ||
|
||||
if (!(
|
||||
string_is_equal(settings->arrays.menu_driver, "xmb") ||
|
||||
string_is_equal(settings->arrays.menu_driver, "ozone")
|
||||
) ||
|
||||
!settings->bools.cheevos_badges_enable)
|
||||
CORO_RET();
|
||||
}
|
||||
@@ -3424,7 +3357,7 @@ found:
|
||||
|
||||
/* Save token to config and clear pass on success */
|
||||
*coro->settings->arrays.cheevos_password = '\0';
|
||||
strlcpy(
|
||||
strncpy(
|
||||
coro->settings->arrays.cheevos_token,
|
||||
cheevos_locals.token, sizeof(coro->settings->arrays.cheevos_token)
|
||||
);
|
||||
|
||||
+171
-163
@@ -1,163 +1,171 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2016 - 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_H
|
||||
#define __RARCH_CHEEVOS_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. */
|
||||
#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_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 int cheats_are_enabled;
|
||||
extern int cheats_were_enabled;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#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
|
||||
|
||||
#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 */
|
||||
+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 */
|
||||
+415
-416
@@ -1,416 +1,415 @@
|
||||
/* 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);
|
||||
else
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
+78
-78
@@ -1,78 +1,78 @@
|
||||
/* 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_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 */
|
||||
@@ -41,8 +41,12 @@
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#ifdef HAVE_NEW_CHEEVOS
|
||||
#include "cheevos-new/fixup.h"
|
||||
#else
|
||||
#include "cheevos/var.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
#include "discord/discord.h"
|
||||
@@ -85,6 +89,7 @@
|
||||
#include "managers/cheat_manager.h"
|
||||
#include "managers/state_manager.h"
|
||||
#include "ui/ui_companion_driver.h"
|
||||
#include "tasks/task_content.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
#include "list_special.h"
|
||||
|
||||
@@ -113,12 +118,14 @@ struct cmd_map
|
||||
unsigned id;
|
||||
};
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
struct cmd_action_map
|
||||
{
|
||||
const char *str;
|
||||
bool (*action)(const char *arg);
|
||||
const char *arg_desc;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct command
|
||||
{
|
||||
@@ -133,9 +140,50 @@ struct command
|
||||
#endif
|
||||
};
|
||||
|
||||
static bool command_version(const char *arg);
|
||||
#if defined(HAVE_COMMAND)
|
||||
static enum cmd_source_t lastcmd_source;
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)
|
||||
static int lastcmd_net_fd;
|
||||
static struct sockaddr_storage lastcmd_net_source;
|
||||
static socklen_t lastcmd_net_source_len;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
static void command_reply(const char * data, size_t len)
|
||||
{
|
||||
switch (lastcmd_source)
|
||||
{
|
||||
case CMD_STDIN:
|
||||
#ifdef HAVE_STDIN_CMD
|
||||
fwrite(data, 1,len, stdout);
|
||||
#endif
|
||||
break;
|
||||
case CMD_NETWORK:
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
sendto(lastcmd_net_fd, data, len, 0,
|
||||
(struct sockaddr*)&lastcmd_net_source, lastcmd_net_source_len);
|
||||
#endif
|
||||
break;
|
||||
case CMD_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
static bool command_version(const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
snprintf(reply, sizeof(reply), "%s\n", PACKAGE_VERSION);
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
command_reply(reply, strlen(reply));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CHEEVOS)
|
||||
static bool command_read_ram(const char *arg);
|
||||
static bool command_write_ram(const char *arg);
|
||||
#endif
|
||||
@@ -143,7 +191,7 @@ static bool command_write_ram(const char *arg);
|
||||
static const struct cmd_action_map action_map[] = {
|
||||
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
||||
{ "VERSION", command_version, "No argument"},
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#if defined(HAVE_CHEEVOS)
|
||||
{ "READ_CORE_RAM", command_read_ram, "<address> <number of bytes>" },
|
||||
{ "WRITE_CORE_RAM", command_write_ram, "<address> <byte1> <byte2> ..." },
|
||||
#endif
|
||||
@@ -173,6 +221,7 @@ static const struct cmd_map map[] = {
|
||||
{ "SCREENSHOT", RARCH_SCREENSHOT },
|
||||
{ "MUTE", RARCH_MUTE },
|
||||
{ "OSK", RARCH_OSK },
|
||||
{ "FPS_TOGGLE", RARCH_FPS_TOGGLE },
|
||||
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
|
||||
{ "VOLUME_UP", RARCH_VOLUME_UP },
|
||||
{ "VOLUME_DOWN", RARCH_VOLUME_DOWN },
|
||||
@@ -184,6 +233,8 @@ static const struct cmd_map map[] = {
|
||||
{ "UI_COMPANION_TOGGLE", RARCH_UI_COMPANION_TOGGLE },
|
||||
{ "GAME_FOCUS_TOGGLE", RARCH_GAME_FOCUS_TOGGLE },
|
||||
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
||||
{ "RECORDING_TOGGLE", RARCH_RECORDING_TOGGLE },
|
||||
{ "STREAMING_TOGGLE", RARCH_STREAMING_TOGGLE },
|
||||
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
||||
{ "MENU_DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN },
|
||||
{ "MENU_LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT },
|
||||
@@ -192,40 +243,6 @@ static const struct cmd_map map[] = {
|
||||
{ "MENU_B", RETRO_DEVICE_ID_JOYPAD_B },
|
||||
{ "MENU_B", RETRO_DEVICE_ID_JOYPAD_B },
|
||||
};
|
||||
|
||||
static enum cmd_source_t lastcmd_source;
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
static int lastcmd_net_fd;
|
||||
static struct sockaddr_storage lastcmd_net_source;
|
||||
static socklen_t lastcmd_net_source_len;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
static bool command_reply(const char * data, size_t len)
|
||||
{
|
||||
switch (lastcmd_source)
|
||||
{
|
||||
case CMD_NONE:
|
||||
break;
|
||||
case CMD_STDIN:
|
||||
#ifdef HAVE_STDIN_CMD
|
||||
fwrite(data, 1,len, stdout);
|
||||
return true;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case CMD_NETWORK:
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
sendto(lastcmd_net_fd, data, len, 0,
|
||||
(struct sockaddr*)&lastcmd_net_source, lastcmd_net_source_len);
|
||||
return true;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool command_set_shader(const char *arg)
|
||||
@@ -255,48 +272,27 @@ bool command_set_shader(const char *arg)
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool command_version(const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
command_reply(reply, strlen(reply));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#define SMY_CMD_STR "READ_CORE_RAM"
|
||||
static bool command_read_ram(const char *arg)
|
||||
{
|
||||
cheevos_var_t var;
|
||||
#if defined(HAVE_NEW_CHEEVOS)
|
||||
unsigned i;
|
||||
char *reply = NULL;
|
||||
const uint8_t * data = NULL;
|
||||
char *reply_at = NULL;
|
||||
unsigned int nbytes = 0;
|
||||
unsigned int alloc_size = 0;
|
||||
int addr = -1;
|
||||
unsigned int addr = -1;
|
||||
|
||||
if (sscanf(arg, "%x %d", &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 + sprintf(reply, SMY_CMD_STR " %x", addr);
|
||||
|
||||
var.value = addr;
|
||||
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
data = cheevos_patch_address(addr, cheevos_get_console());
|
||||
|
||||
if (data)
|
||||
{
|
||||
for (i=0;i<nbytes;i++)
|
||||
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);
|
||||
@@ -307,6 +303,38 @@ static bool command_read_ram(const char *arg)
|
||||
command_reply(reply, reply_at+strlen(" -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;
|
||||
}
|
||||
@@ -314,14 +342,19 @@ static bool command_read_ram(const char *arg)
|
||||
|
||||
static bool command_write_ram(const char *arg)
|
||||
{
|
||||
cheevos_var_t var;
|
||||
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;
|
||||
|
||||
var.value = strtoul(arg, (char**)&arg, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
#endif
|
||||
|
||||
if (data)
|
||||
{
|
||||
@@ -391,7 +424,6 @@ static bool command_network_init(command_t *handle, uint16_t port)
|
||||
msg_hash_to_str(MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT),
|
||||
(unsigned short)port);
|
||||
|
||||
|
||||
if (fd < 0)
|
||||
goto error;
|
||||
|
||||
@@ -612,7 +644,7 @@ bool command_network_new(
|
||||
|
||||
return true;
|
||||
|
||||
#if (defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)) || defined(HAVE_STDIN_CMD)
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND) || defined(HAVE_STDIN_CMD)
|
||||
error:
|
||||
command_free(handle);
|
||||
return false;
|
||||
@@ -1115,7 +1147,6 @@ static void command_event_init_cheats(void)
|
||||
cheat_manager_alloc_if_empty() ;
|
||||
cheat_manager_load_game_specific_cheats() ;
|
||||
|
||||
|
||||
if (settings != NULL && settings->bools.apply_cheats_after_load)
|
||||
cheat_manager_apply_cheats();
|
||||
}
|
||||
@@ -1244,6 +1275,7 @@ static bool event_init_content(void)
|
||||
{
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
@@ -1270,7 +1302,18 @@ static bool event_init_content(void)
|
||||
RARCH_LOG("%s.\n",
|
||||
msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD));
|
||||
|
||||
/*
|
||||
Since the operations are asynchronouse we can't guarantee users will not use auto_load_state to cheat on
|
||||
achievements so we forbid auto_load_state from happening if cheevos_enable and cheevos_hardcode_mode_enable
|
||||
are true
|
||||
*/
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (!settings->bools.cheevos_enable || !settings->bools.cheevos_hardcore_mode_enable)
|
||||
command_event_load_auto_state();
|
||||
#else
|
||||
command_event_load_auto_state();
|
||||
#endif
|
||||
|
||||
command_event(CMD_EVENT_BSV_MOVIE_INIT, NULL);
|
||||
command_event(CMD_EVENT_NETPLAY_INIT, NULL);
|
||||
|
||||
@@ -1300,7 +1343,6 @@ static bool command_event_init_core(enum rarch_core_type *data)
|
||||
if(settings->bools.auto_shaders_enable)
|
||||
config_load_shader_preset();
|
||||
|
||||
|
||||
/* reset video format to libretro's default */
|
||||
video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);
|
||||
|
||||
@@ -1323,7 +1365,6 @@ static bool command_event_init_core(enum rarch_core_type *data)
|
||||
if (!core_load(settings->uints.input_poll_type_behavior))
|
||||
return false;
|
||||
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
|
||||
return true;
|
||||
}
|
||||
@@ -1587,7 +1628,6 @@ static void command_event_save_current_config(enum override_type type)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!string_is_empty(msg))
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
}
|
||||
@@ -1636,8 +1676,8 @@ static bool command_event_main_state(unsigned cmd)
|
||||
{
|
||||
retro_ctx_size_info_t info;
|
||||
char msg[128];
|
||||
char *state_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
size_t state_path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
size_t state_path_size = 16384 * sizeof(char);
|
||||
char *state_path = (char*)malloc(state_path_size);
|
||||
global_t *global = global_get_ptr();
|
||||
bool ret = false;
|
||||
bool push_msg = true;
|
||||
@@ -1673,6 +1713,9 @@ static bool command_event_main_state(unsigned cmd)
|
||||
case CMD_EVENT_LOAD_STATE:
|
||||
if (content_load_state(state_path, false, false))
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_state_loaded_flag = true;
|
||||
#endif
|
||||
ret = true;
|
||||
#ifdef HAVE_NETWORKING
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, NULL);
|
||||
@@ -1724,56 +1767,6 @@ static bool command_event_resize_windowed_scale(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
if (playlist_push(
|
||||
playlist,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL
|
||||
))
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *plist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
playlist_update(
|
||||
playlist,
|
||||
idx,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_display_name,
|
||||
crc32,
|
||||
db_name);
|
||||
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
* @cmd : Event command index.
|
||||
@@ -1784,18 +1777,10 @@ void command_playlist_update_write(
|
||||
**/
|
||||
bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
#ifdef HAVE_DISCORD
|
||||
static bool discord_inited = false;
|
||||
#endif
|
||||
bool boolean = false;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case CMD_EVENT_MENU_REFRESH:
|
||||
#ifdef HAVE_MENU
|
||||
menu_driver_ctl(RARCH_MENU_CTL_REFRESH, NULL);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_SET_PER_GAME_RESOLUTION:
|
||||
#if defined(GEKKO)
|
||||
{
|
||||
@@ -1855,7 +1840,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_LOAD_CORE:
|
||||
{
|
||||
bool success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
bool success = false;
|
||||
subsystem_current_count = 0;
|
||||
content_clear_subsystem();
|
||||
success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
(void)success;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
@@ -1903,6 +1891,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event_init_controllers();
|
||||
break;
|
||||
case CMD_EVENT_RESET:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_state_loaded_flag = false;
|
||||
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);
|
||||
|
||||
@@ -1971,15 +1963,14 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_RESTORE_REMAPS, NULL);
|
||||
|
||||
if (is_inited)
|
||||
{
|
||||
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
|
||||
core_unload_game();
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
core_unload();
|
||||
#ifdef HAVE_DISCORD
|
||||
if (discord_is_inited)
|
||||
{
|
||||
@@ -1989,6 +1980,11 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
}
|
||||
#endif
|
||||
if (is_inited)
|
||||
{
|
||||
subsystem_current_count = 0;
|
||||
content_clear_subsystem();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_QUIT:
|
||||
@@ -2129,6 +2125,12 @@ TODO: Add a setting for these tweaks */
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_FPS_TOGGLE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings->bools.video_fps_show = !(settings->bools.video_fps_show);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_OVERLAY_DEINIT:
|
||||
#ifdef HAVE_OVERLAY
|
||||
input_overlay_free(overlay_ptr);
|
||||
@@ -2170,16 +2172,20 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_RECORD_DEINIT:
|
||||
{
|
||||
recording_set_state(false);
|
||||
streaming_set_state(false);
|
||||
if (!recording_deinit())
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_RECORD_INIT:
|
||||
{
|
||||
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
|
||||
recording_set_state(true);
|
||||
if (!recording_init())
|
||||
{
|
||||
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_HISTORY_DEINIT:
|
||||
@@ -2393,17 +2399,12 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_ADD_TO_FAVORITES:
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||
const char *core_name = NULL;
|
||||
const char *core_path = NULL;
|
||||
const char *label = NULL;
|
||||
|
||||
if (sys_info)
|
||||
{
|
||||
core_name = sys_info->info.library_name;
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
}
|
||||
/* 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;
|
||||
|
||||
if (!string_is_empty(global->name.label))
|
||||
label = global->name.label;
|
||||
@@ -2446,6 +2447,9 @@ TODO: Add a setting for these tweaks */
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG:
|
||||
config_set_defaults();
|
||||
break;
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG:
|
||||
command_event_save_current_config(OVERRIDE_NONE);
|
||||
break;
|
||||
@@ -2678,9 +2682,12 @@ TODO: Add a setting for these tweaks */
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool new_fullscreen_state = !settings->bools.video_fullscreen
|
||||
&& !retroarch_is_forced_fullscreen();
|
||||
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
|
||||
retroarch_set_switching_display_mode();
|
||||
|
||||
/* we toggled manually, write the new value to settings */
|
||||
configuration_set_bool(settings, settings->bools.video_fullscreen,
|
||||
new_fullscreen_state);
|
||||
@@ -2696,6 +2703,8 @@ TODO: Add a setting for these tweaks */
|
||||
video_driver_hide_mouse();
|
||||
else
|
||||
video_driver_show_mouse();
|
||||
|
||||
retroarch_unset_switching_display_mode();
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_COMMAND_DEINIT:
|
||||
@@ -2914,26 +2923,24 @@ TODO: Add a setting for these tweaks */
|
||||
|
||||
if (!settings->bools.discord_enable)
|
||||
return false;
|
||||
if (discord_inited)
|
||||
if (discord_is_ready())
|
||||
return true;
|
||||
|
||||
discord_init();
|
||||
discord_inited = true;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_DISCORD_DEINIT:
|
||||
#ifdef HAVE_DISCORD
|
||||
if (!discord_inited)
|
||||
if (!discord_is_ready())
|
||||
return false;
|
||||
|
||||
discord_shutdown();
|
||||
discord_inited = false;
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_DISCORD_UPDATE:
|
||||
#ifdef HAVE_DISCORD
|
||||
if (!data || !discord_inited)
|
||||
if (!data || !discord_is_ready())
|
||||
return false;
|
||||
|
||||
{
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "playlist.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct command command_t;
|
||||
@@ -85,6 +83,8 @@ enum event_command
|
||||
CMD_EVENT_AUDIO_START,
|
||||
/* Mutes audio. */
|
||||
CMD_EVENT_AUDIO_MUTE_TOGGLE,
|
||||
/* Toggles FPS counter. */
|
||||
CMD_EVENT_FPS_TOGGLE,
|
||||
/* Initializes overlay. */
|
||||
CMD_EVENT_OVERLAY_INIT,
|
||||
/* Deinitializes overlay. */
|
||||
@@ -149,6 +149,7 @@ enum event_command
|
||||
/* Unpauses retroArch. */
|
||||
CMD_EVENT_PAUSE,
|
||||
CMD_EVENT_PAUSE_CHECKS,
|
||||
CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
@@ -157,7 +158,6 @@ enum event_command
|
||||
CMD_EVENT_MENU_PAUSE_LIBRETRO,
|
||||
/* Toggles menu on/off. */
|
||||
CMD_EVENT_MENU_TOGGLE,
|
||||
CMD_EVENT_MENU_REFRESH,
|
||||
/* Applies shader changes. */
|
||||
CMD_EVENT_SHADERS_APPLY_CHANGES,
|
||||
/* A new shader preset has been loaded */
|
||||
@@ -270,23 +270,6 @@ bool command_free(command_t *handle);
|
||||
**/
|
||||
bool command_event(enum event_command action, void *data);
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *playlist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+92
-13
@@ -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-
|
||||
@@ -48,7 +48,7 @@
|
||||
#define DEFAULT_ASPECT_RATIO -1.0f
|
||||
#endif
|
||||
|
||||
#ifdef RARCH_MOBILE
|
||||
#if defined(RARCH_MOBILE) || defined(HAVE_LIBNX)
|
||||
static const bool pointer_enable = true;
|
||||
#else
|
||||
static const bool pointer_enable = false;
|
||||
@@ -117,14 +117,18 @@ static const unsigned monitor_index = 0;
|
||||
/* Window */
|
||||
/* Window size. A value of 0 uses window scale
|
||||
* multiplied by the core framebuffer size. */
|
||||
static const unsigned window_x = 0;
|
||||
static const unsigned window_y = 0;
|
||||
static const unsigned window_width = 1280;
|
||||
static const unsigned window_height = 720;
|
||||
|
||||
/* Fullscreen resolution. A value of 0 uses the desktop
|
||||
* resolution. */
|
||||
static const unsigned fullscreen_x = 0;
|
||||
static const unsigned fullscreen_y = 0;
|
||||
|
||||
/* Number of threads to use for video recording */
|
||||
|
||||
static const unsigned video_record_threads = 2;
|
||||
|
||||
/* Amount of transparency to use for the main window.
|
||||
* 1 is the most transparent while 100 is opaque.
|
||||
*/
|
||||
@@ -148,6 +152,8 @@ static const bool vsync = true;
|
||||
|
||||
static const unsigned max_swapchain_images = 3;
|
||||
|
||||
static const bool adaptive_vsync = false;
|
||||
|
||||
/* Attempts to hard-synchronize CPU and GPU.
|
||||
* Can reduce latency at cost of performance. */
|
||||
static const bool hard_sync = false;
|
||||
@@ -179,10 +185,14 @@ static unsigned swap_interval = 1;
|
||||
/* Threaded video. Will possibly increase performance significantly
|
||||
* at the cost of worse synchronization and latency.
|
||||
*/
|
||||
#if defined(HAVE_LIBNX)
|
||||
static const bool video_threaded = true;
|
||||
#else
|
||||
static const bool video_threaded = false;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_THREADS)
|
||||
#if defined(GEKKO) || defined(PSP)
|
||||
#if defined(GEKKO) || defined(PSP) || defined(PS2)
|
||||
/* For single-core consoles right now it's better to have this be disabled. */
|
||||
static const bool threaded_data_runloop_enable = false;
|
||||
#else
|
||||
@@ -234,6 +244,11 @@ static const bool aspect_ratio_auto = false;
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9;
|
||||
#elif defined(PSP)
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||
#elif defined(_3DS)
|
||||
/* Previously defaulted to ASPECT_RATIO_4_3.
|
||||
* Non-4:3 content looks dreadful when stretched
|
||||
* to 4:3 on the 3DS screen... */
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||
#elif defined(RARCH_CONSOLE)
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
|
||||
#else
|
||||
@@ -260,10 +275,19 @@ static const float default_input_overlay_opacity = 0.7f;
|
||||
|
||||
static bool default_block_config_read = true;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
static bool menu_use_preferred_system_color_theme = true;
|
||||
#else
|
||||
static bool menu_use_preferred_system_color_theme = 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;
|
||||
static bool quick_menu_show_add_to_favorites = true;
|
||||
static bool quick_menu_show_start_recording = true;
|
||||
static bool quick_menu_show_start_streaming = true;
|
||||
static bool quick_menu_show_reset_core_association = true;
|
||||
static bool quick_menu_show_options = true;
|
||||
static bool quick_menu_show_controls = true;
|
||||
static bool quick_menu_show_cheats = true;
|
||||
@@ -278,6 +302,7 @@ static bool quick_menu_show_save_content_dir_overrides = true;
|
||||
|
||||
static bool kiosk_mode_enable = false;
|
||||
|
||||
static bool menu_horizontal_animation = true;
|
||||
static bool menu_show_online_updater = true;
|
||||
static bool menu_show_load_core = true;
|
||||
static bool menu_show_load_content = true;
|
||||
@@ -286,7 +311,11 @@ static bool menu_show_configurations = true;
|
||||
static bool menu_show_help = true;
|
||||
static bool menu_show_quit_retroarch = true;
|
||||
static bool menu_show_reboot = true;
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
static bool menu_show_shutdown = false;
|
||||
#else
|
||||
static bool menu_show_shutdown = true;
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA) || defined(VITA) || defined(_3DS)
|
||||
static bool menu_show_core_updater = false;
|
||||
#else
|
||||
@@ -344,9 +373,7 @@ static unsigned menu_shader_pipeline = 2;
|
||||
#endif
|
||||
|
||||
static bool show_advanced_settings = false;
|
||||
static const uint32_t menu_entry_normal_color = 0xffffffff;
|
||||
static const uint32_t menu_entry_hover_color = 0xff64ff64;
|
||||
static const uint32_t menu_title_color = 0xff64ff64;
|
||||
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
|
||||
|
||||
#else
|
||||
static bool default_block_config_read = false;
|
||||
@@ -368,10 +395,14 @@ static bool default_screenshots_in_content_dir = false;
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3;
|
||||
#elif defined(PS2) || defined(PSP)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_HOLD_START;
|
||||
#elif defined(VITA)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L1_R1_START_SELECT;
|
||||
#elif defined(SWITCH)
|
||||
#elif defined(SWITCH) || defined(ORBIS)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_START_SELECT;
|
||||
#elif TARGET_OS_TV
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_DOWN_Y_L_R;
|
||||
#else
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_NONE;
|
||||
#endif
|
||||
@@ -462,11 +493,23 @@ 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
|
||||
/* Enable bottom LCD screen */
|
||||
static const bool video_3ds_lcd_bottom = true;
|
||||
#endif
|
||||
|
||||
/* AUDIO */
|
||||
|
||||
/* Will enable audio or not. */
|
||||
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_cancel = false;
|
||||
static const bool audio_enable_menu_notice = false;
|
||||
static const bool audio_enable_menu_bgm = false;
|
||||
|
||||
/* Output samplerate. */
|
||||
#ifdef GEKKO
|
||||
static const unsigned out_rate = 32000;
|
||||
@@ -524,8 +567,11 @@ static const int wasapi_sh_buffer_length = -16; /* auto */
|
||||
/* Enables displaying the current frames per second. */
|
||||
static const bool fps_show = false;
|
||||
|
||||
/* Show frame count on FPS display */
|
||||
static const bool framecount_show = true;
|
||||
/* Enables displaying the current frame count. */
|
||||
static const bool framecount_show = false;
|
||||
|
||||
/* Includes displaying the current memory usage/total with FPS/Frames. */
|
||||
static const bool memory_show = false;
|
||||
|
||||
/* Enables use of rewind. This will incur some memory footprint
|
||||
* depending on the save state buffer. */
|
||||
@@ -556,7 +602,13 @@ static const bool pause_nonactive = true;
|
||||
|
||||
/* Saves non-volatile SRAM at a regular interval.
|
||||
* It is measured in seconds. A value of 0 disables autosave. */
|
||||
#if defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(__x86_64__) || defined(_M_X64) || defined(_WIN32) || defined(OSX) || defined(ANDROID) || defined(IOS)
|
||||
/* Flush to file every 10 seconds on modern platforms by default */
|
||||
static const unsigned autosave_interval = 10;
|
||||
#else
|
||||
/* Default to disabled on I/O-constrained platforms */
|
||||
static const unsigned autosave_interval = 0;
|
||||
#endif
|
||||
|
||||
/* Publicly announce netplay */
|
||||
static const bool netplay_public_announce = true;
|
||||
@@ -639,6 +691,9 @@ 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;
|
||||
|
||||
/* File format to use when writing playlists to disk */
|
||||
static const bool playlist_use_old_format = false;
|
||||
|
||||
/* Show Menu start-up screen on boot. */
|
||||
static const bool default_menu_show_start_screen = true;
|
||||
|
||||
@@ -695,8 +750,12 @@ static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
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
|
||||
@@ -713,7 +772,7 @@ static const bool desktop_menu_enable = true;
|
||||
|
||||
#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)
|
||||
#elif defined(PSP) || defined(_3DS) || defined(VITA) || defined(PS2)
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWEST;
|
||||
#else
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_NORMAL;
|
||||
@@ -756,7 +815,23 @@ static char buildbot_server_url[] = "http://bot.libretro.com/nightly/apple/osx/x
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/osx/ppc/latest/";
|
||||
#endif
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#if _MSC_VER == 1600
|
||||
#if _MSC_VER >= 1910
|
||||
#ifndef __WINRT__
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
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/";
|
||||
#endif
|
||||
#else
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/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-uwp/x86/latest/";
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/arm/latest/";
|
||||
#endif
|
||||
#endif
|
||||
#elif _MSC_VER == 1600
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
@@ -785,6 +860,8 @@ static char buildbot_server_url[] = "";
|
||||
#endif
|
||||
#elif defined(WIIU)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/nintendo/wiiu/latest/";
|
||||
#elif defined(HAVE_LIBNX)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/nintendo/switch/libnx/latest/";
|
||||
#elif defined(__CELLOS_LV2__) && defined(DEX_BUILD)
|
||||
static char buildbot_server_url[] = "http://libretro.xbins.org/libretro/nightly/playstation/ps3/latest/dex-ps3/";
|
||||
#elif defined(__CELLOS_LV2__) && defined(CEX_BUILD)
|
||||
@@ -797,4 +874,6 @@ static char buildbot_server_url[] = "";
|
||||
|
||||
static char buildbot_assets_server_url[] = "http://buildbot.libretro.com/assets/";
|
||||
|
||||
static char default_discord_app_id[] = "475456035851599874";
|
||||
|
||||
#endif
|
||||
@@ -87,6 +87,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ 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_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 },
|
||||
@@ -99,6 +100,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#else
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -163,6 +166,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ 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_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 },
|
||||
@@ -175,6 +179,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_F5, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
+13
-1
@@ -152,6 +152,12 @@ static const bool _coreaudio_supp = true;
|
||||
static const bool _coreaudio_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COREAUDIO3
|
||||
static const bool _coreaudio3_supp = true;
|
||||
#else
|
||||
static const bool _coreaudio3_supp = false;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OSS) || defined(HAVE_OSS_BSD)
|
||||
static const bool _oss_supp = true;
|
||||
#else
|
||||
@@ -290,6 +296,12 @@ static const bool _freetype_supp = true;
|
||||
static const bool _freetype_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STB_FONT
|
||||
static const bool _stbfont_supp = true;
|
||||
#else
|
||||
static const bool _stbfont_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
static const bool _netplay_supp = true;
|
||||
#else
|
||||
@@ -302,7 +314,7 @@ static const bool _python_supp = true;
|
||||
static const bool _python_supp = false;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA_METAL)
|
||||
static const bool _cocoa_supp = true;
|
||||
#else
|
||||
static const bool _cocoa_supp = false;
|
||||
|
||||
+234
-74
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* 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-
|
||||
@@ -50,10 +50,17 @@
|
||||
#include "verbosity.h"
|
||||
#include "lakka.h"
|
||||
|
||||
#include "tasks/task_content.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
|
||||
#include "../list_special.h"
|
||||
|
||||
#include "record/record_driver.h"
|
||||
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#include "uwp/uwp_func.h"
|
||||
#endif
|
||||
|
||||
static const char* invalid_filename_chars[] = {
|
||||
/* https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo */
|
||||
"~", "#", "%", "&", "*", "{", "}", "\\", ":", "[", "]", "?", "/", "|", "\'", "\"",
|
||||
@@ -146,6 +153,7 @@ enum video_driver_enum
|
||||
VIDEO_XENON360,
|
||||
VIDEO_PSP1,
|
||||
VIDEO_VITA2D,
|
||||
VIDEO_PS2,
|
||||
VIDEO_CTR,
|
||||
VIDEO_SWITCH,
|
||||
VIDEO_D3D8,
|
||||
@@ -183,12 +191,14 @@ enum audio_driver_enum
|
||||
AUDIO_DSOUND,
|
||||
AUDIO_WASAPI,
|
||||
AUDIO_COREAUDIO,
|
||||
AUDIO_COREAUDIO3,
|
||||
AUDIO_PS3,
|
||||
AUDIO_XENON360,
|
||||
AUDIO_WII,
|
||||
AUDIO_WIIU,
|
||||
AUDIO_RWEBAUDIO,
|
||||
AUDIO_PSP,
|
||||
AUDIO_PS2,
|
||||
AUDIO_CTR,
|
||||
AUDIO_SWITCH,
|
||||
AUDIO_NULL
|
||||
@@ -210,14 +220,17 @@ enum input_driver_enum
|
||||
INPUT_X,
|
||||
INPUT_WAYLAND,
|
||||
INPUT_DINPUT,
|
||||
INPUT_PS4,
|
||||
INPUT_PS3,
|
||||
INPUT_PSP,
|
||||
INPUT_PS2,
|
||||
INPUT_CTR,
|
||||
INPUT_SWITCH,
|
||||
INPUT_XENON360,
|
||||
INPUT_WII,
|
||||
INPUT_WIIU,
|
||||
INPUT_XINPUT,
|
||||
INPUT_UWP,
|
||||
INPUT_UDEV,
|
||||
INPUT_LINUXRAW,
|
||||
INPUT_COCOA,
|
||||
@@ -234,7 +247,9 @@ enum joypad_driver_enum
|
||||
JOYPAD_GX,
|
||||
JOYPAD_WIIU,
|
||||
JOYPAD_XDK,
|
||||
JOYPAD_PS4,
|
||||
JOYPAD_PSP,
|
||||
JOYPAD_PS2,
|
||||
JOYPAD_CTR,
|
||||
JOYPAD_SWITCH,
|
||||
JOYPAD_DINPUT,
|
||||
@@ -285,7 +300,7 @@ enum menu_driver_enum
|
||||
MENU_MATERIALUI,
|
||||
MENU_XMB,
|
||||
MENU_STRIPES,
|
||||
MENU_NUKLEAR,
|
||||
MENU_OZONE,
|
||||
MENU_NULL
|
||||
};
|
||||
|
||||
@@ -298,6 +313,7 @@ enum record_driver_enum
|
||||
enum midi_driver_enum
|
||||
{
|
||||
MIDI_WINMM = RECORD_NULL + 1,
|
||||
MIDI_ALSA,
|
||||
MIDI_NULL
|
||||
};
|
||||
|
||||
@@ -311,6 +327,13 @@ static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WII;
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WIIU;
|
||||
#elif defined(XENON)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_XENON360;
|
||||
#elif defined(HAVE_D3D12) && false
|
||||
/* FIXME: DX12 performance on Xbox is horrible for some reason, so use d3d11 as default */
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D12;
|
||||
#elif defined(HAVE_D3D11)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D11;
|
||||
#elif defined(HAVE_D3D10)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D10;
|
||||
#elif defined(HAVE_D3D9)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D9;
|
||||
#elif defined(HAVE_D3D8)
|
||||
@@ -321,6 +344,8 @@ static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VG;
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VITA2D;
|
||||
#elif defined(PSP)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_PSP1;
|
||||
#elif defined(PS2)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_PS2;
|
||||
#elif defined(_3DS)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_CTR;
|
||||
#elif defined(SWITCH)
|
||||
@@ -349,8 +374,10 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_XENON360;
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WII;
|
||||
#elif defined(WIIU)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WIIU;
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
#elif defined(PSP) || defined(VITA) || defined(ORBIS)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PSP;
|
||||
#elif defined(PS2)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS2;
|
||||
#elif defined(_3DS)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_CTR;
|
||||
#elif defined(SWITCH)
|
||||
@@ -367,6 +394,8 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_TINYALSA;
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_OSS;
|
||||
#elif defined(HAVE_JACK)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_JACK;
|
||||
#elif defined(HAVE_COREAUDIO3)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_COREAUDIO3;
|
||||
#elif defined(HAVE_COREAUDIO)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_COREAUDIO;
|
||||
#elif defined(HAVE_XAUDIO)
|
||||
@@ -409,11 +438,15 @@ static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL;
|
||||
|
||||
#ifdef HAVE_WINMM
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM;
|
||||
#elif defined HAVE_ALSA
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA;
|
||||
#else
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(XENON)
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_UWP;
|
||||
#elif defined(XENON)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XENON360;
|
||||
#elif defined(_XBOX360) || defined(_XBOX) || defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XINPUT;
|
||||
@@ -425,10 +458,14 @@ static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_SDL2;
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_RWEBINPUT;
|
||||
#elif defined(_WIN32)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_DINPUT;
|
||||
#elif defined(ORBIS)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS4;
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS3;
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PSP;
|
||||
#elif defined(PS2)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS2;
|
||||
#elif defined(_3DS)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_CTR;
|
||||
#elif defined(SWITCH)
|
||||
@@ -445,7 +482,7 @@ static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_UDEV;
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_LINUXRAW;
|
||||
#elif defined(HAVE_WAYLAND)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_WAYLAND;
|
||||
#elif defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
||||
#elif defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA_METAL)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_COCOA;
|
||||
#elif defined(__QNX__)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_QNX;
|
||||
@@ -469,8 +506,12 @@ static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_GX;
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_WIIU;
|
||||
#elif defined(_XBOX)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_XDK;
|
||||
#elif defined(ORBIS)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PS4;
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PSP;
|
||||
#elif defined(PS2)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PS2;
|
||||
#elif defined(_3DS)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_CTR;
|
||||
#elif defined(SWITCH)
|
||||
@@ -487,14 +528,14 @@ static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_ANDROID;
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_SDL;
|
||||
#elif defined(DJGPP)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_DOS;
|
||||
#elif defined(IOS)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_MFI;
|
||||
#elif defined(HAVE_HID)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_HID;
|
||||
#elif defined(__QNX__)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_QNX;
|
||||
#elif defined(EMSCRIPTEN)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_RWEBPAD;
|
||||
#elif defined(IOS)
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_MFI;
|
||||
#else
|
||||
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_NULL;
|
||||
#endif
|
||||
@@ -505,7 +546,7 @@ static enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_V4L2;
|
||||
static enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_RWEBCAM;
|
||||
#elif defined(ANDROID)
|
||||
static enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_ANDROID;
|
||||
#elif defined(HAVE_AVFOUNDATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
|
||||
#elif defined(HAVE_AVFOUNDATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA_METAL))
|
||||
static enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_AVFOUNDATION;
|
||||
#else
|
||||
static enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_NULL;
|
||||
@@ -519,16 +560,21 @@ static enum wifi_driver_enum WIFI_DEFAULT_DRIVER = WIFI_NULL;
|
||||
|
||||
#if defined(ANDROID)
|
||||
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_ANDROID;
|
||||
#elif defined(HAVE_CORELOCATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
|
||||
#elif defined(HAVE_CORELOCATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA_METAL))
|
||||
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_CORELOCATION;
|
||||
#else
|
||||
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(_3DS) && defined(HAVE_RGUI)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||
#else
|
||||
#if defined(HAVE_XUI)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI;
|
||||
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_MATERIALUI;
|
||||
#elif defined(HAVE_OZONE) && (defined(HAVE_LIBNX) || TARGET_OS_TV)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_OZONE;
|
||||
#elif defined(HAVE_XMB) && !defined(_XBOX)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XMB;
|
||||
#elif defined(HAVE_RGUI)
|
||||
@@ -536,7 +582,7 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||
#else
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define GENERAL_SETTING(key, configval, default_enable, default_setting, type, handle_setting) \
|
||||
{ \
|
||||
@@ -623,6 +669,8 @@ const char *config_get_default_audio(void)
|
||||
return "roar";
|
||||
case AUDIO_COREAUDIO:
|
||||
return "coreaudio";
|
||||
case AUDIO_COREAUDIO3:
|
||||
return "coreaudio3";
|
||||
case AUDIO_AL:
|
||||
return "openal";
|
||||
case AUDIO_SL:
|
||||
@@ -650,13 +698,17 @@ const char *config_get_default_audio(void)
|
||||
case AUDIO_WIIU:
|
||||
return "AX";
|
||||
case AUDIO_PSP:
|
||||
#ifdef VITA
|
||||
#if defined(VITA)
|
||||
return "vita";
|
||||
#elif defined(ORBIS)
|
||||
return "orbis";
|
||||
#else
|
||||
return "psp";
|
||||
#endif
|
||||
case AUDIO_PS2:
|
||||
return "ps2";
|
||||
case AUDIO_CTR:
|
||||
return "csnd";
|
||||
return "dsp";
|
||||
case AUDIO_SWITCH:
|
||||
return "switch";
|
||||
case AUDIO_RWEBAUDIO:
|
||||
@@ -750,6 +802,8 @@ const char *config_get_default_video(void)
|
||||
return "d3d12";
|
||||
case VIDEO_PSP1:
|
||||
return "psp1";
|
||||
case VIDEO_PS2:
|
||||
return "ps2";
|
||||
case VIDEO_VITA2D:
|
||||
return "vita2d";
|
||||
case VIDEO_CTR:
|
||||
@@ -802,6 +856,8 @@ const char *config_get_default_input(void)
|
||||
{
|
||||
case INPUT_ANDROID:
|
||||
return "android";
|
||||
case INPUT_PS4:
|
||||
return "ps4";
|
||||
case INPUT_PS3:
|
||||
return "ps3";
|
||||
case INPUT_PSP:
|
||||
@@ -810,6 +866,8 @@ const char *config_get_default_input(void)
|
||||
#else
|
||||
return "psp";
|
||||
#endif
|
||||
case INPUT_PS2:
|
||||
return "ps2";
|
||||
case INPUT_CTR:
|
||||
return "ctr";
|
||||
case INPUT_SWITCH:
|
||||
@@ -828,6 +886,8 @@ const char *config_get_default_input(void)
|
||||
return "xenon360";
|
||||
case INPUT_XINPUT:
|
||||
return "xinput";
|
||||
case INPUT_UWP:
|
||||
return "uwp";
|
||||
case INPUT_WII:
|
||||
return "gx";
|
||||
case INPUT_WIIU:
|
||||
@@ -864,6 +924,8 @@ const char *config_get_default_joypad(void)
|
||||
|
||||
switch (default_driver)
|
||||
{
|
||||
case JOYPAD_PS4:
|
||||
return "ps4";
|
||||
case JOYPAD_PS3:
|
||||
return "ps3";
|
||||
case JOYPAD_XINPUT:
|
||||
@@ -880,6 +942,8 @@ const char *config_get_default_joypad(void)
|
||||
#else
|
||||
return "psp";
|
||||
#endif
|
||||
case JOYPAD_PS2:
|
||||
return "ps2";
|
||||
case JOYPAD_CTR:
|
||||
return "ctr";
|
||||
case JOYPAD_SWITCH:
|
||||
@@ -915,7 +979,6 @@ const char *config_get_default_joypad(void)
|
||||
return "null";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* config_get_default_camera:
|
||||
*
|
||||
@@ -1023,14 +1086,14 @@ const char *config_get_default_menu(void)
|
||||
return "rgui";
|
||||
case MENU_XUI:
|
||||
return "xui";
|
||||
case MENU_OZONE:
|
||||
return "ozone";
|
||||
case MENU_MATERIALUI:
|
||||
return "glui";
|
||||
case MENU_XMB:
|
||||
return "xmb";
|
||||
case MENU_STRIPES:
|
||||
return "stripes";
|
||||
case MENU_NUKLEAR:
|
||||
return "nuklear";
|
||||
case MENU_NULL:
|
||||
break;
|
||||
}
|
||||
@@ -1047,6 +1110,8 @@ const char *config_get_default_midi(void)
|
||||
{
|
||||
case MIDI_WINMM:
|
||||
return "winmm";
|
||||
case MIDI_ALSA:
|
||||
return "alsa";
|
||||
case MIDI_NULL:
|
||||
break;
|
||||
}
|
||||
@@ -1071,6 +1136,9 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
unsigned count = 0;
|
||||
struct config_array_setting *tmp = (struct config_array_setting*)calloc(1, (*size + 1) * sizeof(struct config_array_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
/* Arrays */
|
||||
SETTING_ARRAY("playlist_names", settings->arrays.playlist_names, false, NULL, true);
|
||||
SETTING_ARRAY("playlist_cores", settings->arrays.playlist_cores, false, NULL, true);
|
||||
@@ -1103,6 +1171,8 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
SETTING_ARRAY("midi_driver", settings->arrays.midi_driver, false, NULL, true);
|
||||
SETTING_ARRAY("midi_input", settings->arrays.midi_input, true, midi_input, true);
|
||||
SETTING_ARRAY("midi_output", settings->arrays.midi_output, true, midi_output, true);
|
||||
SETTING_ARRAY("youtube_stream_key", settings->arrays.youtube_stream_key, true, NULL, true);
|
||||
SETTING_ARRAY("discord_app_id", settings->arrays.discord_app_id, true, default_discord_app_id, true);
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1114,6 +1184,9 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
|
||||
global_t *global = global_get_ptr();
|
||||
struct config_path_setting *tmp = (struct config_path_setting*)calloc(1, (*size + 1) * sizeof(struct config_path_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
/* Paths */
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true);
|
||||
@@ -1145,6 +1218,8 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_PATH("menu_wallpaper",
|
||||
settings->paths.path_menu_wallpaper, false, NULL, true);
|
||||
SETTING_PATH("rgui_menu_theme_preset",
|
||||
settings->paths.path_rgui_theme_preset, false, NULL, true);
|
||||
#endif
|
||||
SETTING_PATH("content_history_path",
|
||||
settings->paths.path_content_history, false, NULL, true);
|
||||
@@ -1160,14 +1235,12 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
|
||||
SETTING_PATH("input_overlay",
|
||||
settings->paths.path_overlay, false, NULL, true);
|
||||
#endif
|
||||
#ifdef HAVE_FFMPEG
|
||||
SETTING_PATH("video_record_config",
|
||||
settings->paths.path_record_config, false, NULL, true);
|
||||
SETTING_PATH("video_stream_config",
|
||||
settings->paths.path_stream_config, false, NULL, true);
|
||||
SETTING_PATH("video_stream_url",
|
||||
settings->paths.path_stream_url, false, NULL, true);
|
||||
#endif
|
||||
SETTING_PATH("video_font_path",
|
||||
settings->paths.path_font, false, NULL, true);
|
||||
SETTING_PATH("cursor_directory",
|
||||
@@ -1285,7 +1358,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false);
|
||||
SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, false, false);
|
||||
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, false, false);
|
||||
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, true, false);
|
||||
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, false, false);
|
||||
SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, false, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, rewind_enable, false);
|
||||
@@ -1315,7 +1389,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, fullscreen, false);
|
||||
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, bundle_assets_extract_enable, false);
|
||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, vsync, false);
|
||||
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, false, false);
|
||||
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, adaptive_vsync, false);
|
||||
SETTING_BOOL("video_hard_sync", &settings->bools.video_hard_sync, true, hard_sync, false);
|
||||
SETTING_BOOL("video_black_frame_insertion", &settings->bools.video_black_frame_insertion, true, black_frame_insertion, false);
|
||||
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, disable_composition, false);
|
||||
@@ -1325,7 +1399,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("keyboard_gamepad_enable", &settings->bools.input_keyboard_gamepad_enable, true, true, false);
|
||||
SETTING_BOOL("core_set_supports_no_game_enable", &settings->bools.set_supports_no_game_enable, true, true, false);
|
||||
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, audio_enable, false);
|
||||
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, false, false);
|
||||
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, audio_enable_menu, false);
|
||||
SETTING_BOOL("audio_enable_menu_ok", &settings->bools.audio_enable_menu_ok, true, audio_enable_menu_ok, false);
|
||||
SETTING_BOOL("audio_enable_menu_cancel", &settings->bools.audio_enable_menu_cancel, true, audio_enable_menu_cancel, false);
|
||||
SETTING_BOOL("audio_enable_menu_notice", &settings->bools.audio_enable_menu_notice, true, audio_enable_menu_notice, false);
|
||||
SETTING_BOOL("audio_enable_menu_bgm", &settings->bools.audio_enable_menu_bgm, true, audio_enable_menu_bgm, false);
|
||||
SETTING_BOOL("audio_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE), true, false, false);
|
||||
SETTING_BOOL("audio_mixer_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MIXER_MUTE_ENABLE), true, false, false);
|
||||
SETTING_BOOL("location_allow", &settings->bools.location_allow, true, false, false);
|
||||
@@ -1343,11 +1421,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef GEKKO
|
||||
SETTING_BOOL("video_vfilter", &settings->bools.video_vfilter, true, video_vfilter, false);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
|
||||
#ifdef HAVE_THREADS
|
||||
SETTING_BOOL("threaded_data_runloop_enable", &settings->bools.threaded_data_runloop_enable, true, threaded_data_runloop_enable, false);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
|
||||
SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false);
|
||||
SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, true, false);
|
||||
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false);
|
||||
@@ -1366,6 +1444,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false);
|
||||
SETTING_BOOL("quick_menu_show_start_recording", &settings->bools.quick_menu_show_start_recording, true, quick_menu_show_start_recording, false);
|
||||
SETTING_BOOL("quick_menu_show_start_streaming", &settings->bools.quick_menu_show_start_streaming, true, quick_menu_show_start_streaming, false);
|
||||
SETTING_BOOL("quick_menu_show_reset_core_association", &settings->bools.quick_menu_show_reset_core_association, true, quick_menu_show_reset_core_association, false);
|
||||
SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false);
|
||||
SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false);
|
||||
SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false);
|
||||
@@ -1375,6 +1456,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("quick_menu_show_save_content_dir_overrides", &settings->bools.quick_menu_show_save_content_dir_overrides, true, quick_menu_show_save_content_dir_overrides, false);
|
||||
SETTING_BOOL("quick_menu_show_information", &settings->bools.quick_menu_show_information, true, quick_menu_show_information, false);
|
||||
SETTING_BOOL("kiosk_mode_enable", &settings->bools.kiosk_mode_enable, true, kiosk_mode_enable, false);
|
||||
SETTING_BOOL("menu_use_preferred_system_color_theme", &settings->bools.menu_use_preferred_system_color_theme, true, menu_use_preferred_system_color_theme, false);
|
||||
SETTING_BOOL("content_show_settings", &settings->bools.menu_content_show_settings, true, content_show_settings, false);
|
||||
SETTING_BOOL("content_show_favorites", &settings->bools.menu_content_show_favorites, true, content_show_favorites, false);
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
@@ -1481,9 +1563,16 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
|
||||
SETTING_BOOL("video_msg_bgcolor_enable", &settings->bools.video_msg_bgcolor_enable, true, message_bgcolor_enable, false);
|
||||
SETTING_BOOL("video_window_show_decorations", &settings->bools.video_window_show_decorations, true, window_decorations, false);
|
||||
SETTING_BOOL("video_window_save_positions", &settings->bools.video_window_save_positions, true, false, false);
|
||||
|
||||
SETTING_BOOL("sustained_performance_mode", &settings->bools.sustained_performance_mode, true, sustained_performance_mode, false);
|
||||
|
||||
#ifdef _3DS
|
||||
SETTING_BOOL("video_3ds_lcd_bottom", &settings->bools.video_3ds_lcd_bottom, true, video_3ds_lcd_bottom, false);
|
||||
#endif
|
||||
|
||||
SETTING_BOOL("playlist_use_old_format", &settings->bools.playlist_use_old_format, true, playlist_use_old_format, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1494,6 +1583,9 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
|
||||
unsigned count = 0;
|
||||
struct config_float_setting *tmp = (struct config_float_setting*)calloc(1, (*size + 1) * sizeof(struct config_float_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false);
|
||||
SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false);
|
||||
SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false);
|
||||
@@ -1530,6 +1622,12 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
unsigned count = 0;
|
||||
struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_UINT("streaming_mode", &settings->uints.streaming_mode, true, STREAMING_MODE_TWITCH, false);
|
||||
#endif
|
||||
SETTING_UINT("crt_switch_resolution", &settings->uints.crt_switch_resolution, true, crt_switch_resolution, false);
|
||||
SETTING_UINT("input_bind_timeout", &settings->uints.input_bind_timeout, true, input_bind_timeout, false);
|
||||
SETTING_UINT("input_bind_hold", &settings->uints.input_bind_hold, true, input_bind_hold, false);
|
||||
@@ -1549,8 +1647,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, monitor_index, false);
|
||||
SETTING_UINT("video_fullscreen_x", &settings->uints.video_fullscreen_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_fullscreen_y", &settings->uints.video_fullscreen_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_x", &settings->uints.video_window_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_window_y", &settings->uints.video_window_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_opacity", &settings->uints.video_window_opacity, true, window_opacity, false);
|
||||
#ifdef HAVE_COMMAND
|
||||
SETTING_UINT("network_cmd_port", &settings->uints.network_cmd_port, true, network_cmd_port, false);
|
||||
@@ -1564,6 +1660,19 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
|
||||
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
|
||||
SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false);
|
||||
SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, rgui_color_theme, false);
|
||||
SETTING_UINT("rgui_thumbnail_downscaler", &settings->uints.menu_rgui_thumbnail_downscaler, true, rgui_thumbnail_downscaler, false);
|
||||
#ifdef HAVE_LIBNX
|
||||
SETTING_UINT("split_joycon_p1", &settings->uints.input_split_joycon[0], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p2", &settings->uints.input_split_joycon[1], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p3", &settings->uints.input_split_joycon[2], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p4", &settings->uints.input_split_joycon[3], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p5", &settings->uints.input_split_joycon[4], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p6", &settings->uints.input_split_joycon[5], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p7", &settings->uints.input_split_joycon[6], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p8", &settings->uints.input_split_joycon[7], true, 0, false);
|
||||
#endif
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_UINT("menu_left_thumbnails", &settings->uints.menu_left_thumbnails, true, menu_left_thumbnails_default, false);
|
||||
SETTING_UINT("xmb_alpha_factor", &settings->uints.menu_xmb_alpha_factor, true, xmb_alpha_factor, false);
|
||||
@@ -1577,6 +1686,9 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#endif
|
||||
SETTING_UINT("materialui_menu_color_theme", &settings->uints.menu_materialui_color_theme, true, MATERIALUI_THEME_BLUE, false);
|
||||
SETTING_UINT("menu_shader_pipeline", &settings->uints.menu_xmb_shader_pipeline, true, menu_shader_pipeline, false);
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, 1, false);
|
||||
#endif
|
||||
#endif
|
||||
SETTING_UINT("audio_out_rate", &settings->uints.audio_out_rate, true, out_rate, false);
|
||||
SETTING_UINT("custom_viewport_width", &settings->video_viewport_custom.width, false, 0 /* TODO */, false);
|
||||
@@ -1593,7 +1705,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("aspect_ratio_index", &settings->uints.video_aspect_ratio_idx, true, aspect_ratio_idx, false);
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_UINT("netplay_ip_port", &settings->uints.netplay_port, true, RARCH_DEFAULT_PORT, false);
|
||||
SETTING_UINT("video_stream_port", &settings->uints.video_stream_port, true, RARCH_STREAM_DEFAULT_PORT, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT);
|
||||
SETTING_UINT("netplay_input_latency_frames_min",&settings->uints.netplay_input_latency_frames_min, true, 0, false);
|
||||
SETTING_UINT("netplay_input_latency_frames_range",&settings->uints.netplay_input_latency_frames_range, true, 0, false);
|
||||
@@ -1614,6 +1725,22 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
|
||||
SETTING_UINT("midi_volume", &settings->uints.midi_volume, true, midi_volume, false);
|
||||
|
||||
SETTING_UINT("video_stream_port", &settings->uints.video_stream_port, true, RARCH_STREAM_DEFAULT_PORT, false);
|
||||
SETTING_UINT("video_record_quality", &settings->uints.video_record_quality, true, RECORD_CONFIG_TYPE_RECORDING_LOSSLESS_QUALITY, false);
|
||||
SETTING_UINT("video_stream_quality", &settings->uints.video_stream_quality, true, RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY, false);
|
||||
SETTING_UINT("video_record_scale_factor", &settings->uints.video_record_scale_factor, true, 1, false);
|
||||
SETTING_UINT("video_stream_scale_factor", &settings->uints.video_stream_scale_factor, true, 1, false);
|
||||
SETTING_UINT("video_windowed_position_x", &settings->uints.window_position_x, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_y", &settings->uints.window_position_y, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
|
||||
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
|
||||
|
||||
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, video_record_threads, false);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
SETTING_UINT("libnx_overclock", &settings->uints.libnx_overclock, true, SWITCH_DEFAULT_CPU_PROFILE, false);
|
||||
#endif
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1624,6 +1751,9 @@ static struct config_size_setting *populate_settings_size(settings_t *settings,
|
||||
unsigned count = 0;
|
||||
struct config_size_setting *tmp = (struct config_size_setting*)calloc((*size + 1), sizeof(struct config_size_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, rewind_buffer_size, false);
|
||||
|
||||
*size = count;
|
||||
@@ -1636,6 +1766,9 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
|
||||
unsigned count = 0;
|
||||
struct config_int_setting *tmp = (struct config_int_setting*)calloc((*size + 1), sizeof(struct config_int_setting));
|
||||
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
|
||||
SETTING_INT("state_slot", &settings->ints.state_slot, false, 0 /* TODO */, false);
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_INT("netplay_check_frames", &settings->ints.netplay_check_frames, true, netplay_check_frames, false);
|
||||
@@ -1656,7 +1789,7 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
|
||||
*
|
||||
* Set 'default' configuration values.
|
||||
**/
|
||||
static void config_set_defaults(void)
|
||||
void config_set_defaults(void)
|
||||
{
|
||||
unsigned i, j;
|
||||
#ifdef HAVE_MENU
|
||||
@@ -1788,6 +1921,9 @@ static void config_set_defaults(void)
|
||||
*settings->paths.path_menu_xmb_font = '\0';
|
||||
#endif
|
||||
|
||||
strlcpy(settings->arrays.discord_app_id,
|
||||
default_discord_app_id, sizeof(settings->arrays.discord_app_id));
|
||||
|
||||
#ifdef HAVE_MATERIALUI
|
||||
if (g_defaults.menu.materialui.menu_color_theme_enable)
|
||||
settings->uints.menu_materialui_color_theme = g_defaults.menu.materialui.menu_color_theme;
|
||||
@@ -1833,9 +1969,6 @@ static void config_set_defaults(void)
|
||||
#ifdef HAVE_MENU
|
||||
if (first_initialized)
|
||||
settings->bools.menu_show_start_screen = default_menu_show_start_screen;
|
||||
settings->uints.menu_entry_normal_color = menu_entry_normal_color;
|
||||
settings->uints.menu_entry_hover_color = menu_entry_hover_color;
|
||||
settings->uints.menu_title_color = menu_title_color;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
@@ -1869,7 +2002,11 @@ static void config_set_defaults(void)
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
settings->uints.input_joypad_map[i] = i;
|
||||
#ifdef SWITCH /* Switch prefered default dpad mode */
|
||||
settings->uints.input_analog_dpad_mode[i] = ANALOG_DPAD_LSTICK;
|
||||
#else
|
||||
settings->uints.input_analog_dpad_mode[i] = ANALOG_DPAD_NONE;
|
||||
#endif
|
||||
input_config_set_device(i, RETRO_DEVICE_JOYPAD);
|
||||
settings->uints.input_mouse_index[i] = 0;
|
||||
}
|
||||
@@ -1934,6 +2071,7 @@ static void config_set_defaults(void)
|
||||
#endif
|
||||
*settings->paths.path_cheat_database = '\0';
|
||||
*settings->paths.path_menu_wallpaper = '\0';
|
||||
*settings->paths.path_rgui_theme_preset = '\0';
|
||||
*settings->paths.path_content_database = '\0';
|
||||
*settings->paths.path_overlay = '\0';
|
||||
*settings->paths.path_record_config = '\0';
|
||||
@@ -2135,8 +2273,13 @@ static config_file_t *open_default_config_file(void)
|
||||
|
||||
(void)path_size;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
fill_pathname_application_path(app_path, path_size);
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
/* On UWP, the app install directory is not writable so use the writable LocalState dir instead */
|
||||
fill_pathname_home_dir(app_path, path_size);
|
||||
#else
|
||||
fill_pathname_application_dir(app_path, path_size);
|
||||
#endif
|
||||
fill_pathname_resolve_relative(conf_path, app_path,
|
||||
file_path_str(FILE_PATH_MAIN_CONFIG), path_size);
|
||||
|
||||
@@ -2160,7 +2303,6 @@ static config_file_t *open_default_config_file(void)
|
||||
/* Try to create a new config file. */
|
||||
conf = config_file_new(NULL);
|
||||
|
||||
|
||||
if (conf)
|
||||
{
|
||||
/* Since this is a clean config file, we can
|
||||
@@ -2168,7 +2310,7 @@ static config_file_t *open_default_config_file(void)
|
||||
fill_pathname_resolve_relative(conf_path, app_path,
|
||||
file_path_str(FILE_PATH_MAIN_CONFIG), path_size);
|
||||
config_set_bool(conf, "config_save_on_exit", true);
|
||||
saved = config_file_write(conf, conf_path);
|
||||
saved = config_file_write(conf, conf_path, true);
|
||||
}
|
||||
|
||||
if (!saved)
|
||||
@@ -2204,7 +2346,7 @@ static config_file_t *open_default_config_file(void)
|
||||
if (conf)
|
||||
{
|
||||
config_set_bool(conf, "config_save_on_exit", true);
|
||||
saved = config_file_write(conf, conf_path);
|
||||
saved = config_file_write(conf, conf_path, true);
|
||||
}
|
||||
|
||||
if (!saved)
|
||||
@@ -2279,7 +2421,7 @@ static config_file_t *open_default_config_file(void)
|
||||
{
|
||||
/* Since this is a clean config file, we can safely use config_save_on_exit. */
|
||||
config_set_bool(conf, "config_save_on_exit", true);
|
||||
saved = config_file_write(conf, conf_path);
|
||||
saved = config_file_write(conf, conf_path, true);
|
||||
}
|
||||
|
||||
if (!saved)
|
||||
@@ -2321,6 +2463,36 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
static bool check_menu_driver_compatibility(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *video_driver = settings->arrays.video_driver;
|
||||
char *menu_driver = settings->arrays.menu_driver;
|
||||
|
||||
if (string_is_equal (menu_driver, "rgui") ||
|
||||
string_is_equal(menu_driver, "null") ||
|
||||
string_is_equal(video_driver, "null"))
|
||||
return true;
|
||||
|
||||
/* TODO/FIXME - maintenance hazard */
|
||||
if (string_is_equal(video_driver, "d3d9") ||
|
||||
string_is_equal(video_driver, "d3d10") ||
|
||||
string_is_equal(video_driver, "d3d11") ||
|
||||
string_is_equal(video_driver, "d3d12") ||
|
||||
string_is_equal(video_driver, "gdi") ||
|
||||
string_is_equal(video_driver, "gl") ||
|
||||
string_is_equal(video_driver, "gx2") ||
|
||||
string_is_equal(video_driver, "vulkan") ||
|
||||
string_is_equal(video_driver, "metal") ||
|
||||
string_is_equal(video_driver, "ctr") ||
|
||||
string_is_equal(video_driver, "vita2d"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void read_keybinds_keyboard(config_file_t *conf, unsigned user,
|
||||
unsigned idx, struct retro_keybind *bind)
|
||||
{
|
||||
@@ -2484,6 +2656,8 @@ static void config_file_dump_all(config_file_t *conf)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is no longer used, so comment out to silence warnings...
|
||||
#ifdef HAVE_MENU
|
||||
static void config_get_hex_base(config_file_t *conf,
|
||||
const char *key, unsigned *base)
|
||||
@@ -2495,7 +2669,7 @@ static void config_get_hex_base(config_file_t *conf,
|
||||
*base = tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* config_load:
|
||||
@@ -2571,11 +2745,11 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
|
||||
while (extra_path)
|
||||
{
|
||||
bool ret = config_append_file(conf, extra_path);
|
||||
bool result = config_append_file(conf, extra_path);
|
||||
|
||||
RARCH_LOG("Config: appending config \"%s\"\n", extra_path);
|
||||
|
||||
if (!ret)
|
||||
if (!result)
|
||||
RARCH_ERR("Config: failed to append config \"%s\"\n", extra_path);
|
||||
extra_path = strtok_r(NULL, "|", &save);
|
||||
}
|
||||
@@ -2703,7 +2877,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.led_map[i], buf);
|
||||
}
|
||||
|
||||
|
||||
/* Hexadecimal settings */
|
||||
|
||||
if (config_get_hex(conf, "video_message_color", &msg_color))
|
||||
@@ -2712,14 +2885,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
settings->floats.video_msg_color_g = ((msg_color >> 8) & 0xff) / 255.0f;
|
||||
settings->floats.video_msg_color_b = ((msg_color >> 0) & 0xff) / 255.0f;
|
||||
}
|
||||
#ifdef HAVE_MENU
|
||||
config_get_hex_base(conf, "menu_entry_normal_color",
|
||||
&settings->uints.menu_entry_normal_color);
|
||||
config_get_hex_base(conf, "menu_entry_hover_color",
|
||||
&settings->uints.menu_entry_hover_color);
|
||||
config_get_hex_base(conf, "menu_title_color",
|
||||
&settings->uints.menu_title_color);
|
||||
#endif
|
||||
|
||||
/* Float settings */
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
@@ -2879,7 +3044,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!string_is_empty(settings->paths.directory_screenshot))
|
||||
{
|
||||
if (string_is_equal(settings->paths.directory_screenshot, "default"))
|
||||
@@ -2909,6 +3073,8 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
|
||||
if (string_is_equal(settings->paths.path_menu_wallpaper, "default"))
|
||||
*settings->paths.path_menu_wallpaper = '\0';
|
||||
if (string_is_equal(settings->paths.path_rgui_theme_preset, "default"))
|
||||
*settings->paths.path_rgui_theme_preset = '\0';
|
||||
if (string_is_equal(settings->paths.directory_video_shader, "default"))
|
||||
*settings->paths.directory_video_shader = '\0';
|
||||
if (string_is_equal(settings->paths.directory_video_filter, "default"))
|
||||
@@ -2946,7 +3112,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
if (settings->floats.fastforward_ratio < 0.0f)
|
||||
configuration_set_float(settings, settings->floats.fastforward_ratio, 0.0f);
|
||||
|
||||
|
||||
#ifdef HAVE_LAKKA
|
||||
settings->bools.ssh_enable = filestream_exists(LAKKA_SSH_PATH);
|
||||
settings->bools.samba_enable = filestream_exists(LAKKA_SAMBA_PATH);
|
||||
@@ -3026,11 +3191,22 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
if (!check_menu_driver_compatibility())
|
||||
strlcpy(settings->arrays.menu_driver, "rgui", sizeof(settings->arrays.menu_driver));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
// Apply initial clocks
|
||||
extern void libnx_apply_overclock();
|
||||
libnx_apply_overclock();
|
||||
#endif
|
||||
|
||||
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
|
||||
recording_driver_update_streaming_url();
|
||||
|
||||
ret = true;
|
||||
|
||||
|
||||
end:
|
||||
if (conf)
|
||||
config_file_free(conf);
|
||||
@@ -3341,7 +3517,6 @@ bool config_load_remap(void)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
remap_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
|
||||
|
||||
strlcpy(remap_directory,
|
||||
settings->paths.directory_input_remapping,
|
||||
path_size);
|
||||
@@ -3408,7 +3583,6 @@ bool config_load_remap(void)
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
|
||||
/* Create a new config file from core_path */
|
||||
new_conf = config_file_new(core_path);
|
||||
|
||||
@@ -3634,8 +3808,6 @@ static void parse_config_file(void)
|
||||
path_get(RARCH_PATH_CONFIG));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void save_keybind_key(config_file_t *conf, const char *prefix,
|
||||
const char *base, const struct retro_keybind *bind)
|
||||
{
|
||||
@@ -3889,13 +4061,12 @@ static bool config_save_keybinds_file(const char *path)
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
save_keybinds_user(conf, i);
|
||||
|
||||
ret = config_file_write(conf, path);
|
||||
ret = config_file_write(conf, path, true);
|
||||
config_file_free(conf);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* config_save_autoconf_profile:
|
||||
* @path : Path that shall be written to.
|
||||
@@ -3998,7 +4169,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
&input_config_binds[user][i], false, false);
|
||||
}
|
||||
|
||||
ret = config_file_write(conf, autoconf_file);
|
||||
ret = config_file_write(conf, autoconf_file, false);
|
||||
|
||||
config_file_free(conf);
|
||||
free(buf);
|
||||
@@ -4013,7 +4184,6 @@ error:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* config_save_file:
|
||||
* @path : Path that shall be written to.
|
||||
@@ -4204,15 +4374,6 @@ bool config_save_file(const char *path)
|
||||
|
||||
/* Hexadecimal settings */
|
||||
config_set_hex(conf, "video_message_color", msg_color);
|
||||
#ifdef HAVE_MENU
|
||||
config_set_hex(conf, "menu_entry_normal_color",
|
||||
settings->uints.menu_entry_normal_color);
|
||||
config_set_hex(conf, "menu_entry_hover_color",
|
||||
settings->uints.menu_entry_hover_color);
|
||||
config_set_hex(conf, "menu_title_color",
|
||||
settings->uints.menu_title_color);
|
||||
#endif
|
||||
|
||||
|
||||
video_driver_save_settings(conf);
|
||||
|
||||
@@ -4240,7 +4401,7 @@ bool config_save_file(const char *path)
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
save_keybinds_user(conf, i);
|
||||
|
||||
ret = config_file_write(conf, path);
|
||||
ret = config_file_write(conf, path, true);
|
||||
config_file_free(conf);
|
||||
|
||||
return ret;
|
||||
@@ -4486,7 +4647,6 @@ bool config_save_overrides(int override_type)
|
||||
config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]);
|
||||
}
|
||||
|
||||
|
||||
/* blacklist these since they are handled by remaps */
|
||||
/* to-do: add setting to control blacklisting
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
@@ -4512,17 +4672,17 @@ bool config_save_overrides(int override_type)
|
||||
case OVERRIDE_CORE:
|
||||
/* Create a new config file from core_path */
|
||||
RARCH_LOG ("[overrides] path %s\n", core_path);
|
||||
ret = config_file_write(conf, core_path);
|
||||
ret = config_file_write(conf, core_path, true);
|
||||
break;
|
||||
case OVERRIDE_GAME:
|
||||
/* Create a new config file from core_path */
|
||||
RARCH_LOG ("[overrides] path %s\n", game_path);
|
||||
ret = config_file_write(conf, game_path);
|
||||
ret = config_file_write(conf, game_path, true);
|
||||
break;
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
/* Create a new config file from content_path */
|
||||
RARCH_LOG ("[overrides] path %s\n", content_path);
|
||||
ret = config_file_write(conf, content_path);
|
||||
ret = config_file_write(conf, content_path, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -4571,7 +4731,7 @@ bool config_save_overrides(int override_type)
|
||||
/* Replaces currently loaded configuration file with
|
||||
* another one. Will load a dummy core to flush state
|
||||
* properly. */
|
||||
bool config_replace(bool config_save_on_exit, char *path)
|
||||
bool config_replace(bool config_replace_save_on_exit, char *path)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
|
||||
@@ -4583,7 +4743,7 @@ bool config_replace(bool config_save_on_exit, char *path)
|
||||
if (string_is_equal(path, path_get(RARCH_PATH_CONFIG)))
|
||||
return false;
|
||||
|
||||
if (config_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG))
|
||||
if (config_replace_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG))
|
||||
config_save_file(path_get(RARCH_PATH_CONFIG));
|
||||
|
||||
path_set(RARCH_PATH_CONFIG, path);
|
||||
|
||||
+44
-8
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2016 - Jean-André Santoni
|
||||
* 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-
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "gfx/video_driver.h"
|
||||
#include "gfx/video_defines.h"
|
||||
#include "input/input_defines.h"
|
||||
#include "led/led_defines.h"
|
||||
|
||||
@@ -103,11 +103,17 @@ typedef struct settings
|
||||
bool video_fps_show;
|
||||
bool video_statistics_show;
|
||||
bool video_framecount_show;
|
||||
bool video_memory_show;
|
||||
bool video_msg_bgcolor_enable;
|
||||
bool video_3ds_lcd_bottom;
|
||||
|
||||
/* Audio */
|
||||
bool audio_enable;
|
||||
bool audio_enable_menu;
|
||||
bool audio_enable_menu_ok;
|
||||
bool audio_enable_menu_cancel;
|
||||
bool audio_enable_menu_notice;
|
||||
bool audio_enable_menu_bgm;
|
||||
bool audio_sync;
|
||||
bool audio_rate_control;
|
||||
bool audio_wasapi_exclusive_mode;
|
||||
@@ -175,11 +181,16 @@ typedef struct settings
|
||||
bool menu_content_show_history;
|
||||
bool menu_content_show_add;
|
||||
bool menu_content_show_playlists;
|
||||
bool menu_use_preferred_system_color_theme;
|
||||
bool menu_preferred_system_color_theme_set;
|
||||
bool menu_unified_controls;
|
||||
bool quick_menu_show_take_screenshot;
|
||||
bool quick_menu_show_save_load_state;
|
||||
bool quick_menu_show_undo_save_load_state;
|
||||
bool quick_menu_show_add_to_favorites;
|
||||
bool quick_menu_show_start_recording;
|
||||
bool quick_menu_show_start_streaming;
|
||||
bool quick_menu_show_reset_core_association;
|
||||
bool quick_menu_show_options;
|
||||
bool quick_menu_show_controls;
|
||||
bool quick_menu_show_cheats;
|
||||
@@ -290,8 +301,10 @@ typedef struct settings
|
||||
|
||||
bool automatically_add_content_to_playlist;
|
||||
bool video_window_show_decorations;
|
||||
bool video_window_save_positions;
|
||||
|
||||
bool sustained_performance_mode;
|
||||
bool playlist_use_old_format;
|
||||
} bools;
|
||||
|
||||
struct
|
||||
@@ -369,8 +382,6 @@ typedef struct settings
|
||||
unsigned network_cmd_port;
|
||||
unsigned network_remote_base_port;
|
||||
unsigned keymapper_port;
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_window_opacity;
|
||||
unsigned crt_switch_resolution;
|
||||
unsigned crt_switch_resolution_super;
|
||||
@@ -388,13 +399,17 @@ typedef struct settings
|
||||
unsigned video_msg_bgcolor_green;
|
||||
unsigned video_msg_bgcolor_blue;
|
||||
unsigned video_stream_port;
|
||||
unsigned video_record_quality;
|
||||
unsigned video_stream_quality;
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
|
||||
unsigned menu_timedate_style;
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
unsigned menu_rgui_thumbnail_downscaler;
|
||||
unsigned menu_dpi_override_value;
|
||||
unsigned menu_entry_normal_color;
|
||||
unsigned menu_entry_hover_color;
|
||||
unsigned menu_title_color;
|
||||
unsigned menu_rgui_color_theme;
|
||||
unsigned menu_xmb_layout;
|
||||
unsigned menu_xmb_shader_pipeline;
|
||||
unsigned menu_xmb_scale_factor;
|
||||
@@ -402,6 +417,7 @@ typedef struct settings
|
||||
unsigned menu_xmb_theme;
|
||||
unsigned menu_xmb_color_theme;
|
||||
unsigned menu_materialui_color_theme;
|
||||
unsigned menu_ozone_color_theme;
|
||||
unsigned menu_font_color_red;
|
||||
unsigned menu_font_color_green;
|
||||
unsigned menu_font_color_blue;
|
||||
@@ -411,6 +427,7 @@ typedef struct settings
|
||||
|
||||
unsigned input_overlay_show_physical_inputs_port;
|
||||
|
||||
unsigned input_split_joycon[MAX_USERS];
|
||||
unsigned input_joypad_map[MAX_USERS];
|
||||
unsigned input_device[MAX_USERS];
|
||||
unsigned input_mouse_index[MAX_USERS];
|
||||
@@ -428,6 +445,16 @@ typedef struct settings
|
||||
unsigned run_ahead_frames;
|
||||
|
||||
unsigned midi_volume;
|
||||
unsigned streaming_mode;
|
||||
|
||||
unsigned window_position_x;
|
||||
unsigned window_position_y;
|
||||
unsigned window_position_width;
|
||||
unsigned window_position_height;
|
||||
|
||||
unsigned video_record_threads;
|
||||
|
||||
unsigned libnx_overclock;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
@@ -472,6 +499,11 @@ typedef struct settings
|
||||
|
||||
char midi_input[32];
|
||||
char midi_output[32];
|
||||
|
||||
char youtube_stream_key[PATH_MAX_LENGTH];
|
||||
char twitch_stream_key[PATH_MAX_LENGTH];
|
||||
|
||||
char discord_app_id[PATH_MAX_LENGTH];
|
||||
} arrays;
|
||||
|
||||
struct
|
||||
@@ -494,7 +526,7 @@ typedef struct settings
|
||||
char path_overlay[PATH_MAX_LENGTH];
|
||||
char path_record_config[PATH_MAX_LENGTH];
|
||||
char path_stream_config[PATH_MAX_LENGTH];
|
||||
char path_stream_url[PATH_MAX_LENGTH];
|
||||
char path_stream_url[8192];
|
||||
char path_menu_wallpaper[PATH_MAX_LENGTH];
|
||||
char path_audio_dsp_plugin[PATH_MAX_LENGTH];
|
||||
char path_softfilter_plugin[PATH_MAX_LENGTH];
|
||||
@@ -508,6 +540,7 @@ typedef struct settings
|
||||
char path_cheat_settings[PATH_MAX_LENGTH];
|
||||
char path_shader[PATH_MAX_LENGTH];
|
||||
char path_font[PATH_MAX_LENGTH];
|
||||
char path_rgui_theme_preset[PATH_MAX_LENGTH];
|
||||
|
||||
char directory_audio_filter[PATH_MAX_LENGTH];
|
||||
char directory_autoconfig[PATH_MAX_LENGTH];
|
||||
@@ -530,6 +563,7 @@ typedef struct settings
|
||||
char directory_thumbnails[PATH_MAX_LENGTH];
|
||||
char directory_menu_config[PATH_MAX_LENGTH];
|
||||
char directory_menu_content[PATH_MAX_LENGTH];
|
||||
char streaming_title[PATH_MAX_LENGTH];
|
||||
} paths;
|
||||
|
||||
bool modified;
|
||||
@@ -711,6 +745,8 @@ bool config_init(void);
|
||||
|
||||
bool config_overlay_enable_default(void);
|
||||
|
||||
void config_set_defaults(void);
|
||||
|
||||
void config_free(void);
|
||||
|
||||
settings_t *config_get_ptr(void);
|
||||
|
||||
@@ -4,6 +4,8 @@ PACKAGE_NAME=retroarch
|
||||
|
||||
cat /dev/null > config.log
|
||||
|
||||
. qb/qb.init.sh
|
||||
|
||||
. qb/qb.system.sh
|
||||
|
||||
. qb/qb.params.sh
|
||||
@@ -11,3 +13,7 @@ cat /dev/null > config.log
|
||||
. qb/qb.comp.sh
|
||||
|
||||
. qb/qb.libs.sh
|
||||
|
||||
. qb/qb.moc.sh
|
||||
|
||||
. qb/qb.make.sh
|
||||
@@ -82,10 +82,13 @@ bool content_reset_savestate_backups(void);
|
||||
bool content_undo_load_buf_is_empty(void);
|
||||
bool content_undo_save_buf_is_empty(void);
|
||||
|
||||
/* Clears the pending subsystem rom buffer*/
|
||||
/* Checks if launched from the commandline */
|
||||
bool content_launched_from_cli(void);
|
||||
|
||||
/* Clears the pending subsystem rom buffer */
|
||||
bool content_is_subsystem_pending_load(void);
|
||||
|
||||
/* Clears the pending subsystem rom buffer*/
|
||||
/* Clears the pending subsystem rom buffer */
|
||||
void content_clear_subsystem(void);
|
||||
|
||||
/* Set the current subsystem*/
|
||||
@@ -103,6 +106,12 @@ unsigned content_get_subsystem_rom_id(void);
|
||||
/* Set environment variables before a subsystem load */
|
||||
void content_set_subsystem_info(void);
|
||||
|
||||
/* Get the path to the last selected subsystem rom */
|
||||
char* content_get_subsystem_rom(unsigned index);
|
||||
|
||||
/* Sets the subsystem by name */
|
||||
bool content_set_subsystem_by_name(const char* subsystem_name);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -65,6 +65,8 @@ typedef struct rarch_system_info
|
||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||
char valid_extensions[255];
|
||||
|
||||
bool supports_vfs;
|
||||
|
||||
struct retro_disk_control_callback disk_control_cb;
|
||||
struct retro_location_callback location_cb;
|
||||
|
||||
|
||||
+8
-6
@@ -134,7 +134,6 @@ bool core_set_default_callbacks(struct retro_callbacks *cbs)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool core_deinit(void *data)
|
||||
{
|
||||
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
|
||||
@@ -396,20 +395,23 @@ bool core_unload(void)
|
||||
{
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_deinit();
|
||||
if (current_core.inited)
|
||||
current_core.retro_deinit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool core_unload_game(void)
|
||||
{
|
||||
video_driver_free_hw_context();
|
||||
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_unload_game();
|
||||
|
||||
current_core.game_loaded = false;
|
||||
if (current_core.game_loaded)
|
||||
{
|
||||
current_core.retro_unload_game();
|
||||
current_core.game_loaded = false;
|
||||
}
|
||||
|
||||
audio_driver_stop();
|
||||
|
||||
|
||||
+41
-15
@@ -32,6 +32,10 @@
|
||||
#include "core_info.h"
|
||||
#include "file_path_special.h"
|
||||
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#include "uwp/uwp_func.h"
|
||||
#endif
|
||||
|
||||
static const char *core_info_tmp_path = NULL;
|
||||
static const struct string_list *core_info_tmp_list = NULL;
|
||||
static core_info_t *core_info_current = NULL;
|
||||
@@ -197,7 +201,7 @@ static bool core_info_list_iterate(
|
||||
if (!current_path)
|
||||
return false;
|
||||
|
||||
info_path_base = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
info_path_base = (char*)malloc(info_path_base_size);
|
||||
|
||||
info_path_base[0] = '\0';
|
||||
|
||||
@@ -205,7 +209,7 @@ static bool core_info_list_iterate(
|
||||
current_path,
|
||||
info_path_base_size);
|
||||
|
||||
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP) && !defined(_3DS) && !defined(VITA) && !defined(HW_WUP))
|
||||
#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';
|
||||
@@ -226,17 +230,35 @@ static bool core_info_list_iterate(
|
||||
static core_info_list_t *core_info_list_new(const char *path,
|
||||
const char *libretro_info_dir,
|
||||
const char *exts,
|
||||
bool show_hidden_files)
|
||||
bool dir_show_hidden_files)
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
const char *path_basedir = libretro_info_dir;
|
||||
struct string_list *contents = dir_list_new(
|
||||
path, exts,
|
||||
false,
|
||||
show_hidden_files,
|
||||
false, false);
|
||||
struct string_list *contents = string_list_new();
|
||||
bool ok = dir_list_append(contents, path, exts,
|
||||
false, dir_show_hidden_files, false, false);
|
||||
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
/* UWP: browse the optional packages for additional cores */
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
||||
@@ -430,12 +452,12 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
core_info_list_resolve_all_firmware(core_info_list);
|
||||
}
|
||||
|
||||
dir_list_free(contents);
|
||||
string_list_free(contents);
|
||||
return core_info_list;
|
||||
|
||||
error:
|
||||
if (contents)
|
||||
dir_list_free(contents);
|
||||
string_list_free(contents);
|
||||
core_info_list_free(core_info_list);
|
||||
return NULL;
|
||||
}
|
||||
@@ -550,7 +572,11 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
if (!info)
|
||||
return false;
|
||||
|
||||
path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
path = (char*)malloc(path_size);
|
||||
|
||||
if (!path)
|
||||
return false;
|
||||
|
||||
path[0] = '\0';
|
||||
|
||||
for (i = 0; i < info->firmware_count; i++)
|
||||
@@ -652,12 +678,12 @@ void core_info_deinit_list(void)
|
||||
}
|
||||
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files)
|
||||
const char *exts, bool dir_show_hidden_files)
|
||||
{
|
||||
if (!(core_info_curr_list = core_info_list_new(dir_cores,
|
||||
!string_is_empty(path_info) ? path_info : dir_cores,
|
||||
exts,
|
||||
show_hidden_files)))
|
||||
dir_show_hidden_files)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -773,13 +799,13 @@ 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 show_hidden_files)
|
||||
const char *exts, bool dir_show_hidden_files)
|
||||
{
|
||||
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, show_hidden_files, false, false);
|
||||
dir_cores, exts, false, dir_show_hidden_files, false, false);
|
||||
if (!contents)
|
||||
return;
|
||||
|
||||
|
||||
+2
-1
@@ -24,7 +24,8 @@ enum rarch_core_type
|
||||
CORE_TYPE_MPV,
|
||||
CORE_TYPE_IMAGEVIEWER,
|
||||
CORE_TYPE_NETRETROPAD,
|
||||
CORE_TYPE_VIDEO_PROCESSOR
|
||||
CORE_TYPE_VIDEO_PROCESSOR,
|
||||
CORE_TYPE_GONG
|
||||
};
|
||||
|
||||
#endif
|
||||
+28
-2
@@ -25,6 +25,34 @@
|
||||
|
||||
static uint16_t *dummy_frame_buf;
|
||||
|
||||
#if defined(HAVE_LIBNX) && defined(HAVE_STATIC_DUMMY)
|
||||
void retro_init(void) { libretro_dummy_retro_init(); }
|
||||
void retro_deinit(void) { libretro_dummy_retro_deinit(); }
|
||||
unsigned retro_api_version(void) { return libretro_dummy_retro_api_version(); }
|
||||
void retro_set_controller_port_device(unsigned port, unsigned device) { libretro_dummy_retro_set_controller_port_device(port, device); }
|
||||
void retro_get_system_info(struct retro_system_info *info) { libretro_dummy_retro_get_system_info(info); }
|
||||
void retro_get_system_av_info(struct retro_system_av_info *info) { retro_get_system_av_info(info); }
|
||||
void retro_set_environment(retro_environment_t cb) { libretro_dummy_retro_set_environment(cb); }
|
||||
void retro_set_audio_sample(retro_audio_sample_t cb) { libretro_dummy_retro_set_audio_sample(cb); }
|
||||
void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb) { libretro_dummy_retro_set_audio_sample_batch(cb); }
|
||||
void retro_set_input_poll(retro_input_poll_t cb) { libretro_dummy_retro_set_input_poll(cb); }
|
||||
void retro_set_input_state(retro_input_state_t cb) { libretro_dummy_retro_set_input_state(cb); }
|
||||
void retro_set_video_refresh(retro_video_refresh_t cb) { libretro_dummy_retro_set_video_refresh(cb); }
|
||||
void retro_reset(void) { libretro_dummy_retro_reset(); }
|
||||
void retro_run(void) { libretro_dummy_retro_run(); }
|
||||
bool retro_load_game(const struct retro_game_info *info) { return libretro_dummy_retro_load_game(info); }
|
||||
void retro_unload_game(void) { libretro_dummy_retro_unload_game(); }
|
||||
unsigned retro_get_region(void) { return libretro_dummy_retro_get_region(); }
|
||||
bool retro_load_game_special(unsigned type, const struct retro_game_info *info, size_t num) { return libretro_dummy_retro_load_game_special(type, info, num); }
|
||||
size_t retro_serialize_size(void) { return libretro_dummy_retro_serialize_size(); }
|
||||
bool retro_serialize(void *data, size_t size) { return libretro_dummy_retro_serialize(data, size); }
|
||||
bool retro_unserialize(const void *data, size_t size) { return libretro_dummy_retro_unserialize(data, size); }
|
||||
void *retro_get_memory_data(unsigned id) { return libretro_dummy_retro_get_memory_data(id); }
|
||||
size_t retro_get_memory_size(unsigned id) { return libretro_dummy_retro_get_memory_size(id); }
|
||||
void retro_cheat_reset(void) { libretro_dummy_retro_cheat_reset(); }
|
||||
void retro_cheat_set(unsigned idx, bool enabled, const char *code) { libretro_dummy_retro_cheat_set(idx, enabled, code); }
|
||||
#endif
|
||||
|
||||
void libretro_dummy_retro_init(void)
|
||||
{
|
||||
unsigned i;
|
||||
@@ -195,5 +223,3 @@ void libretro_dummy_retro_cheat_set(unsigned idx,
|
||||
(void)enabled;
|
||||
(void)code;
|
||||
}
|
||||
|
||||
|
||||
@@ -360,6 +360,62 @@ size_t libretro_videoprocessor_retro_get_memory_size(unsigned id);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EASTEREGG
|
||||
/* Internal gong core. */
|
||||
|
||||
void libretro_gong_retro_init(void);
|
||||
|
||||
void libretro_gong_retro_deinit(void);
|
||||
|
||||
unsigned libretro_gong_retro_api_version(void);
|
||||
|
||||
void libretro_gong_retro_get_system_info(struct retro_system_info *info);
|
||||
|
||||
void libretro_gong_retro_get_system_av_info(struct retro_system_av_info *info);
|
||||
|
||||
void libretro_gong_retro_set_environment(retro_environment_t cb);
|
||||
|
||||
void libretro_gong_retro_set_video_refresh(retro_video_refresh_t cb);
|
||||
|
||||
void libretro_gong_retro_set_audio_sample(retro_audio_sample_t cb);
|
||||
|
||||
void libretro_gong_retro_set_audio_sample_batch(retro_audio_sample_batch_t cb);
|
||||
|
||||
void libretro_gong_retro_set_input_poll(retro_input_poll_t cb);
|
||||
|
||||
void libretro_gong_retro_set_input_state(retro_input_state_t cb);
|
||||
|
||||
void libretro_gong_retro_set_controller_port_device(unsigned port, unsigned device);
|
||||
|
||||
void libretro_gong_retro_reset(void);
|
||||
|
||||
void libretro_gong_retro_run(void);
|
||||
|
||||
size_t libretro_gong_retro_serialize_size(void);
|
||||
|
||||
bool libretro_gong_retro_serialize(void *data, size_t size);
|
||||
|
||||
bool libretro_gong_retro_unserialize(const void *data, size_t size);
|
||||
|
||||
void libretro_gong_retro_cheat_reset(void);
|
||||
|
||||
void libretro_gong_retro_cheat_set(unsigned index, bool enabled, const char *code);
|
||||
|
||||
bool libretro_gong_retro_load_game(const struct retro_game_info *game);
|
||||
|
||||
bool libretro_gong_retro_load_game_special(unsigned game_type,
|
||||
const struct retro_game_info *info, size_t num_info);
|
||||
|
||||
void libretro_gong_retro_unload_game(void);
|
||||
|
||||
unsigned libretro_gong_retro_get_region(void);
|
||||
|
||||
void *libretro_gong_retro_get_memory_data(unsigned id);
|
||||
|
||||
size_t libretro_gong_retro_get_memory_size(unsigned id);
|
||||
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
Loaded 100 of 2326 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user