mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-10 03:21:30 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
023e280319 | ||
|
|
9a7ca5fe57 | ||
|
|
7b1ad55b20 | ||
|
|
77b092ffc3 | ||
|
|
0737b90080 | ||
|
|
2fd9373c05 | ||
|
|
fee49f0e7e | ||
|
|
a58f80cc09 | ||
|
|
8e1c2e48c4 | ||
|
|
212d7bfbe1 | ||
|
|
2178f7b8ce | ||
|
|
7902a60669 | ||
|
|
134c1e6083 | ||
|
|
6344162900 | ||
|
|
de111ea903 | ||
|
|
ca4f70db22 | ||
|
|
2160f185f1 | ||
|
|
d65b387d0f | ||
|
|
ea69340130 | ||
|
|
c92142cdbd | ||
|
|
f2527b3a3c | ||
|
|
d851cbf3d5 | ||
|
|
485825fcd1 | ||
|
|
bd01ab80ca | ||
|
|
31415f760a | ||
|
|
b2e9a328cd | ||
|
|
dd6eb92352 | ||
|
|
b907ee2503 | ||
|
|
65fe25f03c | ||
|
|
ee421fcaa8 | ||
|
|
68c9cf4cb9 | ||
|
|
6b31bd8b48 | ||
|
|
c506f489df | ||
|
|
a75e7ede0d | ||
|
|
77d97d2407 | ||
|
|
f228b26755 | ||
|
|
757d1baa8d | ||
|
|
5164e62172 | ||
|
|
381bc28530 | ||
|
|
64bdf7e48e | ||
|
|
265ae728dd | ||
|
|
af351932bd | ||
|
|
72428a23c5 | ||
|
|
a482c90222 | ||
|
|
2760586086 | ||
|
|
17cbc80a9b | ||
|
|
431d15746e | ||
|
|
a93289e311 | ||
|
|
ebfa4bdcdc | ||
|
|
d6c17178a3 | ||
|
|
77d815a572 | ||
|
|
c90c98dcaa | ||
|
|
789ef63dee | ||
|
|
fec8d3294c | ||
|
|
95ecbc0859 | ||
|
|
830068e5bd | ||
|
|
a6fcd9dae0 | ||
|
|
bd3f39b005 | ||
|
|
0e5ccd7c15 | ||
|
|
dbb9a43abe | ||
|
|
8d02343b53 | ||
|
|
d7fa70927c | ||
|
|
d03ff06cf3 | ||
|
|
282b4ba21b | ||
|
|
0c4a3a83ce | ||
|
|
af734939ee | ||
|
|
32c92a9a22 | ||
|
|
45cea92ba2 | ||
|
|
871f04e19a | ||
|
|
e54cb1b121 | ||
|
|
ee621ba476 | ||
|
|
f1fa1d4879 | ||
|
|
c4c8699ee3 | ||
|
|
6f4fd8859a | ||
|
|
b1a2d1991c | ||
|
|
6f3003554e | ||
|
|
5370c59201 | ||
|
|
bac0d22ce9 | ||
|
|
8bc3283bd5 | ||
|
|
f8ccf50fd4 | ||
|
|
54ec4e47e8 | ||
|
|
eb69025ca8 | ||
|
|
c18d2e0432 | ||
|
|
b41c4ed624 | ||
|
|
997c24ae0c | ||
|
|
fc169cf4fe | ||
|
|
8e2dfa6184 | ||
|
|
8a1f2f5cf2 | ||
|
|
7bef8746a3 | ||
|
|
1fd2cf1ff5 | ||
|
|
5dc916f0b3 | ||
|
|
04fa4871f0 | ||
|
|
88387ccbde | ||
|
|
3a93377811 | ||
|
|
9e741019f3 | ||
|
|
2a655116a6 | ||
|
|
80fdd6d2a1 | ||
|
|
ca8829fe3c | ||
|
|
a7e40ea3f4 | ||
|
|
5ee6cdf753 | ||
|
|
8de03fe843 | ||
|
|
58623d7540 | ||
|
|
3033dda866 | ||
|
|
4c941d3ada | ||
|
|
db314ff82f | ||
|
|
ca9dd89975 | ||
|
|
d4c691527a | ||
|
|
8c400ce6ab | ||
|
|
e325c68748 | ||
|
|
248f1242dc | ||
|
|
1526c8a15d | ||
|
|
f4c83157af | ||
|
|
413914a1cf | ||
|
|
dae0f36a20 | ||
|
|
16df2ceb4e | ||
|
|
d8fd499f3d | ||
|
|
4d64a94cb2 | ||
|
|
835e491c62 | ||
|
|
037c47eaf1 | ||
|
|
d8b5fea374 | ||
|
|
8198e5c0b2 | ||
|
|
74d4bc80d9 | ||
|
|
1c66905f0d | ||
|
|
4914c164fa | ||
|
|
a7ad6e2024 | ||
|
|
070ee2fb40 | ||
|
|
9532a77b4f | ||
|
|
ba25d90cc8 | ||
|
|
e17c3d869d | ||
|
|
af87a19675 | ||
|
|
b0e62f3ec6 | ||
|
|
a4f1c6b602 | ||
|
|
712a2fcc1d | ||
|
|
710570a408 | ||
|
|
30c824c30a | ||
|
|
6d7ffef316 | ||
|
|
c52f53aada | ||
|
|
df5586570f | ||
|
|
88d62c7766 | ||
|
|
e5d90eebd7 | ||
|
|
6929db9fb6 | ||
|
|
832cc4e945 | ||
|
|
e0b57843aa | ||
|
|
8848b2837b | ||
|
|
0cf6b83b63 | ||
|
|
b78dcf9f4c | ||
|
|
7515c3d7c3 | ||
|
|
8e52fcff96 | ||
|
|
9f2b56a929 | ||
|
|
919a441089 | ||
|
|
3755003d33 | ||
|
|
d7d5dfdc73 | ||
|
|
f050104740 | ||
|
|
3f8ea809de | ||
|
|
8113d2067f | ||
|
|
029019b757 | ||
|
|
a1f50ba847 | ||
|
|
9933eb004b | ||
|
|
b7990bc63d | ||
|
|
eb4049397f | ||
|
|
6aa33c8710 | ||
|
|
c4f818599c | ||
|
|
2cf76a192f | ||
|
|
95f8205fd1 | ||
|
|
3fb2484869 | ||
|
|
64b2830889 | ||
|
|
be7eb4de1c | ||
|
|
7a4c468730 | ||
|
|
ec2267daa6 | ||
|
|
d46011ae14 | ||
|
|
4cc3cf7344 | ||
|
|
de29f0ce62 | ||
|
|
df5528b1d0 | ||
|
|
e049605359 | ||
|
|
20d87347f7 | ||
|
|
533f898132 | ||
|
|
7a00534378 | ||
|
|
6d00810716 | ||
|
|
953172f05b | ||
|
|
c692f457c2 | ||
|
|
bed4214059 | ||
|
|
311c156e08 | ||
|
|
4d87772f4a | ||
|
|
1c6a6c80f4 | ||
|
|
bb05af0d92 | ||
|
|
dc7c4fea2d | ||
|
|
359de5c84b | ||
|
|
87cf910396 | ||
|
|
a2516d23a3 | ||
|
|
c6849bf267 | ||
|
|
8e1437ad86 | ||
|
|
79071bd11b | ||
|
|
9d352af3a8 | ||
|
|
a20d53202d | ||
|
|
3c7c8871d7 | ||
|
|
d44f9467e4 | ||
|
|
d3bbdb2e06 | ||
|
|
b0a2df41dd | ||
|
|
6f7b8aac8c | ||
|
|
7c5e44ead0 | ||
|
|
4c39a7fd78 | ||
|
|
adf4ed960e | ||
|
|
6f9c2da807 | ||
|
|
8fe51864a6 | ||
|
|
e1637ffa20 | ||
|
|
f8b75482e9 | ||
|
|
dc61e23a21 | ||
|
|
bd2b913bc6 | ||
|
|
041670fe02 | ||
|
|
1751f4a0af | ||
|
|
70abbbf4fb | ||
|
|
ff18a55f06 | ||
|
|
6761ec471d | ||
|
|
9a355b8f2e | ||
|
|
6e4cf412f0 | ||
|
|
e7bed050bc | ||
|
|
249abcd108 | ||
|
|
5486894e3b | ||
|
|
38525e1e8f | ||
|
|
3f77a6a320 | ||
|
|
c5c41efc0f | ||
|
|
801ecb019a | ||
|
|
872c364f34 | ||
|
|
97cf6613da | ||
|
|
9252c56142 | ||
|
|
74a3677eb5 | ||
|
|
abad1b3134 | ||
|
|
1836d08b33 | ||
|
|
b540ae3d4d | ||
|
|
146c94a86a | ||
|
|
6c99acb23e | ||
|
|
fdffb7059d | ||
|
|
a276710877 | ||
|
|
a07ada7af6 | ||
|
|
21244c6ec7 | ||
|
|
87c9d9eb9a | ||
|
|
4993630e10 | ||
|
|
13d7e2bed2 | ||
|
|
372603858d | ||
|
|
ba96aac2da | ||
|
|
13a9d11a2c | ||
|
|
ad671a153a | ||
|
|
40d45c9451 | ||
|
|
f62ad312eb | ||
|
|
f481924f1e | ||
|
|
7da45bc789 | ||
|
|
a3175a8fa3 | ||
|
|
8d6067b1d4 | ||
|
|
8632a92568 | ||
|
|
cb3b5d72ab | ||
|
|
a8f7d99aba | ||
|
|
f0285ef792 | ||
|
|
fbf03df8be | ||
|
|
b4a2bd5156 | ||
|
|
15142fd0a9 | ||
|
|
21ede63df2 | ||
|
|
7c314a9165 | ||
|
|
d2a1c39f4b | ||
|
|
6e299065ce | ||
|
|
bce7742745 | ||
|
|
00da860681 | ||
|
|
ac511120d4 | ||
|
|
86ea98605d | ||
|
|
5697a24946 | ||
|
|
25ab35b7d0 | ||
|
|
639152e291 | ||
|
|
c24179dc63 | ||
|
|
d66b8fa882 | ||
|
|
c9e48cd9de | ||
|
|
6f0fc2426d | ||
|
|
3016edce0a | ||
|
|
00cc4ca7aa | ||
|
|
6e46d1deb1 | ||
|
|
8ca8f92aeb | ||
|
|
7ccecc80c1 | ||
|
|
06bafe3cc3 | ||
|
|
47a6f0bb7a | ||
|
|
be0c118c87 | ||
|
|
445f176e24 | ||
|
|
867981b74b | ||
|
|
8b4b5e88ce | ||
|
|
86c826350e | ||
|
|
908de15e7b | ||
|
|
22e5d000c2 | ||
|
|
fdec9c50e0 | ||
|
|
f3e0a627af | ||
|
|
b6764c43db | ||
|
|
afe77527cd | ||
|
|
260cd62482 | ||
|
|
ff9aebedca | ||
|
|
8e7b1ede7f | ||
|
|
9381d27f1f | ||
|
|
f00a75ec84 | ||
|
|
50edd0d467 | ||
|
|
f071e8b440 | ||
|
|
e82882a1ab | ||
|
|
88e7c03e1b | ||
|
|
0fb766b921 | ||
|
|
08a54e45f2 | ||
|
|
91ba0765e6 | ||
|
|
f2c23970a3 | ||
|
|
4db665130c | ||
|
|
be5057eafc | ||
|
|
a5c7b79842 | ||
|
|
7b5a0bf706 | ||
|
|
47a528801d | ||
|
|
2cb14e730f | ||
|
|
215868f755 | ||
|
|
d5860a4f79 | ||
|
|
066d181535 | ||
|
|
d0b735735c | ||
|
|
4cd4de3bd3 | ||
|
|
8dc63653e5 | ||
|
|
3a4d094277 | ||
|
|
bc70477005 | ||
|
|
4052ffe08e | ||
|
|
e056c1e835 | ||
|
|
a646fd3e65 | ||
|
|
019e2acd92 | ||
|
|
968c692a04 | ||
|
|
1dd73f86b7 | ||
|
|
9bcaac1abc | ||
|
|
24b694d674 | ||
|
|
30090db941 | ||
|
|
0ed69fd170 | ||
|
|
368becbc42 | ||
|
|
1ce19f9573 | ||
|
|
460182fc63 | ||
|
|
a82bb0ec94 | ||
|
|
be1bca4ce4 | ||
|
|
2b9b829459 | ||
|
|
f517ca3b56 | ||
|
|
72065aee0b | ||
|
|
c608951ff8 | ||
|
|
0ed9f05571 | ||
|
|
f662d9f65f | ||
|
|
06860bf704 | ||
|
|
3792a5e502 | ||
|
|
fa3dfd5f63 | ||
|
|
4260423e48 | ||
|
|
1fa28f0e31 | ||
|
|
d8d22a9c40 | ||
|
|
e42e79db28 | ||
|
|
2415f821af | ||
|
|
958216ede9 | ||
|
|
e130afff73 | ||
|
|
5efba1c257 | ||
|
|
23331aa484 | ||
|
|
59da4b880e | ||
|
|
058b4cea79 | ||
|
|
921a30da88 | ||
|
|
e71826e3d6 | ||
|
|
f7b94e5f66 | ||
|
|
be2c648596 | ||
|
|
7f5fe5ebff | ||
|
|
052887d8b0 | ||
|
|
c4754815b6 | ||
|
|
34649d1abf | ||
|
|
51edf47ed2 | ||
|
|
db5f3d7a75 | ||
|
|
f6ee035011 | ||
|
|
daf262da96 | ||
|
|
c57f8722e5 | ||
|
|
2bfb5ec0df | ||
|
|
ed334cd1dd | ||
|
|
9639389a66 | ||
|
|
816d805f58 | ||
|
|
63c99363bd | ||
|
|
23096e00a3 | ||
|
|
c570d461af | ||
|
|
d58c425e43 | ||
|
|
2ca52bd08c | ||
|
|
4f32eb9cc1 | ||
|
|
8e4df27305 | ||
|
|
9e07e1a57f | ||
|
|
360bea85b9 | ||
|
|
f069eeb017 | ||
|
|
9a97c73dc2 | ||
|
|
2201e27593 | ||
|
|
c1c328d265 | ||
|
|
cb74af60c9 | ||
|
|
ee0afec787 | ||
|
|
299c808e22 | ||
|
|
de080151cc | ||
|
|
1fadc2e148 | ||
|
|
3e699cf00b | ||
|
|
f37ed2f7e1 | ||
|
|
e42edbf032 | ||
|
|
9c5a7a7453 | ||
|
|
e78aedbb6c | ||
|
|
1315e26ffa | ||
|
|
dc901f6e1e | ||
|
|
ad0a36b825 | ||
|
|
cc177d9622 | ||
|
|
b5b906bc5a | ||
|
|
c8a9f5eded | ||
|
|
7adec98cd8 | ||
|
|
852c8735e6 | ||
|
|
2d2094575e | ||
|
|
55450a5d73 | ||
|
|
0b62a0f6e2 | ||
|
|
00a3aba480 | ||
|
|
9f15e39114 | ||
|
|
0a5e65dc06 | ||
|
|
ab00d587d8 | ||
|
|
19a6375ec6 | ||
|
|
a275242aef | ||
|
|
8356300c3e | ||
|
|
64686d8106 | ||
|
|
78c8a9b197 | ||
|
|
015facee70 | ||
|
|
950719797d | ||
|
|
cf23ff7a88 | ||
|
|
ca55f3198e | ||
|
|
79eb3e6b8c | ||
|
|
752eddbb95 | ||
|
|
b676167ef6 | ||
|
|
d5085c8831 | ||
|
|
dd78622d30 | ||
|
|
5d7e31d2f3 | ||
|
|
6a6150bb03 | ||
|
|
28b9a38d7d | ||
|
|
80b8410b0f | ||
|
|
a0c9ef55cb | ||
|
|
9524203051 | ||
|
|
38fc89fbfc | ||
|
|
64ebf62959 | ||
|
|
611cc52661 | ||
|
|
f7fa5844f2 | ||
|
|
6b77a66298 | ||
|
|
15472eb184 | ||
|
|
a869cb5a7d | ||
|
|
9164bcc244 | ||
|
|
36d33deb30 | ||
|
|
ec6d6e58d6 | ||
|
|
0c0cad8630 | ||
|
|
cf4ab13281 | ||
|
|
b24433a9f2 | ||
|
|
92b46a8275 | ||
|
|
0ff5631649 | ||
|
|
74d4e6043a | ||
|
|
8acc085dec | ||
|
|
94254e4c79 | ||
|
|
86bfd8f4fc | ||
|
|
c6d6fc7098 | ||
|
|
82e2cc7c73 | ||
|
|
7e43db9cf1 | ||
|
|
ecd42f1aa8 | ||
|
|
05e34654c6 | ||
|
|
50f19630bd | ||
|
|
58df2e6427 | ||
|
|
12bf69fa29 | ||
|
|
33d9eee436 | ||
|
|
e8a77e6b91 | ||
|
|
d8787ef805 | ||
|
|
008900e73d | ||
|
|
be5e0dfb1f | ||
|
|
3bbff3c689 | ||
|
|
9ca3d40018 | ||
|
|
3c3f1a2661 | ||
|
|
ef039c2c08 | ||
|
|
5da1aa0af7 | ||
|
|
dca622b4a8 | ||
|
|
dd392dcdfb | ||
|
|
d04d1c0214 | ||
|
|
1103f4f630 | ||
|
|
54636ea5f3 | ||
|
|
647abd6aba | ||
|
|
1377b2e7cf | ||
|
|
d06386d0a5 | ||
|
|
0fe838bfcd | ||
|
|
0777a6d625 | ||
|
|
5076569c81 | ||
|
|
25e99ba75b | ||
|
|
6d536974d8 | ||
|
|
65909fd1db | ||
|
|
8703ad8374 | ||
|
|
2db0c21f52 | ||
|
|
e85f11ea38 | ||
|
|
425e1d9043 | ||
|
|
8819b2a2f6 | ||
|
|
adb2274fc6 | ||
|
|
254932af04 | ||
|
|
0712c0ba99 | ||
|
|
67c3fd88f4 | ||
|
|
039820f367 | ||
|
|
cbc18c74ea | ||
|
|
8859fa0213 | ||
|
|
77f2b7d326 | ||
|
|
77f7e1da8c | ||
|
|
a8b810760b | ||
|
|
b4859cde59 | ||
|
|
abdad9bc16 | ||
|
|
c5ec1885f2 | ||
|
|
40594a3059 | ||
|
|
76b025d70e | ||
|
|
4347517604 | ||
|
|
ca7c374303 | ||
|
|
a84facf636 | ||
|
|
c041470bb0 | ||
|
|
6e662a8064 | ||
|
|
ef5830b233 | ||
|
|
4372db491a | ||
|
|
1b0420807b | ||
|
|
2bdfd2e1d0 | ||
|
|
eeb2a0a934 | ||
|
|
3fe6ecbce7 | ||
|
|
2c882a01c1 | ||
|
|
265b0560b3 | ||
|
|
bc3d0b2acd | ||
|
|
ff0a2d4f57 | ||
|
|
361152000d | ||
|
|
f5e0346fc2 | ||
|
|
2143540c8c | ||
|
|
994ca6b3f8 | ||
|
|
163be3ccfd | ||
|
|
02ce39869c | ||
|
|
2c1cb6cf55 | ||
|
|
8c6f05e715 | ||
|
|
86d24a0fc4 | ||
|
|
55157506a8 | ||
|
|
d4558774df | ||
|
|
e71f56d4a3 | ||
|
|
89e912087b | ||
|
|
d17eee9cca | ||
|
|
5a7c37b819 | ||
|
|
942121462d | ||
|
|
167b977c4d | ||
|
|
bb86387986 | ||
|
|
c30fd2a035 | ||
|
|
51f0e6f9d3 | ||
|
|
d8e382c585 | ||
|
|
d8c5718a6e | ||
|
|
e8d90500de | ||
|
|
46500e119c | ||
|
|
1cfc8a5fc8 | ||
|
|
923ab3b6f4 | ||
|
|
fc173eafab | ||
|
|
7f3b2474a9 | ||
|
|
9ce592b648 | ||
|
|
e55323daa9 | ||
|
|
b1fca8fc7e | ||
|
|
9cf0f19c12 | ||
|
|
d7d1d1d5b8 | ||
|
|
cf422226e6 | ||
|
|
316e1ebf66 | ||
|
|
94ea7dde50 | ||
|
|
0ef6455c61 | ||
|
|
4932b95777 | ||
|
|
80e295505e | ||
|
|
e9ccb86b09 | ||
|
|
2ed38a8481 | ||
|
|
06efb30c46 | ||
|
|
2243d7641b | ||
|
|
62a0d378dd | ||
|
|
ce2d4af103 | ||
|
|
7e64052dc8 | ||
|
|
024b23aa2c | ||
|
|
b2d45beb10 | ||
|
|
3b9036cc79 | ||
|
|
a44f4d1489 | ||
|
|
4b3c37494a | ||
|
|
97ecba8575 | ||
|
|
dcc416ca46 | ||
|
|
d919e93013 | ||
|
|
e6c1704789 | ||
|
|
f6ab07f3fc | ||
|
|
dd8beb48b6 | ||
|
|
51276a682f | ||
|
|
ff68b9244d | ||
|
|
540b15d6ef | ||
|
|
43205baa9a | ||
|
|
7f6f95c215 | ||
|
|
b30aca2d6d | ||
|
|
af7f1da9fb | ||
|
|
670216d021 | ||
|
|
2783a26b97 | ||
|
|
71578a43f6 | ||
|
|
b297f391ad | ||
|
|
2967283b29 | ||
|
|
8e5a00d66b | ||
|
|
b33cb14ba0 | ||
|
|
56bc1757ed | ||
|
|
8ce7703970 | ||
|
|
99645e2cd7 | ||
|
|
2fc350828c | ||
|
|
d207986a74 | ||
|
|
7eec1f3a24 | ||
|
|
635b3b7670 | ||
|
|
8eb34f2544 | ||
|
|
030b11c372 | ||
|
|
697e158d7a | ||
|
|
9d23af5299 | ||
|
|
a32d7d974c | ||
|
|
1ff798b8a5 | ||
|
|
3d96cacd71 | ||
|
|
88d1c1fdca | ||
|
|
826a7d199a | ||
|
|
8ecba8b2a3 | ||
|
|
aa5525f670 | ||
|
|
a130dce708 | ||
|
|
814810aeaf | ||
|
|
a2295af556 | ||
|
|
30074b4404 | ||
|
|
8a63a0ac52 | ||
|
|
ae4b604a6f | ||
|
|
8bc04f90fe | ||
|
|
ad37bc530e | ||
|
|
baf7aa239d | ||
|
|
20a73209b6 | ||
|
|
94e4357fd4 | ||
|
|
1aaaa116d1 | ||
|
|
02bf41a686 | ||
|
|
3c6490d828 | ||
|
|
b1c054e9a5 | ||
|
|
51c9ac4f7a | ||
|
|
35ae907899 | ||
|
|
75d2813d47 | ||
|
|
9c47e24a84 | ||
|
|
ce40bc6446 | ||
|
|
a32880fd22 | ||
|
|
e4b955d4d4 | ||
|
|
eaf1e1474e | ||
|
|
df58d5a7d9 | ||
|
|
07aa350d7e | ||
|
|
875450e228 | ||
|
|
33d99fe75b | ||
|
|
1818552aeb | ||
|
|
ea1df738a7 | ||
|
|
131418e371 | ||
|
|
007829654e | ||
|
|
b984abb371 | ||
|
|
defcde0d1e | ||
|
|
54708a944a | ||
|
|
1fb7d14b36 | ||
|
|
9343eacc0a | ||
|
|
647f1a48a6 | ||
|
|
9b8713aebd | ||
|
|
9057ffbde4 | ||
|
|
70f598c619 | ||
|
|
473d978d78 | ||
|
|
2b1979c3b7 | ||
|
|
512dc7fef5 | ||
|
|
3297900543 | ||
|
|
fbd4900031 | ||
|
|
575265ff06 | ||
|
|
7deeb6d2fa | ||
|
|
4d1b4f905f | ||
|
|
0ece3d8397 | ||
|
|
85d3be1245 | ||
|
|
e179a39491 | ||
|
|
c44dd39dd6 | ||
|
|
e9822e0ac7 | ||
|
|
5c82ef3ee3 | ||
|
|
be796566bc | ||
|
|
f597fd7a11 | ||
|
|
e373d82a58 | ||
|
|
0be2b76892 | ||
|
|
c318d05803 | ||
|
|
dac6f11547 | ||
|
|
06b402bc14 | ||
|
|
59bf897561 | ||
|
|
d2d8f00b29 | ||
|
|
c29ff4304c | ||
|
|
4fa50d14ea | ||
|
|
7526b12338 | ||
|
|
ea85727b3c | ||
|
|
813c7ad1f7 | ||
|
|
7928c03e3c | ||
|
|
319d87cf6f | ||
|
|
ab672c4394 | ||
|
|
e9fdfd2334 | ||
|
|
8e3fb86115 | ||
|
|
caafe61f07 | ||
|
|
f78f5c27ce | ||
|
|
719a3e52c7 | ||
|
|
6bf011a700 | ||
|
|
72dc03a1c6 | ||
|
|
62d2b9a54e | ||
|
|
a357198bda | ||
|
|
eb6d04d430 | ||
|
|
c7f070113a | ||
|
|
9b022c5904 | ||
|
|
1f472db2aa | ||
|
|
ac556e0b7c | ||
|
|
1354526345 | ||
|
|
4312c11d31 | ||
|
|
adc4f27eb9 | ||
|
|
4d8d6478f4 | ||
|
|
fd9d8c9512 | ||
|
|
eb1d3f612f | ||
|
|
a8fc4b204a | ||
|
|
3e3b24bbaf | ||
|
|
e8de264b75 | ||
|
|
8f0c94a322 | ||
|
|
05b6c4eafa | ||
|
|
1a4db72e82 | ||
|
|
c52fdc469f | ||
|
|
9721c7c4be | ||
|
|
aeea0e6ca8 | ||
|
|
176cde31fc | ||
|
|
fb011f8377 | ||
|
|
450fc90a15 | ||
|
|
614521b238 | ||
|
|
ffbb439fb5 | ||
|
|
3d378fd772 | ||
|
|
65c903de3c | ||
|
|
6b150ba38d | ||
|
|
24783b21cf | ||
|
|
aa4ded4bc7 | ||
|
|
eb5a69ded3 | ||
|
|
29a057ac98 | ||
|
|
ca6df1ae32 | ||
|
|
83fae86b6f | ||
|
|
518ff36ed4 | ||
|
|
1c045de7a6 | ||
|
|
e07be500ee | ||
|
|
d02d48da24 | ||
|
|
b948cf46e7 | ||
|
|
ee809abf6b | ||
|
|
6653818dc8 | ||
|
|
1eaa902b6d | ||
|
|
b01e63e2cd | ||
|
|
6346f18133 | ||
|
|
6bf34c36ed | ||
|
|
9cac3175c3 | ||
|
|
32b2808fe0 | ||
|
|
e5eeed688e | ||
|
|
fd206a7dd0 | ||
|
|
0d4833fb76 | ||
|
|
a419c524f7 | ||
|
|
d170cb5469 | ||
|
|
ddb0f81cf2 | ||
|
|
d51edd8239 | ||
|
|
d6eda2502d | ||
|
|
4552002945 | ||
|
|
173f6a23e3 | ||
|
|
c5775fd73c | ||
|
|
2be56942da | ||
|
|
b33d29aecf | ||
|
|
d991c7d471 | ||
|
|
96e154cb8f | ||
|
|
6d8544c26d | ||
|
|
1da67cecf3 | ||
|
|
07ecc641fe | ||
|
|
98f8ed637c | ||
|
|
7a99694a1a | ||
|
|
d5503e9e7c | ||
|
|
1bccf5cf27 | ||
|
|
5dda583a94 | ||
|
|
d532f108fc | ||
|
|
35f796d65d | ||
|
|
e934f11065 | ||
|
|
4a4de74518 | ||
|
|
dd53be15ae | ||
|
|
82fb34a3ce | ||
|
|
82213266e6 | ||
|
|
2b300b96e2 | ||
|
|
3e6ffe3983 | ||
|
|
14e6d42935 | ||
|
|
aa57331569 | ||
|
|
b815c64814 | ||
|
|
2e61eecbdd | ||
|
|
90c36c52ce | ||
|
|
22c95b31ea | ||
|
|
7487d938b3 | ||
|
|
be64bf08e4 | ||
|
|
a4e2c8c75c | ||
|
|
34ec4b9dcb | ||
|
|
7d8e8291ec | ||
|
|
333ef62e25 | ||
|
|
bb972a6dab | ||
|
|
ff6d24cbef | ||
|
|
f48c1800c0 | ||
|
|
c104a232fd | ||
|
|
13a2246c50 | ||
|
|
810be0cea5 | ||
|
|
7c1ee8b24b | ||
|
|
d51048b0df | ||
|
|
f3c3bc9f6e | ||
|
|
29c75105d4 | ||
|
|
fc4a24e4c9 | ||
|
|
7b0c0b63c9 | ||
|
|
32bf9cd716 | ||
|
|
a39bff6e03 | ||
|
|
112600e0db | ||
|
|
03e0d0fe99 | ||
|
|
4c561a2de1 | ||
|
|
340a368465 | ||
|
|
28a7357fca | ||
|
|
1d1acc8940 | ||
|
|
1212b88bae | ||
|
|
542cd6b6bf | ||
|
|
63823b339a | ||
|
|
858af5fbe2 | ||
|
|
b4a743fff4 | ||
|
|
0566b056a5 | ||
|
|
59dae251b0 | ||
|
|
64b36ef5d8 | ||
|
|
3f1ae25713 | ||
|
|
ed67653086 | ||
|
|
371b6a604e | ||
|
|
588707f543 | ||
|
|
0ec5ce8cfe | ||
|
|
95371cbda1 | ||
|
|
dfdbc00a84 | ||
|
|
dbf2fae5c1 | ||
|
|
fc9e018534 | ||
|
|
7c599b715e | ||
|
|
9606db6f79 | ||
|
|
af5a2f61a1 | ||
|
|
0a1bcab732 | ||
|
|
9f33ba8607 | ||
|
|
3cd2018cc1 | ||
|
|
df7f47d00a | ||
|
|
2f457af8bf | ||
|
|
25b7e54bdb | ||
|
|
7a7902c4ac | ||
|
|
ae6e410de1 | ||
|
|
4c08bdc0e9 | ||
|
|
6329eca684 | ||
|
|
9d45d26f56 | ||
|
|
13b6a016fc | ||
|
|
16c1bd7a03 | ||
|
|
ba0e6bcdea | ||
|
|
128dff15ab | ||
|
|
c8028f3150 | ||
|
|
a22131b452 | ||
|
|
c72a68faf8 | ||
|
|
7da491d009 | ||
|
|
8b8b08aefd | ||
|
|
0de23512e7 | ||
|
|
b3d3cbd4e1 | ||
|
|
18d27468ae | ||
|
|
4ab8fb9423 | ||
|
|
f0f3df3043 | ||
|
|
502f3ddc74 | ||
|
|
7e8b9135c3 | ||
|
|
fbead501f3 | ||
|
|
826ca302ca | ||
|
|
88ab8ceb24 | ||
|
|
4dc9c408d4 | ||
|
|
bf22eeff21 | ||
|
|
f2e80fd8e8 | ||
|
|
a34c066e07 | ||
|
|
e9d0834a39 | ||
|
|
2f241d10d4 | ||
|
|
d45189b853 | ||
|
|
696fa900a1 | ||
|
|
b67777f664 | ||
|
|
5b79d2b942 | ||
|
|
5665e27324 | ||
|
|
b4733fd6c2 | ||
|
|
826a5009b0 | ||
|
|
d8498d0de7 | ||
|
|
8dbe653e9f | ||
|
|
e75992a66f | ||
|
|
7bc9e5260e | ||
|
|
7a3d7e784a | ||
|
|
dd91373f35 | ||
|
|
b4ea072ce7 | ||
|
|
33f0009a11 | ||
|
|
8d7911976c | ||
|
|
b4a9ac37ff | ||
|
|
366a1d58f8 | ||
|
|
78406bef69 | ||
|
|
d6d89e10ba | ||
|
|
fa40be2aa5 | ||
|
|
071476174d | ||
|
|
74309e6e1c | ||
|
|
f00d194ae3 | ||
|
|
b2c3a2c2db | ||
|
|
af8559bc19 | ||
|
|
b0f29a6743 | ||
|
|
fae9223641 | ||
|
|
938f6cc26e | ||
|
|
016e24e5a5 | ||
|
|
8d9fbf4a62 | ||
|
|
36f9d359c2 | ||
|
|
2a6af87d23 | ||
|
|
865fec4282 | ||
|
|
7a0428fc76 | ||
|
|
e99049a8ff | ||
|
|
cf7785d784 | ||
|
|
2f25ec6f8b | ||
|
|
72a02b7647 |
No files matched your search
+4
-2
@@ -10,7 +10,7 @@ matrix:
|
||||
- g++-mingw-w64-i686
|
||||
- mingw-w64-i686-dev
|
||||
script:
|
||||
- CROSS_COMPILE=i686-w64-mingw32- ./configure --disable-d3d9 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- CROSS_COMPILE=i686-w64-mingw32- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- compiler: mingw-x64
|
||||
addons:
|
||||
apt:
|
||||
@@ -18,7 +18,7 @@ matrix:
|
||||
- g++-mingw-w64-x86-64
|
||||
- mingw-w64-x86-64-dev
|
||||
script:
|
||||
- CROSS_COMPILE=x86_64-w64-mingw32- ./configure --disable-d3d9 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- CROSS_COMPILE=x86_64-w64-mingw32- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- compiler: gcc
|
||||
- compiler: clang
|
||||
addons:
|
||||
@@ -64,3 +64,5 @@ addons:
|
||||
build_command_prepend: "./configure; make clean"
|
||||
build_command: "make"
|
||||
branch_pattern: coverity_scan
|
||||
notifications:
|
||||
email: false
|
||||
Vendored
+126
-124
@@ -1,125 +1,127 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 3
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
Vendored
+20
-23
@@ -5,44 +5,41 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "msys2-mingw64 debug",
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"args": [],
|
||||
"args": ["-v"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32 debug",
|
||||
{
|
||||
"name": "(gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"request": "attach",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"processId": "${command:pickProcess}",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw32\\bin\\gdb.exe",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
Vendored
+1
@@ -14,4 +14,5 @@
|
||||
"*.in": "c",
|
||||
"*.rh": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
+66
-5
@@ -1,4 +1,66 @@
|
||||
# 1.7.2 (future)
|
||||
# 1.7.3 (future)
|
||||
|
||||
# 1.7.2
|
||||
- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now).
|
||||
- CRT: Added CRT SwitchRes.
|
||||
- COMMON: Hide the 'Core delete' option if the 'Core updater' is also hidden.
|
||||
- COMMON: Add way to reset core association for playlist entry.
|
||||
- COMMON: Fix invalid long command line options causing infinite loop on Windows
|
||||
- COMMON: Add OSD statistics for video/audio/core.
|
||||
- COMMON: Added runahead system; allows you to drive down latency even further.
|
||||
- COMMON: Fix buggy behavior that could happen with ZIP file reading on some platforms as a result of not initializing struct.
|
||||
- CHEEVOS: Support Atari 2600, Virtual Boy, and Arcade (only Neo Geo, CPS-1, CPS-2 and CPS-3 and only with fbalpha core).
|
||||
- CHEEVOS: Add option to automatically take a screenshot when an achievement is triggered.
|
||||
- CHEEVOS: Fixed incompatibilities with Neo Geo Pocket achievement sets.
|
||||
- CHEEVOS: Store only login token, not password.
|
||||
- D3D10: Added D3D10 driver to release build. Has working shaders (Slang), overlay, and menu display driver support. Should be on par capabilities wise
|
||||
with D3D11 driver except for there being no hardware rendering right now.
|
||||
- D3D11: Experimental hardware renderer. Allows for libretro cores to use D3D11 for hardware rendering. First core to use this is PPSSPP.
|
||||
- D3D11: Increase backwards compatibility, shaders compile with Shader Model 4.0 now, added support for more feature levels.
|
||||
- D3D10/D3D11/D3D12: Fix crashes with completely black or white thumbnail textures in XMB.
|
||||
- GUI: Support disabling window decorations on Windows and Linux.
|
||||
- LIBRETRO: Addition - Functions to enable and disable audio and video, and an environment function to query status of audio and video enables.
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- MENU: Add Rewind/Latency/Overlay settings to Quick Menu, add options to show/hide them (User Interface -> Views -> Quick Menu)
|
||||
- MENU/RGUI: Only show Menu Linear Filter for RGUI and only show it for
|
||||
video drivers that implement it (D3D8/9/10/11/12/GL)
|
||||
- MENU/RGUI: Add User Interface -> Appearance options.
|
||||
- MENU/RGUI: D3D8/D3D9: Hookup Menu Linear Filter
|
||||
- MENU/XMB: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons.
|
||||
- MENU/XMB: Left/right thumbnails are now automatically scaled according to layout.
|
||||
- MENU/XMB: Add Left Thumbnails (additional to the right).
|
||||
- MENU/XMB: Fixed left/right tab regression.
|
||||
- MENU/XMB: Fix scaling of tall images that were cut on bottom previously.
|
||||
- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins.
|
||||
- MENU/XMB: Mouse cursor scales correctly now.
|
||||
- MENU/XMB: Add toggle to show/hide Playlist tabs.
|
||||
- MENU/XMB: Add menu layout - can switch between Desktop, Handheld and Auto.
|
||||
- MENU/XMB: Don't load menu pipeline shaders unless XMB is selected (D3D10/D3D11/D3D12/GL/Vulkan)
|
||||
- MENU/VIDEO: Only show black frame insertion for the video drivers/context drivers
|
||||
that support it (so far this includes - D3D8/D3D9, OpenGL, Vulkan)
|
||||
- MENU/VIDEO: Only show max swapchain images if supported by video driver and/or context driver (so far this includes - DRM EGL context driver, VideoCore EGL context driver, Vulkan)
|
||||
- MENU/MaterialUI: Automatic DPI Scaling should be much improved now, now scales as expected at 1440p and 4K resolutions.
|
||||
- MENU/MaterialUI: Fix wrong calculation of an entry height causing long playlists to end up outside of screen range. This also could cause crashes on low DPI screens.
|
||||
- IOS: Fixed crash when opening downloaded roms from Safari or using the "Open in.." functionality. Added the compiler flag to support keyboard remapping to controls.
|
||||
- IOS: Fixed buffer overlap that caused a crash while trying to download GLSL shaders from the buildbot.
|
||||
- PS3: fix URLS
|
||||
- SCANNER: Should be able to scan dual-layer Wii disc images now, filestream code now supports files larger than 4GB.
|
||||
- SHADERS/SLANG: Slang shaders should work again on Android version and MSVC versions (basically all the Griffin-based versions).
|
||||
- SHADERS: If GL context is GLES2/3/Core context, Cg shaders are unavailable. Applies to shader list too.
|
||||
- SHADERS: Hide cg/glsl shaders from being able to be selected if D3D8/9/10/11/Vulkan video drivers are selected.
|
||||
- SHADERS: Hide slang shaders from being able to be selected if D3D8/9/OpenGL video drivers are selected.
|
||||
- SHADERS: Prevent crashes from occurring if we have the GL video driver in use and we try to skip to a slang shader through next/previous hotkeys
|
||||
- SHADERS: Fix shader parameter increase / decrease functions
|
||||
- SUBSYSTEM: handle savestates properly (cart1 + cart2.state0)
|
||||
- VULKAN/X11: Fix X11 Vulkan bug from Wayland driver.
|
||||
- VULKAN: Fix multi-line text spacing in menus with Vulkan driver.
|
||||
- WINDOWS XP: Add Cheevos support.
|
||||
- WINDOWS/MSVC 2003/2005/2010/2013/2015/2017: Add Cheevos support.
|
||||
- VITA: Bugfix for 'PS Vita takes many time to start to accept input' issue.
|
||||
- X11: Allow compositor disabling on X11 fullscreen through _NET_WM_BYPASS_COMPOSITOR
|
||||
- X11: Prioritize _NET_WM_STATE_FULLSCREEN_ in true fullscreen mode
|
||||
- WIIU: Fix OOB read/write in keyboard driver.
|
||||
|
||||
# 1.7.1
|
||||
- 3DS: Now correctly reports amount of CPU cores.
|
||||
@@ -38,9 +100,8 @@
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- NETPLAY: Add menu option to select different MITM (relay) server locations.
|
||||
- OSX: Modify HID buttons detection algorithm.
|
||||
- QB: Added --datarootdir.
|
||||
- QB: Added --bindir and --mandir and deprecated --with-bin_dir and --with-man_dir.
|
||||
- QB: Added --docdir.
|
||||
- QB: Added --datarootdir, --sysconfdir, --bindir, --docdir and --mandir.
|
||||
- QB: Deprecated --global-config-dir, --with-bin_dir and --with-man_dir.
|
||||
- SHADERS: Allow saving of shader presets based on the parent directory (Saving one for */foo/bar/mario.sfc* would result in *shaders/presets/corename/bar.ext*). We decided it's safer to still isolate the presets to a single core because different cores may treat video output differently.
|
||||
- SHADERS: Don't save the path to the current preset to the main config. This was causing weird behavior, instead it will try to load *currentconfig.ext* and it will save a preset with that name when select *apply shader preset*. The resulting shader will restore properly after restarting and even after core/parent/game specific presets are loaded
|
||||
- SOLARIS: Initial port.
|
||||
@@ -279,7 +340,7 @@ Skipped this one.
|
||||
- MISC: Various frontend optimizations.
|
||||
- NET: Fix bug #4703 (https://github.com/libretro/RetroArch/issues/4703)
|
||||
- OSX/MACOS: Fixes serious memory leak
|
||||
- THUMBNAILS: Thumbnails show up now in Load Content -> Collection, Information -> Database
|
||||
- THUMBNAILS: Thumbnails show up now in Load Content -> Collection, Information -> Database
|
||||
- VIDEO: Fix threaded video regression; tickering of menu entries would no longer work.
|
||||
- VITA: Fix 30fps menu (poke into input now instead of reading the entire input buffer which apparently is slow)
|
||||
- VITA: Fix frame throttle
|
||||
|
||||
@@ -46,7 +46,7 @@ endif
|
||||
include Makefile.common
|
||||
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang"),1)
|
||||
DEFINES += -Wno-invalid-source-encoding
|
||||
DEFINES += -Wno-invalid-source-encoding -Wno-incompatible-ms-struct
|
||||
endif
|
||||
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep -c "tcc"),1)
|
||||
@@ -133,7 +133,7 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
ifneq ($(X86),)
|
||||
CFLAGS += -m32
|
||||
CXXLAGS += -m32
|
||||
CXXFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
endif
|
||||
|
||||
|
||||
+61
-37
@@ -199,11 +199,13 @@ OBJ += frontend/frontend.o \
|
||||
audio/audio_driver.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \
|
||||
input/input_driver.o \
|
||||
input/input_mapper.o \
|
||||
led/led_driver.o \
|
||||
led/drivers/led_null.o \
|
||||
gfx/video_coord_array.o \
|
||||
gfx/video_display_server.o \
|
||||
gfx/video_driver.o \
|
||||
gfx/video_crt_switch.o \
|
||||
camera/camera_driver.o \
|
||||
wifi/wifi_driver.o \
|
||||
location/location_driver.o \
|
||||
@@ -258,7 +260,18 @@ OBJ += frontend/frontend.o \
|
||||
record/drivers/record_null.o \
|
||||
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
|
||||
performance_counters.o \
|
||||
verbosity.o
|
||||
verbosity.o \
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
OBJ += runahead/copy_load_info.o \
|
||||
runahead/dirty_input.o \
|
||||
runahead/mem_util.o \
|
||||
runahead/mylist.o \
|
||||
runahead/run_ahead.o \
|
||||
runahead/secondary_core.o
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ifeq ($(HAVE_CC_RESAMPLER), 1)
|
||||
@@ -767,7 +780,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/widgets/menu_input_dialog.o \
|
||||
menu/widgets/menu_input_bind_dialog.o \
|
||||
menu/widgets/menu_entry.o \
|
||||
menu/widgets/menu_list.o \
|
||||
menu/widgets/menu_osk.o \
|
||||
menu/menu_cbs.o \
|
||||
menu/cbs/menu_cbs_ok.o \
|
||||
@@ -1023,9 +1035,6 @@ ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
LIBS += -ldrm
|
||||
endif
|
||||
|
||||
OBJ += \
|
||||
gfx/drivers_renderchain/null_renderchain.o
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
@@ -1249,18 +1258,23 @@ endif
|
||||
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o \
|
||||
gfx/drivers_shader/shader_hlsl.o
|
||||
gfx/drivers_shader/shader_hlsl.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D10), 1)
|
||||
OBJ += gfx/drivers/d3d10.o gfx/common/d3d10_common.o
|
||||
OBJ += gfx/drivers/d3d10.o \
|
||||
gfx/common/d3d10_common.o \
|
||||
gfx/drivers_font/d3d10_font.o \
|
||||
menu/drivers_display/menu_display_d3d10.o
|
||||
DEFINES += -DHAVE_D3D10
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D11), 1)
|
||||
OBJ += gfx/drivers/d3d11.o gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o menu/drivers_display/menu_display_d3d11.o
|
||||
OBJ += gfx/drivers/d3d11.o \
|
||||
gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o \
|
||||
menu/drivers_display/menu_display_d3d11.o
|
||||
DEFINES += -DHAVE_D3D11
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
@@ -1268,8 +1282,10 @@ ifeq ($(HAVE_D3D11), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D12), 1)
|
||||
OBJ += gfx/drivers/d3d12.o gfx/common/d3d12_common.o \
|
||||
gfx/drivers_font/d3d12_font.o menu/drivers_display/menu_display_d3d12.o
|
||||
OBJ += gfx/drivers/d3d12.o \
|
||||
gfx/common/d3d12_common.o \
|
||||
gfx/drivers_font/d3d12_font.o \
|
||||
menu/drivers_display/menu_display_d3d12.o
|
||||
DEFINES += -DHAVE_D3D12
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
@@ -1278,8 +1294,8 @@ endif
|
||||
|
||||
ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),)
|
||||
INCLUDE_DIRS += -isystemgfx/include/dxsdk
|
||||
OBJ += gfx/common/d3dcompiler_common.o
|
||||
OBJ += gfx/common/dxgi_common.o
|
||||
OBJ += gfx/common/d3dcompiler_common.o \
|
||||
gfx/common/dxgi_common.o
|
||||
CFLAGS += -Wno-unknown-pragmas
|
||||
endif
|
||||
|
||||
@@ -1301,23 +1317,27 @@ endif
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
DEFINES += -DHAVE_D3D8
|
||||
OBJ += gfx/drivers/d3d9.o
|
||||
OBJ += gfx/drivers/d3d8.o
|
||||
OBJ += gfx/common/d3d8_common.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d8.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
DEFINES += -DHAVE_D3D9
|
||||
OBJ += gfx/drivers/d3d9.o
|
||||
OBJ += gfx/common/d3d9_common.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d9.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D_COMMON), 1)
|
||||
DEFINES += -DHAVE_D3D
|
||||
OBJ += \
|
||||
gfx/common/d3d_common.o \
|
||||
gfx/drivers_context/d3d_ctx.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d.o
|
||||
endif
|
||||
OBJ += gfx/common/d3d_common.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SLANG),1)
|
||||
@@ -1453,7 +1473,7 @@ ifeq ($(HAVE_ZLIB), 1)
|
||||
ifeq ($(HAVE_BUILTINZLIB), 1)
|
||||
OBJ += $(DEPS_DIR)/libz/adler32.o \
|
||||
$(DEPS_DIR)/libz/compress.o \
|
||||
$(DEPS_DIR)/libz/crc32.o \
|
||||
$(DEPS_DIR)/libz/libz-crc32.o \
|
||||
$(DEPS_DIR)/libz/deflate.o \
|
||||
$(DEPS_DIR)/libz/gzclose.o \
|
||||
$(DEPS_DIR)/libz/gzlib.o \
|
||||
@@ -1472,19 +1492,27 @@ ifeq ($(HAVE_ZLIB), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FLAC), 1)
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
||||
ifeq ($(HAVE_CHD), 1)
|
||||
CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/bitstream.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/cdrom.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/chd.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/flac.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/huffman.o \
|
||||
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_bitstream.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_cdrom.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_chd.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_huffman.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FLAC), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac_codec.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_lzma.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
@@ -1586,10 +1614,6 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KEYMAPPER), 1)
|
||||
OBJ += input/input_mapper.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
|
||||
OBJ += input/input_remote.o \
|
||||
cores/libretro-net-retropad/net_retropad_core.o
|
||||
|
||||
@@ -11,6 +11,13 @@ PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
UNAME_ARCH = $(shell uname -m)
|
||||
|
||||
ifeq ($(UNAME_ARCH),x86_64)
|
||||
@@ -171,6 +178,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -654,6 +662,95 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
CC = cl.exe
|
||||
CXX = cl.exe
|
||||
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
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
|
||||
|
||||
ifneq (,$(findstring x64,$(PlatformSuffix)))
|
||||
ifeq ($(HOST_ARCH),x86)
|
||||
# cross-compile for x64 from x86 host
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/bin/x86_amd64"):$(PATH)
|
||||
else
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/bin/amd64"):$(PATH)
|
||||
endif
|
||||
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS140COMNTOOLS)../../VC/lib/amd64")
|
||||
WinArch = x64
|
||||
PlatLib = um\x64
|
||||
VCLib = amd64
|
||||
else ifneq (,$(findstring arm,$(PlatformSuffix)))
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/bin/x86_arm"):$(PATH)
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS140COMNTOOLS)../../VC/lib/arm")
|
||||
HAVE_DIRECTX = 0
|
||||
WinArch = arm
|
||||
PlatLib = um\arm
|
||||
VCLib = arm
|
||||
else
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS140COMNTOOLS)../../VC/lib")
|
||||
WinArch = x86
|
||||
PlatLib = um\x86
|
||||
VCLib =
|
||||
endif
|
||||
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS140COMNTOOLS)../../VC/include")
|
||||
|
||||
reg_query = $(call filter_out2,$(subst $2,,$(shell reg query "$2" -v "$1" 2>nul)))
|
||||
fix_path = $(subst $(SPACE),\ ,$(subst \,/,$1))
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir := $(WindowsSdkDir)
|
||||
|
||||
WindowsSDKVersion ?= $(firstword $(foreach folder,$(subst $(subst \,/,$(WindowsSdkDir)Include/),,$(wildcard $(call fix_path,$(WindowsSdkDir)Include\*))),$(if $(wildcard $(call fix_path,$(WindowsSdkDir)Include/$(folder)/um/Windows.h)),$(folder),)))$(BACKSLASH)
|
||||
WindowsSDKVersion := $(WindowsSDKVersion)
|
||||
|
||||
export INCLUDE := $(INCLUDE);$(VCINSTALLDIR)INCLUDE;$(VCINSTALLDIR)ATLMFC\INCLUDE;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um
|
||||
export LIB := $(LIB);$(VCINSTALLDIR)LIB$(VCLib);$(VCINSTALLDIR)ATLMFC\LIB$(VCLib);$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\$(WinArch);$(WindowsSdkDir)lib\$(WindowsSDKVersion)$(PlatLib)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
@@ -744,6 +841,10 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
CFLAGS += -DHAVE_IMAGEVIEWER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
CFLAGS += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
CFLAGS += -DHAVE_7ZIP
|
||||
endif
|
||||
|
||||
@@ -53,7 +53,6 @@ HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_KEYMAPPER := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
|
||||
|
||||
+4
-5
@@ -4,7 +4,7 @@ include version.all
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
CELL_PSGL_VERSION = opt
|
||||
|
||||
ASSETS_DIR := media/assets
|
||||
|
||||
@@ -63,7 +63,7 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
@@ -96,8 +96,7 @@ ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
ifneq($(system_platform), win)
|
||||
else ifneq ($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
@@ -120,7 +119,7 @@ DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LA
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
PPU_OPTIMIZE_LV := -O2 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@ include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
|
||||
@@ -94,8 +94,7 @@ ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
ifneq($(system_platform), win)
|
||||
else ifneq($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
|
||||
+5
-1
@@ -6,6 +6,7 @@ DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_HID = 0
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
@@ -88,6 +89,10 @@ else
|
||||
DEFINES += -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_SHADERPIPELINE
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD),1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
@@ -120,7 +125,6 @@ else
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_KEYMAPPER = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# RetroArch
|
||||
|
||||
RetroArch is the reference frontend for the libretro API.
|
||||
Popular examples of implementations for this API includes videogame system emulators and game engines, but also
|
||||
Popular examples of implementations for this API includes videogame system emulators and game engines as well as
|
||||
more generalized 3D programs.
|
||||
These programs are instantiated as dynamic libraries. We refer to these as "libretro cores".
|
||||
|
||||
@@ -18,7 +18,7 @@ These programs are instantiated as dynamic libraries. We refer to these as "libr
|
||||
|
||||
[libretro](http://libretro.com) is an API that exposes generic audio/video/input callbacks.
|
||||
A frontend for libretro (such as RetroArch) handles video output, audio output, input and application lifecycle.
|
||||
A libretro core written in portable C or C++ can run seamlessly on many platforms with very little/no porting effort.
|
||||
A libretro core written in portable C or C++ can run seamlessly on many platforms with very little to no porting effort.
|
||||
|
||||
While RetroArch is the reference frontend for libretro, several other projects have used the libretro
|
||||
interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use.
|
||||
@@ -49,7 +49,7 @@ More developer-centric stuff is found [here](https://github.com/libretro/libretr
|
||||
|
||||
## Philosophy
|
||||
|
||||
RetroArch attempts to be small and lean,
|
||||
RetroArch attempts to be small and lean
|
||||
while still having all the useful core features expected from an emulator.
|
||||
It is designed to be very portable and features a gamepad-centric UI.
|
||||
It also has a full-featured command-line interface.
|
||||
@@ -121,7 +121,7 @@ RetroArch needs at least one of these audio driver libraries:
|
||||
- DirectSound (Win32, Xbox 1)
|
||||
- CoreAudio (OSX, iOS)
|
||||
|
||||
To run properly, RetroArch requires a libretro implementation present, however, as it's typically loaded
|
||||
To run properly, RetroArch requires a libretro implementation present; however, as it's typically loaded
|
||||
dynamically, it's not required at build time.
|
||||
|
||||
## Dependencies (Console ports, mobile)
|
||||
@@ -131,12 +131,12 @@ anything other than what the respective SDKs provide.
|
||||
|
||||
## Configuring
|
||||
|
||||
The default configuration is defined in config.def.h.
|
||||
The default configuration is defined in `config.def.h`.
|
||||
It is not recommended to change this unless you know what you're doing.
|
||||
These can later be tweaked by using a config file.
|
||||
A sample configuration file is installed to /etc/retroarch.cfg. This is the system-wide config file.
|
||||
A sample configuration file is installed to `/etc/retroarch.cfg`. This is the system-wide config file.
|
||||
|
||||
RetroArch will on startup create a config file in $XDG\_CONFIG\_HOME/retroarch/retroarch.cfg if doesn't exist.
|
||||
RetroArch will on startup create a config file in `$XDG\_CONFIG\_HOME/retroarch/retroarch.cfg` if it does not exist.
|
||||
Users only need to configure a certain option if the desired value deviates from the value defined in config.def.h.
|
||||
|
||||
To configure joypads, use the built-in menu or the `retroarch-joyconfig` command-line tool.
|
||||
@@ -144,3 +144,115 @@ To configure joypads, use the built-in menu or the `retroarch-joyconfig` command
|
||||
## Compiling and installing
|
||||
|
||||
Instructions for compiling and installing RetroArch can be found in the [Libretro/RetroArch Documentation Center](https://docs.libretro.com/).
|
||||
|
||||
## CRT 15Khz Resolution Switching
|
||||
|
||||
CRT Switch res will turn on, on the fly. However, you will need to restart retroarch to disable it. With CRT SwitchRes enable Retroarch will start in 2560 x 480 @ 60.
|
||||
|
||||
If you are running windows, before enabling the CRT SwitchRes options pleasae make sure you have installed CRTEmudriver and installed some modelines. The minimum modelins for all games to switch correctly are:
|
||||
|
||||
- 2560 x 192 @ 60.000000
|
||||
- 2560 x 200 @ 60.000000
|
||||
- 2560 x 240 @ 60.000000
|
||||
- 2560 x 224 @ 60.000000
|
||||
- 2560 x 237 @ 60.000000
|
||||
- 2560 x 256 @ 50.000000
|
||||
- 2560 x 254 @ 55.000000
|
||||
- 2560 x 448 @ 60.000000
|
||||
- 2560 x 480 @ 60.000000
|
||||
|
||||
Install these modelines replacing 2560 with your desired super resuloution. The above resolutions are NTSC only so if you would be playing any PAL content please add pal modelines:
|
||||
|
||||
- 2560 x 192 @ 50.000000
|
||||
- 2560 x 200 @ 50.000000
|
||||
- 2560 x 240 @ 50.000000
|
||||
- 2560 x 224 @ 50.000000
|
||||
- 2560 x 288 @ 50.000000
|
||||
- 2560 x 237 @ 50.000000
|
||||
- 2560 x 254 @ 55.000000
|
||||
- 2560 x 448 @ 50.000000
|
||||
- 2560 x 480 @ 50.000000
|
||||
|
||||
Some games will require heigher PAL resolutions which should also be installed:
|
||||
|
||||
- 2560 x 512 @ 50.000000
|
||||
- 2560 x 576 @ 50.000000
|
||||
|
||||
Ideally install all these modelines and everything will work great.
|
||||
|
||||
## Super Resolutions
|
||||
|
||||
The default super resolution is 2560. It is displayed just under the CRT switch option, which can be found in video settings. This can be changed within the retroarch.cfg. The only compatible resolutions are 1920, 2560 and 3840. Any other resolutions will be ignored and native swithing will be activated.
|
||||
|
||||
## Native Resolutions
|
||||
|
||||
If native reolutions are activeted you will need a whole new set of modelines:
|
||||
|
||||
- 512 x 240 @ 50.006977 SNESpal
|
||||
- 512 x 224 @ 50.006977 SNESpal
|
||||
- 512 x 448 @ 50.006977 SNESpal
|
||||
- 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
|
||||
- 256 x 192 @ 49.701458 MDpal
|
||||
- 320 x 224 @ 49.701458 MDpal
|
||||
- 320 x 240 @ 49.701458 MDpal
|
||||
- 320 x 448 @ 49.701458 MDpal
|
||||
- 320 x 480 @ 49.701458 MDpal
|
||||
- 256 x 224 @ 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 @ 50.000000 N64pal
|
||||
- 640 x 576 @ 50.000000 n64pal
|
||||
- 640 x 288 @ 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
|
||||
- 640 x 252 @ 49.759998 PSXpal
|
||||
|
||||
- 384 x 240 @ 59.941002 PSXntsc
|
||||
- 256 x 480 @ 59.941002 PSXntsc
|
||||
|
||||
- 352 x 240 @ 59.820000 Saturn/SGFX_NTSCp
|
||||
- 704 x 240 @ 59.820000 SaturnNTSCp
|
||||
- 352 x 480 @ 59.820000 SaturnNTSCi
|
||||
- 704 x 480 @ 59.820000 SaturnNTSCi
|
||||
- 352 x 288 @ 49.701458 SaturnPALp
|
||||
- 704 x 288 @ 49.701458 SaturnPALp
|
||||
- 352 x 576 @ 49.701458 SaturnPALi
|
||||
- 704 x 576 @ 49.701458 SaturnPALi
|
||||
|
||||
- 240 x 160 @ 59.730000 GBA
|
||||
- 320 x 200 @ 60.000000 Doom
|
||||
|
||||
// Arcade
|
||||
|
||||
- 400 x 254 @ 54.706841 MK
|
||||
- 384 x 224 @ 59.637405 CPS1
|
||||
|
||||
These modelines are more acurate giving exact hz. However, some games may have unwanted results. This is due to mid-scanline resolution chages on the orgiginal hardware. For the best results super resolutions are the way to go.
|
||||
|
||||
## CRT resolution switching & Mame
|
||||
|
||||
Some arecade resolutions can be alot different. There is resolution detection to ensure mame games will be diplayed in the closest available resolution but drawn at their native resolution within this resolution. Meaning that the mame game will look just like the original hardware.
|
||||
|
||||
Mame roms that run in a vertical aspect like DoDonPachi need to be roted within mame before rolution swithing and aspect correction will work. Do this before enableing CRT switchRes so that Retroarch will run in your desktop resolution. Once you have roted any games that may need it switch CRT SwitchRes on.
|
||||
+75
-35
@@ -146,10 +146,8 @@ static size_t audio_driver_rewind_size = 0;
|
||||
static int16_t *audio_driver_rewind_buf = NULL;
|
||||
static int16_t *audio_driver_output_samples_conv_buf = NULL;
|
||||
|
||||
#ifdef DEBUG
|
||||
static unsigned audio_driver_free_samples_buf[AUDIO_BUFFER_FREE_SAMPLES_COUNT];
|
||||
static uint64_t audio_driver_free_samples_count = 0;
|
||||
#endif
|
||||
|
||||
static size_t audio_driver_buffer_size = 0;
|
||||
static size_t audio_driver_data_ptr = 0;
|
||||
@@ -183,6 +181,8 @@ static void *audio_driver_resampler_data = NULL;
|
||||
static const audio_driver_t *current_audio = NULL;
|
||||
static void *audio_driver_context_audio_data = NULL;
|
||||
|
||||
static bool audio_suspended = false;
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@@ -193,18 +193,15 @@ enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
return (enum resampler_quality)settings->uints.audio_resampler_quality;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* compute_audio_buffer_statistics:
|
||||
*
|
||||
* Computes audio buffer statistics.
|
||||
*
|
||||
**/
|
||||
static void compute_audio_buffer_statistics(void)
|
||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
||||
{
|
||||
unsigned i, low_water_size, high_water_size, avg, stddev;
|
||||
float avg_filled = 0.0f;
|
||||
float deviation = 0.0f;
|
||||
uint64_t accum = 0;
|
||||
uint64_t accum_var = 0;
|
||||
unsigned low_water_count = 0;
|
||||
@@ -213,9 +210,21 @@ static void compute_audio_buffer_statistics(void)
|
||||
(unsigned)audio_driver_free_samples_count,
|
||||
AUDIO_BUFFER_FREE_SAMPLES_COUNT);
|
||||
|
||||
if (samples < 3)
|
||||
return;
|
||||
if (!stats || samples < 3)
|
||||
return false;
|
||||
|
||||
stats->samples = (unsigned)audio_driver_free_samples_count;
|
||||
|
||||
#ifdef WARPUP
|
||||
/* uint64 to double not implemented, fair chance
|
||||
* signed int64 to double doesn't exist either */
|
||||
/* https://forums.libretro.com/t/unsupported-platform-help/13903/ */
|
||||
(void)stddev;
|
||||
#elif defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
/* FIXME: error C2520: conversion from unsigned __int64
|
||||
* to double not implemented, use signed __int64 */
|
||||
(void)stddev;
|
||||
#else
|
||||
for (i = 1; i < samples; i++)
|
||||
accum += audio_driver_free_samples_buf[i];
|
||||
|
||||
@@ -223,24 +232,17 @@ static void compute_audio_buffer_statistics(void)
|
||||
|
||||
for (i = 1; i < samples; i++)
|
||||
{
|
||||
int diff = avg - audio_driver_free_samples_buf[i];
|
||||
accum_var += diff * diff;
|
||||
int diff = avg - audio_driver_free_samples_buf[i];
|
||||
accum_var += diff * diff;
|
||||
}
|
||||
|
||||
#ifdef WARPUP
|
||||
/* uint64 to double not implemented, fair chance signed int64 to double doesn't exist either */
|
||||
/* https://forums.libretro.com/t/unsupported-platform-help/13903/ */
|
||||
(void)stddev; (void)avg_filled; (void)deviation;
|
||||
#elif defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
/* FIXME: error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64 */
|
||||
(void)stddev; (void)avg_filled; (void)deviation;
|
||||
#else
|
||||
stddev = (unsigned)sqrt((double)accum_var / (samples - 2));
|
||||
avg_filled = 1.0f - (float)avg / audio_driver_buffer_size;
|
||||
deviation = (float)stddev / audio_driver_buffer_size;
|
||||
stddev = (unsigned)
|
||||
sqrt((double)accum_var / (samples - 2));
|
||||
|
||||
RARCH_LOG("[Audio]: Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n",
|
||||
avg_filled * 100.0, deviation * 100.0);
|
||||
stats->average_buffer_saturation = (1.0f - (float)avg
|
||||
/ audio_driver_buffer_size) * 100.0;
|
||||
stats->std_deviation_percentage = ((float)stddev
|
||||
/ audio_driver_buffer_size) * 100.0;
|
||||
#endif
|
||||
|
||||
low_water_size = (unsigned)(audio_driver_buffer_size * 3 / 4);
|
||||
@@ -254,11 +256,29 @@ static void compute_audio_buffer_statistics(void)
|
||||
high_water_count++;
|
||||
}
|
||||
|
||||
RARCH_LOG("[Audio]: Amount of time spent close to underrun: %.2f %%. Close to blocking: %.2f %%.\n",
|
||||
(100.0 * low_water_count) / (samples - 1),
|
||||
(100.0 * high_water_count) / (samples - 1));
|
||||
stats->close_to_underrun = (100.0 * low_water_count) / (samples - 1);
|
||||
stats->close_to_blocking = (100.0 * high_water_count) / (samples - 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void report_audio_buffer_statistics(void)
|
||||
{
|
||||
audio_statistics_t audio_stats = {0.0f};
|
||||
if (!compute_audio_buffer_statistics(&audio_stats))
|
||||
return;
|
||||
|
||||
#ifdef DEBUG
|
||||
RARCH_LOG("[Audio]: Average audio buffer saturation: %.2f %%,"
|
||||
" standard deviation (percentage points): %.2f %%.\n"
|
||||
"[Audio]: Amount of time spent close to underrun: %.2f %%."
|
||||
" Close to blocking: %.2f %%.\n",
|
||||
audio_stats.average_buffer_saturation,
|
||||
audio_stats.std_deviation_percentage,
|
||||
audio_stats.close_to_underrun,
|
||||
audio_stats.close_to_blocking);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* audio_driver_find_handle:
|
||||
@@ -343,9 +363,7 @@ static bool audio_driver_deinit_internal(void)
|
||||
|
||||
command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
compute_audio_buffer_statistics();
|
||||
#endif
|
||||
report_audio_buffer_statistics();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -514,9 +532,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
|
||||
command_event(CMD_EVENT_DSP_FILTER_INIT, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
audio_driver_free_samples_count = 0;
|
||||
#endif
|
||||
|
||||
audio_mixer_init(settings->uints.audio_out_rate);
|
||||
|
||||
@@ -581,8 +597,8 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
|
||||
&is_perfcnt_enable);
|
||||
|
||||
if ( is_paused ||
|
||||
!audio_driver_active ||
|
||||
if ( is_paused ||
|
||||
!audio_driver_active ||
|
||||
!audio_driver_input_data ||
|
||||
!audio_driver_output_samples_buf)
|
||||
return;
|
||||
@@ -626,13 +642,11 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
int delta_mid = avail - half_size;
|
||||
double direction = (double)delta_mid / half_size;
|
||||
double adjust = 1.0 + audio_driver_rate_control_delta * direction;
|
||||
#ifdef DEBUG
|
||||
unsigned write_idx = audio_driver_free_samples_count++ &
|
||||
(AUDIO_BUFFER_FREE_SAMPLES_COUNT - 1);
|
||||
|
||||
audio_driver_free_samples_buf
|
||||
[write_idx] = avail;
|
||||
#endif
|
||||
audio_source_ratio_current =
|
||||
audio_source_ratio_original * adjust;
|
||||
|
||||
@@ -696,6 +710,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
**/
|
||||
void audio_driver_sample(int16_t left, int16_t right)
|
||||
{
|
||||
if (audio_suspended)
|
||||
return;
|
||||
|
||||
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = left;
|
||||
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = right;
|
||||
|
||||
@@ -723,6 +740,9 @@ size_t audio_driver_sample_batch(const int16_t *data, size_t frames)
|
||||
if (frames > (AUDIO_CHUNK_SIZE_NONBLOCKING >> 1))
|
||||
frames = AUDIO_CHUNK_SIZE_NONBLOCKING >> 1;
|
||||
|
||||
if (audio_suspended)
|
||||
return frames;
|
||||
|
||||
audio_driver_flush(data, frames << 1);
|
||||
|
||||
return frames;
|
||||
@@ -1286,11 +1306,31 @@ bool audio_driver_owns_driver(void)
|
||||
return audio_driver_data_own;
|
||||
}
|
||||
|
||||
void audio_driver_suspend(void)
|
||||
{
|
||||
audio_suspended = true;
|
||||
}
|
||||
|
||||
bool audio_driver_is_suspended(void)
|
||||
{
|
||||
return audio_suspended;
|
||||
}
|
||||
|
||||
void audio_driver_resume(void)
|
||||
{
|
||||
audio_suspended = false;
|
||||
}
|
||||
|
||||
void audio_driver_set_active(void)
|
||||
{
|
||||
audio_driver_active = true;
|
||||
}
|
||||
|
||||
bool audio_driver_is_active(void)
|
||||
{
|
||||
return audio_driver_active;
|
||||
}
|
||||
|
||||
void audio_driver_destroy(void)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
|
||||
@@ -46,6 +46,15 @@ enum audio_action
|
||||
AUDIO_ACTION_MIXER
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
/* Creates and initializes handle to audio driver.
|
||||
@@ -152,8 +161,16 @@ void audio_driver_set_own_driver(void);
|
||||
|
||||
void audio_driver_unset_own_driver(void);
|
||||
|
||||
void audio_driver_suspend(void);
|
||||
|
||||
bool audio_driver_is_suspended(void);
|
||||
|
||||
void audio_driver_resume(void);
|
||||
|
||||
void audio_driver_set_active(void);
|
||||
|
||||
bool audio_driver_is_active(void);
|
||||
|
||||
void audio_driver_destroy(void);
|
||||
|
||||
void audio_driver_deinit_resampler(void);
|
||||
@@ -258,6 +275,8 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void);
|
||||
|
||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
|
||||
@@ -83,12 +83,13 @@ static void *gx_audio_init(const char *device,
|
||||
AIInit(NULL);
|
||||
AIRegisterDMACallback(dma_callback);
|
||||
|
||||
if (rate < 33000)
|
||||
//ranges 0-32000 (default low) and 40000-47999 (in settings going down from 48000) -> set to 32000 hz
|
||||
if (rate <= 32000 || (rate >= 40000 && rate < 48000))
|
||||
{
|
||||
AISetDSPSampleRate(AI_SAMPLERATE_32KHZ);
|
||||
*new_rate = 32000;
|
||||
}
|
||||
else
|
||||
else //ranges 32001-39999 (in settings going up from 32000) and 48000-max (default high) -> set to 48000 hz
|
||||
{
|
||||
AISetDSPSampleRate(AI_SAMPLERATE_48KHZ);
|
||||
*new_rate = 48000;
|
||||
|
||||
@@ -133,6 +133,9 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
sl->buf_count = (latency * 4 * rate + 500) / 1000;
|
||||
sl->buf_count = (sl->buf_count + sl->buf_size / 2) / sl->buf_size;
|
||||
|
||||
if (sl->buf_count < 2)
|
||||
sl->buf_count = 2;
|
||||
|
||||
sl->buffer = (uint8_t**)calloc(sizeof(uint8_t*), sl->buf_count);
|
||||
if (!sl->buffer)
|
||||
goto error;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include<libtransistor/nx.h>
|
||||
#include<libtransistor/alloc_pages.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
@@ -27,12 +28,6 @@ static const int max_num_samples = sample_rate;
|
||||
static const int num_channels = 2;
|
||||
static const size_t sample_buffer_size = ((max_num_samples * num_channels * sizeof(uint16_t)) + 0xfff) & ~0xfff;
|
||||
|
||||
/* don't think this can be in mapped memory, since samples get DMA'd out of it */
|
||||
static uint16_t __attribute__((aligned(0x1000))) sample_buffer_1[sample_buffer_size/sizeof(uint16_t)];
|
||||
static uint16_t __attribute__((aligned(0x1000))) sample_buffer_2[sample_buffer_size/sizeof(uint16_t)];
|
||||
static uint16_t __attribute__((aligned(0x1000))) sample_buffer_3[sample_buffer_size/sizeof(uint16_t)];
|
||||
static uint16_t *sample_buffers[3] = {sample_buffer_1, sample_buffer_2, sample_buffer_3};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
audio_output_t output;
|
||||
@@ -254,11 +249,14 @@ static void *switch_audio_init(const char *device,
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].sample_data = sample_buffers[i];
|
||||
swa->buffers[i].sample_data = alloc_pages(sample_buffer_size, sample_buffer_size, NULL);
|
||||
swa->buffers[i].buffer_size = sample_buffer_size;
|
||||
swa->buffers[i].data_size = sample_buffer_size;
|
||||
swa->buffers[i].unknown = 0;
|
||||
|
||||
if(swa->buffers[i].sample_data == NULL)
|
||||
goto fail_audio_output;
|
||||
|
||||
if (audio_ipc_output_append_buffer(&swa->output, &swa->buffers[i]) != RESULT_OK)
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
+142
-51
@@ -48,6 +48,7 @@
|
||||
#include "cond.h"
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../paths.h"
|
||||
#include "../command.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../configuration.h"
|
||||
@@ -106,6 +107,8 @@
|
||||
#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
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -1036,7 +1039,7 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
|
||||
|
||||
for (aux = mem;; aux++)
|
||||
{
|
||||
if(*aux == '"' || *aux == ':')
|
||||
if (*aux == '"' || *aux == ':')
|
||||
break;
|
||||
expr->count += *aux == '_';
|
||||
}
|
||||
@@ -1093,13 +1096,13 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(aux[1] == 'h' || aux[1] == 'H')
|
||||
if (aux[1] == 'h' || aux[1] == 'H')
|
||||
expr->terms[i].multiplier = (double)strtol(aux + 2, &end, 16);
|
||||
else
|
||||
expr->terms[i].multiplier = strtod(aux + 1, &end);
|
||||
aux = end;
|
||||
|
||||
if(*aux == '$')
|
||||
if (*aux == '$')
|
||||
{
|
||||
aux++;
|
||||
expr->terms[i].compare_next = true;
|
||||
@@ -1333,12 +1336,10 @@ static int cheevos_new_lboard(cheevos_readud_t *ud)
|
||||
|
||||
if (!ldb || !ud)
|
||||
return -1;
|
||||
|
||||
lboard = ldb + ud->lboard_count++;
|
||||
|
||||
if (!lboard)
|
||||
return -1;
|
||||
|
||||
lboard->id = strtol(ud->id.string, NULL, 10);
|
||||
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
lboard->format = cheevos_parse_format(&ud->format);
|
||||
lboard->title = cheevos_dupstr(&ud->title);
|
||||
lboard->description = cheevos_dupstr(&ud->desc);
|
||||
@@ -1962,6 +1963,23 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||
cheevos_make_unlock_url(cheevo, url, sizeof(url));
|
||||
task_push_http_transfer(url, true, NULL,
|
||||
cheevos_unlocked, cheevo);
|
||||
|
||||
if (settings && settings->bools.cheevos_auto_screenshot)
|
||||
{
|
||||
char shotname[256];
|
||||
|
||||
snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u",
|
||||
settings->paths.directory_screenshot,
|
||||
path_basename(path_get(RARCH_PATH_BASENAME)),
|
||||
cheevo->id);
|
||||
shotname[sizeof(shotname) - 1] = '\0';
|
||||
|
||||
if (take_screenshot(shotname, true,
|
||||
video_driver_cached_frame_has_valid_framebuffer()))
|
||||
RARCH_LOG("[CHEEVOS]: got a screenshot for cheevo %u\n", cheevo->id);
|
||||
else
|
||||
RARCH_LOG("[CHEEVOS]: failed to get screenshot for cheevo %u\n", cheevo->id);
|
||||
}
|
||||
}
|
||||
|
||||
cheevo->last = valid;
|
||||
@@ -2822,21 +2840,22 @@ typedef struct
|
||||
enum
|
||||
{
|
||||
/* Negative values because CORO_SUB generates positive values */
|
||||
SNES_MD5 = -1,
|
||||
GENESIS_MD5 = -2,
|
||||
LYNX_MD5 = -3,
|
||||
NES_MD5 = -4,
|
||||
GENERIC_MD5 = -5,
|
||||
EVAL_MD5 = -6,
|
||||
FILL_MD5 = -7,
|
||||
GET_GAMEID = -8,
|
||||
GET_CHEEVOS = -9,
|
||||
GET_BADGES = -10,
|
||||
LOGIN = -11,
|
||||
HTTP_GET = -12,
|
||||
DEACTIVATE = -13,
|
||||
PLAYING = -14,
|
||||
DELAY = -15
|
||||
SNES_MD5 = -1,
|
||||
GENESIS_MD5 = -2,
|
||||
LYNX_MD5 = -3,
|
||||
NES_MD5 = -4,
|
||||
GENERIC_MD5 = -5,
|
||||
FILENAME_MD5 = -6,
|
||||
EVAL_MD5 = -7,
|
||||
FILL_MD5 = -8,
|
||||
GET_GAMEID = -9,
|
||||
GET_CHEEVOS = -10,
|
||||
GET_BADGES = -11,
|
||||
LOGIN = -12,
|
||||
HTTP_GET = -13,
|
||||
DEACTIVATE = -14,
|
||||
PLAYING = -15,
|
||||
DELAY = -16
|
||||
};
|
||||
|
||||
static int cheevos_iterate(coro_t *coro)
|
||||
@@ -2886,7 +2905,8 @@ static int cheevos_iterate(coro_t *coro)
|
||||
{GENESIS_MD5, "Genesis (6Mb padding)", genesis_exts},
|
||||
{LYNX_MD5, "Atari Lynx (only first 512 bytes)", lynx_exts},
|
||||
{NES_MD5, "NES (discards VROM)", NULL},
|
||||
{GENERIC_MD5, "Generic (plain content)", NULL}
|
||||
{GENERIC_MD5, "Generic (plain content)", NULL},
|
||||
{FILENAME_MD5, "Generic (filename)", NULL}
|
||||
};
|
||||
|
||||
CORO_ENTER();
|
||||
@@ -3146,7 +3166,7 @@ found:
|
||||
mode = CHEEVOS_ACTIVE_HARDCORE;
|
||||
|
||||
for (; cheevo < end; cheevo++)
|
||||
if(cheevo->active & mode)
|
||||
if (cheevo->active & mode)
|
||||
number_of_unlocked--;
|
||||
|
||||
snprintf(msg, sizeof(msg),
|
||||
@@ -3332,6 +3352,25 @@ found:
|
||||
|
||||
CORO_GOTO(GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a game based on its filename (with no extension)
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(FILENAME_MD5)
|
||||
if (!string_is_empty(coro->path))
|
||||
{
|
||||
char base_noext[PATH_MAX_LENGTH];
|
||||
fill_pathname_base_noext(base_noext, coro->path, sizeof(base_noext));
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
MD5_Update(&coro->md5, (void*)base_noext, strlen(base_noext));
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
|
||||
CORO_GOTO(GET_GAMEID);
|
||||
}
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Evaluates the CHEEVOS_VAR_MD5 hash
|
||||
* Inputs CHEEVOS_VAR_INFO, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
|
||||
@@ -3429,7 +3468,7 @@ found:
|
||||
if ((void*)coro->json)
|
||||
free((void*)coro->json);
|
||||
RARCH_LOG("[CHEEVOS]: got game id %s.\n", gameid);
|
||||
coro->gameid = strtol(gameid, NULL, 10);
|
||||
coro->gameid = (unsigned)strtol(gameid, NULL, 10);
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
@@ -3550,29 +3589,46 @@ found:
|
||||
|
||||
{
|
||||
char urle_user[64];
|
||||
char urle_pwd[64];
|
||||
char urle_login[64];
|
||||
const char *username = coro ? coro->settings->arrays.cheevos_username : NULL;
|
||||
const char *password = coro ? coro->settings->arrays.cheevos_password : NULL;
|
||||
const char *login;
|
||||
bool via_token;
|
||||
|
||||
if (!username || !*username || !password || !*password)
|
||||
if (coro)
|
||||
{
|
||||
if (string_is_empty(coro->settings->arrays.cheevos_password))
|
||||
{
|
||||
via_token = true;
|
||||
login = coro->settings->arrays.cheevos_token;
|
||||
}
|
||||
else
|
||||
{
|
||||
via_token = false;
|
||||
login = coro->settings->arrays.cheevos_password;
|
||||
}
|
||||
}
|
||||
else
|
||||
login = NULL;
|
||||
|
||||
if (string_is_empty(username) || string_is_empty(login))
|
||||
{
|
||||
runloop_msg_queue_push(
|
||||
"Missing Retro Achievements account information.",
|
||||
"Missing RetroAchievements account information.",
|
||||
0, 5 * 60, false);
|
||||
runloop_msg_queue_push(
|
||||
"Please fill in your account information in Settings.",
|
||||
0, 5 * 60, false);
|
||||
RARCH_ERR("[CHEEVOS]: username and/or password not informed.\n");
|
||||
RARCH_ERR("[CHEEVOS]: login info not informed.\n");
|
||||
CORO_STOP();
|
||||
}
|
||||
|
||||
cheevos_url_encode(username, urle_user, sizeof(urle_user));
|
||||
cheevos_url_encode(password, urle_pwd, sizeof(urle_pwd));
|
||||
cheevos_url_encode(login, urle_login, sizeof(urle_login));
|
||||
|
||||
snprintf(
|
||||
coro->url, sizeof(coro->url),
|
||||
"http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s",
|
||||
urle_user, urle_pwd
|
||||
"http://retroachievements.org/dorequest.php?r=login&u=%s&%c=%s",
|
||||
urle_user, via_token ? 't' : 'p', urle_login
|
||||
);
|
||||
|
||||
coro->url[sizeof(coro->url) - 1] = 0;
|
||||
@@ -3587,32 +3643,67 @@ found:
|
||||
|
||||
if (coro->json)
|
||||
{
|
||||
int res = cheevos_get_value(
|
||||
char error_response[64];
|
||||
char error_message[256];
|
||||
|
||||
cheevos_get_value(
|
||||
coro->json,
|
||||
CHEEVOS_JSON_KEY_ERROR,
|
||||
error_response,
|
||||
sizeof(error_response)
|
||||
);
|
||||
|
||||
/* No error, continue with login */
|
||||
if (string_is_empty(error_response))
|
||||
{
|
||||
int res = cheevos_get_value(
|
||||
coro->json,
|
||||
CHEEVOS_JSON_KEY_TOKEN,
|
||||
cheevos_locals.token,
|
||||
sizeof(cheevos_locals.token));
|
||||
|
||||
if ((void*)coro->json)
|
||||
free((void*)coro->json);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
if (coro->settings->bools.cheevos_verbose_enable)
|
||||
{
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg),
|
||||
"RetroAchievements: Logged in as \"%s\".",
|
||||
coro->settings->arrays.cheevos_username);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, false);
|
||||
}
|
||||
|
||||
/* Save token to config and clear pass on success */
|
||||
*coro->settings->arrays.cheevos_password = '\0';
|
||||
strncpy(
|
||||
coro->settings->arrays.cheevos_token,
|
||||
cheevos_locals.token, sizeof(cheevos_locals.token)
|
||||
);
|
||||
CORO_RET();
|
||||
}
|
||||
}
|
||||
|
||||
if ((void*)coro->json)
|
||||
free((void*)coro->json);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
if (coro->settings->bools.cheevos_verbose_enable)
|
||||
{
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg),
|
||||
"RetroAchievements: logged in as \"%s\".",
|
||||
coro->settings->arrays.cheevos_username);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 3 * 60, false);
|
||||
}
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
/* Site returned error, display it */
|
||||
snprintf(error_message, sizeof(error_message),
|
||||
"RetroAchievements: %s",
|
||||
error_response);
|
||||
error_message[sizeof(error_message) - 1] = 0;
|
||||
runloop_msg_queue_push(error_message, 0, 5 * 60, false);
|
||||
*coro->settings->arrays.cheevos_token = '\0';
|
||||
|
||||
CORO_STOP();
|
||||
}
|
||||
|
||||
runloop_msg_queue_push("Retro Achievements login error.", 0, 5 * 60, false);
|
||||
|
||||
runloop_msg_queue_push("RetroAchievements: Error contacting server.", 0, 5 * 60, false);
|
||||
RARCH_ERR("[CHEEVOS]: error getting user token.\n");
|
||||
|
||||
CORO_STOP();
|
||||
|
||||
/**************************************************************************
|
||||
@@ -3694,7 +3785,7 @@ found:
|
||||
coro->json[length] = 0;
|
||||
}
|
||||
|
||||
coro->k = length;
|
||||
coro->k = (unsigned)length;
|
||||
net_http_delete(coro->http);
|
||||
net_http_connection_free(coro->conn);
|
||||
CORO_RET();
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ typedef enum
|
||||
CHEEVOS_CONSOLE_PLAYSTATION = 12,
|
||||
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
|
||||
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
|
||||
CHEEVOS_CONSOLE_XBOX_360 = 15,
|
||||
CHEEVOS_CONSOLE_GAME_GEAR = 15,
|
||||
CHEEVOS_CONSOLE_GAMECUBE = 16,
|
||||
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
|
||||
CHEEVOS_CONSOLE_NINTENDO_DS = 18,
|
||||
|
||||
@@ -191,12 +191,6 @@ void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
|
||||
var->value -= 0x2000;
|
||||
}
|
||||
}
|
||||
else if (console == CHEEVOS_CONSOLE_NEOGEO_POCKET)
|
||||
{
|
||||
if (var->value >= 0x4000 && var->value <= 0x7fff)
|
||||
CHEEVOS_LOG(CHEEVOS_TAG "NGP memory address %X adjusted to %X\n", var->value, var->value - 0x004000);
|
||||
var->value -= 0x4000;
|
||||
}
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
|
||||
@@ -140,6 +140,8 @@ static const struct cmd_action_map action_map[] = {
|
||||
static const struct cmd_map map[] = {
|
||||
{ "FAST_FORWARD", RARCH_FAST_FORWARD_KEY },
|
||||
{ "FAST_FORWARD_HOLD", RARCH_FAST_FORWARD_HOLD_KEY },
|
||||
{ "SLOWMOTION", RARCH_SLOWMOTION_KEY },
|
||||
{ "SLOWMOTION_HOLD", RARCH_SLOWMOTION_HOLD_KEY },
|
||||
{ "LOAD_STATE", RARCH_LOAD_STATE_KEY },
|
||||
{ "SAVE_STATE", RARCH_SAVE_STATE_KEY },
|
||||
{ "FULLSCREEN_TOGGLE", RARCH_FULLSCREEN_TOGGLE_KEY },
|
||||
@@ -160,7 +162,6 @@ static const struct cmd_map map[] = {
|
||||
{ "MUTE", RARCH_MUTE },
|
||||
{ "OSK", RARCH_OSK },
|
||||
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
|
||||
{ "SLOWMOTION", RARCH_SLOWMOTION },
|
||||
{ "VOLUME_UP", RARCH_VOLUME_UP },
|
||||
{ "VOLUME_DOWN", RARCH_VOLUME_DOWN },
|
||||
{ "OVERLAY_NEXT", RARCH_OVERLAY_NEXT },
|
||||
@@ -219,26 +220,13 @@ static bool command_reply(const char * data, size_t len)
|
||||
bool command_set_shader(const char *arg)
|
||||
{
|
||||
char msg[256];
|
||||
enum rarch_shader_type type = RARCH_SHADER_NONE;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
bool is_preset = false;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
enum rarch_shader_type type = video_shader_get_type_from_ext(
|
||||
path_get_extension(arg), &is_preset);
|
||||
|
||||
switch (msg_hash_to_file_type(msg_hash_calculate(path_get_extension(arg))))
|
||||
{
|
||||
case FILE_TYPE_SHADER_GLSL:
|
||||
case FILE_TYPE_SHADER_PRESET_GLSLP:
|
||||
type = RARCH_SHADER_GLSL;
|
||||
break;
|
||||
case FILE_TYPE_SHADER_CG:
|
||||
case FILE_TYPE_SHADER_PRESET_CGP:
|
||||
type = RARCH_SHADER_CG;
|
||||
break;
|
||||
case FILE_TYPE_SHADER_SLANG:
|
||||
case FILE_TYPE_SHADER_PRESET_SLANGP:
|
||||
type = RARCH_SHADER_SLANG;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
if (type == RARCH_SHADER_NONE)
|
||||
return false;
|
||||
|
||||
snprintf(msg, sizeof(msg), "Shader: \"%s\"", arg);
|
||||
runloop_msg_queue_push(msg, 1, 120, true);
|
||||
@@ -255,8 +243,7 @@ static bool command_read_ram(const char *arg)
|
||||
{
|
||||
cheevos_var_t var;
|
||||
unsigned i;
|
||||
unsigned nbytes;
|
||||
char reply[256];
|
||||
char reply[256] = {0};
|
||||
const uint8_t * data = NULL;
|
||||
char *reply_at = NULL;
|
||||
|
||||
@@ -290,7 +277,6 @@ static bool command_read_ram(const char *arg)
|
||||
|
||||
static bool command_write_ram(const char *arg)
|
||||
{
|
||||
int i;
|
||||
cheevos_var_t var;
|
||||
unsigned nbytes = 0;
|
||||
uint8_t *data = NULL;
|
||||
@@ -1714,31 +1700,28 @@ void command_playlist_push_write(
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
size_t idx,
|
||||
const char *core_display_name,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *path)
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *plist = (playlist_t*)data;
|
||||
playlist_t *playlist = NULL;
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (plist)
|
||||
playlist = plist;
|
||||
#ifdef HAVE_MENU
|
||||
else
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
||||
#endif
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
playlist_update(
|
||||
playlist,
|
||||
idx,
|
||||
label,
|
||||
NULL,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_display_name,
|
||||
NULL,
|
||||
NULL);
|
||||
crc32,
|
||||
db_name);
|
||||
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
@@ -2213,11 +2196,22 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_CORE_INFO_INIT:
|
||||
{
|
||||
char ext_name[255];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
ext_name[0] = '\0';
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL);
|
||||
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
return false;
|
||||
|
||||
if (!string_is_empty(settings->paths.directory_libretro))
|
||||
core_info_init_list();
|
||||
core_info_init_list(settings->paths.path_libretro_info,
|
||||
settings->paths.directory_libretro,
|
||||
ext_name,
|
||||
settings->bools.show_hidden_files
|
||||
);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_CORE_DEINIT:
|
||||
@@ -2340,7 +2334,28 @@ TODO: Add a setting for these tweaks */
|
||||
);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true);
|
||||
break;
|
||||
|
||||
}
|
||||
case CMD_EVENT_RESET_CORE_ASSOCIATION:
|
||||
{
|
||||
const char *core_name = "DETECT";
|
||||
const char *core_path = "DETECT";
|
||||
size_t *playlist_index = (size_t*)data;
|
||||
|
||||
command_playlist_update_write(
|
||||
NULL,
|
||||
*playlist_index,
|
||||
NULL,
|
||||
NULL,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true);
|
||||
break;
|
||||
|
||||
}
|
||||
case CMD_EVENT_RESTART_RETROARCH:
|
||||
if (!frontend_driver_set_fork(FRONTEND_FORK_RESTART))
|
||||
return false;
|
||||
|
||||
@@ -138,6 +138,8 @@ enum event_command
|
||||
CMD_EVENT_RESUME,
|
||||
/* Add a playlist entry to favorites. */
|
||||
CMD_EVENT_ADD_TO_FAVORITES,
|
||||
/* Reset playlist entry associated core to DETECT */
|
||||
CMD_EVENT_RESET_CORE_ASSOCIATION,
|
||||
/* Toggles pause. */
|
||||
CMD_EVENT_PAUSE_TOGGLE,
|
||||
/* Pauses RetroArch. */
|
||||
@@ -269,9 +271,12 @@ void command_playlist_push_write(
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
size_t idx,
|
||||
const char *core_display_name,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *path);
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
||||
+22
-8
@@ -67,6 +67,10 @@ static bool bundle_assets_extract_enable = false;
|
||||
static bool materialui_icons_enable = true;
|
||||
#endif
|
||||
|
||||
static const bool crt_switch_resolution = false;
|
||||
static const int crt_switch_resolution_super = 2560;
|
||||
|
||||
|
||||
static const bool def_history_list_enable = true;
|
||||
static const bool def_playlist_entry_remove = true;
|
||||
static const bool def_playlist_entry_rename = true;
|
||||
@@ -293,6 +297,7 @@ static bool content_show_history = true;
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
static bool content_show_add = true;
|
||||
#endif
|
||||
static bool content_show_playlists = true;
|
||||
|
||||
#ifdef HAVE_XMB
|
||||
static unsigned xmb_scale_factor = 100;
|
||||
@@ -300,9 +305,10 @@ static unsigned xmb_alpha_factor = 75;
|
||||
static unsigned menu_font_color_red = 255;
|
||||
static unsigned menu_font_color_green = 255;
|
||||
static unsigned menu_font_color_blue = 255;
|
||||
static unsigned xmb_menu_layout = 0;
|
||||
static unsigned xmb_icon_theme = XMB_ICON_THEME_MONOCHROME;
|
||||
static unsigned xmb_theme = XMB_THEME_ELECTRIC_BLUE;
|
||||
#ifdef HAVE_LAKKA
|
||||
#if defined(HAVE_LAKKA) || defined(__arm__) || defined(__PPC64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__)
|
||||
static bool xmb_shadows_enable = false;
|
||||
#else
|
||||
static bool xmb_shadows_enable = true;
|
||||
@@ -352,6 +358,8 @@ static bool default_screenshots_in_content_dir = false;
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3;
|
||||
#elif defined(VITA)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L1_R1_START_SELECT;
|
||||
#elif defined(SWITCH)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_START_SELECT;
|
||||
#else
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_NONE;
|
||||
#endif
|
||||
@@ -587,6 +595,12 @@ static const float slowmotion_ratio = 3.0;
|
||||
/* Maximum fast forward ratio. */
|
||||
static const float fastforward_ratio = 0.0;
|
||||
|
||||
/* Run core logic one or more frames ahead then load the state back to reduce perceived input lag. */
|
||||
static const unsigned run_ahead_frames = 1;
|
||||
|
||||
/* When using the Run Ahead feature, use a secondary instance of the core. */
|
||||
static const bool run_ahead_secondary_instance = true;
|
||||
|
||||
/* Enable stdin/network command interface. */
|
||||
static const bool network_cmd_enable = false;
|
||||
static const uint16_t network_cmd_port = 55355;
|
||||
@@ -599,11 +613,7 @@ static const unsigned default_content_history_size = 100;
|
||||
/* Show Menu start-up screen on boot. */
|
||||
static const bool default_menu_show_start_screen = true;
|
||||
|
||||
#ifdef RARCH_MOBILE
|
||||
static const bool menu_dpi_override_enable = false;
|
||||
#else
|
||||
static const bool menu_dpi_override_enable = true;
|
||||
#endif
|
||||
|
||||
#ifdef RARCH_MOBILE
|
||||
static const unsigned menu_dpi_override_value = 72;
|
||||
@@ -648,6 +658,10 @@ static const unsigned input_bind_timeout = 5;
|
||||
|
||||
static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
static const bool xmb_vertical_thumbnails = false;
|
||||
|
||||
#ifdef IOS
|
||||
static const bool ui_companion_start_on_boot = false;
|
||||
#else
|
||||
@@ -717,11 +731,11 @@ static char buildbot_server_url[] = "";
|
||||
#elif defined(WIIU)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/nintendo/wiiu/latest/";
|
||||
#elif defined(__CELLOS_LV2__) && defined(DEX_BUILD)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/playstation/ps3/latest/dex-ps3/";
|
||||
static char buildbot_server_url[] = "http://libretro.xbins.org/libretro/nightly/playstation/ps3/latest/dex-ps3/";
|
||||
#elif defined(__CELLOS_LV2__) && defined(CEX_BUILD)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/playstation/ps3/latest/cex-ps3/";
|
||||
static char buildbot_server_url[] = "http://libretro.xbins.org/libretro/nightly/playstation/ps3/latest/cex-ps3/";
|
||||
#elif defined(__CELLOS_LV2__) && defined(ODE_BUILD)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/playstation/ps3/latest/ode-ps3/";
|
||||
static char buildbot_server_url[] = "http://libretro.xbins.org/libretro/nightly/playstation/ps3/latest/ode-ps3/";
|
||||
#else
|
||||
static char buildbot_server_url[] = "";
|
||||
#endif
|
||||
|
||||
@@ -66,6 +66,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -86,7 +88,6 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, 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 },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -140,6 +141,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_F4, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_F2, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -160,7 +163,6 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, RETROK_e, 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 },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_KP_MINUS,NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
+95
-94
@@ -67,6 +67,7 @@ struct config_bool_setting
|
||||
bool def_enable;
|
||||
bool def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_int_setting
|
||||
@@ -76,6 +77,7 @@ struct config_int_setting
|
||||
bool def_enable;
|
||||
int def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_uint_setting
|
||||
@@ -85,6 +87,7 @@ struct config_uint_setting
|
||||
bool def_enable;
|
||||
unsigned def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_float_setting
|
||||
@@ -94,6 +97,7 @@ struct config_float_setting
|
||||
bool def_enable;
|
||||
float def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_array_setting
|
||||
@@ -103,6 +107,7 @@ struct config_array_setting
|
||||
bool def_enable;
|
||||
const char *def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_path_setting
|
||||
@@ -535,6 +540,9 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
||||
#define SETTING_ARRAY(key, configval, default_enable, default_setting, handle_setting) \
|
||||
GENERAL_SETTING(key, configval, default_enable, default_setting, struct config_array_setting, handle_setting)
|
||||
|
||||
#define SETTING_OVERRIDE(override_setting) \
|
||||
tmp[count-1].override = override_setting
|
||||
|
||||
struct defaults g_defaults;
|
||||
static settings_t *configuration_settings = NULL;
|
||||
|
||||
@@ -1025,6 +1033,7 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
#ifdef HAVE_CHEEVOS
|
||||
SETTING_ARRAY("cheevos_username", settings->arrays.cheevos_username, false, NULL, true);
|
||||
SETTING_ARRAY("cheevos_password", settings->arrays.cheevos_password, false, NULL, true);
|
||||
SETTING_ARRAY("cheevos_token", settings->arrays.cheevos_token, false, NULL, true);
|
||||
#endif
|
||||
SETTING_ARRAY("video_context_driver", settings->arrays.video_context_driver, false, NULL, true);
|
||||
SETTING_ARRAY("audio_driver", settings->arrays.audio_driver, false, NULL, true);
|
||||
@@ -1181,6 +1190,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("netplay_allow_slaves", &settings->bools.netplay_allow_slaves, true, netplay_allow_slaves, false);
|
||||
SETTING_BOOL("netplay_require_slaves", &settings->bools.netplay_require_slaves, true, netplay_require_slaves, false);
|
||||
SETTING_BOOL("netplay_stateless_mode", &settings->bools.netplay_stateless_mode, true, netplay_stateless_mode, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE);
|
||||
SETTING_BOOL("netplay_use_mitm_server", &settings->bools.netplay_use_mitm_server, true, netplay_use_mitm_server, false);
|
||||
SETTING_BOOL("netplay_request_device_p1", &settings->bools.netplay_request_devices[0], true, false, false);
|
||||
SETTING_BOOL("netplay_request_device_p2", &settings->bools.netplay_request_devices[1], true, false, false);
|
||||
@@ -1206,10 +1216,13 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, false, false /* TODO */, false);
|
||||
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("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);
|
||||
SETTING_BOOL("run_ahead_enabled", &settings->bools.run_ahead_enabled, true, false, false);
|
||||
SETTING_BOOL("run_ahead_secondary_instance", &settings->bools.run_ahead_secondary_instance, true, false, false);
|
||||
SETTING_BOOL("audio_sync", &settings->bools.audio_sync, true, audio_sync, false);
|
||||
SETTING_BOOL("video_shader_enable", &settings->bools.video_shader_enable, true, shader_enable, false);
|
||||
SETTING_BOOL("video_shader_watch_files", &settings->bools.video_shader_watch_files, true, video_shader_watch_files, false);
|
||||
@@ -1232,6 +1245,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, 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("crt_switch_resolution", &settings->bools.crt_switch_resolution, true, crt_switch_resolution, false);
|
||||
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, disable_composition, false);
|
||||
SETTING_BOOL("pause_nonactive", &settings->bools.pause_nonactive, true, pause_nonactive, false);
|
||||
SETTING_BOOL("video_gpu_screenshot", &settings->bools.video_gpu_screenshot, true, gpu_screenshot, false);
|
||||
@@ -1299,10 +1313,14 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
SETTING_BOOL("content_show_add", &settings->bools.menu_content_show_add, true, content_show_add, false);
|
||||
#endif
|
||||
SETTING_BOOL("content_show_playlists", &settings->bools.menu_content_show_playlists, true, content_show_playlists, false);
|
||||
SETTING_BOOL("menu_show_load_core", &settings->bools.menu_show_load_core, true, menu_show_load_core, false);
|
||||
SETTING_BOOL("menu_show_load_content", &settings->bools.menu_show_load_content, true, menu_show_load_content, false);
|
||||
SETTING_BOOL("menu_show_information", &settings->bools.menu_show_information, true, menu_show_information, false);
|
||||
SETTING_BOOL("menu_show_configurations", &settings->bools.menu_show_configurations, true, menu_show_configurations, false);
|
||||
SETTING_BOOL("menu_show_latency", &settings->bools.menu_show_latency, true, true, false);
|
||||
SETTING_BOOL("menu_show_rewind", &settings->bools.menu_show_rewind, true, true, false);
|
||||
SETTING_BOOL("menu_show_overlays", &settings->bools.menu_show_overlays, true, true, false);
|
||||
SETTING_BOOL("menu_show_help", &settings->bools.menu_show_help, true, menu_show_help, false);
|
||||
SETTING_BOOL("menu_show_quit_retroarch", &settings->bools.menu_show_quit_retroarch, true, menu_show_quit_retroarch, false);
|
||||
SETTING_BOOL("menu_show_reboot", &settings->bools.menu_show_reboot, true, menu_show_reboot, false);
|
||||
@@ -1317,8 +1335,14 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_MATERIALUI
|
||||
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false);
|
||||
#endif
|
||||
#ifdef HAVE_RGUI
|
||||
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);
|
||||
SETTING_BOOL("rgui_border_filler_thickness_enable", &settings->bools.menu_rgui_border_filler_thickness_enable, true, true, false);
|
||||
SETTING_BOOL("rgui_border_filler_enable", &settings->bools.menu_rgui_border_filler_enable, true, true, false);
|
||||
#endif
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
|
||||
SETTING_BOOL("xmb_vertical_thumbnails", &settings->bools.menu_xmb_vertical_thumbnails, true, xmb_vertical_thumbnails, false);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_CHEEVOS
|
||||
@@ -1326,10 +1350,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
|
||||
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_auto_screenshot", &settings->bools.cheevos_auto_screenshot, true, false, false);
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false);
|
||||
#endif
|
||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false);
|
||||
@@ -1344,9 +1369,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
SETTING_BOOL("network_remote_enable", &settings->bools.network_remote_enable, false, false /* TODO */, false);
|
||||
#endif
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
SETTING_BOOL("keymapper_enable", &settings->bools.keymapper_enable, true, true /* TODO */, false);
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_BOOL("netplay_nat_traversal", &settings->bools.netplay_nat_traversal, true, true, false);
|
||||
#endif
|
||||
@@ -1451,9 +1473,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
SETTING_UINT("network_remote_base_port", &settings->uints.network_remote_base_port, true, network_remote_base_port, false);
|
||||
#endif
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
SETTING_UINT("keymapper_port", &settings->uints.keymapper_port, true, 0, false);
|
||||
#endif
|
||||
#ifdef GEKKO
|
||||
SETTING_UINT("video_viwidth", &settings->uints.video_viwidth, true, video_viwidth, false);
|
||||
#endif
|
||||
@@ -1461,8 +1480,10 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
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);
|
||||
#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);
|
||||
SETTING_UINT("xmb_scale_factor", &settings->uints.menu_xmb_scale_factor, true, xmb_scale_factor, false);
|
||||
SETTING_UINT("xmb_layout", &settings->uints.menu_xmb_layout, true, xmb_menu_layout, false);
|
||||
SETTING_UINT("xmb_theme", &settings->uints.menu_xmb_theme, true, xmb_icon_theme, false);
|
||||
SETTING_UINT("xmb_menu_color_theme", &settings->uints.menu_xmb_color_theme, true, xmb_theme, false);
|
||||
SETTING_UINT("menu_font_color_red", &settings->uints.menu_font_color_red, true, menu_font_color_red, false);
|
||||
@@ -1474,6 +1495,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#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);
|
||||
SETTING_UINT("crt_switch_resolution_super", &settings->uints.crt_switch_resolution_super, true, crt_switch_resolution_super, false);
|
||||
SETTING_UINT("custom_viewport_height", &settings->video_viewport_custom.height, false, 0 /* TODO */, false);
|
||||
SETTING_UINT("custom_viewport_x", (unsigned*)&settings->video_viewport_custom.x, false, 0 /* TODO */, false);
|
||||
SETTING_UINT("custom_viewport_y", (unsigned*)&settings->video_viewport_custom.y, false, 0 /* TODO */, false);
|
||||
@@ -1486,6 +1508,7 @@ 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_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);
|
||||
SETTING_UINT("netplay_share_digital", &settings->uints.netplay_share_digital, true, netplay_share_digital, false);
|
||||
@@ -1501,6 +1524,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_msg_bgcolor_green", &settings->uints.video_msg_bgcolor_green, true, message_bgcolor_green, false);
|
||||
SETTING_UINT("video_msg_bgcolor_blue", &settings->uints.video_msg_bgcolor_blue, true, message_bgcolor_blue, false);
|
||||
|
||||
SETTING_UINT("run_ahead_frames", &settings->uints.run_ahead_frames, true, 1, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1509,11 +1534,12 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
static struct config_int_setting *populate_settings_int(settings_t *settings, int *size)
|
||||
{
|
||||
unsigned count = 0;
|
||||
struct config_int_setting *tmp = (struct config_int_setting*)malloc((*size + 1) * sizeof(struct config_int_setting));
|
||||
struct config_int_setting *tmp = (struct config_int_setting*)calloc((*size + 1), sizeof(struct config_int_setting));
|
||||
|
||||
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);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES);
|
||||
#endif
|
||||
#ifdef HAVE_WASAPI
|
||||
SETTING_INT("audio_wasapi_sh_buffer_length", &settings->ints.audio_wasapi_sh_buffer_length, true, wasapi_sh_buffer_length, false);
|
||||
@@ -1699,6 +1725,7 @@ static void config_set_defaults(void)
|
||||
#ifdef HAVE_CHEEVOS
|
||||
*settings->arrays.cheevos_username = '\0';
|
||||
*settings->arrays.cheevos_password = '\0';
|
||||
*settings->arrays.cheevos_token = '\0';
|
||||
#endif
|
||||
|
||||
input_config_reset();
|
||||
@@ -1727,8 +1754,7 @@ static void config_set_defaults(void)
|
||||
{
|
||||
settings->uints.input_joypad_map[i] = i;
|
||||
settings->uints.input_analog_dpad_mode[i] = ANALOG_DPAD_NONE;
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &i))
|
||||
input_config_set_device(i, RETRO_DEVICE_JOYPAD);
|
||||
input_config_set_device(i, RETRO_DEVICE_JOYPAD);
|
||||
settings->uints.input_mouse_index[i] = 0;
|
||||
}
|
||||
|
||||
@@ -1742,8 +1768,7 @@ static void config_set_defaults(void)
|
||||
dir_clear(RARCH_DIR_SAVESTATE);
|
||||
|
||||
*settings->paths.path_libretro_info = '\0';
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL))
|
||||
*settings->paths.directory_libretro = '\0';
|
||||
*settings->paths.directory_libretro = '\0';
|
||||
*settings->paths.directory_cursor = '\0';
|
||||
*settings->paths.directory_resampler = '\0';
|
||||
*settings->paths.directory_screenshot = '\0';
|
||||
@@ -1764,12 +1789,9 @@ static void config_set_defaults(void)
|
||||
*settings->paths.directory_video_filter = '\0';
|
||||
*settings->paths.directory_audio_filter = '\0';
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_UPS_PREF, NULL))
|
||||
rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_BPS_PREF, NULL))
|
||||
rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL))
|
||||
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
@@ -1897,8 +1919,14 @@ static void config_set_defaults(void)
|
||||
g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
|
||||
sizeof(settings->paths.directory_menu_config));
|
||||
#if TARGET_OS_IPHONE
|
||||
path_set(RARCH_PATH_CONFIG,
|
||||
settings->paths.directory_menu_config);
|
||||
{
|
||||
char *config_file_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
size_t config_file_path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
|
||||
fill_pathname_join(config_file_path, settings->paths.directory_menu_config, file_path_str(FILE_PATH_MAIN_CONFIG), config_file_path_size);
|
||||
path_set(RARCH_PATH_CONFIG,
|
||||
config_file_path);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1912,12 +1940,10 @@ static void config_set_defaults(void)
|
||||
g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
||||
sizeof(settings->paths.directory_autoconfig));
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL) &&
|
||||
!string_is_empty(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]))
|
||||
if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]))
|
||||
dir_set(RARCH_DIR_SAVESTATE, g_defaults.dirs[DEFAULT_DIR_SAVESTATE]);
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL) &&
|
||||
!string_is_empty(g_defaults.dirs[DEFAULT_DIR_SRAM]))
|
||||
if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_SRAM]))
|
||||
dir_set(RARCH_DIR_SAVEFILE, g_defaults.dirs[DEFAULT_DIR_SRAM]);
|
||||
|
||||
if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_SYSTEM]))
|
||||
@@ -2365,9 +2391,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
unsigned msg_color = 0;
|
||||
config_file_t *conf = NULL;
|
||||
char *override_username = NULL;
|
||||
#ifdef HAVE_NETWORKING
|
||||
char *override_netplay_ip_address = NULL;
|
||||
#endif
|
||||
const char *path_core = NULL;
|
||||
const char *path_config = NULL;
|
||||
const char *shader_ext = NULL;
|
||||
@@ -2445,11 +2468,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
override_username = strdup(settings->paths.username);
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL))
|
||||
override_netplay_ip_address = strdup(settings->paths.netplay_server);
|
||||
#endif
|
||||
|
||||
/* Boolean settings */
|
||||
|
||||
for (i = 0; i < (unsigned)bool_settings_size; i++)
|
||||
@@ -2472,15 +2490,12 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
settings->bools.network_remote_enable_user[i] = tmp_bool;
|
||||
}
|
||||
#endif
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL))
|
||||
if (config_get_bool(conf, "log_verbosity", &tmp_bool))
|
||||
{
|
||||
if (config_get_bool(conf, "log_verbosity", &tmp_bool))
|
||||
{
|
||||
if (tmp_bool)
|
||||
verbosity_enable();
|
||||
else
|
||||
verbosity_disable();
|
||||
}
|
||||
if (tmp_bool)
|
||||
verbosity_enable();
|
||||
else
|
||||
verbosity_disable();
|
||||
}
|
||||
{
|
||||
char tmp[64];
|
||||
@@ -2513,14 +2528,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
*uint_settings[i].ptr = tmp;
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL))
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bools.netplay_stateless_mode, "netplay_stateless_mode");
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL))
|
||||
CONFIG_GET_INT_BASE(conf, settings, ints.netplay_check_frames, "netplay_check_frames");
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, NULL))
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.netplay_port, "netplay_ip_port");
|
||||
#endif
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char buf[64];
|
||||
@@ -2536,11 +2543,8 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
snprintf(buf, sizeof(buf), "input_player%u_mouse_index", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_mouse_index[i], buf);
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &i))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "input_libretro_device_p%u", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_libretro_device[i], buf);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "input_libretro_device_p%u", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_libretro_device[i], buf);
|
||||
}
|
||||
|
||||
/* LED map for use by the led driver */
|
||||
@@ -2606,11 +2610,8 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
strlcpy(path_settings[i].ptr, tmp_str, PATH_MAX_LENGTH);
|
||||
}
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL))
|
||||
{
|
||||
if (config_get_path(conf, "libretro_directory", tmp_str, path_size))
|
||||
strlcpy(settings->paths.directory_libretro, tmp_str, sizeof(settings->paths.directory_libretro));
|
||||
}
|
||||
if (config_get_path(conf, "libretro_directory", tmp_str, path_size))
|
||||
strlcpy(settings->paths.directory_libretro, tmp_str, sizeof(settings->paths.directory_libretro));
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (config_get_path(conf, "libretro_path", tmp_str, path_size))
|
||||
@@ -2631,16 +2632,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
free(override_username);
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL))
|
||||
{
|
||||
strlcpy(settings->paths.netplay_server,
|
||||
override_netplay_ip_address,
|
||||
sizeof(settings->paths.netplay_server));
|
||||
free(override_netplay_ip_address);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (settings->uints.video_hard_sync_frames > 3)
|
||||
settings->uints.video_hard_sync_frames = 3;
|
||||
|
||||
@@ -2949,7 +2940,7 @@ bool config_load_override(void)
|
||||
config_file_t *new_conf = NULL;
|
||||
bool should_append = false;
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system ?
|
||||
const char *core_name = system ?
|
||||
system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
|
||||
@@ -3037,7 +3028,7 @@ bool config_load_override(void)
|
||||
if (!should_append)
|
||||
goto error;
|
||||
|
||||
/* Re-load the configuration with any overrides
|
||||
/* Re-load the configuration with any overrides
|
||||
* that might have been found */
|
||||
buf[0] = '\0';
|
||||
|
||||
@@ -3122,7 +3113,7 @@ bool config_unload_override(void)
|
||||
bool config_load_remap(void)
|
||||
{
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *remap_directory = NULL;
|
||||
char *remap_directory = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
config_file_t *new_conf = NULL;
|
||||
@@ -3142,12 +3133,12 @@ bool config_load_remap(void)
|
||||
/* path to the directory containing retroarch.cfg (prefix) */
|
||||
remap_directory = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for core-specific configuration (prefix+suffix) */
|
||||
/* final path for core-specific configuration (prefix+suffix) */
|
||||
core_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for game-specific configuration (prefix+suffix) */
|
||||
game_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
remap_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
|
||||
strlcpy(remap_directory,
|
||||
@@ -3249,7 +3240,7 @@ bool config_load_shader_preset(void)
|
||||
char *parent_path = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system
|
||||
const char *core_name = system
|
||||
? system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
|
||||
@@ -3787,8 +3778,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
error:
|
||||
free(buf);
|
||||
free(autoconf_file);
|
||||
if (path_new)
|
||||
free(path_new);
|
||||
free(path_new);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3864,9 +3854,11 @@ bool config_save_file(const char *path)
|
||||
if (array_settings && (array_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)array_settings_size; i++)
|
||||
config_set_string(conf,
|
||||
array_settings[i].ident,
|
||||
array_settings[i].ptr);
|
||||
if (!array_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(array_settings[i].override, NULL))
|
||||
config_set_string(conf,
|
||||
array_settings[i].ident,
|
||||
array_settings[i].ptr);
|
||||
|
||||
free(array_settings);
|
||||
}
|
||||
@@ -3875,9 +3867,11 @@ bool config_save_file(const char *path)
|
||||
if (float_settings && (float_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
config_set_float(conf,
|
||||
float_settings[i].ident,
|
||||
*float_settings[i].ptr);
|
||||
if (!float_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(float_settings[i].override, NULL))
|
||||
config_set_float(conf,
|
||||
float_settings[i].ident,
|
||||
*float_settings[i].ptr);
|
||||
|
||||
free(float_settings);
|
||||
}
|
||||
@@ -3886,9 +3880,11 @@ bool config_save_file(const char *path)
|
||||
if (int_settings && (int_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)int_settings_size; i++)
|
||||
config_set_int(conf,
|
||||
int_settings[i].ident,
|
||||
*int_settings[i].ptr);
|
||||
if (!int_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(int_settings[i].override, NULL))
|
||||
config_set_int(conf,
|
||||
int_settings[i].ident,
|
||||
*int_settings[i].ptr);
|
||||
|
||||
free(int_settings);
|
||||
}
|
||||
@@ -3896,9 +3892,11 @@ bool config_save_file(const char *path)
|
||||
if (uint_settings && (uint_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)uint_settings_size; i++)
|
||||
config_set_int(conf,
|
||||
uint_settings[i].ident,
|
||||
*uint_settings[i].ptr);
|
||||
if (!uint_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(uint_settings[i].override, NULL))
|
||||
config_set_int(conf,
|
||||
uint_settings[i].ident,
|
||||
*uint_settings[i].ptr);
|
||||
|
||||
free(uint_settings);
|
||||
}
|
||||
@@ -3925,8 +3923,10 @@ bool config_save_file(const char *path)
|
||||
if (bool_settings && (bool_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)bool_settings_size; i++)
|
||||
config_set_bool(conf, bool_settings[i].ident,
|
||||
*bool_settings[i].ptr);
|
||||
if (!bool_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(bool_settings[i].override, NULL))
|
||||
config_set_bool(conf, bool_settings[i].ident,
|
||||
*bool_settings[i].ptr);
|
||||
|
||||
free(bool_settings);
|
||||
}
|
||||
@@ -3943,6 +3943,7 @@ bool config_save_file(const char *path)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Verbosity isn't in bool_settings since it needs to be loaded differently */
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL))
|
||||
{
|
||||
config_set_bool(conf, "log_verbosity",
|
||||
@@ -4189,28 +4190,28 @@ bool config_save_overrides(int override_type)
|
||||
char cfg[64];
|
||||
|
||||
cfg[0] = '\0';
|
||||
if (settings->uints.input_device[i]
|
||||
if (settings->uints.input_device[i]
|
||||
!= overrides->uints.input_device[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_joypad_map[i]
|
||||
if (settings->uints.input_joypad_map[i]
|
||||
!= overrides->uints.input_joypad_map[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_joypad_index", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
!= overrides->uints.input_libretro_device[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_libretro_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_libretro_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
!= overrides->uints.input_analog_dpad_mode[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_analog_dpad_mode", i + 1);
|
||||
|
||||
+20
-1
@@ -92,8 +92,10 @@ typedef struct settings
|
||||
bool video_shared_context;
|
||||
bool video_force_srgb_disable;
|
||||
bool video_fps_show;
|
||||
bool video_statistics_show;
|
||||
bool video_framecount_show;
|
||||
bool video_msg_bgcolor_enable;
|
||||
bool crt_switch_resolution;
|
||||
|
||||
/* Audio */
|
||||
bool audio_enable;
|
||||
@@ -145,8 +147,15 @@ typedef struct settings
|
||||
bool menu_show_help;
|
||||
bool menu_show_quit_retroarch;
|
||||
bool menu_show_reboot;
|
||||
bool menu_show_latency;
|
||||
bool menu_show_rewind;
|
||||
bool menu_show_overlays;
|
||||
bool menu_materialui_icons_enable;
|
||||
bool menu_rgui_background_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_thickness_enable;
|
||||
bool menu_rgui_border_filler_enable;
|
||||
bool menu_xmb_shadows_enable;
|
||||
bool menu_xmb_vertical_thumbnails;
|
||||
bool menu_content_show_settings;
|
||||
bool menu_content_show_favorites;
|
||||
bool menu_content_show_images;
|
||||
@@ -155,6 +164,7 @@ typedef struct settings
|
||||
bool menu_content_show_netplay;
|
||||
bool menu_content_show_history;
|
||||
bool menu_content_show_add;
|
||||
bool menu_content_show_playlists;
|
||||
bool menu_unified_controls;
|
||||
bool quick_menu_show_take_screenshot;
|
||||
bool quick_menu_show_save_load_state;
|
||||
@@ -195,6 +205,7 @@ typedef struct settings
|
||||
bool cheevos_leaderboards_enable;
|
||||
bool cheevos_badges_enable;
|
||||
bool cheevos_verbose_enable;
|
||||
bool cheevos_auto_screenshot;
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
@@ -221,6 +232,8 @@ typedef struct settings
|
||||
bool playlist_entry_remove;
|
||||
bool playlist_entry_rename;
|
||||
bool rewind_enable;
|
||||
bool run_ahead_enabled;
|
||||
bool run_ahead_secondary_instance;
|
||||
bool pause_nonactive;
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
@@ -331,6 +344,7 @@ typedef struct settings
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_window_opacity;
|
||||
unsigned crt_switch_resolution_super;
|
||||
unsigned video_monitor_index;
|
||||
unsigned video_fullscreen_x;
|
||||
unsigned video_fullscreen_y;
|
||||
@@ -346,10 +360,12 @@ typedef struct settings
|
||||
unsigned video_msg_bgcolor_blue;
|
||||
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
unsigned menu_dpi_override_value;
|
||||
unsigned menu_entry_normal_color;
|
||||
unsigned menu_entry_hover_color;
|
||||
unsigned menu_title_color;
|
||||
unsigned menu_xmb_layout;
|
||||
unsigned menu_xmb_shader_pipeline;
|
||||
unsigned menu_xmb_scale_factor;
|
||||
unsigned menu_xmb_alpha_factor;
|
||||
@@ -373,11 +389,13 @@ typedef struct settings
|
||||
unsigned input_libretro_device[MAX_USERS];
|
||||
unsigned input_analog_dpad_mode[MAX_USERS];
|
||||
|
||||
unsigned input_keymapper_ids[RARCH_CUSTOM_BIND_LIST_END];
|
||||
unsigned input_keymapper_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
unsigned input_remap_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
unsigned led_map[MAX_LEDS];
|
||||
|
||||
unsigned run_ahead_frames;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
@@ -393,6 +411,7 @@ typedef struct settings
|
||||
char menu_driver[32];
|
||||
char cheevos_username[32];
|
||||
char cheevos_password[32];
|
||||
char cheevos_token[32];
|
||||
char video_context_driver[32];
|
||||
char audio_driver[32];
|
||||
char audio_resampler[32];
|
||||
|
||||
@@ -92,17 +92,16 @@ void content_clear_subsystem(void);
|
||||
void content_set_subsystem(unsigned subsystem);
|
||||
|
||||
/* Get the current subsystem*/
|
||||
int content_get_subsystem();
|
||||
int content_get_subsystem(void);
|
||||
|
||||
/* Add a rom to the subsystem rom buffer */
|
||||
void content_add_subsystem(const char* path);
|
||||
|
||||
/* Get the current subsystem rom id */
|
||||
int content_get_subsystem_rom_id();
|
||||
unsigned content_get_subsystem_rom_id(void);
|
||||
|
||||
/* Set environment variables before a subsystem load */
|
||||
void content_set_subsystem_info();
|
||||
|
||||
void content_set_subsystem_info(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
||||
@@ -170,6 +170,9 @@ bool core_set_poll_type(unsigned *type);
|
||||
/* Runs the core for one frame. */
|
||||
bool core_run(void);
|
||||
|
||||
/* Runs the core for one frame, but does not trigger any input polling */
|
||||
bool core_run_no_input_polling(void);
|
||||
|
||||
bool core_init(void);
|
||||
|
||||
bool core_deinit(void *data);
|
||||
|
||||
+21
@@ -44,6 +44,11 @@
|
||||
#include "gfx/video_driver.h"
|
||||
#include "audio/audio_driver.h"
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "runahead/copy_load_info.h"
|
||||
#include "runahead/secondary_core.h"
|
||||
#endif
|
||||
|
||||
struct retro_callbacks retro_ctx;
|
||||
struct retro_core_t current_core;
|
||||
|
||||
@@ -262,6 +267,11 @@ bool core_set_controller_port_device(retro_ctx_controller_info_t *pad)
|
||||
{
|
||||
if (!pad)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
remember_controller_port_device(pad->port, pad->device);
|
||||
#endif
|
||||
|
||||
current_core.retro_set_controller_port_device(pad->port, pad->device);
|
||||
return true;
|
||||
}
|
||||
@@ -280,6 +290,11 @@ bool core_load_game(retro_ctx_load_content_info_t *load_info)
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
set_load_content_info(load_info);
|
||||
clear_controller_port_map();
|
||||
#endif
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (load_info && load_info->special)
|
||||
@@ -424,6 +439,12 @@ bool core_run(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_run_no_input_polling(void)
|
||||
{
|
||||
current_core.retro_run();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_load(unsigned poll_type_behavior)
|
||||
{
|
||||
current_core.poll_type = poll_type_behavior;
|
||||
|
||||
+32
-33
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <file/config_file.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <file/archive_file.h>
|
||||
@@ -26,14 +27,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "config.def.h"
|
||||
#include "core_info.h"
|
||||
#include "configuration.h"
|
||||
#include "file_path_special.h"
|
||||
#include "list_special.h"
|
||||
|
||||
static const char *core_info_tmp_path = NULL;
|
||||
static const struct string_list *core_info_tmp_list = NULL;
|
||||
@@ -224,21 +221,23 @@ static bool core_info_list_iterate(
|
||||
return true;
|
||||
}
|
||||
|
||||
static core_info_list_t *core_info_list_new(const char *path)
|
||||
static core_info_list_t *core_info_list_new(const char *path,
|
||||
const char *libretro_info_dir,
|
||||
const char *exts,
|
||||
bool show_hidden_files)
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
struct string_list *contents = dir_list_new_special(
|
||||
path, DIR_LIST_CORES, NULL);
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *path_basedir = !string_is_empty(settings->paths.path_libretro_info) ?
|
||||
settings->paths.path_libretro_info : settings->paths.directory_libretro;
|
||||
|
||||
const char *path_basedir = libretro_info_dir;
|
||||
struct string_list *contents = dir_list_new(
|
||||
path, exts,
|
||||
false,
|
||||
show_hidden_files,
|
||||
false, false);
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
||||
|
||||
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
|
||||
if (!core_info_list)
|
||||
goto error;
|
||||
@@ -518,7 +517,8 @@ static core_info_t *core_info_find_internal(
|
||||
static bool core_info_list_update_missing_firmware_internal(
|
||||
core_info_list_t *core_info_list,
|
||||
const char *core,
|
||||
const char *systemdir)
|
||||
const char *systemdir,
|
||||
bool *set_missing_bios)
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *info = NULL;
|
||||
@@ -535,7 +535,6 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
|
||||
path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
path[0] = '\0';
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
|
||||
for (i = 0; i < info->firmware_count; i++)
|
||||
{
|
||||
@@ -547,7 +546,7 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
info->firmware[i].missing = !filestream_exists(path);
|
||||
if (info->firmware[i].missing && !info->firmware[i].optional)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
*set_missing_bios = true;
|
||||
RARCH_WARN("Firmware missing: %s\n", info->firmware[i].path);
|
||||
}
|
||||
}
|
||||
@@ -635,14 +634,13 @@ void core_info_deinit_list(void)
|
||||
core_info_curr_list = NULL;
|
||||
}
|
||||
|
||||
bool core_info_init_list(void)
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings)
|
||||
core_info_curr_list = core_info_list_new(settings->paths.directory_libretro);
|
||||
|
||||
if (!core_info_curr_list)
|
||||
if (!(core_info_curr_list = core_info_list_new(dir_cores,
|
||||
!string_is_empty(path_info) ? path_info : dir_cores,
|
||||
exts,
|
||||
show_hidden_files)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -655,13 +653,15 @@ bool core_info_get_list(core_info_list_t **core)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info)
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool *set_missing_bios)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
return core_info_list_update_missing_firmware_internal(
|
||||
core_info_curr_list,
|
||||
info->path, info->directory.system);
|
||||
info->path, info->directory.system,
|
||||
set_missing_bios);
|
||||
}
|
||||
|
||||
bool core_info_load(core_info_ctx_find_t *info)
|
||||
@@ -751,16 +751,15 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
|
||||
*num_infos = supported;
|
||||
}
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len)
|
||||
void core_info_get_name(const char *path, char *s, size_t len,
|
||||
const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files)
|
||||
{
|
||||
size_t i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *contents = dir_list_new_special(
|
||||
settings->paths.directory_libretro,
|
||||
DIR_LIST_CORES, NULL);
|
||||
const char *path_basedir = !string_is_empty(settings->paths.path_libretro_info) ?
|
||||
settings->paths.path_libretro_info : settings->paths.directory_libretro;
|
||||
|
||||
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);
|
||||
if (!contents)
|
||||
return;
|
||||
|
||||
@@ -786,7 +785,7 @@ void core_info_get_name(const char *path, char *s, size_t len)
|
||||
continue;
|
||||
}
|
||||
|
||||
conf = config_file_new(info_path);
|
||||
conf = config_file_new(info_path);
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
|
||||
+7
-3
@@ -97,7 +97,9 @@ bool core_info_list_get_display_name(core_info_list_t *list,
|
||||
|
||||
bool core_info_get_display_name(const char *path, char *s, size_t len);
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len);
|
||||
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);
|
||||
|
||||
core_info_t *core_info_get(core_info_list_t *list, size_t i);
|
||||
|
||||
@@ -109,11 +111,13 @@ bool core_info_get_current_core(core_info_t **core);
|
||||
|
||||
void core_info_deinit_list(void);
|
||||
|
||||
bool core_info_init_list(void);
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files);
|
||||
|
||||
bool core_info_get_list(core_info_list_t **core);
|
||||
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info);
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool *set_missing_bios);
|
||||
|
||||
bool core_info_find(core_info_ctx_find_t *info, const char *name);
|
||||
|
||||
|
||||
@@ -98,12 +98,6 @@ ifneq (,$(findstring gles,$(platform)))
|
||||
CFLAGS += -DHAVE_OPENGLES
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring qnx,$(platform)))
|
||||
CFLAGS += -Wc,-std=c99
|
||||
else
|
||||
CFLAGS += -std=gnu99
|
||||
endif
|
||||
|
||||
# Locale support should be enabled by default, as it's most common.
|
||||
ifneq ($(locale),false)
|
||||
CFLAGS += -DHAVE_LOCALE
|
||||
@@ -120,7 +114,7 @@ endif
|
||||
CFLAGS += -I../../libretro-common/include
|
||||
|
||||
OBJECTS := mpv-libretro.o
|
||||
LDFLAGS += -lmpv
|
||||
LDFLAGS += -lmpv -ldl -lm
|
||||
CFLAGS += -Wall -pedantic
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
/* mpv media player libretro core
|
||||
* Copyright (C) 2018 Mahyar Koshkouei
|
||||
*
|
||||
*
|
||||
* This program 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 Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
#include <locale.h>
|
||||
#endif
|
||||
@@ -29,7 +33,7 @@
|
||||
#include <mpv/client.h>
|
||||
#include <mpv/opengl_cb.h>
|
||||
|
||||
#include "libretro.h"
|
||||
#include <libretro.h>
|
||||
#include "version.h"
|
||||
|
||||
static struct retro_hw_render_callback hw_render;
|
||||
@@ -56,6 +60,13 @@ static int64_t *playback_time = 0;
|
||||
/* filepath required globaly as mpv is reopened on context change */
|
||||
static char *filepath = NULL;
|
||||
|
||||
static volatile int frame_queue = 0;
|
||||
|
||||
void queue_new_frame(void *cb_ctx)
|
||||
{
|
||||
frame_queue++;
|
||||
}
|
||||
|
||||
static void fallback_log(enum retro_log_level level, const char *fmt, ...)
|
||||
{
|
||||
(void)level;
|
||||
@@ -123,19 +134,24 @@ static void *get_proc_address_mpv(void *fn_ctx, const char *name)
|
||||
void *proc_addr = (void *) hw_render.get_proc_address(name);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// EGL 1.4 (supported by the RPI firmware) does not necessarily return
|
||||
// function pointers for core functions.
|
||||
if (!proc_addr) {
|
||||
void *h = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_LAZY);
|
||||
#ifdef HAVE_OPENGLES
|
||||
/* EGL 1.4 (supported by the RPI firmware) does not necessarily return
|
||||
* function pointers for core functions.
|
||||
*/
|
||||
if (!proc_addr)
|
||||
{
|
||||
void *h = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_LAZY);
|
||||
|
||||
if (!h)
|
||||
h = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY);
|
||||
if (!h)
|
||||
h = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY);
|
||||
|
||||
if (h) {
|
||||
proc_addr = dlsym(h, name);
|
||||
dlclose(h);
|
||||
}
|
||||
}
|
||||
if (h)
|
||||
{
|
||||
proc_addr = dlsym(h, name);
|
||||
dlclose(h);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(proc_addr == NULL)
|
||||
log_cb(RETRO_LOG_ERROR, "Failure obtaining %s proc address\n", name);
|
||||
@@ -293,6 +309,13 @@ static void context_reset(void)
|
||||
goto err;
|
||||
}
|
||||
|
||||
mpv_opengl_cb_set_update_callback(mpv_gl, queue_new_frame, NULL);
|
||||
|
||||
mpv_set_option_string(mpv, "ao", "audio-cb");
|
||||
|
||||
/* Attempt to enable hardware acceleration. MPV will fallback to software
|
||||
* decoding on failure.
|
||||
*/
|
||||
if(mpv_set_option_string(mpv, "hwdec", "auto") < 0)
|
||||
log_cb(RETRO_LOG_ERROR, "failed to set hwdec option\n");
|
||||
|
||||
@@ -316,6 +339,17 @@ static void context_reset(void)
|
||||
usleep(10);
|
||||
}
|
||||
|
||||
/* TODO #2: Check for the highest samplerate in audio stream, and use that.
|
||||
* Fall back to 48kHz otherwise.
|
||||
* We currently force the audio to be sampled at 48KHz.
|
||||
*/
|
||||
mpv_set_option_string(mpv, "audio-samplerate", "48000");
|
||||
mpv_set_option_string(mpv, "opengl-swapinterval", "0");
|
||||
|
||||
/* The following works best when vsync is switched off in Retroarch. */
|
||||
//mpv_set_option_string(mpv, "video-sync", "display-resample");
|
||||
//mpv_set_option_string(mpv, "display-fps", "60");
|
||||
|
||||
log_cb(RETRO_LOG_INFO, "Context reset.\n");
|
||||
|
||||
return;
|
||||
@@ -380,20 +414,25 @@ void retro_reset(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void audio_callback(void)
|
||||
static void audio_callback(double fps)
|
||||
{
|
||||
static unsigned phase;
|
||||
/* Obtain len samples to reduce lag. */
|
||||
int len = 48000 / (int)floor(fps);
|
||||
static int16_t frames[512];
|
||||
|
||||
for (unsigned i = 0; i < 30000 / 60; i++, phase++)
|
||||
while(len > 0)
|
||||
{
|
||||
int16_t val = 0x800 * sinf(2.0f * M_PI * phase * 300.0f / 30000.0f);
|
||||
audio_cb(val, val);
|
||||
}
|
||||
int mpv_len = mpv_audio_callback(&frames, len > 512 ? 512*2 : len*2);
|
||||
//printf("mpv cb: %d\n", mpv_len);
|
||||
if(mpv_len < 1)
|
||||
return;
|
||||
|
||||
phase %= 100;
|
||||
len -= mpv_len;
|
||||
|
||||
//printf("acb: %lu\n", audio_batch_cb(frames, mpv_len));
|
||||
audio_batch_cb(frames, mpv_len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void retropad_update_input(void)
|
||||
{
|
||||
@@ -413,7 +452,7 @@ static void retropad_update_input(void)
|
||||
/* A ternary operator is used since input_state_cb returns an int16_t, but
|
||||
* we only care about whether the button is on or off which is why we store
|
||||
* the value in a single bit for each button.
|
||||
*
|
||||
*
|
||||
* Unsure if saving the memory is worth the extra checks, costing CPU time,
|
||||
* but both are incredibly miniscule anyway.
|
||||
*/
|
||||
@@ -470,12 +509,14 @@ void retro_run(void)
|
||||
* retro_get_system_av_info() call.
|
||||
*/
|
||||
static bool updated_video_dimensions = false;
|
||||
static int64_t width, height;
|
||||
static int64_t width = 0, height = 0;
|
||||
static double container_fps = 30.0f;
|
||||
|
||||
if(updated_video_dimensions == false)
|
||||
{
|
||||
mpv_get_property(mpv, "dwidth", MPV_FORMAT_INT64, &width);
|
||||
mpv_get_property(mpv, "dheight", MPV_FORMAT_INT64, &height);
|
||||
mpv_get_property(mpv, "container-fps", MPV_FORMAT_DOUBLE, &container_fps);
|
||||
|
||||
/* We don't know the dimensions of the video when
|
||||
* retro_get_system_av_info is called, so we have to set it here for
|
||||
@@ -492,18 +533,44 @@ void retro_run(void)
|
||||
.aspect_ratio = -1,
|
||||
};
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &geometry);
|
||||
log_cb(RETRO_LOG_INFO, "Setting fps to %f\n", container_fps);
|
||||
|
||||
struct retro_system_timing timing = {
|
||||
.fps = container_fps,
|
||||
.sample_rate = 48000.0f,
|
||||
};
|
||||
|
||||
struct retro_system_av_info av_info = {
|
||||
.geometry = geometry,
|
||||
.timing = timing,
|
||||
};
|
||||
|
||||
if(width > 0 && height > 0)
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &av_info);
|
||||
|
||||
updated_video_dimensions = true;
|
||||
}
|
||||
|
||||
print_mpv_logs();
|
||||
|
||||
retropad_update_input();
|
||||
/* TODO #2: Implement an audio callback feature in to libmpv */
|
||||
/* audio_callback(); */
|
||||
|
||||
/* TODO #2: Implement an audio callback feature in to libmpv */
|
||||
audio_callback(container_fps);
|
||||
|
||||
#if 1
|
||||
if(frame_queue > 0)
|
||||
{
|
||||
mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), width, height);
|
||||
video_cb(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
frame_queue--;
|
||||
}
|
||||
else
|
||||
video_cb(NULL, width, height, 0);
|
||||
#else
|
||||
mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), width, height);
|
||||
video_cb(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <3ds.h>
|
||||
#include <sys/iosupport.h>
|
||||
#include <3ds/services/apt.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
+153
-176
@@ -21,46 +21,16 @@
|
||||
#include <compat/strl.h>
|
||||
#include <retro_endianness.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "libretro-db/libretrodb.h"
|
||||
|
||||
#include "list_special.h"
|
||||
#include "core_info.h"
|
||||
#include "database_info.h"
|
||||
#include "msg_hash.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#define DB_CURSOR_ROM_NAME 0x16bbcf13U
|
||||
#define DB_CURSOR_NAME 0x7c9b0c46U
|
||||
#define DB_CURSOR_DESCRIPTION 0x91b0c789U
|
||||
#define DB_CURSOR_GENRE 0x0f802156U
|
||||
#define DB_CURSOR_PUBLISHER 0x5e099013U
|
||||
#define DB_CURSOR_DEVELOPER 0x1783d2abU
|
||||
#define DB_CURSOR_ORIGIN 0x1315e3edU
|
||||
#define DB_CURSOR_FRANCHISE 0xc3a526b8U
|
||||
#define DB_CURSOR_BBFC_RATING 0xede26836U
|
||||
#define DB_CURSOR_ESRB_RATING 0x4c3fa255U
|
||||
#define DB_CURSOR_ELSPA_RATING 0xd9cab41eU
|
||||
#define DB_CURSOR_CERO_RATING 0x084a1772U
|
||||
#define DB_CURSOR_PEGI_RATING 0x431b736eU
|
||||
#define DB_CURSOR_CHECKSUM_CRC32 0x0b88671dU
|
||||
#define DB_CURSOR_CHECKSUM_SHA1 0x7c9de632U
|
||||
#define DB_CURSOR_CHECKSUM_MD5 0x0b888fabU
|
||||
#define DB_CURSOR_ENHANCEMENT_HW 0xab612029U
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_REVIEW 0xd3573eabU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_RATING 0xd30dc4feU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_ISSUE 0xa0f30d42U
|
||||
#define DB_CURSOR_FAMITSU_MAGAZINE_RATING 0x0a50ca62U
|
||||
#define DB_CURSOR_TGDB_RATING 0x8d61458aU
|
||||
#define DB_CURSOR_MAX_USERS 0x1084ff77U
|
||||
#define DB_CURSOR_RELEASEDATE_MONTH 0x790ad76cU
|
||||
#define DB_CURSOR_RELEASEDATE_YEAR 0x7fd06ed7U
|
||||
#define DB_CURSOR_RUMBLE_SUPPORTED 0x1a4dc3ecU
|
||||
#define DB_CURSOR_COOP_SUPPORTED 0x7c953ff6U
|
||||
#define DB_CURSOR_ANALOG_SUPPORTED 0xf220fc17U
|
||||
#define DB_CURSOR_SIZE 0x7c9dede0U
|
||||
#define DB_CURSOR_SERIAL 0x1b843ec5U
|
||||
|
||||
int database_info_build_query_enum(char *s, size_t len,
|
||||
enum database_query_type type,
|
||||
const char *path)
|
||||
@@ -201,7 +171,6 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
|
||||
|
||||
for (i = 0; i < item.val.map.len; i++)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
struct rmsgpack_dom_value *key = &item.val.map.items[i].key;
|
||||
struct rmsgpack_dom_value *val = &item.val.map.items[i].value;
|
||||
const char *val_string = NULL;
|
||||
@@ -209,121 +178,123 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
|
||||
if (!key || !val)
|
||||
continue;
|
||||
|
||||
val_string = val->val.string.buff;
|
||||
str = key->val.string.buff;
|
||||
value = msg_hash_calculate(str);
|
||||
val_string = val->val.string.buff;
|
||||
str = key->val.string.buff;
|
||||
|
||||
switch (value)
|
||||
if (string_is_equal(str, "publisher"))
|
||||
{
|
||||
case DB_CURSOR_SERIAL:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->serial = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_ROM_NAME:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->rom_name = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_NAME:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->name = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_DESCRIPTION:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->description = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_GENRE:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->genre = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_PUBLISHER:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->publisher = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_DEVELOPER:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->developer = string_split(val_string, "|");
|
||||
break;
|
||||
case DB_CURSOR_ORIGIN:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->origin = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_FRANCHISE:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->franchise = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_BBFC_RATING:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->bbfc_rating = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_ESRB_RATING:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->esrb_rating = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_ELSPA_RATING:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->elspa_rating = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_CERO_RATING:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->cero_rating = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_PEGI_RATING:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->pegi_rating = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_ENHANCEMENT_HW:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->enhancement_hw = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_REVIEW:
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->edge_magazine_review = strdup(val_string);
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_RATING:
|
||||
db_info->edge_magazine_rating = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_ISSUE:
|
||||
db_info->edge_magazine_issue = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_FAMITSU_MAGAZINE_RATING:
|
||||
db_info->famitsu_magazine_rating = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_TGDB_RATING:
|
||||
db_info->tgdb_rating = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_MAX_USERS:
|
||||
db_info->max_users = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_MONTH:
|
||||
db_info->releasemonth = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_YEAR:
|
||||
db_info->releaseyear = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_RUMBLE_SUPPORTED:
|
||||
db_info->rumble_supported = (int)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_COOP_SUPPORTED:
|
||||
db_info->coop_supported = (int)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_ANALOG_SUPPORTED:
|
||||
db_info->analog_supported = (int)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_SIZE:
|
||||
db_info->size = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_CRC32:
|
||||
db_info->crc32 = swap_if_little32(*(uint32_t*)val->val.binary.buff);
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_SHA1:
|
||||
db_info->sha1 = bin_to_hex_alloc((uint8_t*)val->val.binary.buff, val->val.binary.len);
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_MD5:
|
||||
db_info->md5 = bin_to_hex_alloc((uint8_t*)val->val.binary.buff, val->val.binary.len);
|
||||
break;
|
||||
default:
|
||||
RARCH_LOG("Unknown key: %s\n", str);
|
||||
break;
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->publisher = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "developer"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->developer = string_split(val_string, "|");
|
||||
}
|
||||
else if (string_is_equal(str, "serial"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->serial = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "rom_name"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->rom_name = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "name"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->name = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "description"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->description = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "genre"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->genre = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "origin"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->origin = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "franchise"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->franchise = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "bbfc_rating"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->bbfc_rating = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "esrb_rating"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->esrb_rating = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "elspa_rating"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->elspa_rating = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "cero_rating"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->cero_rating = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "pegi_rating"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->pegi_rating = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "enhancement_hw"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->enhancement_hw = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "edge_review"))
|
||||
{
|
||||
if (!string_is_empty(val_string))
|
||||
db_info->edge_magazine_review = strdup(val_string);
|
||||
}
|
||||
else if (string_is_equal(str, "edge_rating"))
|
||||
db_info->edge_magazine_rating = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "edge_issue"))
|
||||
db_info->edge_magazine_issue = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "famitsu_rating"))
|
||||
db_info->famitsu_magazine_rating = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "tgdb_rating"))
|
||||
db_info->tgdb_rating = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "users"))
|
||||
db_info->max_users = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "releasemonth"))
|
||||
db_info->releasemonth = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "releaseyear"))
|
||||
db_info->releaseyear = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "rumble"))
|
||||
db_info->rumble_supported = (int)val->val.uint_;
|
||||
else if (string_is_equal(str, "coop"))
|
||||
db_info->coop_supported = (int)val->val.uint_;
|
||||
else if (string_is_equal(str, "analog"))
|
||||
db_info->analog_supported = (int)val->val.uint_;
|
||||
else if (string_is_equal(str, "size"))
|
||||
db_info->size = (unsigned)val->val.uint_;
|
||||
else if (string_is_equal(str, "crc"))
|
||||
db_info->crc32 = swap_if_little32(
|
||||
*(uint32_t*)val->val.binary.buff);
|
||||
else if (string_is_equal(str, "sha1"))
|
||||
db_info->sha1 = bin_to_hex_alloc(
|
||||
(uint8_t*)val->val.binary.buff, val->val.binary.len);
|
||||
else if (string_is_equal(str, "md5"))
|
||||
db_info->md5 = bin_to_hex_alloc(
|
||||
(uint8_t*)val->val.binary.buff, val->val.binary.len);
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Unknown key: %s\n", str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,22 +342,22 @@ static int database_cursor_close(libretrodb_t *db, libretrodb_cursor_t *cur)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool type_is_prioritized(enum msg_file_type type)
|
||||
static bool type_is_prioritized(const char *path)
|
||||
{
|
||||
return (type == FILE_TYPE_CUE || type == FILE_TYPE_GDI);
|
||||
}
|
||||
|
||||
static enum msg_file_type file_type(const char *path)
|
||||
{
|
||||
return msg_hash_to_file_type(msg_hash_calculate(path_get_extension(path)));
|
||||
const char *ext = path_get_extension(path);
|
||||
if (string_is_equal_noncase(ext, "cue"))
|
||||
return true;
|
||||
if (string_is_equal_noncase(ext, "gdi"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static int dir_entry_compare(const void *left, const void *right)
|
||||
{
|
||||
const struct string_list_elem *le = (const struct string_list_elem*)left;
|
||||
const struct string_list_elem *re = (const struct string_list_elem*)right;
|
||||
bool l = type_is_prioritized(file_type(le->data));
|
||||
bool r = type_is_prioritized(file_type(re->data));
|
||||
bool l = type_is_prioritized(le->data);
|
||||
bool r = type_is_prioritized(re->data);
|
||||
|
||||
return (int) r - (int) l;
|
||||
}
|
||||
@@ -397,37 +368,44 @@ static void dir_list_prioritize(struct string_list *list)
|
||||
}
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type, retro_task_t *task)
|
||||
enum database_type type, retro_task_t *task,
|
||||
bool show_hidden_files)
|
||||
{
|
||||
database_info_handle_t *db = (database_info_handle_t*)
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
struct string_list *list = NULL;
|
||||
database_info_handle_t *db = (database_info_handle_t*)
|
||||
calloc(1, sizeof(*db));
|
||||
|
||||
if (!db)
|
||||
return NULL;
|
||||
|
||||
db->list = dir_list_new_special(dir, DIR_LIST_RECURSIVE, NULL);
|
||||
core_info_get_list(&core_info_list);
|
||||
|
||||
if (!db->list)
|
||||
goto error;
|
||||
list = dir_list_new(dir, core_info_list->all_ext,
|
||||
false, show_hidden_files,
|
||||
false, true);
|
||||
|
||||
dir_list_prioritize(db->list);
|
||||
if (!list)
|
||||
{
|
||||
free(db);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dir_list_prioritize(list);
|
||||
|
||||
db->list = list;
|
||||
db->list_ptr = 0;
|
||||
db->status = DATABASE_STATUS_ITERATE;
|
||||
db->type = type;
|
||||
|
||||
return db;
|
||||
|
||||
error:
|
||||
if (db)
|
||||
free(db);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
database_info_handle_t *database_info_file_init(const char *path,
|
||||
enum database_type type, retro_task_t *task)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *list = NULL;
|
||||
database_info_handle_t *db = (database_info_handle_t*)
|
||||
calloc(1, sizeof(*db));
|
||||
|
||||
@@ -436,23 +414,22 @@ database_info_handle_t *database_info_file_init(const char *path,
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
db->list = string_list_new();
|
||||
list = string_list_new();
|
||||
|
||||
if (!db->list)
|
||||
goto error;
|
||||
if (!list)
|
||||
{
|
||||
free(db);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
string_list_append(db->list, path, attr);
|
||||
string_list_append(list, path, attr);
|
||||
|
||||
db->list_ptr = 0;
|
||||
db->list = list;
|
||||
db->status = DATABASE_STATUS_ITERATE;
|
||||
db->type = type;
|
||||
|
||||
return db;
|
||||
|
||||
error:
|
||||
if (db)
|
||||
free(db);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void database_info_free(database_info_handle_t *db)
|
||||
|
||||
+2
-1
@@ -126,7 +126,8 @@ database_info_list_t *database_info_list_new(const char *rdb_path,
|
||||
void database_info_list_free(database_info_list_t *list);
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type, retro_task_t *task);
|
||||
enum database_type type, retro_task_t *task,
|
||||
bool show_hidden_files);
|
||||
|
||||
database_info_handle_t *database_info_file_init(const char *path,
|
||||
enum database_type type, retro_task_t *task);
|
||||
|
||||
Vendored
+2
-2
@@ -2,7 +2,7 @@ language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode8.2
|
||||
osx_image: xcode8.3
|
||||
|
||||
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
||||
sudo: required
|
||||
@@ -13,7 +13,7 @@ env:
|
||||
- GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92 SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install python3; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python3; fi
|
||||
- git clone https://github.com/KhronosGroup/glslang.git glslang
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Tools/external/spirv-headers
|
||||
|
||||
Vendored
+6
-1
@@ -101,12 +101,17 @@ spirv_cross_add_library(spirv-cross-hlsl spirv_cross_hlsl STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.cpp)
|
||||
|
||||
spirv_cross_add_library(spirv-cross-util spirv_cross_util STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross_util.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross_util.cpp)
|
||||
|
||||
add_executable(spirv-cross main.cpp)
|
||||
target_compile_options(spirv-cross PRIVATE ${spirv-compiler-options})
|
||||
target_compile_definitions(spirv-cross PRIVATE ${spirv-compiler-defines})
|
||||
|
||||
install(TARGETS spirv-cross RUNTIME DESTINATION bin)
|
||||
target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-hlsl spirv-cross-cpp spirv-cross-msl spirv-cross-core)
|
||||
target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-hlsl spirv-cross-cpp spirv-cross-msl spirv-cross-util spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-util spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-glsl spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-msl spirv-cross-glsl)
|
||||
target_link_libraries(spirv-cross-hlsl spirv-cross-glsl)
|
||||
|
||||
Vendored
+2
-2
@@ -7,8 +7,8 @@ SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader
|
||||
## Features
|
||||
|
||||
- Convert SPIR-V to readable, usable and efficient GLSL
|
||||
- Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL) [EXPERIMENTAL]
|
||||
- Convert SPIR-V to readable, usable and efficient HLSL [EXPERIMENTAL]
|
||||
- Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL)
|
||||
- Convert SPIR-V to readable, usable and efficient HLSL
|
||||
- Convert SPIR-V to debuggable C++ [EXPERIMENTAL]
|
||||
- Reflection API to simplify the creation of Vulkan pipeline layouts
|
||||
- Reflection API to modify and tweak OpDecorations
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS += -std=c++11 -Wall -Wextra
|
||||
LOCAL_MODULE := spirv-cross
|
||||
LOCAL_SRC_FILES := ../spirv_cfg.cpp ../spirv_cross.cpp ../spirv_glsl.cpp ../spirv_msl.cpp ../spirv_cpp.cpp
|
||||
LOCAL_SRC_FILES := ../spirv_cfg.cpp ../spirv_cross.cpp ../spirv_cross_util.cpp ../spirv_glsl.cpp ../spirv_hlsl.cpp ../spirv_msl.cpp ../spirv_cpp.cpp
|
||||
LOCAL_CPP_FEATURES := exceptions
|
||||
LOCAL_ARM_MODE := arm
|
||||
LOCAL_CFLAGS := -D__STDC_LIMIT_MACROS
|
||||
|
||||
Vendored
+128
-35
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "spirv_cpp.hpp"
|
||||
#include "spirv_cross_util.hpp"
|
||||
#include "spirv_glsl.hpp"
|
||||
#include "spirv_hlsl.hpp"
|
||||
#include "spirv_msl.hpp"
|
||||
@@ -286,9 +287,9 @@ static void print_resources(const Compiler &compiler, const ShaderResources &res
|
||||
uint64_t modes = compiler.get_execution_mode_mask();
|
||||
|
||||
fprintf(stderr, "Entry points:\n");
|
||||
auto entry_points = compiler.get_entry_points();
|
||||
auto entry_points = compiler.get_entry_points_and_stages();
|
||||
for (auto &e : entry_points)
|
||||
fprintf(stderr, " %s (%s)\n", e.c_str(), execution_model_to_str(compiler.get_entry_point(e).model));
|
||||
fprintf(stderr, " %s (%s)\n", e.name.c_str(), execution_model_to_str(e.execution_model));
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Execution modes:\n");
|
||||
@@ -467,8 +468,15 @@ struct CLIArguments
|
||||
vector<InterfaceVariableRename> interface_variable_renames;
|
||||
vector<HLSLVertexAttributeRemap> hlsl_attr_remap;
|
||||
string entry;
|
||||
string entry_stage;
|
||||
|
||||
vector<pair<string, string>> entry_point_rename;
|
||||
struct Rename
|
||||
{
|
||||
string old_name;
|
||||
string new_name;
|
||||
ExecutionModel execution_model;
|
||||
};
|
||||
vector<Rename> entry_point_rename;
|
||||
|
||||
uint32_t iterations = 1;
|
||||
bool cpp = false;
|
||||
@@ -491,12 +499,13 @@ static void print_help()
|
||||
"[--hlsl] [--shader-model] [--hlsl-enable-compat] "
|
||||
"[--separate-shader-objects]"
|
||||
"[--pls-in format input-name] [--pls-out format output-name] [--remap source_name target_name "
|
||||
"components] [--extension ext] [--entry name] [--remove-unused-variables] "
|
||||
"components] [--extension ext] [--entry name] [--stage <stage (vert, frag, geom, tesc, tese, "
|
||||
"comp)>] [--remove-unused-variables] "
|
||||
"[--flatten-multidimensional-arrays] [--no-420pack-extension] "
|
||||
"[--remap-variable-type <variable_name> <new_variable_type>] "
|
||||
"[--rename-interface-variable <in|out> <location> <new_variable_name>] "
|
||||
"[--set-hlsl-vertex-input-semantic <location> <semantic>] "
|
||||
"[--rename-entry-point <old> <new>] "
|
||||
"[--rename-entry-point <old> <new> <stage>] "
|
||||
"\n");
|
||||
}
|
||||
|
||||
@@ -584,31 +593,22 @@ static PlsFormat pls_format(const char *str)
|
||||
return PlsNone;
|
||||
}
|
||||
|
||||
void rename_interface_variable(Compiler &compiler, const vector<Resource> &resources,
|
||||
const InterfaceVariableRename &rename)
|
||||
static ExecutionModel stage_to_execution_model(const std::string &stage)
|
||||
{
|
||||
for (auto &v : resources)
|
||||
{
|
||||
if (!compiler.has_decoration(v.id, spv::DecorationLocation))
|
||||
continue;
|
||||
|
||||
auto loc = compiler.get_decoration(v.id, spv::DecorationLocation);
|
||||
if (loc != rename.location)
|
||||
continue;
|
||||
|
||||
auto &type = compiler.get_type(v.base_type_id);
|
||||
|
||||
// This is more of a friendly variant. If we need to rename interface variables, we might have to rename
|
||||
// structs as well and make sure all the names match up.
|
||||
if (type.basetype == SPIRType::Struct)
|
||||
{
|
||||
compiler.set_name(v.base_type_id, join("SPIRV_Cross_Interface_Location", rename.location));
|
||||
for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++)
|
||||
compiler.set_member_name(v.base_type_id, i, join("InterfaceMember", i));
|
||||
}
|
||||
|
||||
compiler.set_name(v.id, rename.variable_name);
|
||||
}
|
||||
if (stage == "vert")
|
||||
return ExecutionModelVertex;
|
||||
else if (stage == "frag")
|
||||
return ExecutionModelFragment;
|
||||
else if (stage == "comp")
|
||||
return ExecutionModelGLCompute;
|
||||
else if (stage == "tesc")
|
||||
return ExecutionModelTessellationControl;
|
||||
else if (stage == "tese")
|
||||
return ExecutionModelTessellationEvaluation;
|
||||
else if (stage == "geom")
|
||||
return ExecutionModelGeometry;
|
||||
else
|
||||
SPIRV_CROSS_THROW("Invalid stage.");
|
||||
}
|
||||
|
||||
static int main_inner(int argc, char *argv[])
|
||||
@@ -652,9 +652,11 @@ static int main_inner(int argc, char *argv[])
|
||||
cbs.add("--rename-entry-point", [&args](CLIParser &parser) {
|
||||
auto old_name = parser.next_string();
|
||||
auto new_name = parser.next_string();
|
||||
args.entry_point_rename.push_back({ old_name, new_name });
|
||||
auto model = stage_to_execution_model(parser.next_string());
|
||||
args.entry_point_rename.push_back({ old_name, new_name, move(model) });
|
||||
});
|
||||
cbs.add("--entry", [&args](CLIParser &parser) { args.entry = parser.next_string(); });
|
||||
cbs.add("--stage", [&args](CLIParser &parser) { args.entry_stage = parser.next_string(); });
|
||||
cbs.add("--separate-shader-objects", [&args](CLIParser &) { args.sso = true; });
|
||||
cbs.add("--set-hlsl-vertex-input-semantic", [&args](CLIParser &parser) {
|
||||
HLSLVertexAttributeRemap remap;
|
||||
@@ -733,6 +735,7 @@ static int main_inner(int argc, char *argv[])
|
||||
unique_ptr<CompilerGLSL> compiler;
|
||||
|
||||
bool combined_image_samplers = false;
|
||||
bool build_dummy_sampler = false;
|
||||
|
||||
if (args.cpp)
|
||||
{
|
||||
@@ -755,6 +758,7 @@ static int main_inner(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
combined_image_samplers = !args.vulkan_semantics;
|
||||
build_dummy_sampler = true;
|
||||
compiler = unique_ptr<CompilerGLSL>(new CompilerGLSL(read_spirv_file(args.input)));
|
||||
}
|
||||
|
||||
@@ -770,10 +774,82 @@ static int main_inner(int argc, char *argv[])
|
||||
}
|
||||
|
||||
for (auto &rename : args.entry_point_rename)
|
||||
compiler->rename_entry_point(rename.first, rename.second);
|
||||
compiler->rename_entry_point(rename.old_name, rename.new_name, rename.execution_model);
|
||||
|
||||
if (!args.entry.empty())
|
||||
compiler->set_entry_point(args.entry);
|
||||
auto entry_points = compiler->get_entry_points_and_stages();
|
||||
auto entry_point = args.entry;
|
||||
ExecutionModel model = ExecutionModelMax;
|
||||
|
||||
if (!args.entry_stage.empty())
|
||||
{
|
||||
model = stage_to_execution_model(args.entry_stage);
|
||||
if (entry_point.empty())
|
||||
{
|
||||
// Just use the first entry point with this stage.
|
||||
for (auto &e : entry_points)
|
||||
{
|
||||
if (e.execution_model == model)
|
||||
{
|
||||
entry_point = e.name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (entry_point.empty())
|
||||
{
|
||||
fprintf(stderr, "Could not find an entry point with stage: %s\n", args.entry_stage.c_str());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure both stage and name exists.
|
||||
bool exists = false;
|
||||
for (auto &e : entry_points)
|
||||
{
|
||||
if (e.execution_model == model && e.name == entry_point)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
fprintf(stderr, "Could not find an entry point %s with stage: %s\n", entry_point.c_str(),
|
||||
args.entry_stage.c_str());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!entry_point.empty())
|
||||
{
|
||||
// Make sure there is just one entry point with this name, or the stage
|
||||
// is ambiguous.
|
||||
uint32_t stage_count = 0;
|
||||
for (auto &e : entry_points)
|
||||
{
|
||||
if (e.name == entry_point)
|
||||
{
|
||||
stage_count++;
|
||||
model = e.execution_model;
|
||||
}
|
||||
}
|
||||
|
||||
if (stage_count == 0)
|
||||
{
|
||||
fprintf(stderr, "There is no entry point with name: %s\n", entry_point.c_str());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else if (stage_count > 1)
|
||||
{
|
||||
fprintf(stderr, "There is more than one entry point with name: %s. Use --stage.\n", entry_point.c_str());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!entry_point.empty())
|
||||
compiler->set_entry_point(entry_point, model);
|
||||
|
||||
if (!args.set_version && !compiler->get_options().version)
|
||||
{
|
||||
@@ -816,10 +892,14 @@ static int main_inner(int argc, char *argv[])
|
||||
{
|
||||
// Enable all compat options.
|
||||
hlsl_opts.point_size_compat = true;
|
||||
hlsl_opts.point_coord_compat = true;
|
||||
}
|
||||
hlsl->set_options(hlsl_opts);
|
||||
}
|
||||
|
||||
if (build_dummy_sampler)
|
||||
compiler->build_dummy_sampler_for_combined_images();
|
||||
|
||||
ShaderResources res;
|
||||
if (args.remove_unused)
|
||||
{
|
||||
@@ -858,9 +938,11 @@ static int main_inner(int argc, char *argv[])
|
||||
for (auto &rename : args.interface_variable_renames)
|
||||
{
|
||||
if (rename.storageClass == StorageClassInput)
|
||||
rename_interface_variable(*compiler, res.stage_inputs, rename);
|
||||
spirv_cross_util::rename_interface_variable(*compiler, res.stage_inputs, rename.location,
|
||||
rename.variable_name);
|
||||
else if (rename.storageClass == StorageClassOutput)
|
||||
rename_interface_variable(*compiler, res.stage_outputs, rename);
|
||||
spirv_cross_util::rename_interface_variable(*compiler, res.stage_outputs, rename.location,
|
||||
rename.variable_name);
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "error at --rename-interface-variable <in|out> ...\n");
|
||||
@@ -887,6 +969,17 @@ static int main_inner(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (args.hlsl)
|
||||
{
|
||||
auto *hlsl_compiler = static_cast<CompilerHLSL *>(compiler.get());
|
||||
uint32_t new_builtin = hlsl_compiler->remap_num_workgroups_builtin();
|
||||
if (new_builtin)
|
||||
{
|
||||
hlsl_compiler->set_decoration(new_builtin, DecorationDescriptorSet, 0);
|
||||
hlsl_compiler->set_decoration(new_builtin, DecorationBinding, 0);
|
||||
}
|
||||
}
|
||||
|
||||
string glsl;
|
||||
for (uint32_t i = 0; i < args.iterations; i++)
|
||||
{
|
||||
|
||||
+2
@@ -130,6 +130,7 @@
|
||||
<ClCompile Include="..\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="..\spirv_msl.cpp" />
|
||||
<ClCompile Include="..\spirv_cfg.cpp" />
|
||||
<ClCompile Include="..\spirv_cross_util.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\GLSL.std.450.h" />
|
||||
@@ -141,6 +142,7 @@
|
||||
<ClInclude Include="..\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="..\spirv_msl.hpp" />
|
||||
<ClInclude Include="..\spirv_cfg.hpp" />
|
||||
<ClInclude Include="..\spirv_cross_util.hpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
<ClCompile Include="..\spirv_hlsl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\spirv_cross_util.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\GLSL.std.450.h">
|
||||
@@ -65,5 +68,8 @@
|
||||
<ClInclude Include="..\spirv_hlsl.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\spirv_cross_util.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,29 @@
|
||||
static float4 FragColor;
|
||||
static float4 vA;
|
||||
static float4 vB;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vA : TEXCOORD0;
|
||||
float4 vB : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = fmod(vA, vB);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vA = stage_input.vA;
|
||||
vB = stage_input.vB;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (((1.0f.xxxx + 1.0f.xxxx) + (1.0f.xxx.xyzz + 1.0f.xxxx)) + (1.0f.xxxx + 2.0f.xxxx)) + (1.0f.xx.xyxy + 2.0f.xxxx);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
RWByteAddressBuffer _15 : register(u0);
|
||||
ByteAddressBuffer _20 : register(t1);
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 SPIRV_Cross_Inverse(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = m[1][1];
|
||||
adj[0][1] = -m[0][1];
|
||||
|
||||
adj[1][0] = -m[1][0];
|
||||
adj[1][1] = m[0][0];
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the determinant of a 2x2 matrix.
|
||||
float SPIRV_Cross_Det2x2(float a1, float a2, float b1, float b2)
|
||||
{
|
||||
return a1 * b2 - b1 * a2;
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 SPIRV_Cross_Inverse(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = SPIRV_Cross_Det2x2(m[1][1], m[1][2], m[2][1], m[2][2]);
|
||||
adj[0][1] = -SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[2][1], m[2][2]);
|
||||
adj[0][2] = SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[1][1], m[1][2]);
|
||||
|
||||
adj[1][0] = -SPIRV_Cross_Det2x2(m[1][0], m[1][2], m[2][0], m[2][2]);
|
||||
adj[1][1] = SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[2][0], m[2][2]);
|
||||
adj[1][2] = -SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[1][0], m[1][2]);
|
||||
|
||||
adj[2][0] = SPIRV_Cross_Det2x2(m[1][0], m[1][1], m[2][0], m[2][1]);
|
||||
adj[2][1] = -SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[2][0], m[2][1]);
|
||||
adj[2][2] = SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[1][0], m[1][1]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the determinant of a 3x3 matrix.
|
||||
float SPIRV_Cross_Det3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
|
||||
{
|
||||
return a1 * SPIRV_Cross_Det2x2(b2, b3, c2, c3) - b1 * SPIRV_Cross_Det2x2(a2, a3, c2, c3) + c1 * SPIRV_Cross_Det2x2(a2, a3, b2, b3);
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 SPIRV_Cross_Inverse(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = SPIRV_Cross_Det3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][1] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][2] = SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][3] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
|
||||
|
||||
adj[1][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
|
||||
|
||||
adj[2][0] = SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][1] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][2] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][3] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
|
||||
|
||||
adj[3][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
float2x2 _23 = asfloat(uint2x2(_20.Load2(0), _20.Load2(8)));
|
||||
float2x2 _24 = SPIRV_Cross_Inverse(_23);
|
||||
_15.Store2(0, asuint(_24[0]));
|
||||
_15.Store2(8, asuint(_24[1]));
|
||||
float3x3 _29 = asfloat(uint3x3(_20.Load3(16), _20.Load3(32), _20.Load3(48)));
|
||||
float3x3 _30 = SPIRV_Cross_Inverse(_29);
|
||||
_15.Store3(16, asuint(_30[0]));
|
||||
_15.Store3(32, asuint(_30[1]));
|
||||
_15.Store3(48, asuint(_30[2]));
|
||||
float4x4 _35 = asfloat(uint4x4(_20.Load4(64), _20.Load4(80), _20.Load4(96), _20.Load4(112)));
|
||||
float4x4 _36 = SPIRV_Cross_Inverse(_35);
|
||||
_15.Store4(64, asuint(_36[0]));
|
||||
_15.Store4(80, asuint(_36[1]));
|
||||
_15.Store4(96, asuint(_36[2]));
|
||||
_15.Store4(112, asuint(_36[3]));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
RWByteAddressBuffer _10 : register(u0);
|
||||
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
|
||||
{
|
||||
uint3 SPIRV_Cross_NumWorkgroups_count : packoffset(c0);
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_10.Store3(0, SPIRV_Cross_NumWorkgroups_count);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
RWByteAddressBuffer _10 : register(u0);
|
||||
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
|
||||
{
|
||||
uint3 SPIRV_Cross_NumWorkgroups_count : packoffset(c0);
|
||||
};
|
||||
|
||||
static uint3 gl_WorkGroupID;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint3 gl_WorkGroupID : SV_GroupID;
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_10.Store3(0, SPIRV_Cross_NumWorkgroups_count + gl_WorkGroupID);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_WorkGroupID = stage_input.gl_WorkGroupID;
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
static float gl_ClipDistance[2];
|
||||
static float gl_CullDistance[1];
|
||||
static float FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float2 gl_ClipDistance0 : SV_ClipDistance0;
|
||||
float gl_CullDistance0 : SV_CullDistance0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (gl_ClipDistance[0] + gl_CullDistance[0]) + gl_ClipDistance[1];
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_ClipDistance[0] = stage_input.gl_ClipDistance0.x;
|
||||
gl_ClipDistance[1] = stage_input.gl_ClipDistance0.y;
|
||||
gl_CullDistance[0] = stage_input.gl_CullDistance0.x;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
static bool gl_FrontFacing;
|
||||
static float4 FragColor;
|
||||
static float4 vA;
|
||||
static float4 vB;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vA : TEXCOORD0;
|
||||
float4 vB : TEXCOORD1;
|
||||
bool gl_FrontFacing : SV_IsFrontFace;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
if (gl_FrontFacing)
|
||||
{
|
||||
FragColor = vA;
|
||||
}
|
||||
else
|
||||
{
|
||||
FragColor = vB;
|
||||
}
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_FrontFacing = stage_input.gl_FrontFacing;
|
||||
vA = stage_input.vA;
|
||||
vB = stage_input.vB;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
static float3 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float3 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0xffc00000u));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
Texture2DMS<float4> uSubpass0 : register(t0);
|
||||
Texture2DMS<float4> uSubpass1 : register(t1);
|
||||
|
||||
static float4 gl_FragCoord;
|
||||
static int gl_SampleID;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 gl_FragCoord : SV_Position;
|
||||
uint gl_SampleID : SV_SampleIndex;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (uSubpass0.Load(int2(gl_FragCoord.xy), 1) + uSubpass1.Load(int2(gl_FragCoord.xy), 2)) + uSubpass0.Load(int2(gl_FragCoord.xy), gl_SampleID);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_FragCoord = stage_input.gl_FragCoord;
|
||||
gl_SampleID = stage_input.gl_SampleID;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
Texture2D<float4> uSubpass0 : register(t0);
|
||||
Texture2D<float4> uSubpass1 : register(t1);
|
||||
|
||||
static float4 gl_FragCoord;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 gl_FragCoord : SV_Position;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = uSubpass0.Load(int3(int2(gl_FragCoord.xy), 0)) + uSubpass1.Load(int3(int2(gl_FragCoord.xy), 0));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_FragCoord = stage_input.gl_FragCoord;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
static float2 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float2 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float2(0.5f, 0.5f);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
static const int Value = 2;
|
||||
|
||||
cbuffer _15 : register(b0)
|
||||
{
|
||||
float4 _15_samples[Value] : packoffset(c0);
|
||||
};
|
||||
|
||||
static float4 FragColor;
|
||||
static int Index;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation int Index : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = _15_samples[Index];
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
Index = stage_input.Index;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
static float4 gl_Position;
|
||||
static float gl_ClipDistance[2];
|
||||
static float gl_CullDistance[1];
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 gl_Position : SV_Position;
|
||||
float2 gl_ClipDistance0 : SV_ClipDistance0;
|
||||
float gl_CullDistance0 : SV_CullDistance0;
|
||||
};
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = 1.0f.xxxx;
|
||||
gl_ClipDistance[0] = 0.0f;
|
||||
gl_ClipDistance[1] = 0.0f;
|
||||
gl_CullDistance[0] = 4.0f;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
vert_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_Position = gl_Position;
|
||||
stage_output.gl_ClipDistance0.x = gl_ClipDistance[0];
|
||||
stage_output.gl_ClipDistance0.y = gl_ClipDistance[1];
|
||||
stage_output.gl_CullDistance0.x = gl_CullDistance[0];
|
||||
return stage_output;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ struct SPIRV_Cross_Output
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = 1.0f.xxxx;
|
||||
gl_PointSize = 10.0f;
|
||||
gl_PointSize = 1.0f;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
static const float4 _20[2] = { 10.0f.xxxx, 20.0f.xxxx };
|
||||
|
||||
static float4 gl_Position;
|
||||
static float4 vInput0;
|
||||
static float4 vInput1;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vInput0 : TEXCOORD0;
|
||||
float4 vInput1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = 10.0f.xxxx + vInput1;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vInput0 = stage_input.vInput0;
|
||||
vInput1 = stage_input.vInput1;
|
||||
vert_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_Position = gl_Position;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 vB [[user(locn1)]];
|
||||
float4 vA [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = fmod(in.vA, in.vB);
|
||||
return out;
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = (((float4(1.0) + float4(1.0)) + (float3(1.0).xyzz + float4(1.0))) + (float4(1.0) + float4(2.0))) + (float2(1.0).xyxy + float4(2.0));
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct MatrixOut
|
||||
{
|
||||
float2x2 m2out;
|
||||
float3x3 m3out;
|
||||
float4x4 m4out;
|
||||
};
|
||||
|
||||
struct MatrixIn
|
||||
{
|
||||
float2x2 m2in;
|
||||
float3x3 m3in;
|
||||
float4x4 m4in;
|
||||
};
|
||||
|
||||
// Returns the determinant of a 2x2 matrix.
|
||||
inline float spvDet2x2(float a1, float a2, float b1, float b2)
|
||||
{
|
||||
return a1 * b2 - b1 * a2;
|
||||
}
|
||||
|
||||
// Returns the determinant of a 3x3 matrix.
|
||||
inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
|
||||
{
|
||||
return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3);
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
|
||||
|
||||
adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
|
||||
|
||||
adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
|
||||
|
||||
adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 spvInverse3x3(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = spvDet2x2(m[1][1], m[1][2], m[2][1], m[2][2]);
|
||||
adj[0][1] = -spvDet2x2(m[0][1], m[0][2], m[2][1], m[2][2]);
|
||||
adj[0][2] = spvDet2x2(m[0][1], m[0][2], m[1][1], m[1][2]);
|
||||
|
||||
adj[1][0] = -spvDet2x2(m[1][0], m[1][2], m[2][0], m[2][2]);
|
||||
adj[1][1] = spvDet2x2(m[0][0], m[0][2], m[2][0], m[2][2]);
|
||||
adj[1][2] = -spvDet2x2(m[0][0], m[0][2], m[1][0], m[1][2]);
|
||||
|
||||
adj[2][0] = spvDet2x2(m[1][0], m[1][1], m[2][0], m[2][1]);
|
||||
adj[2][1] = -spvDet2x2(m[0][0], m[0][1], m[2][0], m[2][1]);
|
||||
adj[2][2] = spvDet2x2(m[0][0], m[0][1], m[1][0], m[1][1]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 spvInverse2x2(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = m[1][1];
|
||||
adj[0][1] = -m[0][1];
|
||||
|
||||
adj[1][0] = -m[1][0];
|
||||
adj[1][1] = m[0][0];
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
kernel void main0(device MatrixOut& _15 [[buffer(0)]], device MatrixIn& _20 [[buffer(1)]])
|
||||
{
|
||||
_15.m2out = spvInverse2x2(_20.m2in);
|
||||
_15.m3out = spvInverse3x3(_20.m3in);
|
||||
_15.m4out = spvInverse4x4(_20.m4in);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct s1
|
||||
{
|
||||
int a;
|
||||
};
|
||||
|
||||
struct s2
|
||||
{
|
||||
s1 b;
|
||||
};
|
||||
|
||||
struct dstbuffer
|
||||
{
|
||||
s2 test[1];
|
||||
};
|
||||
|
||||
constant s2 _31 = {};
|
||||
|
||||
kernel void main0(device dstbuffer& _19 [[buffer(0)]])
|
||||
{
|
||||
s2 _30 = _31;
|
||||
_30.b.a = 0;
|
||||
_19.test[0].b.a = _30.b.a;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
typedef float3x2 packed_float2x3;
|
||||
|
||||
struct S0
|
||||
{
|
||||
float2 a[1];
|
||||
@@ -58,8 +60,10 @@ struct SSBO1
|
||||
float3x2 m3;
|
||||
float2x2 m4;
|
||||
float2x2 m5[9];
|
||||
float2x3 m6[4][2];
|
||||
packed_float2x3 m6[4][2];
|
||||
char pad10[8];
|
||||
float3x2 m7;
|
||||
char pad11[8];
|
||||
float array[1];
|
||||
};
|
||||
|
||||
@@ -96,5 +100,6 @@ kernel void main0(device SSBO1& ssbo_430 [[buffer(0)]], device SSBO0& ssbo_140 [
|
||||
ssbo_430.content.m3s[5].c = ssbo_140.content.m3s[5].c;
|
||||
ssbo_430.content.m3s[6].c = ssbo_140.content.m3s[6].c;
|
||||
ssbo_430.content.m3s[7].c = ssbo_140.content.m3s[7].c;
|
||||
ssbo_430.content.m1.a = ssbo_430.content.m3.a * ssbo_430.m6[1][1];
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
@@ -9,6 +11,12 @@ struct Foobar
|
||||
float b;
|
||||
};
|
||||
|
||||
constant float4 _37[3] = {float4(1.0), float4(2.0), float4(3.0)};
|
||||
constant float4 _49[2] = {float4(1.0), float4(2.0)};
|
||||
constant float4 _54[2] = {float4(8.0), float4(10.0)};
|
||||
constant float4 _55[2][2] = {{float4(1.0), float4(2.0)}, {float4(8.0), float4(10.0)}};
|
||||
constant Foobar _75[2] = {{10.0, 40.0}, {90.0, 70.0}};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
int index [[user(locn0)]];
|
||||
@@ -19,6 +27,20 @@ struct main0_out
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
// Implementation of an array copy function to cover GLSL's ability to copy an array via assignment.
|
||||
template<typename T, uint N>
|
||||
void spvArrayCopy(thread T (&dst)[N], thread const T (&src)[N])
|
||||
{
|
||||
for (uint i = 0; i < N; dst[i] = src[i], i++);
|
||||
}
|
||||
|
||||
// An overload for constant arrays.
|
||||
template<typename T, uint N>
|
||||
void spvArrayCopyConstant(thread T (&dst)[N], constant T (&src)[N])
|
||||
{
|
||||
for (uint i = 0; i < N; dst[i] = src[i], i++);
|
||||
}
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
@@ -9,6 +11,9 @@ struct Foo
|
||||
float b;
|
||||
};
|
||||
|
||||
constant float _16[4] = {1.0, 4.0, 3.0, 2.0};
|
||||
constant Foo _28[2] = {{10.0, 20.0}, {30.0, 40.0}};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
int line [[user(locn0)]];
|
||||
@@ -19,6 +24,20 @@ struct main0_out
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
// Implementation of an array copy function to cover GLSL's ability to copy an array via assignment.
|
||||
template<typename T, uint N>
|
||||
void spvArrayCopy(thread T (&dst)[N], thread const T (&src)[N])
|
||||
{
|
||||
for (uint i = 0; i < N; dst[i] = src[i], i++);
|
||||
}
|
||||
|
||||
// An overload for constant arrays.
|
||||
template<typename T, uint N>
|
||||
void spvArrayCopyConstant(thread T (&dst)[N], constant T (&src)[N])
|
||||
{
|
||||
for (uint i = 0; i < N; dst[i] = src[i], i++);
|
||||
}
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 vB [[user(locn1)]];
|
||||
float4 vA [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]], bool gl_FrontFacing [[front_facing]])
|
||||
{
|
||||
main0_out out = {};
|
||||
if (gl_FrontFacing)
|
||||
{
|
||||
out.FragColor = in.vA;
|
||||
}
|
||||
else
|
||||
{
|
||||
out.FragColor = in.vB;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float3 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = float3(as_type<float>(0x7f800000u), as_type<float>(0xff800000u), as_type<float>(0xffc00000u));
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(texture2d_ms<float> uSubpass0 [[texture(0)]], texture2d_ms<float> uSubpass1 [[texture(1)]], uint gl_SampleID [[sample_id]], float4 gl_FragCoord [[position]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = (uSubpass0.read(uint2(gl_FragCoord.xy), 1) + uSubpass1.read(uint2(gl_FragCoord.xy), 2)) + uSubpass0.read(uint2(gl_FragCoord.xy), gl_SampleID);
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(texture2d<float> uSubpass0 [[texture(0)]], texture2d<float> uSubpass1 [[texture(1)]], float4 gl_FragCoord [[position]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = uSubpass0.read(uint2(gl_FragCoord.xy), 0) + uSubpass1.read(uint2(gl_FragCoord.xy), 0);
|
||||
return out;
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(depth2d<float> uDepth [[texture(0)]], texture2d<float> uColor [[texture(1)]], sampler uSamplerShadow [[sampler(0)]], sampler uSampler [[sampler(1)]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = uDepth.sample_compare(uSamplerShadow, float3(0.5).xy, 0.5) + uColor.sample(uSampler, float2(0.5)).x;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
uint gl_SampleMask [[sample_mask]];
|
||||
};
|
||||
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = float4(1.0);
|
||||
out.gl_SampleMask = 0;
|
||||
return out;
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct SpecConstArray
|
||||
{
|
||||
float4 samples[2];
|
||||
};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
int Index [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]], constant SpecConstArray& _15 [[buffer(0)]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = _15.samples[in.Index];
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -75,31 +75,31 @@ inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
|
||||
|
||||
|
||||
adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
|
||||
|
||||
|
||||
adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
|
||||
|
||||
|
||||
adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
|
||||
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]);
|
||||
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
typedef float3x4 packed_float4x3;
|
||||
|
||||
struct _15
|
||||
{
|
||||
packed_float4x3 _m0;
|
||||
packed_float4x3 _m1;
|
||||
};
|
||||
|
||||
struct _42
|
||||
{
|
||||
float4x4 _m0;
|
||||
float4x4 _m1;
|
||||
float _m2;
|
||||
char pad3[12];
|
||||
packed_float3 _m3;
|
||||
float _m4;
|
||||
packed_float3 _m5;
|
||||
float _m6;
|
||||
float _m7;
|
||||
float _m8;
|
||||
float2 _m9;
|
||||
};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 m_25 [[attribute(0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float3 m_72 [[user(locn0)]];
|
||||
float4 gl_Position [[position]];
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]], constant _15& _17 [[buffer(0)]], constant _42& _44 [[buffer(1)]])
|
||||
{
|
||||
main0_out out = {};
|
||||
float3 _34;
|
||||
do
|
||||
{
|
||||
_34 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1);
|
||||
break;
|
||||
} while (false);
|
||||
float4 _70 = _44._m0 * float4(_44._m3 + (in.m_25.xyz * (_44._m6 + _44._m7)), 1.0);
|
||||
out.m_72 = _34;
|
||||
float4 _95 = _70;
|
||||
_95.y = -_70.y;
|
||||
out.gl_Position = _95;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
constant float4 _20[2] = {float4(10.0), float4(20.0)};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 vInput1 [[attribute(1)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 gl_Position [[position]];
|
||||
};
|
||||
|
||||
vertex main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.gl_Position = float4(10.0) + in.vInput1;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) in vec4 vA;
|
||||
layout(location = 1) in vec4 vB;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vA - vB * trunc(vA / vB);
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = (((vec4(1.0) + vec4(1.0)) + (vec3(1.0).xyzz + vec4(1.0))) + (vec4(1.0) + vec4(2.0))) + (vec2(1.0).xyxy + vec4(2.0));
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
|
||||
uniform sampler2D SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler;
|
||||
uniform sampler2D SPIRV_Cross_CombinedSampledImageSampler;
|
||||
|
||||
layout(location = 0) out vec4 _entryPointOutput;
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0);
|
||||
_entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _122.xy, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _122.xy, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy);
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#version 450
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler Sampler;
|
||||
layout(set = 0, binding = 0) uniform texture2D SampledImage;
|
||||
uniform sampler SPIRV_Cross_DummySampler;
|
||||
|
||||
layout(location = 0) out vec4 _entryPointOutput;
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0);
|
||||
_entryPointOutput = ((texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _122.xy, 0) + texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _122.xy, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#version 450
|
||||
|
||||
invariant gl_Position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(1.0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#version 450
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
float gl_ClipDistance[1];
|
||||
float gl_CullDistance[1];
|
||||
};
|
||||
|
||||
invariant gl_Position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(1.0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#version 450
|
||||
|
||||
invariant gl_Position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(1.0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 450
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
invariant gl_Position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(1.0);
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#version 450
|
||||
|
||||
in float gl_ClipDistance[4];
|
||||
in float gl_CullDistance[3];
|
||||
|
||||
layout(location = 0) out float FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = gl_ClipDistance[0] + gl_CullDistance[0];
|
||||
}
|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
#version 450
|
||||
#extension GL_ARB_gpu_shader_int64 : require
|
||||
|
||||
layout(location = 0) out vec3 FragColor;
|
||||
layout(location = 0) flat in double vTmp;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(dvec3(uint64BitsToDouble(0x7ff0000000000000ul), uint64BitsToDouble(0xfff0000000000000ul), uint64BitsToDouble(0xfff8000000000000ul)) + dvec3(vTmp));
|
||||
}
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
#version 450
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
float gl_ClipDistance[4];
|
||||
float gl_CullDistance[3];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(1.0);
|
||||
gl_ClipDistance[0] = 0.0;
|
||||
gl_ClipDistance[1] = 0.0;
|
||||
gl_ClipDistance[2] = 0.0;
|
||||
gl_ClipDistance[3] = 0.0;
|
||||
gl_CullDistance[1] = 4.0;
|
||||
}
|
||||
|
||||
+9
-5
@@ -1,11 +1,15 @@
|
||||
#version 450
|
||||
|
||||
out float gl_ClipDistance[4];
|
||||
out float gl_CullDistance[3];
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(10.0);
|
||||
gl_ClipDistance[0] = 1.0;
|
||||
gl_ClipDistance[1] = 4.0;
|
||||
gl_CullDistance[0] = 4.0;
|
||||
gl_CullDistance[1] = 9.0;
|
||||
gl_Position = vec4(1.0);
|
||||
gl_ClipDistance[0] = 0.0;
|
||||
gl_ClipDistance[1] = 0.0;
|
||||
gl_ClipDistance[2] = 0.0;
|
||||
gl_ClipDistance[3] = 0.0;
|
||||
gl_CullDistance[1] = 4.0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) in vec4 vA;
|
||||
layout(location = 1) in vec4 vB;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (gl_FrontFacing)
|
||||
{
|
||||
FragColor = vA;
|
||||
}
|
||||
else
|
||||
{
|
||||
FragColor = vB;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) flat in mediump int vA;
|
||||
layout(location = 1) flat in mediump int vB;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(0.0);
|
||||
mediump int _49;
|
||||
int _60;
|
||||
for (int _57 = 0, _58 = 0; _58 < vA; _57 = _60, _58 += _49)
|
||||
{
|
||||
if ((vA + _58) == 20)
|
||||
{
|
||||
_60 = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
int _59;
|
||||
if ((vB + _58) == 40)
|
||||
{
|
||||
_59 = 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
_59 = _57;
|
||||
}
|
||||
_60 = _59;
|
||||
}
|
||||
_49 = _60 + 10;
|
||||
FragColor += vec4(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) out highp vec3 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0xff800000u), uintBitsToFloat(0xffc00000u));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#version 310 es
|
||||
|
||||
layout(location = 1) in vec4 vInput1;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(10.0) + vInput1;
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(binding = 0, std140) uniform SpecConstArray
|
||||
{
|
||||
vec4 samples[2];
|
||||
} _15;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) flat in mediump int Index;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = _15.samples[Index];
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
layout(constant_id = 10) const int Value = 2;
|
||||
|
||||
layout(set = 0, binding = 0, std140) uniform SpecConstArray
|
||||
{
|
||||
vec4 samples[Value];
|
||||
} _15;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) flat in mediump int Index;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = _15.samples[Index];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
static float4 FragColor;
|
||||
static float4 vA;
|
||||
static float4 vB;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vA : TEXCOORD0;
|
||||
float4 vB : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = fmod(vA, vB);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vA = stage_input.vA;
|
||||
vB = stage_input.vB;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
float4 foo(float4 foo_1)
|
||||
{
|
||||
return foo_1 + 1.0f.xxxx;
|
||||
}
|
||||
|
||||
float4 foo(float3 foo_1)
|
||||
{
|
||||
return foo_1.xyzz + 1.0f.xxxx;
|
||||
}
|
||||
|
||||
float4 foo_1(float4 foo_2)
|
||||
{
|
||||
return foo_2 + 2.0f.xxxx;
|
||||
}
|
||||
|
||||
float4 foo(float2 foo_2)
|
||||
{
|
||||
return foo_2.xyxy + 2.0f.xxxx;
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float4 foo_3 = 1.0f.xxxx;
|
||||
float4 foo_2 = foo(foo_3);
|
||||
float3 foo_5 = 1.0f.xxx;
|
||||
float4 foo_4 = foo(foo_5);
|
||||
float4 foo_7 = 1.0f.xxxx;
|
||||
float4 foo_6 = foo_1(foo_7);
|
||||
float2 foo_9 = 1.0f.xx;
|
||||
float4 foo_8 = foo(foo_9);
|
||||
FragColor = ((foo_2 + foo_4) + foo_6) + foo_8;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
RWByteAddressBuffer _15 : register(u0);
|
||||
ByteAddressBuffer _20 : register(t1);
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 SPIRV_Cross_Inverse(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = m[1][1];
|
||||
adj[0][1] = -m[0][1];
|
||||
|
||||
adj[1][0] = -m[1][0];
|
||||
adj[1][1] = m[0][0];
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the determinant of a 2x2 matrix.
|
||||
float SPIRV_Cross_Det2x2(float a1, float a2, float b1, float b2)
|
||||
{
|
||||
return a1 * b2 - b1 * a2;
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 SPIRV_Cross_Inverse(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = SPIRV_Cross_Det2x2(m[1][1], m[1][2], m[2][1], m[2][2]);
|
||||
adj[0][1] = -SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[2][1], m[2][2]);
|
||||
adj[0][2] = SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[1][1], m[1][2]);
|
||||
|
||||
adj[1][0] = -SPIRV_Cross_Det2x2(m[1][0], m[1][2], m[2][0], m[2][2]);
|
||||
adj[1][1] = SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[2][0], m[2][2]);
|
||||
adj[1][2] = -SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[1][0], m[1][2]);
|
||||
|
||||
adj[2][0] = SPIRV_Cross_Det2x2(m[1][0], m[1][1], m[2][0], m[2][1]);
|
||||
adj[2][1] = -SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[2][0], m[2][1]);
|
||||
adj[2][2] = SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[1][0], m[1][1]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
// Returns the determinant of a 3x3 matrix.
|
||||
float SPIRV_Cross_Det3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
|
||||
{
|
||||
return a1 * SPIRV_Cross_Det2x2(b2, b3, c2, c3) - b1 * SPIRV_Cross_Det2x2(a2, a3, c2, c3) + c1 * SPIRV_Cross_Det2x2(a2, a3, b2, b3);
|
||||
}
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 SPIRV_Cross_Inverse(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
|
||||
adj[0][0] = SPIRV_Cross_Det3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][1] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][2] = SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
|
||||
adj[0][3] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
|
||||
|
||||
adj[1][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
|
||||
adj[1][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
|
||||
|
||||
adj[2][0] = SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][1] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][2] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
|
||||
adj[2][3] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
|
||||
|
||||
adj[3][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
|
||||
adj[3][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
|
||||
|
||||
// Calculate the determinant as a combination of the cofactors of the first row.
|
||||
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]);
|
||||
|
||||
// Divide the classical adjoint matrix by the determinant.
|
||||
// If determinant is zero, matrix is not invertable, so leave it unchanged.
|
||||
return (det != 0.0f) ? (adj * (1.0f / det)) : m;
|
||||
}
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
float2x2 _23 = asfloat(uint2x2(_20.Load2(0), _20.Load2(8)));
|
||||
float2x2 _24 = SPIRV_Cross_Inverse(_23);
|
||||
_15.Store2(0, asuint(_24[0]));
|
||||
_15.Store2(8, asuint(_24[1]));
|
||||
float3x3 _29 = asfloat(uint3x3(_20.Load3(16), _20.Load3(32), _20.Load3(48)));
|
||||
float3x3 _30 = SPIRV_Cross_Inverse(_29);
|
||||
_15.Store3(16, asuint(_30[0]));
|
||||
_15.Store3(32, asuint(_30[1]));
|
||||
_15.Store3(48, asuint(_30[2]));
|
||||
float4x4 _35 = asfloat(uint4x4(_20.Load4(64), _20.Load4(80), _20.Load4(96), _20.Load4(112)));
|
||||
float4x4 _36 = SPIRV_Cross_Inverse(_35);
|
||||
_15.Store4(64, asuint(_36[0]));
|
||||
_15.Store4(80, asuint(_36[1]));
|
||||
_15.Store4(96, asuint(_36[2]));
|
||||
_15.Store4(112, asuint(_36[3]));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
RWByteAddressBuffer _10 : register(u0);
|
||||
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
|
||||
{
|
||||
uint3 SPIRV_Cross_NumWorkgroups_count : packoffset(c0);
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_10.Store3(0, SPIRV_Cross_NumWorkgroups_count);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
Loaded 100 of 831 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user