mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-10 03:21:30 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fc6bfbb24 | ||
|
|
6c02dfd84c | ||
|
|
5139241e87 | ||
|
|
a453819732 | ||
|
|
9193bdc46c | ||
|
|
56cbaefd05 | ||
|
|
c0f79d2032 | ||
|
|
4e222589a0 | ||
|
|
daa44b7441 | ||
|
|
22e9029640 | ||
|
|
4d0af5f4ae | ||
|
|
e7cde2c4ef | ||
|
|
60b8a25203 | ||
|
|
c842d2e27e | ||
|
|
28a0b6c2e2 | ||
|
|
56d22d4564 | ||
|
|
9bdb6291b0 | ||
|
|
175672dedc | ||
|
|
064ea5368e | ||
|
|
bf610ba2e6 | ||
|
|
7acd4b1847 | ||
|
|
dcf7ae855e | ||
|
|
fd767f65bd | ||
|
|
f94c798792 | ||
|
|
b6347420d3 | ||
|
|
0de6af43bb | ||
|
|
64db75a62e | ||
|
|
11289367cf | ||
|
|
7b52b4a258 | ||
|
|
7e45bd93f6 | ||
|
|
242eef6a6d | ||
|
|
89cd494ab7 | ||
|
|
9bd18e22ba | ||
|
|
f48cce2334 | ||
|
|
7913b88853 | ||
|
|
8cf4127695 | ||
|
|
5888718c04 | ||
|
|
070c09faec | ||
|
|
35f1c9ba33 | ||
|
|
407d7e2c4e | ||
|
|
a05d3bc4f7 | ||
|
|
a0ba515337 | ||
|
|
d19aebc0bf | ||
|
|
b25e2ce4e8 | ||
|
|
964e9db588 | ||
|
|
1e2d8de9ca | ||
|
|
f5efddb7ec | ||
|
|
d7ab78d923 | ||
|
|
44d3561468 | ||
|
|
2b02616512 | ||
|
|
ff831a7d99 | ||
|
|
ddf34bacfd | ||
|
|
bda5e67b48 | ||
|
|
8bea9ceadb | ||
|
|
789897481b | ||
|
|
be87075618 | ||
|
|
95bb7f5aa5 | ||
|
|
b01ac41c5f | ||
|
|
186528a7e0 | ||
|
|
5b99a74cd8 | ||
|
|
a6539570a2 | ||
|
|
468256a8f8 | ||
|
|
79219c1640 | ||
|
|
71b423c572 | ||
|
|
8f64909886 | ||
|
|
a16cbe7cde | ||
|
|
d56bd2180f | ||
|
|
6cc7d124c0 | ||
|
|
755578fc43 | ||
|
|
6f69034f6a | ||
|
|
c44e4de4f8 | ||
|
|
d3504abc5d | ||
|
|
c6a9967b58 | ||
|
|
1f2054d42f | ||
|
|
d254c3eca4 | ||
|
|
9a23ee8017 | ||
|
|
1b1ec37f36 | ||
|
|
2a9046c06f | ||
|
|
9730fa5c51 | ||
|
|
d3484528d1 | ||
|
|
752e729ec2 | ||
|
|
b212640732 | ||
|
|
692c8683b2 | ||
|
|
1951adeb5b | ||
|
|
788bb4de50 | ||
|
|
597e0ce1ec | ||
|
|
521433d1c7 | ||
|
|
72e6909aaa | ||
|
|
c58af0d74e | ||
|
|
e28db33f64 | ||
|
|
34edaaf98b | ||
|
|
8a93e8d503 | ||
|
|
e428cec428 | ||
|
|
98682197c9 | ||
|
|
327e2237d6 | ||
|
|
19aed2af36 | ||
|
|
56389466aa | ||
|
|
6738d64546 | ||
|
|
2d8623fa10 | ||
|
|
ce2fb1770b | ||
|
|
d4bd06545f | ||
|
|
02ae733b27 | ||
|
|
6ccb9aa00d | ||
|
|
8c95a5731a | ||
|
|
1a3b137d9d | ||
|
|
8c785fa689 | ||
|
|
4d1090dc53 | ||
|
|
43aa977a91 | ||
|
|
ef84300de0 | ||
|
|
d8257f4817 | ||
|
|
37bebb5b65 | ||
|
|
febfc18f0b | ||
|
|
8b1f8b8ae2 | ||
|
|
b31779c588 | ||
|
|
b45b1b3e55 | ||
|
|
49bea666ff | ||
|
|
b141c37fe9 | ||
|
|
843a7f200c | ||
|
|
a8af4ee8c6 | ||
|
|
85e4f5d94d | ||
|
|
da0e2e6a51 | ||
|
|
1f3e1baeb6 | ||
|
|
1bfea60c2d | ||
|
|
31b99e2b01 | ||
|
|
01d659a4a3 | ||
|
|
40e9416c6c | ||
|
|
b5d2782833 | ||
|
|
bfb71f0694 | ||
|
|
875ab9378d | ||
|
|
a8ee5f6c44 | ||
|
|
ecc6c60ed2 | ||
|
|
e11209ac79 | ||
|
|
a5be56dd77 | ||
|
|
6fe379d978 | ||
|
|
aaf35f53f8 | ||
|
|
42f88a8239 | ||
|
|
42e93f3197 | ||
|
|
09ad30f9de | ||
|
|
9dc597cf6c | ||
|
|
72ff4c4d44 | ||
|
|
8e33b35b09 | ||
|
|
1923ec11a9 | ||
|
|
97813b9722 | ||
|
|
2a211f90cf | ||
|
|
30e24a0bee | ||
|
|
f2c9e754a9 | ||
|
|
103c8c3939 | ||
|
|
5f14aab6fc | ||
|
|
11df736662 | ||
|
|
ce5b481fc8 | ||
|
|
c02ff23ab6 | ||
|
|
4eb7ca5db1 | ||
|
|
26b2ff7c3f | ||
|
|
6900045b35 | ||
|
|
3b3bcd8697 | ||
|
|
30353792a5 | ||
|
|
e9b7c7267e | ||
|
|
37454f79a8 | ||
|
|
bc90062366 | ||
|
|
c64d5556c1 | ||
|
|
d5dbfe78d5 | ||
|
|
940efa8d73 | ||
|
|
5783030b5c | ||
|
|
8031a541da | ||
|
|
6ace5e99f0 | ||
|
|
a6a53bd539 | ||
|
|
71d1dedbdb | ||
|
|
3391a0b94e | ||
|
|
0d88799e6d | ||
|
|
92afd7387d | ||
|
|
e42015e026 | ||
|
|
757a9c08de | ||
|
|
4ccb844ad6 | ||
|
|
b030588669 | ||
|
|
6d90aae5d6 | ||
|
|
c1a936ea81 | ||
|
|
cd33e39040 | ||
|
|
596901b335 | ||
|
|
115bdd9fe5 | ||
|
|
1ca2a617f9 | ||
|
|
aa0f553a25 | ||
|
|
e83a74528b | ||
|
|
8024dd367e | ||
|
|
428175cbbc | ||
|
|
2cfe34ce3f | ||
|
|
f93af36364 | ||
|
|
2b4b38a5c5 | ||
|
|
63b0084d3b | ||
|
|
2a4bbe301a | ||
|
|
72f97fe712 | ||
|
|
ba35d29541 | ||
|
|
bc67aa3aad | ||
|
|
755d1ee17b | ||
|
|
a42b400ee9 | ||
|
|
b90e0750c3 | ||
|
|
17dc8e9fb2 | ||
|
|
1d05861969 | ||
|
|
abc18d3793 | ||
|
|
408cfd66d6 | ||
|
|
7ca6538095 | ||
|
|
db65537c24 | ||
|
|
039da3bb83 | ||
|
|
ee9c786297 | ||
|
|
35300bf08b | ||
|
|
f30f597499 | ||
|
|
5202afb173 | ||
|
|
934d5782a7 | ||
|
|
e6bf322737 | ||
|
|
75673beac6 | ||
|
|
a6ad1241ed | ||
|
|
23ae113bfb | ||
|
|
83aa0842ca | ||
|
|
9436951437 | ||
|
|
5d0c4a0237 | ||
|
|
0ac208c91d | ||
|
|
84e253becc | ||
|
|
962e1f710e | ||
|
|
409c541494 | ||
|
|
a2f2a726bb | ||
|
|
11ff498f3d | ||
|
|
a08eef9fda | ||
|
|
fe4b8983e7 | ||
|
|
2b70e9d9ec | ||
|
|
d8f1a08a47 | ||
|
|
9b1e1af86e | ||
|
|
f5d923caec | ||
|
|
007d3323c5 | ||
|
|
67af3758df | ||
|
|
cc879a7bcc | ||
|
|
833285cfbf | ||
|
|
d89f268d98 | ||
|
|
1523976d2c | ||
|
|
0e46a6b77e | ||
|
|
410188ce90 | ||
|
|
cef20c4135 | ||
|
|
532462702e | ||
|
|
76267cf05f | ||
|
|
942c61cb58 | ||
|
|
b726959297 | ||
|
|
8e21e61923 | ||
|
|
226206e2f8 | ||
|
|
754c9d4db9 | ||
|
|
ca75e5ee50 | ||
|
|
fb1c44c900 | ||
|
|
24ea73b218 | ||
|
|
18c708d29a | ||
|
|
6fa5822bb2 | ||
|
|
da070061b0 | ||
|
|
81859c805f | ||
|
|
45580cb9a8 | ||
|
|
457d543cb1 | ||
|
|
45cde3c49e | ||
|
|
c61230cdbe | ||
|
|
85e7920b66 | ||
|
|
c9fd0d4a77 | ||
|
|
e8941ec437 | ||
|
|
9e372c6c29 | ||
|
|
1bbdad4621 | ||
|
|
969067b359 | ||
|
|
8d835d9b51 | ||
|
|
0adba21410 | ||
|
|
b979e6209e | ||
|
|
fb94ccbfd2 | ||
|
|
7e67a1bf36 | ||
|
|
d2aa12149f | ||
|
|
562201bdd4 | ||
|
|
6eee3d68dd | ||
|
|
bcea63b177 | ||
|
|
e2617d56cf | ||
|
|
eec5d7722b | ||
|
|
d950794659 | ||
|
|
a43d2b627a | ||
|
|
12cf1bf5f8 | ||
|
|
966a1d49e7 | ||
|
|
27c6e3c5c4 | ||
|
|
e01416a0da | ||
|
|
b2963a9124 | ||
|
|
377f5567ce | ||
|
|
69fedc6b40 | ||
|
|
5549b136c2 | ||
|
|
6982dd838f | ||
|
|
fa07570f76 | ||
|
|
f364d2d3ec | ||
|
|
c830d0273d | ||
|
|
32888c1f17 | ||
|
|
b67bb87c8d | ||
|
|
cbd5e87711 | ||
|
|
534e5bbf34 | ||
|
|
d73685d3ef | ||
|
|
3ff3cada71 | ||
|
|
028fc18294 | ||
|
|
29e1000e47 | ||
|
|
7ed13e667f | ||
|
|
9dd33b9797 | ||
|
|
02a2a81dac | ||
|
|
a31a73efba | ||
|
|
3b256becc6 | ||
|
|
47ea7c7cb9 | ||
|
|
2b4890220a | ||
|
|
5483f5fc39 | ||
|
|
700fce3bd2 | ||
|
|
dc4f7ec920 | ||
|
|
3aaab43736 | ||
|
|
df1c131520 | ||
|
|
3d0e768e71 | ||
|
|
0b3545837e | ||
|
|
a180b1094e | ||
|
|
d2fa1f177d | ||
|
|
39406c3357 | ||
|
|
453681b59d | ||
|
|
ac22a9ce20 | ||
|
|
c4bb588f3b | ||
|
|
aa5ac765b7 | ||
|
|
8b5e7c45d0 | ||
|
|
2e8569a472 | ||
|
|
8771171f63 | ||
|
|
24306429bd | ||
|
|
2963288b29 | ||
|
|
2c7d674d52 | ||
|
|
ae6524a7f5 | ||
|
|
31a30f1496 | ||
|
|
0e159a0ec0 | ||
|
|
80dbef47cb | ||
|
|
c60f706f1e | ||
|
|
e5610d5ddb | ||
|
|
76d07cd6a7 | ||
|
|
311de8138e | ||
|
|
df632814e6 | ||
|
|
94022f0599 | ||
|
|
1464995fdc | ||
|
|
43a6213b68 | ||
|
|
4dfda8743c | ||
|
|
8e96700f0f | ||
|
|
27c47a89b9 | ||
|
|
f9ba402766 | ||
|
|
840ebb13ca | ||
|
|
48adfab643 | ||
|
|
4f7f237644 | ||
|
|
5d2b7ce32f | ||
|
|
0336c2f975 | ||
|
|
dac1f10708 | ||
|
|
50e902f2ea | ||
|
|
0b4ccf25e7 | ||
|
|
fa458b2f5c | ||
|
|
e225e96025 | ||
|
|
178730891d | ||
|
|
d446742d4b | ||
|
|
ef75c80218 | ||
|
|
caaf4f922b | ||
|
|
9c305f7e95 | ||
|
|
88cb40834c | ||
|
|
535012f8bf | ||
|
|
0ee124582c | ||
|
|
58d6918533 | ||
|
|
6fc0cc4645 | ||
|
|
9449184c69 | ||
|
|
75b48a866f | ||
|
|
df27e704a5 | ||
|
|
efc35e43bb | ||
|
|
6776caa3f5 | ||
|
|
e30c7edd8d | ||
|
|
acdbf6f069 | ||
|
|
dbe270476a | ||
|
|
81519d227b | ||
|
|
6fe3a31617 | ||
|
|
3451994374 | ||
|
|
2a25e284af | ||
|
|
ea6b69f078 | ||
|
|
7f75e9f4cf | ||
|
|
14d2528da7 | ||
|
|
f880cb2d48 | ||
|
|
1fd1426388 | ||
|
|
501fd33b68 | ||
|
|
553f9b705e | ||
|
|
cd5852d3b0 | ||
|
|
1d118c46a3 | ||
|
|
1e96393228 | ||
|
|
caad590d04 | ||
|
|
b297bd7e6c | ||
|
|
3a5d1c5322 | ||
|
|
dda52a1eed | ||
|
|
189ea0578d | ||
|
|
b8e3933fe0 | ||
|
|
d24478d0d8 | ||
|
|
80880ec857 | ||
|
|
ba3513fb70 | ||
|
|
461a936eb4 | ||
|
|
8db625dd59 | ||
|
|
7eecb5b2b8 | ||
|
|
d0b997a414 | ||
|
|
f096e667d8 | ||
|
|
0aa1164a6f | ||
|
|
11a7171b51 | ||
|
|
3865856aa2 | ||
|
|
91298255ad | ||
|
|
4dd8fb4df9 | ||
|
|
5d46e8bca4 | ||
|
|
2f55c5724f | ||
|
|
e6c455d2c6 | ||
|
|
8d99fd7ce0 | ||
|
|
a7bad98b39 | ||
|
|
f80d701ca7 | ||
|
|
6d4b5a93ea | ||
|
|
e81ee5f0cb | ||
|
|
7cf4763bfb | ||
|
|
b0013dbd68 | ||
|
|
f9a412dc11 | ||
|
|
19c537db52 | ||
|
|
9c695765dd | ||
|
|
f34dbdff8b | ||
|
|
ed9e82d906 | ||
|
|
de1efd7878 | ||
|
|
0ccfa3804b | ||
|
|
d8924d6fbb | ||
|
|
f7b5baccb6 | ||
|
|
f907f2ea7d | ||
|
|
445c2dd6f4 | ||
|
|
337e185d18 | ||
|
|
5fc95142e5 | ||
|
|
ebb65cd781 | ||
|
|
761f172367 | ||
|
|
ceb1d1f8a0 | ||
|
|
5dd837b310 | ||
|
|
9783e59ed3 | ||
|
|
5e09af9c77 | ||
|
|
5bfa63e4bd | ||
|
|
efcbb7627c | ||
|
|
b1732efd03 | ||
|
|
1f7649bfd8 | ||
|
|
d953ec2b5f | ||
|
|
5bc78d3ad5 | ||
|
|
9889f34180 | ||
|
|
08e61230e9 | ||
|
|
b0b39ff899 | ||
|
|
7dcd46a20f | ||
|
|
7f38ee79f7 | ||
|
|
b011f27c89 | ||
|
|
911d01b1e4 | ||
|
|
7b1b5b07c6 | ||
|
|
b228775b0d | ||
|
|
4a3e4fc7de | ||
|
|
13f18afcd9 | ||
|
|
8147e6f31c | ||
|
|
f896ba29d0 | ||
|
|
037b57a4bd | ||
|
|
27a133c4fd | ||
|
|
80bdcd89a6 | ||
|
|
b5a1111e07 | ||
|
|
a5f232793b | ||
|
|
55c33d2022 | ||
|
|
aeab2e5bd1 | ||
|
|
ebf644f172 | ||
|
|
15fb080e74 | ||
|
|
c7acc4b118 | ||
|
|
af37d3780a | ||
|
|
68f7aeadb2 | ||
|
|
3a442af6be | ||
|
|
d3d4c5740c | ||
|
|
7ab992e858 | ||
|
|
05e35bd4b1 | ||
|
|
fde8cbecf2 | ||
|
|
34699a9504 | ||
|
|
604024b799 | ||
|
|
7b39da0848 | ||
|
|
a6f8013c24 | ||
|
|
2906744a0d | ||
|
|
03e800c1c8 | ||
|
|
81c8fc891a | ||
|
|
f597861a4c | ||
|
|
923305df4c | ||
|
|
891d8741db | ||
|
|
ee813ab76b | ||
|
|
9acb536bf4 | ||
|
|
3d2c579bc7 | ||
|
|
a7f134b5a7 | ||
|
|
722137296d | ||
|
|
34a1eb34a9 | ||
|
|
00a3a74d43 | ||
|
|
192fa74868 | ||
|
|
0c3a684e2c | ||
|
|
f2ea5dde11 | ||
|
|
4416baa920 | ||
|
|
152f658c7d | ||
|
|
f51560cb0e | ||
|
|
2e2ae5494b | ||
|
|
801b9b5c6f | ||
|
|
ba41d1bf84 | ||
|
|
648032bd75 | ||
|
|
de6c185e88 | ||
|
|
fc0ea0c63f | ||
|
|
e96c85b41c | ||
|
|
5af5222249 | ||
|
|
6b45447425 | ||
|
|
d33772195f | ||
|
|
8d6aafde95 | ||
|
|
9ef75473e0 | ||
|
|
16cccb8796 | ||
|
|
1f6b9e1c18 | ||
|
|
89641d0009 | ||
|
|
18035bc8ec | ||
|
|
dbc51fb132 | ||
|
|
4aca11693e | ||
|
|
9436cc0234 | ||
|
|
6f57aa84a8 | ||
|
|
5328ce7375 | ||
|
|
61971c2f0e | ||
|
|
e2691c425c | ||
|
|
2dfe14ce4d | ||
|
|
9182a2e519 | ||
|
|
60c22afb94 | ||
|
|
9e347ec71f | ||
|
|
f087b150c9 | ||
|
|
b68256689a | ||
|
|
53d1048905 | ||
|
|
f97ebfbf1f | ||
|
|
c0117f077b | ||
|
|
019b9a08c2 | ||
|
|
c8c7ca0c30 | ||
|
|
3adb6cc5a8 | ||
|
|
374a52c0e9 | ||
|
|
8e3b3762ad | ||
|
|
b0f7728606 | ||
|
|
a2cddb27e5 | ||
|
|
74013c220a | ||
|
|
204f9aa484 | ||
|
|
d4367ed993 | ||
|
|
706a549f03 | ||
|
|
b9e65fc750 | ||
|
|
8f4a1b748b | ||
|
|
8422e44a2d | ||
|
|
994e07fa3d | ||
|
|
e98b165761 | ||
|
|
282853873b | ||
|
|
6ee8f681da | ||
|
|
495c702860 | ||
|
|
4315b57791 | ||
|
|
8797fa95eb | ||
|
|
1163c1aef8 | ||
|
|
4c390944bb | ||
|
|
c76ce05070 | ||
|
|
aa66ca8bf4 | ||
|
|
766f3b33c7 | ||
|
|
1657b9b7c4 | ||
|
|
183d2fcabd | ||
|
|
a18e7767f3 | ||
|
|
2634a5ea2d | ||
|
|
6cdde6d9aa | ||
|
|
684374eec8 | ||
|
|
ef17085216 | ||
|
|
427003fa3b | ||
|
|
85fab182b8 | ||
|
|
17aa49004f | ||
|
|
da3a90a025 | ||
|
|
580c0184c2 | ||
|
|
2a54cbca75 | ||
|
|
0588c3c68e | ||
|
|
26f9489f89 | ||
|
|
0d898dd479 | ||
|
|
74a602d4c9 | ||
|
|
507b609ec9 | ||
|
|
9f2e395c45 | ||
|
|
8bff69eae8 | ||
|
|
f07571f8eb | ||
|
|
ccc9d36949 | ||
|
|
3c664f51b2 | ||
|
|
ccfd9d79dd | ||
|
|
0cd2310a6f | ||
|
|
3bfc13223c | ||
|
|
bc81a9dc88 | ||
|
|
8354ffd452 | ||
|
|
45541a0d44 | ||
|
|
013ecf3719 | ||
|
|
68a6b7f402 | ||
|
|
812eefa601 | ||
|
|
4dc6eb0ae4 | ||
|
|
c227ce5ed2 | ||
|
|
e79c19e52a | ||
|
|
840bd459df | ||
|
|
472abb1e8f | ||
|
|
30d5cd1a07 | ||
|
|
c30715db10 | ||
|
|
042c2e82a0 | ||
|
|
9018012c5c | ||
|
|
ba0986ae20 | ||
|
|
f86b80e2b0 | ||
|
|
978dcf1997 | ||
|
|
a6b24ce995 | ||
|
|
f10b60f14f | ||
|
|
57ad08e37d | ||
|
|
3a18a57de5 | ||
|
|
cba3c5b68c | ||
|
|
b96f51ecc3 | ||
|
|
bf7cbb2aea | ||
|
|
a3757cea70 | ||
|
|
ef4cc160a5 | ||
|
|
634da308aa | ||
|
|
9e2d53dc99 | ||
|
|
5730ebc118 | ||
|
|
dc6752cdf4 | ||
|
|
63ad668ff0 | ||
|
|
cf97ff3824 | ||
|
|
6a46065162 | ||
|
|
80b17668b6 | ||
|
|
4dd3a22679 | ||
|
|
1028dc7959 | ||
|
|
0e363164b1 | ||
|
|
d387cfbfbe | ||
|
|
6bbfcdd069 | ||
|
|
3a981e081c | ||
|
|
ba8050ae2c | ||
|
|
5fba9fe25a | ||
|
|
cb63f20c8c | ||
|
|
956c6ca25a | ||
|
|
b8da3d0e9f | ||
|
|
c5de5d9433 | ||
|
|
b04a52e2e9 | ||
|
|
0b68b46c57 | ||
|
|
3a53010b13 | ||
|
|
d608904309 | ||
|
|
2e3b6fbdf0 | ||
|
|
a5bf9d8dc6 | ||
|
|
96e96b9dfd | ||
|
|
56fad1a77b | ||
|
|
ed38887910 | ||
|
|
c24e66e61c | ||
|
|
8bc1d9965d | ||
|
|
c6fd61cc86 | ||
|
|
673a190d84 | ||
|
|
ce19e7c98a | ||
|
|
393ebfc467 | ||
|
|
bb1fdad0d9 | ||
|
|
93523782e5 | ||
|
|
f1c5812ff8 | ||
|
|
3a30c71cea | ||
|
|
9be084de00 | ||
|
|
cc9ce0044b | ||
|
|
c323041bc5 | ||
|
|
54726aa668 | ||
|
|
3d5bb2af17 | ||
|
|
6437e4b4a9 | ||
|
|
9ba42837d8 | ||
|
|
db2816556c | ||
|
|
86b64c34aa | ||
|
|
5f8c888e0f | ||
|
|
2440b6198d | ||
|
|
0c9b4a60a2 | ||
|
|
4a6a97be60 | ||
|
|
924007eda2 | ||
|
|
a6ff88a094 | ||
|
|
4a7bfa463f | ||
|
|
7902fdafd8 | ||
|
|
b957e5aff4 | ||
|
|
f36dfda328 | ||
|
|
4b6c4e5a6a | ||
|
|
d3c2d90a2c | ||
|
|
fb4bf99a31 | ||
|
|
d5ec046c63 | ||
|
|
6a47669d21 | ||
|
|
93561a042b | ||
|
|
f680f00098 | ||
|
|
625ddc5e52 | ||
|
|
27f34bf420 | ||
|
|
7e56ecba4b | ||
|
|
e2e411bfa5 | ||
|
|
8179379d31 | ||
|
|
6cb2159a50 | ||
|
|
d28d14079a | ||
|
|
1a20fff7f2 | ||
|
|
f0d47bcd13 | ||
|
|
a80fb7c969 | ||
|
|
6208981ad3 | ||
|
|
e8ff299fd4 | ||
|
|
ef63b4342c | ||
|
|
3271b61b6a | ||
|
|
63d9d80d17 | ||
|
|
6ee8ddb496 | ||
|
|
3fc2ddb8d2 | ||
|
|
99500b6f10 | ||
|
|
80df049f41 | ||
|
|
ed0e1cbba1 | ||
|
|
c3591d9af8 | ||
|
|
d0d8a98046 | ||
|
|
e601190ecb | ||
|
|
f8d32bf10d | ||
|
|
0ec2ae1e97 | ||
|
|
6319dbcc8a | ||
|
|
8d7e9b31a4 | ||
|
|
b8460026fb | ||
|
|
ffff5df787 | ||
|
|
2178b6d10f | ||
|
|
c8027ebe1d | ||
|
|
6b9dc2205b | ||
|
|
094196220d | ||
|
|
7ab2cbf877 | ||
|
|
fd799bccef | ||
|
|
c5ffd06778 | ||
|
|
6c73cea470 | ||
|
|
832cf07247 | ||
|
|
49c399217d | ||
|
|
f884e5b0c8 | ||
|
|
500869dd3f | ||
|
|
537870b6ec | ||
|
|
2fcd44b40c | ||
|
|
932904e07e | ||
|
|
983617372a | ||
|
|
b7bbf368fe | ||
|
|
1dc918b8c7 | ||
|
|
84d4822901 | ||
|
|
f08031345e | ||
|
|
7bdb48088b | ||
|
|
5db96f35fa | ||
|
|
5918e15999 | ||
|
|
773dbcf1cc | ||
|
|
55334aeffd | ||
|
|
528e4d8cc4 | ||
|
|
6311885824 | ||
|
|
13da6bf4a2 | ||
|
|
b4bb6e2ef4 | ||
|
|
64e0861aee | ||
|
|
3ba978caa9 | ||
|
|
e16d962c01 | ||
|
|
f25306ba22 | ||
|
|
03a745e5b4 | ||
|
|
0550b22a35 | ||
|
|
f74e399bdf | ||
|
|
cc26f4a88c | ||
|
|
41575a63ac | ||
|
|
6ce57ffe18 | ||
|
|
e1ec0e578c | ||
|
|
4a5de7ed6a | ||
|
|
2cb8b50cef | ||
|
|
fe72bc3ab6 | ||
|
|
cc1a828c87 | ||
|
|
e54da03ddc | ||
|
|
4ba100f660 | ||
|
|
29ce197d16 | ||
|
|
5c7778519b | ||
|
|
b9585df325 | ||
|
|
214c2fe273 | ||
|
|
5fc2f3db51 | ||
|
|
9f7d0d59c5 | ||
|
|
51c01df815 | ||
|
|
1d9ea0297e | ||
|
|
b640e1cbe9 | ||
|
|
47164a550d | ||
|
|
c106783e85 | ||
|
|
f4685447cc | ||
|
|
e6f637ea6b | ||
|
|
9172765252 | ||
|
|
4bd4692cf2 | ||
|
|
6f73bdf287 | ||
|
|
f97d6ec909 | ||
|
|
fb257eb21e | ||
|
|
a3b593f27b | ||
|
|
273d94e549 | ||
|
|
d01b9c4a09 | ||
|
|
82f721145c | ||
|
|
58e87387d5 | ||
|
|
f03180c31a | ||
|
|
92a18e411c | ||
|
|
4f16ff8c2e | ||
|
|
bd883ad4d5 | ||
|
|
b4b5ed1630 | ||
|
|
0731a79a4f | ||
|
|
f71bbeae9f | ||
|
|
29fa91dcd0 | ||
|
|
a634994809 | ||
|
|
bd9e70f70e | ||
|
|
cdcca43233 | ||
|
|
cb475f7815 | ||
|
|
d8e9e3383d | ||
|
|
7484e01034 | ||
|
|
1a3a88a62e | ||
|
|
f608b5ed52 | ||
|
|
86ac651edf | ||
|
|
47f6ff7435 | ||
|
|
dc81998c0b | ||
|
|
5b5e3e4a05 | ||
|
|
88873776c8 | ||
|
|
9f45370120 | ||
|
|
daa2a572b9 | ||
|
|
a3f95f58ec | ||
|
|
1f8e0fdfe5 | ||
|
|
60a45db69e | ||
|
|
841593f082 | ||
|
|
4ef66e6e8c | ||
|
|
79b434719f | ||
|
|
318843a71d | ||
|
|
194aa4ae7b | ||
|
|
da5ce6ef35 | ||
|
|
37c67e480d | ||
|
|
2b693afc7e | ||
|
|
2d9727f499 | ||
|
|
1679124361 | ||
|
|
e7414e8286 | ||
|
|
2dd9c5bb82 | ||
|
|
1c5a35d0d3 | ||
|
|
5e42401fdb | ||
|
|
3e5cc5b300 | ||
|
|
cd9cda08a2 | ||
|
|
87a7c0f426 | ||
|
|
45c50c604b | ||
|
|
f30c0010f6 | ||
|
|
281223eae8 | ||
|
|
136068098d | ||
|
|
29098d6b99 | ||
|
|
f1f3a6f0ae | ||
|
|
e1b1a1b07b | ||
|
|
ebd9430982 | ||
|
|
e73b1564a4 | ||
|
|
6d2df385f8 | ||
|
|
bd73d4b98a | ||
|
|
11f26ed549 | ||
|
|
78adf0cca4 | ||
|
|
d1dba26565 | ||
|
|
ac18a75311 | ||
|
|
10697dc543 | ||
|
|
df1979be12 | ||
|
|
897c1654ab | ||
|
|
f48458d5bd | ||
|
|
c5b71470c4 | ||
|
|
57df01bbaa | ||
|
|
61ff51be2f | ||
|
|
daf0b55f80 | ||
|
|
830b2e429d | ||
|
|
030a65bf9b | ||
|
|
c4d3ea6f8d | ||
|
|
4ead2df09e | ||
|
|
4069796926 | ||
|
|
99472beeb6 | ||
|
|
713de18a04 | ||
|
|
0c07dc6f24 | ||
|
|
1dee2438e6 | ||
|
|
6c95f389b1 | ||
|
|
f13148d10e | ||
|
|
91e8f7d4db | ||
|
|
17d1e387de | ||
|
|
7477dd65ff | ||
|
|
5d64adf1a6 | ||
|
|
bce0c40b73 | ||
|
|
734e952457 | ||
|
|
3bdea333e1 | ||
|
|
8ddcf4d6d7 | ||
|
|
797f26421a | ||
|
|
9d144e28fc | ||
|
|
ae52cd2c68 | ||
|
|
7a281a348e | ||
|
|
591e8e22c7 | ||
|
|
89ee07486a | ||
|
|
7ceb107c6a | ||
|
|
e32ceb8f30 | ||
|
|
86385dcaf7 | ||
|
|
97e96bf272 | ||
|
|
fdffc1a178 | ||
|
|
fea2dd3d17 | ||
|
|
b997c8f80f | ||
|
|
391fd3eadc | ||
|
|
f26b18c7a4 | ||
|
|
db66dcb4db | ||
|
|
6efe1128c0 | ||
|
|
2a4f19d0c7 | ||
|
|
c8d25a9152 | ||
|
|
d8a5958e21 | ||
|
|
cb3ab8b12e | ||
|
|
2f6297838e | ||
|
|
09c49aad11 | ||
|
|
bc511b8c8a | ||
|
|
066a0a6b32 | ||
|
|
ccb45a068d | ||
|
|
28b2bf537f | ||
|
|
78a3d0f828 | ||
|
|
3917b02f9f | ||
|
|
0256156a6b | ||
|
|
19facdb066 | ||
|
|
d23faff8d6 | ||
|
|
2738c79aa0 | ||
|
|
1c1b35708a | ||
|
|
db152fede8 | ||
|
|
b75f4b4f67 | ||
|
|
92ef4002d1 | ||
|
|
59b5ecf7db | ||
|
|
c398db76d4 | ||
|
|
27caf46616 | ||
|
|
510dfca756 | ||
|
|
2d3fc1a384 | ||
|
|
443262a9cd | ||
|
|
6f77859eed | ||
|
|
d2a0046f23 | ||
|
|
d7168584a2 | ||
|
|
de1079497c | ||
|
|
346d9480f7 | ||
|
|
2df70cce17 | ||
|
|
4498e9ffba | ||
|
|
a682ccd8e8 | ||
|
|
e948412bb4 | ||
|
|
7b3554fd3c | ||
|
|
25a7c04a27 | ||
|
|
28d9ba6a05 | ||
|
|
33103263a7 | ||
|
|
93b523e6ea | ||
|
|
fd3ef0ec9c | ||
|
|
60f203d344 | ||
|
|
39742e24db | ||
|
|
9b0b16e2c0 | ||
|
|
c8f03b4640 | ||
|
|
fca639ad84 | ||
|
|
0b27f539c2 | ||
|
|
823e2c9a32 | ||
|
|
460ceaef97 | ||
|
|
97dec217b3 | ||
|
|
06648ca21b | ||
|
|
06b840c6ca | ||
|
|
859da19d80 | ||
|
|
4fd750b48a | ||
|
|
b3900217da | ||
|
|
2d27a8c3e2 | ||
|
|
1f8a85615c | ||
|
|
5ef595be1a | ||
|
|
de3581de73 | ||
|
|
15c3f56b37 | ||
|
|
21d928ba0e | ||
|
|
a7e9ca4def | ||
|
|
38ec1acf8e | ||
|
|
77b158e6a2 | ||
|
|
0ce1fa7751 | ||
|
|
332ccbf300 | ||
|
|
7b09d5399c | ||
|
|
1e212b4248 | ||
|
|
8e6f931f85 | ||
|
|
1515bd8c1b | ||
|
|
4eb33dfc4f | ||
|
|
d7f4538c01 | ||
|
|
b2ec210fd6 | ||
|
|
9cb896a3d9 | ||
|
|
161d758b33 | ||
|
|
a77f9c37c6 | ||
|
|
26b9cb3c78 | ||
|
|
728f77b2bc | ||
|
|
2967e35930 | ||
|
|
650fe99198 | ||
|
|
2064a98dfd | ||
|
|
2e210b6bb4 | ||
|
|
39cc418e2e | ||
|
|
fb38c0da21 | ||
|
|
ef6b87ae2c | ||
|
|
3407cd665d | ||
|
|
af12858953 | ||
|
|
a5e35e7193 | ||
|
|
3bb5072e1b | ||
|
|
db034b8a12 | ||
|
|
e099b8150c | ||
|
|
24cb240079 | ||
|
|
7cbe4ba9a8 | ||
|
|
1af59d71c7 | ||
|
|
71cdb5e03c | ||
|
|
f566ecebf4 | ||
|
|
e65ad7c6d8 | ||
|
|
a11decf61d | ||
|
|
3b334b60d6 | ||
|
|
8dd6328fb7 | ||
|
|
c78a33ba8f | ||
|
|
c76545bf6c | ||
|
|
9c72e6aaaf | ||
|
|
4e79ef9f61 | ||
|
|
8701ce289a | ||
|
|
e0eb625dd0 | ||
|
|
54fd72fb24 | ||
|
|
399011a4fa | ||
|
|
8eac8916b7 | ||
|
|
bea71745c1 | ||
|
|
9c2fc061ee | ||
|
|
eac088696a | ||
|
|
74c8506391 | ||
|
|
7e9945cde9 | ||
|
|
2a42983b4f | ||
|
|
a8d3ddc05d | ||
|
|
ae8d0630e2 | ||
|
|
f34e180b40 | ||
|
|
e0597ab747 | ||
|
|
52f799a815 | ||
|
|
bf1bd83631 | ||
|
|
31728bd2ca | ||
|
|
22a776bb3e | ||
|
|
ae9e13324d | ||
|
|
dc7c0a570f | ||
|
|
0236b52b03 | ||
|
|
42905d9bbb | ||
|
|
8007c3efd7 | ||
|
|
6eb089cb82 | ||
|
|
aa641325cb | ||
|
|
7fdb621481 | ||
|
|
8f9d807306 | ||
|
|
9f804f40bc | ||
|
|
4415086176 | ||
|
|
7616ea1b73 | ||
|
|
3dc3534498 | ||
|
|
a84a2046c4 | ||
|
|
ea5045d50a | ||
|
|
581683dc69 | ||
|
|
5894d0ef86 | ||
|
|
27d671bd0a | ||
|
|
5eb5ecac77 | ||
|
|
23ace06ca1 | ||
|
|
acf9e41aae | ||
|
|
49ea8b950e | ||
|
|
141f09ad2e | ||
|
|
d3a4cc90c8 | ||
|
|
4ad0a1214e | ||
|
|
5ca618c8d6 | ||
|
|
8d7ea32e0d | ||
|
|
1f0d57f5f2 | ||
|
|
58e6e2c025 | ||
|
|
0be4d7d178 | ||
|
|
99699af36f | ||
|
|
e011329728 | ||
|
|
890de0e79b | ||
|
|
fce097b892 | ||
|
|
e90a71d9f5 | ||
|
|
3ab8f017d9 | ||
|
|
88d1e455e3 | ||
|
|
8a6d5dbe91 | ||
|
|
6b24663dd9 | ||
|
|
7cc34302f4 | ||
|
|
517a3f801f | ||
|
|
edd89c5ba3 | ||
|
|
f9b548492e | ||
|
|
df2a31b0e9 | ||
|
|
d7df6b3729 | ||
|
|
e03e578212 | ||
|
|
7b040a52b6 | ||
|
|
9fe3271900 | ||
|
|
9f6a97db76 | ||
|
|
d62ada458c | ||
|
|
942fd7102d | ||
|
|
ef05fd8a78 | ||
|
|
3ee75e86c5 | ||
|
|
553099abf1 | ||
|
|
cb41b5d7d9 | ||
|
|
9b52164b00 | ||
|
|
23437f27b4 | ||
|
|
b42c92c619 | ||
|
|
67220c358c | ||
|
|
7cc8040347 | ||
|
|
f2ec145cb7 | ||
|
|
bbd9a6566c | ||
|
|
8c20206afa | ||
|
|
d4f5f3244a | ||
|
|
560a5f0a4f | ||
|
|
74942551ff | ||
|
|
8347b6da21 | ||
|
|
5b13f85967 | ||
|
|
dedcd26495 | ||
|
|
55d262f5d8 | ||
|
|
df885fce31 | ||
|
|
eeb6230ebd | ||
|
|
bc53b9e1b6 | ||
|
|
bb047c32ad | ||
|
|
84baf5db1f | ||
|
|
73bd969ac9 | ||
|
|
e20024ead9 | ||
|
|
984f763d75 | ||
|
|
50de28b1a1 | ||
|
|
a96eb24247 | ||
|
|
c01a199493 | ||
|
|
ab669a2db8 | ||
|
|
c8ec048459 | ||
|
|
8d5a79fc69 | ||
|
|
c2923f5504 | ||
|
|
fff95facc7 | ||
|
|
e4ad16fc1b | ||
|
|
dc9ee8c6bc | ||
|
|
f7dba84c67 | ||
|
|
507c6dc09f | ||
|
|
2104ac44d9 | ||
|
|
6eaaaef995 | ||
|
|
2794031d12 | ||
|
|
74901e6161 | ||
|
|
6946ea1bd3 | ||
|
|
95bbd914f1 | ||
|
|
ed320fd914 | ||
|
|
39243a8d40 | ||
|
|
abf045ef0e | ||
|
|
7af7616d3d | ||
|
|
fe80c4ce2c | ||
|
|
e4029b72c1 | ||
|
|
b897ba4e30 | ||
|
|
8c551f3990 | ||
|
|
d1ca90e136 | ||
|
|
ed69916e59 | ||
|
|
6d4119690d | ||
|
|
69bb95c49b | ||
|
|
f677a7ad7e | ||
|
|
8ca98e0a18 | ||
|
|
f4250a1ad5 | ||
|
|
3dff396ff4 | ||
|
|
08abfd9208 | ||
|
|
f9e4ff3610 | ||
|
|
a516a0a3a3 | ||
|
|
8e095164e0 | ||
|
|
751c0fe58c | ||
|
|
cf8e7cd362 | ||
|
|
af9911df8a | ||
|
|
34b120c269 | ||
|
|
d3e68239df | ||
|
|
3a0468523a | ||
|
|
0598f2e7c8 | ||
|
|
9791712165 | ||
|
|
3979d03cb3 | ||
|
|
13b03ff5d3 | ||
|
|
bf47859430 | ||
|
|
2e0eb4df8e | ||
|
|
5311544c65 | ||
|
|
c04b555f04 | ||
|
|
e653a33237 | ||
|
|
a7632620da | ||
|
|
e63697dca7 | ||
|
|
73c36c47e2 | ||
|
|
99c00b438b | ||
|
|
3033c1586a | ||
|
|
c495ca924d | ||
|
|
2c12010889 | ||
|
|
e0b59c40ea | ||
|
|
6eddea99c0 | ||
|
|
41d9a8fd75 | ||
|
|
bd14582465 | ||
|
|
21bf01ca6c | ||
|
|
ad695a8b72 | ||
|
|
a039e6c41e | ||
|
|
14c9806584 | ||
|
|
30bbfd88d1 | ||
|
|
2aff5b54ff | ||
|
|
80cdb92154 | ||
|
|
c1ef5c5497 | ||
|
|
2ddcea8112 | ||
|
|
2d19885a17 | ||
|
|
a4ab4794cf | ||
|
|
ba661a3af4 | ||
|
|
447e990522 | ||
|
|
0c13961f9e | ||
|
|
8559fb8085 | ||
|
|
e1db3e7a6d | ||
|
|
a3b9f0ab63 | ||
|
|
b925603eff | ||
|
|
a8445c3ec4 | ||
|
|
5d5115941f | ||
|
|
45d532b3a2 | ||
|
|
aa255a9ad2 | ||
|
|
d3480e6365 | ||
|
|
94b04828f9 | ||
|
|
3a3776ba24 | ||
|
|
f19ff885f4 | ||
|
|
7b8299bbd7 | ||
|
|
2424ffaa26 | ||
|
|
30ba656f5c | ||
|
|
24a78a28c2 | ||
|
|
5e5f0106e7 | ||
|
|
b37ea96969 | ||
|
|
966053be60 | ||
|
|
0e337bb110 | ||
|
|
06366c9c85 | ||
|
|
6e22e2b4fc | ||
|
|
dbd2faf69a | ||
|
|
efb022bb28 | ||
|
|
df9cf9df21 | ||
|
|
dddfbe311a | ||
|
|
88a91af0dc | ||
|
|
c9ff9ea253 | ||
|
|
3058fc3390 | ||
|
|
59050709a9 | ||
|
|
edb8ecdbf8 | ||
|
|
e17baf411c | ||
|
|
947bd80faf | ||
|
|
c81ad957fa | ||
|
|
010148ce9c | ||
|
|
0ece7015e7 | ||
|
|
f6cb15f410 | ||
|
|
bf1f201e5a | ||
|
|
777e96f2ea | ||
|
|
7a481236bf | ||
|
|
6c5d303a07 | ||
|
|
c9669b696c | ||
|
|
956f869974 | ||
|
|
5c5dae7160 | ||
|
|
a11af7ef1d | ||
|
|
b4e5f61713 | ||
|
|
1d933a6b52 | ||
|
|
70ca528d85 | ||
|
|
228049df11 | ||
|
|
c51b107d9c | ||
|
|
54e7ec8e79 | ||
|
|
5db48f9aea | ||
|
|
e2b003a993 | ||
|
|
48982de355 | ||
|
|
0ec95f7aea | ||
|
|
3528923507 | ||
|
|
33929842bb | ||
|
|
ed53542b8b | ||
|
|
298e8b6326 | ||
|
|
e87cd7382e | ||
|
|
472a792d88 | ||
|
|
0c741e6f61 | ||
|
|
6d0101d118 | ||
|
|
d1ad5c336e | ||
|
|
2d107b44fa | ||
|
|
74120c47e7 | ||
|
|
88311acad3 | ||
|
|
fddcf2b204 | ||
|
|
abb855a3cc | ||
|
|
420f61bfb0 | ||
|
|
f4948a1826 | ||
|
|
4f60966dd5 | ||
|
|
657f5aa2a2 | ||
|
|
acef4ac22e | ||
|
|
e0eb5e698e | ||
|
|
a79b3250ce | ||
|
|
07f13876fc | ||
|
|
7ac985e9be | ||
|
|
8287a961e4 | ||
|
|
f611d1c357 | ||
|
|
21c1acac73 | ||
|
|
3df545112c | ||
|
|
6dbfbb0846 | ||
|
|
b279dfcb64 | ||
|
|
10c6ef6f1a | ||
|
|
515918f80c | ||
|
|
04e6554ad6 | ||
|
|
b57f0d95c2 | ||
|
|
8908d9983b | ||
|
|
aab1e87439 | ||
|
|
80f946e0a6 | ||
|
|
6f95823702 | ||
|
|
2214e04784 | ||
|
|
e62e0c83da | ||
|
|
d0b414f9d8 | ||
|
|
e566a5591b | ||
|
|
f2ddc8eff0 | ||
|
|
63dc7cbedb | ||
|
|
6ccde2b907 | ||
|
|
5b944a0e65 | ||
|
|
3145708106 | ||
|
|
7fd4d5013d | ||
|
|
f993355f71 | ||
|
|
d7c9ca08cc | ||
|
|
a74ef2214d | ||
|
|
8860619a5e | ||
|
|
b9248cf3af | ||
|
|
0dd2f075fe | ||
|
|
3090e85064 | ||
|
|
8170548034 | ||
|
|
9b2cfc4867 | ||
|
|
82d44e9ad3 | ||
|
|
bd16fd49ab | ||
|
|
cf3a010ead | ||
|
|
99f696abd2 | ||
|
|
abf4e50e6d | ||
|
|
e5f986d16d | ||
|
|
9ab6957dc4 | ||
|
|
f9e06725fa | ||
|
|
0a32642f17 | ||
|
|
601fda9784 | ||
|
|
df3bb2e7e8 | ||
|
|
93f0679ead | ||
|
|
24f69cb537 | ||
|
|
5aa159431e | ||
|
|
768be8b9c8 | ||
|
|
b8899ecbd3 | ||
|
|
6c02686f84 | ||
|
|
2884ad2d73 | ||
|
|
c2d2fe971e | ||
|
|
c96ae959b3 | ||
|
|
a37d624967 | ||
|
|
06e3a9e762 | ||
|
|
55559983fd | ||
|
|
8a8687ec9c | ||
|
|
d09e0f7da2 | ||
|
|
39a1ebacc3 | ||
|
|
4c608ca994 | ||
|
|
8686b8c5a2 | ||
|
|
acdb5efdcd | ||
|
|
923eef3eb3 | ||
|
|
b464014a51 | ||
|
|
f7744d812e | ||
|
|
88cac16409 | ||
|
|
be5ebbc039 | ||
|
|
7cc614263a | ||
|
|
6732afa608 | ||
|
|
4be19999a5 | ||
|
|
11fed40c79 | ||
|
|
1b6870b180 | ||
|
|
7ab2254fc4 | ||
|
|
d9c0f769c7 | ||
|
|
d8bb9ac018 | ||
|
|
b371f4bb32 | ||
|
|
e5b346ad92 | ||
|
|
a6f7bf9492 | ||
|
|
f6fdd421c6 | ||
|
|
136fb6e3c9 | ||
|
|
0389bc64fe | ||
|
|
7e61f08cdb | ||
|
|
74eb6336d5 | ||
|
|
481a140c9c | ||
|
|
292d506ed8 | ||
|
|
8d5a8355a7 | ||
|
|
20bb653f1e | ||
|
|
d5d4e9ff2b | ||
|
|
fb74e11011 | ||
|
|
ca2bc6dccd | ||
|
|
b788bf71bd | ||
|
|
6254ddecf2 | ||
|
|
5003a2d50b | ||
|
|
e9b6f1e18d | ||
|
|
8619534a31 | ||
|
|
129a44b8ce | ||
|
|
20122d21ee | ||
|
|
794de84961 | ||
|
|
f63385de08 | ||
|
|
6c08ceacb9 | ||
|
|
ec45df79f4 | ||
|
|
65c177a0ee | ||
|
|
704cc61fd8 | ||
|
|
0ae7ffe0d3 | ||
|
|
52c754cfa8 | ||
|
|
8f900de65e | ||
|
|
0f66bc3297 | ||
|
|
7954dab835 | ||
|
|
661e5bf50b | ||
|
|
678c4093c1 | ||
|
|
982d6893b0 | ||
|
|
5b37ced196 | ||
|
|
d0adbd194e | ||
|
|
c1496a8600 | ||
|
|
5804233ca8 | ||
|
|
e98b006715 | ||
|
|
192f5875b9 | ||
|
|
1beba28d02 | ||
|
|
d0368124e6 | ||
|
|
5c5e5be649 | ||
|
|
c3736adb77 | ||
|
|
203876a206 | ||
|
|
1657079c45 | ||
|
|
7e56881b88 | ||
|
|
3b92cce6bf | ||
|
|
e80d99dbae | ||
|
|
a792112bd1 | ||
|
|
d18ee7eaed | ||
|
|
1b404afc86 | ||
|
|
d49b7b28b6 | ||
|
|
a6afddae04 | ||
|
|
ad7dd75458 | ||
|
|
fc725e252e | ||
|
|
22062fdf91 | ||
|
|
c4049946ea | ||
|
|
6ab2244a43 | ||
|
|
72e3d5c38c | ||
|
|
a34555c9a9 | ||
|
|
eaccab5237 | ||
|
|
ec4b0f9089 | ||
|
|
8c2070947e | ||
|
|
c872edcc2b | ||
|
|
0a65875956 | ||
|
|
96f5323723 | ||
|
|
ba8b5749ac | ||
|
|
7dbaa45172 | ||
|
|
688443b9a6 | ||
|
|
10076706b5 | ||
|
|
c7c0ba7d03 | ||
|
|
893cd2b472 | ||
|
|
3101ee8036 | ||
|
|
64ceabfc9d | ||
|
|
010aa8061f | ||
|
|
258c8acdad | ||
|
|
353b2ebff6 | ||
|
|
e6462de5be | ||
|
|
a2ab7defa9 | ||
|
|
5c876647ed | ||
|
|
946b765e61 | ||
|
|
817247851f | ||
|
|
1d6e8baa03 | ||
|
|
033a7259b4 | ||
|
|
6d2a7b1f26 | ||
|
|
a79bd5a509 | ||
|
|
00567ac3a8 | ||
|
|
a8359a8664 | ||
|
|
a6d757f0aa | ||
|
|
a1467346f5 | ||
|
|
f5e5490724 | ||
|
|
ab69edb51a | ||
|
|
0f3836f549 | ||
|
|
86388283a4 | ||
|
|
7b5547d368 | ||
|
|
321285811f | ||
|
|
69fe86f57d | ||
|
|
a7be0520b5 | ||
|
|
12ed6b8657 | ||
|
|
c29d5906d2 | ||
|
|
b933a8796b | ||
|
|
7e3a458925 | ||
|
|
04d2607368 | ||
|
|
073954c561 | ||
|
|
f330c0ebc7 | ||
|
|
60702e3871 | ||
|
|
d71a2db781 | ||
|
|
b4d2ed3421 | ||
|
|
85f9eb402e | ||
|
|
9efc0d2a78 | ||
|
|
db33df2268 | ||
|
|
f96b285715 | ||
|
|
c7c71cb01f | ||
|
|
b1c0fe7d0d | ||
|
|
f51994d7e3 | ||
|
|
29c9afa609 | ||
|
|
56b4d4917c | ||
|
|
008881462d | ||
|
|
dbaa237c71 | ||
|
|
4c0c842451 | ||
|
|
b10616ffb7 | ||
|
|
12aa454d54 | ||
|
|
2cab3a7e4e | ||
|
|
e7616f2dc2 | ||
|
|
c3e6ac96aa | ||
|
|
0215c37447 | ||
|
|
eb62b610cb | ||
|
|
c8a134818a | ||
|
|
cf4084c829 | ||
|
|
443e454e5a | ||
|
|
96ae1608d5 | ||
|
|
a2032a56a0 | ||
|
|
61b7b2e590 | ||
|
|
04ec4d96ca | ||
|
|
e07ce68e7f | ||
|
|
78c49047a5 | ||
|
|
b8d84dd0b9 | ||
|
|
4fe6f032ec | ||
|
|
8178e21cda | ||
|
|
6f5c68c1d0 | ||
|
|
aa7c289708 | ||
|
|
917b354eb7 | ||
|
|
599d08fe12 | ||
|
|
c5c9a6b563 | ||
|
|
636ee4489a | ||
|
|
4ecb4d5dfb | ||
|
|
12cbacae31 | ||
|
|
c4f06f2ef2 | ||
|
|
a57df7d43f | ||
|
|
3f5aa82853 | ||
|
|
d64154bf40 | ||
|
|
2dcd2bc5c6 | ||
|
|
a3a5f6e07e | ||
|
|
ab54fda509 | ||
|
|
fee7ab9dc8 | ||
|
|
c63011db71 | ||
|
|
417be6e497 | ||
|
|
73e81dba96 | ||
|
|
5ff20a708a | ||
|
|
ca062cbe38 | ||
|
|
2768f639a2 | ||
|
|
6fc71b6b55 | ||
|
|
9488e4e25a | ||
|
|
c23d84c54f | ||
|
|
f8b9c8fa6d | ||
|
|
4b728cd264 | ||
|
|
dc207beb80 | ||
|
|
ac044c47ee | ||
|
|
14eb6d5cda | ||
|
|
2be575bb19 | ||
|
|
08d9ee9600 | ||
|
|
d3fd5f25d5 | ||
|
|
29ad88e09c | ||
|
|
9e7882ec96 | ||
|
|
7d9193555a | ||
|
|
5a4bd619ba | ||
|
|
c978b53214 | ||
|
|
4b68a21a7e | ||
|
|
5e0f78e8a0 | ||
|
|
0e22aec947 | ||
|
|
bb7ee12766 | ||
|
|
d4503bc037 | ||
|
|
961972a858 | ||
|
|
66157307d8 | ||
|
|
cbfdd7bbd9 | ||
|
|
6f116b2edf | ||
|
|
c453675d38 | ||
|
|
be936e9bcf | ||
|
|
157fbeccb5 |
No files matched your search
+34
-1
@@ -7,7 +7,13 @@
|
||||
*.elf
|
||||
*.dol
|
||||
*.map
|
||||
*.swp
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
config.log
|
||||
/.project
|
||||
/.externalToolBuilders/
|
||||
/retroarch
|
||||
/retroarch.cfg
|
||||
/retroarch.exe
|
||||
@@ -66,7 +72,24 @@ menu/driverspzarch.c
|
||||
# Wii U
|
||||
*.depend
|
||||
*.rpx
|
||||
*.last
|
||||
wiiu/wut/elf2rpl/elf2rpl
|
||||
/pkg/wiiu/retroarch
|
||||
/pkg/wiiu/wiiu
|
||||
/pkg/wiiu/rpx
|
||||
/wiiu-devel.properties
|
||||
|
||||
|
||||
# 3ds
|
||||
/.lst
|
||||
*.3dsx
|
||||
*.cia
|
||||
*.3ds
|
||||
*.bnr
|
||||
*.smdh
|
||||
/retroarch_3ds.core
|
||||
/retroarch_3ds.icn
|
||||
/retroarch_3ds_salamander.icn
|
||||
|
||||
# Ctags
|
||||
/tags
|
||||
@@ -110,5 +133,15 @@ obj-unix/
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.obj
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.res
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.pdb
|
||||
|
||||
retroarch.cfg
|
||||
Makefile.local
|
||||
|
||||
# Emscripten artifacts
|
||||
|
||||
retroarch.js
|
||||
retroarch.js.mem
|
||||
*.bc
|
||||
*.wasm
|
||||
|
||||
# only ignore .js files in the repo root
|
||||
/*.js
|
||||
Vendored
+5
@@ -9,4 +9,9 @@
|
||||
"editor.tabSize": 3,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"files.associations": {
|
||||
"frontend_driver.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c"
|
||||
},
|
||||
}
|
||||
+73
-2
@@ -1,4 +1,69 @@
|
||||
# 1.7.0 (future)
|
||||
# 1.7.2 (future)
|
||||
|
||||
# 1.7.1
|
||||
- 3DS: Now correctly reports amount of CPU cores.
|
||||
- 3DS: Frontend rating is now correctly implemented for both New 3DS/2DS and Old 3DS/2DS.
|
||||
- 3DS: Initial networking support, HTTP requests won't work yet.
|
||||
- 3DS: Now reports memory and battery state.
|
||||
- AUDIO: Added 'Audio Resampler Quality' setting to Audio Settings. Setting this higher will increase sound quality at the expense of sound latency and/or performance. Setting this value lower will improve sound latency/performance at the expense of sound quality. Only has an effect if the Sinc resampler is used, and you have to restart the game for changes to take effect.
|
||||
- CHEEVOS: Fix unofficial achievements not being loaded.
|
||||
- CHEEVOS: Show savestate menu entries when no achievements are found even if hardcore mode is enabled.
|
||||
- CHEEVOS: Support Neo Geo Pocket.
|
||||
- COMMON: Bugfix for issue related to 'Windows mouse pointer visible when running MESS or MAME cores'.
|
||||
- COMMON: Fix bug 'Last item in a Playlist is ignored'.
|
||||
- COMMON: New LED API. Driver implemented for Raspberry Pi, proof of concept implemented for core MAME 2003.
|
||||
- COMMON: Add quick menu option to watch shader files for changes and recompile them automatically (Linux only for now).
|
||||
- D3D8: Direct3D 8 can now work on systems that have Direct3D 8 installed.
|
||||
- D3D9: Add menu support for MaterialUI/XMB.
|
||||
- D3D10: Initial video driver implementation.
|
||||
- D3D11: Initial video driver implementation.
|
||||
- D3D11: SPIRV-Cross/slang shader support for D3D11.
|
||||
- D3D12: Initial video driver implementation.
|
||||
- DINPUT: don't reinitialize input driver on network events / media insertion / network drive connection
|
||||
- INPUT: show friendly names when available under input binds and system information
|
||||
- INPUT: show the config name when available under system information
|
||||
- GUI: Allow changing menu font color.
|
||||
- GUI: Menu visibility options for RGUI and MaterialUI.
|
||||
- GUI/MaterialUI: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers.
|
||||
- GUI/XMB: Add Monochrome Inverted icon theme.
|
||||
- GUI/XMB: Allow changing menu scale to 200%.
|
||||
- GUI/XMB: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers. Menu shader effects currently don't work on D3D8/D3D9 Cg.
|
||||
- HAIKU: Restored port.
|
||||
- KEYMAPPER: prevent a condition that caused input_menu_toggle to stop working when a RETRO_DEVICE_KEYBOARD type device is enabled
|
||||
- GL: ignore hard gpu sync when fast-forwarding
|
||||
- IOS10/11: Handle hardware keyboards and iCade controllers
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Portuguese-Brazilian translation.
|
||||
- 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.
|
||||
- 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.
|
||||
- SWITCH: Initial Nintendo Switch port, based on libtransistor SDK.
|
||||
- PS3: Enable Cheevos.
|
||||
- PSP: Enable threading support through pthreads.
|
||||
- SHADERS: SPIRV-Cross/slang shader support for D3D11.
|
||||
- SHIELD ATV: Allow the remote / gamepad takeover hack to work with the 2017 gamepad
|
||||
- SUBSYSTEM: Subsystem saves now respect the save directory
|
||||
- SUBSYSTEM: You can now load subsystem games from the menu (see https://github.com/libretro/RetroArch/pull/6282 for caveats)
|
||||
- VULKAN: Fix swapchain recreation bug on Nvidia GPUs with Windows 10 (resolved in Windows Nvidia driver version 390.77).
|
||||
- WINDOWS: Improved Unicode support (for cores/directory creation and 7zip archives).
|
||||
- WINDOWS: Show progress meter on taskbar for downloads (Windows 7 and up).
|
||||
- WINDOWS: WS_EX_LAYERED drastically decreases performance, so only set it when needed (transparency in windowed mode).
|
||||
- WIIU: Overlay support.
|
||||
- WIIU: Transparency support in menu + overlays.
|
||||
- WIIU: Increased stability during core switching.
|
||||
- WIIU: Shader support.
|
||||
- WIIU: Menu shader effects added (shaders).
|
||||
- WIIU: Add missing time/clock support. (also fixes RTC [Real Time Clock] in Gambatte)
|
||||
- XBOX OG: Restored port.
|
||||
|
||||
# 1.7.0
|
||||
- CHEEVOS: Add badges for achievements, shows thumbnail images of achievements.
|
||||
- CHEEVOS: Leaderboard support.
|
||||
- CHEEVOS: Only disable savestates on hardcore mode if achievements are not available.
|
||||
@@ -11,8 +76,10 @@
|
||||
- COMMON: New VFS (Virtual File System) API.
|
||||
- COMMON: Fixed some playlist bugs.
|
||||
- COMMON: New snow shader.
|
||||
- COMMON: Fix Quick Menu title.
|
||||
- COMMON: Fix Quick Menu title, no longer shows 'Select File'.
|
||||
- COMMON: Fix loading cores that require no content one after another.
|
||||
- COMMON: Map Delete key to Y button for non-unified menu keyboard controls.
|
||||
- COMMON: Fix for relative paths being normalised and generating a duplicate history entry.
|
||||
- EMSCRIPTEN: Fix references to browserfs.
|
||||
- FREEBSD: Support libusb HID input driver.
|
||||
- HAIKU: Buildfix.
|
||||
@@ -24,7 +91,9 @@
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Portuguese-Brazilian translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- LOCALIZATION: Update Russian translation.
|
||||
- MENU: Snowflake menu shader effect.
|
||||
- OSX/PPC: Fix the GL2 renderchain, had to use EXT versions of framebuffer/renderbuffer functions.
|
||||
- PS3: HTTP requests / downloads should now work.
|
||||
- PS3: Core Updater now works.
|
||||
@@ -36,6 +105,7 @@
|
||||
- SCANNER: Fix crash from Windows-incompatible format string.
|
||||
- VITA: Improve packaging, installation times.
|
||||
- WIIU: Disabled the controller patcher for now since it was the source of many stability issues.
|
||||
- VULKAN: Various stability fixes for WSI.
|
||||
- WINDOWS: Add MSVC 2017 solution.
|
||||
- WINDOWS: Get rid of the empty console window in MSVC 2010 builds.
|
||||
- WINDOWS: Raw input driver now supports new lightgun code.
|
||||
@@ -45,6 +115,7 @@
|
||||
- WINDOWS: Improve version reporting under System Information.
|
||||
- WINDOWS: Support window transparency.
|
||||
- WINDOWS: Correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98.
|
||||
- WINDOWS: Added Visual Studio 2017 support.
|
||||
|
||||
# 1.6.9
|
||||
- COMMON: Small memory leak.
|
||||
|
||||
@@ -9,13 +9,24 @@ endif
|
||||
|
||||
include config.mk
|
||||
|
||||
# Put your favorite compile flags in this file, if you want different defaults than upstream.
|
||||
# Do not attempt to create that file upstream.
|
||||
# (It'd be better to put this comment in that file, but .gitignore doesn't work on files that exist in the repo.)
|
||||
-include Makefile.local
|
||||
|
||||
TARGET = retroarch
|
||||
|
||||
OBJDIR := obj-unix
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_OVERLAY
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
@@ -66,6 +77,7 @@ endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_FLAG = -O0 -g
|
||||
DEFINES += -DDEBUG -D_DEBUG
|
||||
else
|
||||
OPTIMIZE_FLAG = -O3 -ffast-math
|
||||
endif
|
||||
@@ -74,7 +86,7 @@ ifneq ($(findstring Win32,$(OS)),)
|
||||
LDFLAGS += -mwindows
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) $(DEBUG_FLAG) -I. -Ideps -Ideps/stb
|
||||
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
APPEND_CFLAGS := $(CFLAGS)
|
||||
CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
@@ -189,22 +201,33 @@ install: $(TARGET)
|
||||
rm -f $(OBJDIR)/git_version.o
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps 2>/dev/null || /bin/true
|
||||
install -m755 $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
install -m755 tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
install -m644 retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
install -m644 retroarch.desktop $(DESTDIR)$(PREFIX)/share/applications
|
||||
install -m644 docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
install -m644 docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
install -m644 media/retroarch.svg $(DESTDIR)$(PREFIX)/share/pixmaps
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
cp COPYING $(DESTDIR)$(DOC_DIR)
|
||||
cp README.md $(DESTDIR)$(DOC_DIR)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@if test -d media/assets; then \
|
||||
echo "Installing media assets..."; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/glui; \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/xmb; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/glui; \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
|
||||
echo "Asset copying done."; \
|
||||
fi
|
||||
|
||||
@@ -212,14 +235,17 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING.assets
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/README.md
|
||||
rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/retroarch.svg
|
||||
rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch
|
||||
rm -rf $(DESTDIR)$(ASSETS_DIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR)
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
|
||||
+220
-148
@@ -115,6 +115,13 @@ else
|
||||
OSX := 0
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Haiku,$(OS)),)
|
||||
LIBS += -lroot -lnetwork
|
||||
HAVE_UNIX = 1
|
||||
else
|
||||
LIBS += -lm
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Linux,$(OS)),)
|
||||
LIBS += -lrt
|
||||
OBJ += input/drivers/linuxraw_input.o \
|
||||
@@ -131,15 +138,6 @@ ifeq ($(TARGET), retroarch_3ds)
|
||||
OBJ += frontend/drivers/platform_ctr.o
|
||||
endif
|
||||
|
||||
ifeq ($(findstring Haiku,$(OS)),)
|
||||
LIBS += -lm
|
||||
DEBUG_FLAG = -g
|
||||
else
|
||||
LIBS += -lroot -lnetwork
|
||||
# stable and nightly haiku builds are stuck on gdb 6.x but we use gcc4
|
||||
DEBUG_FLAG = -gdwarf-2
|
||||
endif
|
||||
|
||||
# Git
|
||||
|
||||
GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
@@ -201,6 +199,8 @@ OBJ += frontend/frontend.o \
|
||||
audio/audio_driver.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \
|
||||
input/input_driver.o \
|
||||
led/led_driver.o \
|
||||
led/drivers/led_null.o \
|
||||
gfx/video_coord_array.o \
|
||||
gfx/video_display_server.o \
|
||||
gfx/video_driver.o \
|
||||
@@ -220,8 +220,6 @@ OBJ += frontend/frontend.o \
|
||||
input/input_autodetect_builtin.o \
|
||||
input/input_keymaps.o \
|
||||
input/input_remapping.o \
|
||||
tasks/task_overlay.o \
|
||||
input/input_overlay.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \
|
||||
managers/core_option_manager.o \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \
|
||||
@@ -286,7 +284,8 @@ OBJ += intl/msg_hash_de.o \
|
||||
intl/msg_hash_ru.o \
|
||||
intl/msg_hash_vn.o \
|
||||
intl/msg_hash_chs.o \
|
||||
intl/msg_hash_cht.o
|
||||
intl/msg_hash_cht.o \
|
||||
intl/msg_hash_ar.o
|
||||
|
||||
endif
|
||||
|
||||
@@ -542,7 +541,6 @@ OBJ += deps/libui/libui_main.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
ifeq ($(HAVE_STDIN_CMD), 1)
|
||||
@@ -558,6 +556,7 @@ endif
|
||||
ifeq ($(HAVE_EMSCRIPTEN), 1)
|
||||
OBJ += frontend/drivers/platform_emscripten.o \
|
||||
input/drivers/rwebinput_input.o \
|
||||
input/drivers_joypad/rwebpad_joypad.o \
|
||||
audio/drivers/rwebaudio.o \
|
||||
camera/drivers/rwebcam.o
|
||||
endif
|
||||
@@ -651,7 +650,8 @@ endif
|
||||
ifeq ($(HAVE_DSOUND), 1)
|
||||
OBJ += audio/drivers/dsound.o
|
||||
DEFINES += -DHAVE_DSOUND
|
||||
LIBS += -ldxguid -ldsound
|
||||
HAVE_DX_COMMON = 1
|
||||
LIBS += -ldsound
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WASAPI), 1)
|
||||
@@ -672,13 +672,7 @@ ifeq ($(HAVE_NEON),1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \
|
||||
audio/drivers_resampler/cc_resampler_neon.o \
|
||||
memory/neon/memcpy-neon.o
|
||||
# When compiled without this, tries to attempt to compile sinc lerp,
|
||||
# which will error out
|
||||
#
|
||||
# TODO - we need to make quality levels of sinc
|
||||
# runtime toggleable instead of going by compile-time
|
||||
# defines
|
||||
DEFINES += -DSINC_LOWER_QUALITY
|
||||
DEFINES += -DHAVE_NEON
|
||||
endif
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \
|
||||
@@ -691,14 +685,6 @@ ifeq ($(HAVE_NEON),1)
|
||||
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
# if user explicitly sets --disable-vulkan on Windows, then disable it
|
||||
ifneq ($(HAVE_NO_VULKAN),1)
|
||||
HAVE_VULKAN=1
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
endif
|
||||
endif
|
||||
|
||||
HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI)
|
||||
|
||||
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
|
||||
@@ -810,6 +796,10 @@ endif
|
||||
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
OBJ += \
|
||||
tasks/task_overlay.o \
|
||||
input/input_overlay.o \
|
||||
led/drivers/led_overlay.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STB_FONT), 1)
|
||||
@@ -869,6 +859,13 @@ ifeq ($(TARGET), retroarch_3ds)
|
||||
input/drivers_joypad/ctr_joypad.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_switch)
|
||||
OBJ += gfx/drivers/switch_gfx.o \
|
||||
input/drivers/switch_input.o \
|
||||
input/drivers_joypad/switch_joypad.o \
|
||||
audio/drivers/switch_audio.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WAYLAND), 1)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||
input/drivers/wayland_input.o
|
||||
@@ -879,7 +876,8 @@ endif
|
||||
#Input
|
||||
|
||||
ifeq ($(HAVE_DINPUT), 1)
|
||||
LIBS += -ldinput8 -ldxguid -lole32
|
||||
HAVE_DX_COMMON = 1
|
||||
LIBS += -ldinput8 -lole32
|
||||
DEFINES += -DHAVE_DINPUT
|
||||
OBJ += input/drivers/dinput.o \
|
||||
input/drivers_joypad/dinput_joypad.o
|
||||
@@ -1112,6 +1110,8 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
DEFINES += -DHAVE_EGL $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
OBJ += gfx/common/egl_common.o
|
||||
endif
|
||||
|
||||
@@ -1154,55 +1154,18 @@ endif
|
||||
|
||||
ifeq ($(HAVE_VULKAN), 1)
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
GLSLANG_PLATFORM := Windows
|
||||
WANT_WGL = 1
|
||||
else
|
||||
GLSLANG_PLATFORM := Unix
|
||||
endif
|
||||
|
||||
GLSLANG_SOURCES := \
|
||||
$(wildcard $(DEPS_DIR)/glslang/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/SPIRV/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/hlsl/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp)
|
||||
|
||||
SPIRV_CROSS_SOURCES := $(DEPS_DIR)/SPIRV-Cross/spirv_cross.cpp \
|
||||
$(DEPS_DIR)/SPIRV-Cross/spirv_cfg.cpp
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
WANT_WGL = 1
|
||||
# Trivial temporary workaround for MinGW and glslang.
|
||||
CXXFLAGS += -fpermissive
|
||||
endif
|
||||
|
||||
DEFINES += \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM) \
|
||||
-I$(DEPS_DIR)/glslang/glslang/OGLCompilersDLL \
|
||||
-I$(DEPS_DIR)/glslang/glslang \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/Public \
|
||||
-I$(DEPS_DIR)/glslang/glslang/SPIRV \
|
||||
-I$(DEPS_DIR)/glslang \
|
||||
-I$(DEPS_DIR)/SPIRV-Cross
|
||||
|
||||
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses -Igfx/include
|
||||
CFLAGS += -Igfx/include
|
||||
|
||||
GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
|
||||
SPIRV_CROSS_OBJ := $(SPIRV_CROSS_SOURCES:.cpp=.o)
|
||||
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses
|
||||
|
||||
OBJ += gfx/drivers/vulkan.o \
|
||||
gfx/common/vulkan_common.o \
|
||||
$(LIBRETRO_COMM_DIR)/vulkan/vulkan_symbol_wrapper.o \
|
||||
gfx/drivers_font/vulkan_raster_font.o \
|
||||
gfx/drivers_shader/shader_vulkan.o \
|
||||
gfx/drivers_shader/glslang_util.o \
|
||||
gfx/drivers_shader/slang_reflection.o \
|
||||
gfx/drivers_shader/slang_preprocess.o \
|
||||
$(GLSLANG_OBJ) \
|
||||
$(SPIRV_CROSS_OBJ)
|
||||
gfx/drivers_shader/shader_vulkan.o
|
||||
|
||||
ifeq ($(HAVE_VULKAN_DISPLAY), 1)
|
||||
OBJ += gfx/drivers_context/khr_display_ctx.o
|
||||
@@ -1211,12 +1174,12 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
OBJ += menu/drivers_display/menu_display_vulkan.o
|
||||
endif
|
||||
LIBS += -lstdc++
|
||||
DEFINES += -DHAVE_SLANG
|
||||
endif
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
INCLUDE_DIRS += -Igfx/include
|
||||
|
||||
ifeq ($(WANT_WGL), 1)
|
||||
OBJ += gfx/drivers_context/wgl_ctx.o
|
||||
LIBS += -lcomctl32
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OMAP), 1)
|
||||
@@ -1266,8 +1229,18 @@ endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
HAVE_D3DX = 1
|
||||
DEFINES += -DHAVE_D3D9
|
||||
LIBS += -ld3d9 -ld3dx9 -ldxguid
|
||||
ifeq ($(HAVE_D3DX), 1)
|
||||
DEFINES += -DHAVE_D3DX
|
||||
endif
|
||||
ifneq ($(HAVE_DYLIB), 1)
|
||||
LIBS += -ld3d9
|
||||
ifeq ($(HAVE_D3DX), 1)
|
||||
LIBS += -ld3dx9
|
||||
endif
|
||||
endif
|
||||
HAVE_DX_COMMON = 1
|
||||
OBJ += gfx/drivers_font/d3d_w32_font.o
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
LIBS += -lcgD3D9
|
||||
@@ -1275,23 +1248,70 @@ ifeq ($(HAVE_D3D9), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
LIBS += -lcgD3D9
|
||||
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
|
||||
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
|
||||
DEFINES += -DHAVE_D3D11
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 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
|
||||
DEFINES += -DHAVE_D3D12
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
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
|
||||
CFLAGS += -Wno-unknown-pragmas
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
HAVE_DX_COMMON = 1
|
||||
DEFINES += -DHAVE_D3D8
|
||||
LIBS += -ld3d8 -ld3dx8 -ldxguid
|
||||
ifneq ($(HAVE_DYLIB), 1)
|
||||
LIBS += -ld3d8
|
||||
ifeq ($(HAVE_D3DX), 1)
|
||||
LIBS += -ld3dx8
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJ += gfx/drivers_renderchain/d3d8_renderchain.o
|
||||
ifeq ($(HAVE_DX_COMMON), 1)
|
||||
LIBS += -ldxguid
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
DEFINES += -DHAVE_D3D8
|
||||
OBJ += gfx/drivers/d3d9.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
DEFINES += -DHAVE_D3D9
|
||||
OBJ += gfx/drivers/d3d9.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D_COMMON), 1)
|
||||
DEFINES += -DHAVE_D3D
|
||||
OBJ += gfx/drivers/d3d.o \
|
||||
OBJ += \
|
||||
gfx/common/d3d_common.o \
|
||||
gfx/drivers_context/d3d_ctx.o
|
||||
|
||||
@@ -1300,6 +1320,60 @@ ifeq ($(HAVE_D3D_COMMON), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SLANG),1)
|
||||
DEFINES += -DHAVE_SLANG
|
||||
OBJ += gfx/drivers_shader/slang_process.o
|
||||
OBJ += gfx/drivers_shader/slang_preprocess.o
|
||||
OBJ += gfx/drivers_shader/glslang_util.o
|
||||
OBJ += gfx/drivers_shader/slang_reflection.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GLSLANG), 1)
|
||||
DEFINES += -DHAVE_GLSLANG
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
GLSLANG_PLATFORM := Windows
|
||||
else
|
||||
GLSLANG_PLATFORM := Unix
|
||||
endif
|
||||
|
||||
INCLUDE_DIRS += \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM) \
|
||||
-I$(DEPS_DIR)/glslang/glslang/OGLCompilersDLL \
|
||||
-I$(DEPS_DIR)/glslang/glslang \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent \
|
||||
-I$(DEPS_DIR)/glslang/glslang/glslang/Public \
|
||||
-I$(DEPS_DIR)/glslang/glslang/SPIRV \
|
||||
-I$(DEPS_DIR)/glslang
|
||||
|
||||
GLSLANG_SOURCES := \
|
||||
$(wildcard $(DEPS_DIR)/glslang/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/SPIRV/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/hlsl/*.cpp) \
|
||||
$(wildcard $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp)
|
||||
|
||||
OBJ += $(GLSLANG_SOURCES:.cpp=.o)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SPIRV_CROSS), 1)
|
||||
DEFINES += -DHAVE_SPIRV_CROSS
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/SPIRV-Cross
|
||||
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cross.o
|
||||
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cfg.o
|
||||
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_glsl.o
|
||||
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_hlsl.o
|
||||
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_msl.o
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_WGL), 1)
|
||||
OBJ += gfx/drivers_context/wgl_ctx.o
|
||||
LIBS += -lcomctl32
|
||||
endif
|
||||
|
||||
#ifeq ($(HAVE_LIBXML2), 1)
|
||||
#LIBS += $(LIBXML2_LIBS)
|
||||
#DEFINES += $(LIBXML2_CFLAGS)
|
||||
@@ -1335,9 +1409,15 @@ ifeq ($(HAVE_7ZIP),1)
|
||||
$(7ZOBJ)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FLAC),1)
|
||||
CFLAGS += -I$(DEPS_DIR)/libFLAC/include
|
||||
DEFINES += -DHAVE_FLAC -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
|
||||
ifeq ($(HAVE_IBXM), 1)
|
||||
DEFINES += -DHAVE_IBXM
|
||||
OBJ += $(DEPS_DIR)/ibxm/ibxm.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BUILTINFLAC),1)
|
||||
HAVE_FLAC = 1
|
||||
CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include
|
||||
DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
|
||||
-DFLAC_PACKAGE_VERSION="\"retroarch\""
|
||||
FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \
|
||||
$(DEPS_DIR)/libFLAC/bitreader.o \
|
||||
@@ -1361,22 +1441,52 @@ ifeq ($(HAVE_FLAC),1)
|
||||
FLACOBJ += $(DEPS_DIR)/libFLAC/windows_unicode_filenames.o
|
||||
endif
|
||||
OBJ += $(FLACOBJ)
|
||||
else ifeq ($(HAVE_FLAC),1)
|
||||
LIBS += $(FLAC_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.o
|
||||
OBJ += $(ZLIB_OBJS)
|
||||
DEFINES += -DHAVE_ZLIB
|
||||
HAVE_COMPRESSION = 1
|
||||
ifeq ($(HAVE_BUILTINZLIB), 1)
|
||||
OBJ += $(DEPS_DIR)/libz/adler32.o \
|
||||
$(DEPS_DIR)/libz/compress.o \
|
||||
$(DEPS_DIR)/libz/crc32.o \
|
||||
$(DEPS_DIR)/libz/deflate.o \
|
||||
$(DEPS_DIR)/libz/gzclose.o \
|
||||
$(DEPS_DIR)/libz/gzlib.o \
|
||||
$(DEPS_DIR)/libz/gzread.o \
|
||||
$(DEPS_DIR)/libz/gzwrite.o \
|
||||
$(DEPS_DIR)/libz/inffast.o \
|
||||
$(DEPS_DIR)/libz/inflate.o \
|
||||
$(DEPS_DIR)/libz/inftrees.o \
|
||||
$(DEPS_DIR)/libz/trees.o \
|
||||
$(DEPS_DIR)/libz/uncompr.o \
|
||||
$(DEPS_DIR)/libz/zutil.o
|
||||
INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include/compat
|
||||
DEFINES += -DWANT_ZLIB
|
||||
else
|
||||
LIBS += -lz
|
||||
LIBS += $(ZLIB_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FLAC), 1)
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
||||
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 \
|
||||
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
DEFINES += -DHAVE_RTGA
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/tga/rtga.o
|
||||
@@ -1398,11 +1508,6 @@ ifeq ($(HAVE_RBMP), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_IBXM), 1)
|
||||
DEFINES += -DHAVE_IBXM
|
||||
OBJ += $(DEPS_DIR)/ibxm/ibxm.o
|
||||
endif
|
||||
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \
|
||||
@@ -1412,42 +1517,6 @@ ifdef HAVE_COMPRESSION
|
||||
DEFINES += -DHAVE_COMPRESSION
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BUILTINZLIB),1)
|
||||
OBJ += $(DEPS_DIR)/libz/adler32.o \
|
||||
$(DEPS_DIR)/libz/compress.o \
|
||||
$(DEPS_DIR)/libz/crc32.o \
|
||||
$(DEPS_DIR)/libz/deflate.o \
|
||||
$(DEPS_DIR)/libz/gzclose.o \
|
||||
$(DEPS_DIR)/libz/gzlib.o \
|
||||
$(DEPS_DIR)/libz/gzread.o \
|
||||
$(DEPS_DIR)/libz/gzwrite.o \
|
||||
$(DEPS_DIR)/libz/inffast.o \
|
||||
$(DEPS_DIR)/libz/inflate.o \
|
||||
$(DEPS_DIR)/libz/inftrees.o \
|
||||
$(DEPS_DIR)/libz/trees.o \
|
||||
$(DEPS_DIR)/libz/uncompr.o \
|
||||
$(DEPS_DIR)/libz/zutil.o
|
||||
else
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
OBJ += $(ZLIB_OBJS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
ifeq ($(HAVE_FLAC), 1)
|
||||
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
||||
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 \
|
||||
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Video4Linux 2
|
||||
|
||||
ifeq ($(HAVE_V4L2),1)
|
||||
@@ -1500,6 +1569,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
network/netplay/netplay_handshake.o \
|
||||
network/netplay/netplay_init.o \
|
||||
network/netplay/netplay_io.o \
|
||||
network/netplay/netplay_keyboard.o \
|
||||
network/netplay/netplay_sync.o \
|
||||
network/netplay/netplay_discovery.o \
|
||||
network/netplay/netplay_buf.o \
|
||||
@@ -1525,27 +1595,25 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
cores/libretro-net-retropad/net_retropad_core.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MINIUPNPC), 1)
|
||||
ifeq ($(HAVE_BUILTINMINIUPNPC), 1)
|
||||
DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR
|
||||
DEFINES += -I$(DEPS_DIR)
|
||||
OBJ += \
|
||||
$(DEPS_DIR)/miniupnpc/igd_desc_parse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpreplyparse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpcommands.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnperrors.o \
|
||||
$(DEPS_DIR)/miniupnpc/connecthostport.o \
|
||||
$(DEPS_DIR)/miniupnpc/portlistingparse.o \
|
||||
$(DEPS_DIR)/miniupnpc/receivedata.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpdev.o \
|
||||
$(DEPS_DIR)/miniupnpc/minissdpc.o \
|
||||
$(DEPS_DIR)/miniupnpc/miniwget.o \
|
||||
$(DEPS_DIR)/miniupnpc/miniupnpc.o \
|
||||
$(DEPS_DIR)/miniupnpc/minixml.o \
|
||||
$(DEPS_DIR)/miniupnpc/minisoap.o
|
||||
else
|
||||
LIBS += $(MINIUPNPC_LIBS)
|
||||
endif
|
||||
ifeq ($(HAVE_BUILTINMINIUPNPC), 1)
|
||||
HAVE_MINIUPNPC = 1
|
||||
DEFINES += -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR
|
||||
DEFINES += -I$(DEPS_DIR)
|
||||
OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpreplyparse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpcommands.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnperrors.o \
|
||||
$(DEPS_DIR)/miniupnpc/connecthostport.o \
|
||||
$(DEPS_DIR)/miniupnpc/portlistingparse.o \
|
||||
$(DEPS_DIR)/miniupnpc/receivedata.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpdev.o \
|
||||
$(DEPS_DIR)/miniupnpc/minissdpc.o \
|
||||
$(DEPS_DIR)/miniupnpc/miniwget.o \
|
||||
$(DEPS_DIR)/miniupnpc/miniupnpc.o \
|
||||
$(DEPS_DIR)/miniupnpc/minixml.o \
|
||||
$(DEPS_DIR)/miniupnpc/minisoap.o
|
||||
else ifeq ($(HAVE_MINIUPNPC), 1)
|
||||
LIBS += $(MINIUPNPC_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1659,3 +1727,7 @@ OBJ += libretro-common/audio/dsp_filters/echo.o \
|
||||
libretro-common/audio/dsp_filters/reverb.o \
|
||||
libretro-common/audio/dsp_filters/wahwah.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RPILED), 1)
|
||||
OBJ += led/drivers/led_rpi.o
|
||||
endif
|
||||
+48
-21
@@ -46,6 +46,9 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -63,6 +66,11 @@ else
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_SSL = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
@@ -72,7 +80,7 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
@@ -118,7 +126,7 @@ endif
|
||||
|
||||
CFLAGS += -I. -Ideps -Ideps/libz -Ideps/7zip -Ideps/stb -Ilibretro-common/include
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
@@ -129,19 +137,25 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lctru -lm
|
||||
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LIBS += -lctrud
|
||||
else
|
||||
LIBS += -lctru
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(BUILD_3DSX), 1)
|
||||
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
|
||||
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_3DS), 1)
|
||||
TARGET_3DS := $(TARGET).3ds
|
||||
TARGET_3DS := $(TARGET).3ds
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_CIA), 1)
|
||||
TARGET_CIA := $(TARGET).cia
|
||||
TARGET_CIA := $(TARGET).cia
|
||||
endif
|
||||
|
||||
.PHONY: $(BUILD) clean all
|
||||
@@ -152,7 +166,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).core
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ) libretro_ctr.a
|
||||
|
||||
PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-
|
||||
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
||||
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
@@ -163,25 +177,38 @@ STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
ifeq ($(strip $(CTRBANNERTOOL)),)
|
||||
ifneq ($(findstring Linux,$(shell uname)),)
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname)),)
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
else
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
endif
|
||||
else
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
BANNERTOOL = $(CTRBANNERTOOL)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRMAKEROM)),)
|
||||
ifneq ($(findstring Linux,$(shell uname)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
else
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
endif
|
||||
else
|
||||
MAKEROM = $(CTRMAKEROM)
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -202,7 +229,7 @@ endif
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -210,7 +237,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITPRO)/devkitARM/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
+27
-14
@@ -111,7 +111,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ)
|
||||
|
||||
PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-
|
||||
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
||||
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
@@ -122,25 +122,38 @@ STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
ifeq ($(strip $(CTRBANNERTOOL)),)
|
||||
ifneq ($(findstring Linux,$(shell uname)),)
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname)),)
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
else
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
endif
|
||||
else
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
BANNERTOOL = $(CTRBANNERTOOL)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRMAKEROM)),)
|
||||
ifneq ($(findstring Linux,$(shell uname)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname)),)
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
else
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
endif
|
||||
else
|
||||
MAKEROM = $(CTRMAKEROM)
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -161,7 +174,7 @@ endif
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
|
||||
+28
-44
@@ -1,14 +1,15 @@
|
||||
TARGET := retroarch.js
|
||||
|
||||
EOPT = USE_ZLIB=1 USE_SDL=2 # Emscripten specific options
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
|
||||
PTHREAD = 0
|
||||
OS = Emscripten
|
||||
OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_EGL = 1
|
||||
HAVE_OPENGLES = 1
|
||||
@@ -17,31 +18,28 @@ HAVE_RPNG = 1
|
||||
HAVE_EMSCRIPTEN = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 1
|
||||
HAVE_SDL2 = 0
|
||||
HAVE_ZLIB = 1
|
||||
WANT_ZLIB = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
MEMORY = 536870912
|
||||
|
||||
# XXX: setting this to 1/2 currently crashes Firefox nightly
|
||||
PRECISE_F32 = 2
|
||||
PRECISE_F32 = 1
|
||||
|
||||
OBJDIR := obj-emscripten
|
||||
|
||||
ifneq ($(NATIVE_ZLIB),)
|
||||
WANT_ZLIB = 0
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
DEFINES += -DHAVE_SDL2
|
||||
endif
|
||||
|
||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
||||
|
||||
LIBS := -s USE_SDL=2 -s USE_ZLIB=1
|
||||
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) \
|
||||
LIBS := -s USE_ZLIB=1
|
||||
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s NO_EXIT_RUNTIME=0 -s FULL_ES2=1 -s BINARYEN_TRAP_MODE=\"clamp\" \
|
||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||
--js-library emscripten/library_rwebaudio.js \
|
||||
--js-library emscripten/library_rwebinput.js \
|
||||
--js-library emscripten/library_rwebcam.js
|
||||
ifneq ($(PTHREAD), 0)
|
||||
LDFLAGS += -s USE_PTHREADS=$(PTHREAD) -s PTHREAD_POOL_SIZE=2
|
||||
@@ -49,7 +47,12 @@ endif
|
||||
|
||||
ifeq ($(ASYNC), 1)
|
||||
LDFLAGS += -s ASYNCIFY=$(ASYNC)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
LIBS += -s USE_SDL=2
|
||||
DEFINES += -DHAVE_SDL2
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
@@ -64,7 +67,7 @@ ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -O0 -g
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
LDFLAGS += -O2
|
||||
LDFLAGS += -O2 -s WASM=1
|
||||
# WARNING: some optimizations can break some cores (ex: LTO breaks tyrquake)
|
||||
LDFLAGS += -s PRECISE_F32=$(PRECISE_F32)
|
||||
ifeq ($(LTO), 1)
|
||||
@@ -73,48 +76,29 @@ else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
CFLAGS += -DHAVE_RPNG -Wall -Wno-unused-result -Wno-unused-variable -I. -Ilibretro-common/include -std=gnu99 -s USE_ZLIB=1 \
|
||||
CFLAGS += -DHAVE_RPNG -Wall -I. -Ilibretro-common/include -std=gnu99 -s USE_ZLIB=1 \
|
||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_take_screenshot']"
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJ)
|
||||
$(TARGET): $(RARCH_OBJ) $(libretro)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LD) -o $@ $(OBJ) $(libretro) $(LIBS) $(LDFLAGS)
|
||||
$(Q)$(LD) -o $@ $(RARCH_OBJ) $(libretro) $(LIBS) $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) $(EOPTS) -c -o $@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CXXFLAGS) $(DEFINES) $(EOPTS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f deps/libz/*.o
|
||||
rm -f frontend/*.o
|
||||
rm -f menu/*.o
|
||||
rm -f menu/disp/*.o
|
||||
rm -f audio/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f compat/rxml/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/scaler/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/d3d/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/math/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f gfx/rpng/*.o
|
||||
rm -f gfx/glsym/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f libretro-common/*/*.o
|
||||
rm -rf $(OBJDIR)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all clean
|
||||
+7
-3
@@ -671,6 +671,10 @@ ifeq ($(HAVE_GRIFFIN_CPP), 1)
|
||||
OBJ += griffin/griffin_cpp.o
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
@@ -763,7 +767,7 @@ endif
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
CFLAGS += -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL
|
||||
else
|
||||
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MATERIALUI), 1)
|
||||
@@ -832,7 +836,7 @@ ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -Wp64
|
||||
endif
|
||||
|
||||
CFLAGS += -Od -Zi -D_DEBUG -MTd -TP
|
||||
CFLAGS += -Od -Zi -D_DEBUG -MTd
|
||||
LDFLAGS += -DEBUG
|
||||
else
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
@@ -847,7 +851,7 @@ else ifneq (,$(findstring msvc,$(platform)))
|
||||
LDFLAGS += -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup
|
||||
endif
|
||||
|
||||
CFLAGS += -O2 -DNDEBUG -MT -TP
|
||||
CFLAGS += -O2 -DNDEBUG -MT
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
TARGET := retroarch.exe
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
OS = Win32
|
||||
ARCH = amd64
|
||||
#TARGET_ARCH = x86
|
||||
BUILD_DIR = objs/msvc
|
||||
CXX_BUILD = 0
|
||||
|
||||
|
||||
WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
|
||||
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
|
||||
|
||||
HAVE_D3DX := 1
|
||||
HAVE_D3D8 := 0
|
||||
HAVE_D3D9 := 1
|
||||
HAVE_D3D10 := 1
|
||||
HAVE_D3D11 := 1
|
||||
HAVE_D3D12 := 1
|
||||
HAVE_CG := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_VULKAN := 1
|
||||
HAVE_XAUDIO := 1
|
||||
HAVE_XINPUT := 1
|
||||
HAVE_WASAPI := 0
|
||||
HAVE_THREAD_STORAGE := 1
|
||||
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_MATERIALUI := 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_DINPUT := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_KEYMAPPER := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
|
||||
include Makefile.common
|
||||
INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS))
|
||||
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS))
|
||||
CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS))
|
||||
LIBS := $(filter-out -lstdc++,$(LIBS))
|
||||
|
||||
ifeq ($(ARCH),x64)
|
||||
ARCH := amd64
|
||||
endif
|
||||
|
||||
ARCH2 := $(ARCH)
|
||||
ifeq ($(ARCH),amd64)
|
||||
ARCH2 := x64
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),)
|
||||
TARGET_ARCH = $(ARCH)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),x64)
|
||||
TARGET_ARCH = amd64
|
||||
endif
|
||||
|
||||
TARGET_ARCH2 = $(TARGET_ARCH)
|
||||
ifeq ($(TARGET_ARCH2),amd64)
|
||||
TARGET_ARCH2 = x64
|
||||
endif
|
||||
|
||||
CROSS = $(ARCH)
|
||||
ifeq ($(ARCH),x86)
|
||||
CROSS =
|
||||
endif
|
||||
|
||||
|
||||
INCLUDE := $(VCINSTALLDIR)include;$(VCINSTALLDIR)atlmfc\include;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um;
|
||||
LIB := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\$(TARGET_ARCH2);$(WindowsSdkDir)lib\$(WindowsSDKVersion)um\$(TARGET_ARCH2);C:\Program Files (x86)\NVIDIA Corporation\Cg\lib.$(TARGET_ARCH2);C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Lib\$(TARGET_ARCH2);
|
||||
LIBPATH := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCINSTALLDIR)bin\\$(CROSS)"):$(shell IFS=$$'\n'; cygpath "$(WindowsSdkDir)\bin\\$(ARCH2)"):$(PATH)
|
||||
|
||||
|
||||
export INCLUDE := $(INCLUDE)
|
||||
export LIB := $(LIB)
|
||||
export LIBPATH := $(LIBPATH)
|
||||
export PATH := $(PATH)
|
||||
|
||||
#$(info WindowsSdkDir : $(WindowsSdkDir))
|
||||
#$(info WindowsSDKVersion : $(WindowsSDKVersion))
|
||||
#$(info VCINSTALLDIR : $(VCINSTALLDIR))
|
||||
#$(info INCLUDE : $(INCLUDE))
|
||||
#$(info LIB : $(LIB))
|
||||
#$(info LIBPATH : $(LIBPATH))
|
||||
#$(info PATH : $(PATH))
|
||||
#$(error end)
|
||||
|
||||
DEFINES += -D__SSE__ -D__SSE2__
|
||||
ifeq ($(TARGET_ARCH2),x64)
|
||||
DEFINES += -D__x86_64__
|
||||
else
|
||||
#DEFINES += -D__i686__
|
||||
endif
|
||||
|
||||
FLAGS += -nologo -MP
|
||||
FLAGS += -Gm- -Zc:inline -fp:precise -Zc:forScope -GR- -Gd -Oi -volatile:iso
|
||||
#FLAGS += -Zc:wchar_t -Zp16 -Z7
|
||||
#FLAGS += -utf-8
|
||||
#FLAGS += -source-charset:utf-8
|
||||
|
||||
CXXFLAGS += $(CFLAGS) -TP -EHsc
|
||||
ifeq ($(CXX_BUILD),1)
|
||||
CFLAGS := $(CXXFLAGS)
|
||||
DEFINES += -DCXX_BUILD
|
||||
else
|
||||
CFLAGS += -TC
|
||||
endif
|
||||
|
||||
WARNINGS += -WX -W3
|
||||
WARNINGS += -wd4101 -wd4996 -wd4244 -wd4267 -wd4090 -wd4305 -wd4146 -wd4334 -wd4018 -wd4800 -wd4838
|
||||
|
||||
CC = cl.exe
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
RC = rc.exe
|
||||
|
||||
LIBS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
LDFLAGS += -nologo -wx -nxcompat -machine:$(TARGET_ARCH2)
|
||||
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
FLAGS += -GS -Gy -Od -RTC1 -D_SECURE_SCL=1 -Zi
|
||||
FLAGS += -MDd
|
||||
LDFLAGS += -DEBUG
|
||||
DEFINES += -DDEBUG -D_DEBUG
|
||||
else
|
||||
FLAGS += -GS- -Gy- -O2 -Ob2 -GF -GT -Oy -Ot -D_SECURE_SCL=0
|
||||
FLAGS += -MD
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-debug
|
||||
endif
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-griffin
|
||||
endif
|
||||
|
||||
BUILD_DIR := $(BUILD_DIR)-$(TARGET_ARCH2)
|
||||
|
||||
ifneq ($(V), 1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ := griffin/griffin.o griffin/griffin_cpp.o
|
||||
DEFINES += -DHAVE_GRIFFIN -DUSE_MATH_DEFINES
|
||||
else
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
INCLUDE_DIRS += -I. -Igfx/include
|
||||
|
||||
#OBJ := version_git.o
|
||||
|
||||
OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
OBJ := $(OBJ:.o=.obj)
|
||||
|
||||
|
||||
|
||||
|
||||
LDFLAGS += -WX -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup
|
||||
|
||||
DEFINES := $(patsubst -f%,,$(DEFINES))
|
||||
LDFLAGS := $(patsubst -l%,%.lib,$(LDFLAGS))
|
||||
LIBS := $(filter-out -lm,$(LIBS))
|
||||
LIBS := $(patsubst -l%,%.lib,$(LIBS))
|
||||
|
||||
|
||||
#$(info INCLUDE_DIRS : $(INCLUDE_DIRS))
|
||||
#$(info DEFINES : $(DEFINES))
|
||||
#$(info CFLAGS : $(CFLAGS))
|
||||
#$(info CXXFLAGS : $(CXXFLAGS))
|
||||
#$(info LDFLAGS : $(LDFLAGS))
|
||||
#$(info LIBS : $(LIBS))
|
||||
#$(info OBJ : $(OBJ))
|
||||
#$(info target : $(TARGET))
|
||||
#$(info flags : $(FLAGS))
|
||||
#$(info INCLUDE : $(INCLUDE))
|
||||
#$(info LIB : $(LIB))
|
||||
#$(info LIBPATH : $(LIBPATH))
|
||||
#$(error end)
|
||||
|
||||
$(info os : $(OS))
|
||||
$(info host : $(ARCH))
|
||||
$(info target : $(TARGET_ARCH))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
%: $(BUILD_DIR)/%
|
||||
cp $< $@
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
%.exe: $(BUILD_DIR)/%.exe
|
||||
cp $< $@
|
||||
cp $(BUILD_DIR)/$*.pdb $*.pbd
|
||||
endif
|
||||
|
||||
SHELL:=$(SHELL) -o pipefail
|
||||
|
||||
DEPFLAGS = -showIncludes | tee $(BUILD_DIR)/$*.dtemp | sed /'Note: including file:'/d
|
||||
MAKEDEPS = echo $@: $< \\ > $(BUILD_DIR)/$*.depend && \
|
||||
grep 'Note: including file:' $(BUILD_DIR)/$*.dtemp \
|
||||
| sed '/$(subst \,\\,$(WindowsSdkDir))/Id; /$(subst \,\\,$(VCINSTALLDIR))/Id; s/Note: including file:[ ]*//g; s/\\/\//g; s/ /\\ /g; s/.*/ & \\/g' \
|
||||
>> $(BUILD_DIR)/$*.depend && \
|
||||
rm -f $(BUILD_DIR)/$*.dtemp
|
||||
|
||||
#DEPFLAGS :=
|
||||
#MAKEDEPS :=
|
||||
|
||||
$(BUILD_DIR)/%.obj: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CXX) -c -Fo:$@ $< $(FLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDE_DIRS) $(WARNINGS) $(DEPFLAGS)
|
||||
@$(MAKEDEPS)
|
||||
|
||||
$(BUILD_DIR)/%.obj: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CC) -c -Fo:$@ $< $(FLAGS) $(CFLAGS) $(DEFINES) $(INCLUDE_DIRS) $(WARNINGS) $(DEPFLAGS)
|
||||
@$(MAKEDEPS)
|
||||
|
||||
$(BUILD_DIR)/%.res: %.rc
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(RC) $<
|
||||
$(Q)mv $*.res $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET): $(OBJ) .$(TARGET).last
|
||||
@touch .$(TARGET).last
|
||||
$(Q)$(LD) $(OBJ) $(LDFLAGS) $(LIBS) -out:$(BUILD_DIR)/$(TARGET)
|
||||
|
||||
%.h %.hpp %.depend %.last: ;
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
||||
rm -f $(BUILD_DIR)/$(TARGET)
|
||||
rm -f .$(TARGET).last
|
||||
rm -f $(OBJ:.obj=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend %.last
|
||||
|
||||
-include $(patsubst %.obj,%.depend,$(filter %.obj,$(OBJ)))
|
||||
@@ -15,7 +15,7 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -D__ARM_ARCH_6__ -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@ DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
HAVE_THREADS = 1
|
||||
BIG_STACK = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
@@ -21,11 +21,11 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/libz deps/7zip libretro-common/include
|
||||
INCDIR = deps deps/stb deps/libz deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
TARGET := retroarch_switch
|
||||
|
||||
DEBUG ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 0 # enable later?
|
||||
HAVE_XMB = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_MENU = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
|
||||
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path t>o libtransistor")
|
||||
endif
|
||||
|
||||
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/
|
||||
LIBDIRS := -L.
|
||||
|
||||
TARGETS := $(TARGET).nro
|
||||
|
||||
CFLAGS += $(INCDIRS) $(DEFINES) -Wunused-command-line-argument
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
$(TARGET).nro.so: $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LIB) $(LIBTRANSISTOR_COMMON_LIBS)
|
||||
$(LD) $(LD_FLAGS) --allow-multiple-definition -o $@ $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LDFLAGS) -lm
|
||||
|
||||
%.squashfs.o: %.squashfs
|
||||
$(LD) -s -r -b binary -m aarch64elf -T $(LIBTRANSISTOR_HOME)/fs.T -o $@ $<
|
||||
|
||||
fs.squashfs: fs/*
|
||||
mksquashfs $^ $@ -comp lz4 -nopad -noappend
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).nro.so $(TARGET).nro
|
||||
|
||||
.PHONY: clean all
|
||||
+184
-124
@@ -1,98 +1,172 @@
|
||||
TARGET := retroarch_wiiu
|
||||
BUILD_HBL_ELF = 1
|
||||
BUILD_RPX = 1
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
BUILD_HBL_ELF = 1
|
||||
BUILD_RPX = 1
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 0
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
PC_DEVELOPMENT_IP_ADDRESS ?=
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-salamander
|
||||
TARGET := $(TARGET)_salamander
|
||||
else ifeq ($(GRIFFIN_BUILD),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-griffin
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-debug
|
||||
endif
|
||||
|
||||
ifneq ($(V), 1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS ?=
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
|
||||
OBJ :=
|
||||
OBJ += wiiu/input/wpad_driver.o
|
||||
OBJ += wiiu/input/kpad_driver.o
|
||||
OBJ += wiiu/input/pad_functions.o
|
||||
OBJ += wiiu/system/memory.o
|
||||
OBJ += wiiu/system/exception_handler.o
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/fs/sd_fat_devoptab.o
|
||||
OBJ += wiiu/fs/fs_utils.o
|
||||
OBJ += wiiu/tex_shader.o
|
||||
OBJ += wiiu/hbl.o
|
||||
|
||||
ifeq ($(ENABLE_CONTROLLER_PATCHER), 1)
|
||||
OBJ += wiiu/controller_patcher/ControllerPatcher.o
|
||||
OBJ += wiiu/controller_patcher/ControllerPatcherWrapper.o
|
||||
OBJ += wiiu/controller_patcher/ConfigReader.o
|
||||
OBJ += wiiu/controller_patcher/config/ConfigParser.o
|
||||
OBJ += wiiu/controller_patcher/config/ConfigValues.o
|
||||
OBJ += wiiu/controller_patcher/network/ControllerPatcherNet.o
|
||||
OBJ += wiiu/controller_patcher/network/TCPServer.o
|
||||
OBJ += wiiu/controller_patcher/network/UDPClient.o
|
||||
OBJ += wiiu/controller_patcher/network/UDPServer.o
|
||||
OBJ += wiiu/controller_patcher/patcher/ControllerPatcherUtils.o
|
||||
OBJ += wiiu/controller_patcher/patcher/ControllerPatcherHID.o
|
||||
OBJ += wiiu/controller_patcher/utils/CPRetainVars.o
|
||||
OBJ += wiiu/controller_patcher/utils/CPStringTools.o
|
||||
OBJ += wiiu/controller_patcher/utils/PadConst.o
|
||||
OBJ += wiiu/controller_patcher/utils/FSHelper.o
|
||||
endif
|
||||
|
||||
DEFINES :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING
|
||||
# DEFINES += -DWANT_IFADDRS
|
||||
# DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
else
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_KEYMAPPER = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STB_FONT = 1
|
||||
# HAVE_FREETYPE = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
# WANT_IFADDRS = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
WANT_IOSUHAX = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
BLACKLIST += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
OBJ += gfx/drivers/wiiu_gfx.o
|
||||
OBJ += gfx/drivers_font/wiiu_font.o
|
||||
OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += input/drivers/wiiu_input.o
|
||||
OBJ += input/drivers_joypad/wiiu_joypad.o
|
||||
OBJ += audio/drivers/wiiu_audio.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
ifeq ($(WIIU_LOG_RPX),1)
|
||||
defines += -DWIIU_LOG_RPX
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_KEYMAPPER
|
||||
ifeq ($(WIIU_HID),1)
|
||||
DEFINES += -DWIIU_HID
|
||||
OBJ += wiiu/input/hidpad_driver.o
|
||||
OBJ += wiiu/input/wiiu_hid.o
|
||||
OBJ += input/connect/joypad_connection.o \
|
||||
input/connect/connect_ps2adapter.o \
|
||||
input/connect/connect_psxadapter.o \
|
||||
input/connect/connect_ps3.o \
|
||||
input/connect/connect_ps4.o \
|
||||
input/connect/connect_wii.o \
|
||||
input/connect/connect_nesusb.o \
|
||||
input/connect/connect_snesusb.o \
|
||||
input/connect/connect_wiiupro.o \
|
||||
input/connect/connect_wiiugca.o
|
||||
endif
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
DEFINES += -DRARCH_CONSOLE -DIS_SALAMANDER
|
||||
|
||||
OBJ += frontend/frontend_salamander.o
|
||||
OBJ += frontend/frontend_driver.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
OBJ += frontend/drivers/platform_null.o
|
||||
OBJ += libretro-common/encodings/encoding_utf.o
|
||||
OBJ += libretro-common/compat/compat_strcasestr.o
|
||||
OBJ += libretro-common/file/file_path.o
|
||||
OBJ += libretro-common/string/stdstring.o
|
||||
OBJ += libretro-common/lists/string_list.o
|
||||
OBJ += libretro-common/lists/dir_list.o
|
||||
OBJ += libretro-common/file/retro_dirent.o
|
||||
OBJ += libretro-common/compat/compat_strl.o
|
||||
OBJ += libretro-common/file/config_file.o
|
||||
OBJ += libretro-common/streams/file_stream.o
|
||||
OBJ += libretro-common/vfs/vfs_implementation.o
|
||||
OBJ += libretro-common/hash/rhash.o
|
||||
OBJ += file_path_str.o
|
||||
OBJ += verbosity.o
|
||||
else
|
||||
DEFINES += -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_SHADERPIPELINE
|
||||
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
OBJ += gfx/drivers/gx2_shaders/sprite.o
|
||||
OBJ += gfx/drivers/gx2_shaders/frame.o
|
||||
OBJ += gfx/drivers/gx2_shaders/ribbon.o
|
||||
OBJ += gfx/drivers/gx2_shaders/ribbon_simple.o
|
||||
OBJ += gfx/drivers/gx2_shaders/bokeh.o
|
||||
OBJ += gfx/drivers/gx2_shaders/snow.o
|
||||
OBJ += gfx/drivers/gx2_shaders/snow_simple.o
|
||||
OBJ += gfx/drivers/gx2_shaders/snowflake.o
|
||||
OBJ += gfx/drivers_shader/slang_preprocess.o
|
||||
OBJ += gfx/drivers_shader/glslang_util.o
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING
|
||||
# DEFINES += -DWANT_IFADDRS
|
||||
# DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
else
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_KEYMAPPER = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STB_FONT = 1
|
||||
# HAVE_FREETYPE = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
# WANT_IFADDRS = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
WANT_IOSUHAX = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST := $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
OBJ += gfx/drivers/gx2_gfx.o
|
||||
OBJ += gfx/drivers_font/wiiu_font.o
|
||||
OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += input/drivers/wiiu_input.o
|
||||
OBJ += input/drivers_joypad/wiiu_joypad.o
|
||||
OBJ += audio/drivers/wiiu_audio.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
|
||||
#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__).
|
||||
DEFINES += -DWIIU -DMSB_FIRST -D__WUT__
|
||||
#DEFINES += -D_GNU_SOURCE
|
||||
DEFINES += -DHAVE_MAIN
|
||||
DEFINES += -DRARCH_CONSOLE
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_TCP_PORT),)
|
||||
DEFINES += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
@@ -122,7 +196,6 @@ else
|
||||
ELF2RPL := $(ELF2RPL).exe
|
||||
endif
|
||||
|
||||
|
||||
INCDIRS := -I. -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib
|
||||
|
||||
@@ -134,6 +207,7 @@ ifeq ($(DEBUG), 1)
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
LDFLAGS := $(CFLAGS)
|
||||
|
||||
ASFLAGS := $(CFLAGS) -mregnames
|
||||
@@ -142,29 +216,12 @@ CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
||||
#CFLAGS += -Wall
|
||||
|
||||
#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__).
|
||||
CFLAGS += -DWIIU -DMSB_FIRST -D__WUT__
|
||||
CFLAGS += -DHAVE_MAIN
|
||||
CFLAGS += -DHAVE_UPDATE_ASSETS
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
ifeq ($(ENABLE_CONTROLLER_PATCHER), 1)
|
||||
CFLAGS += -DENABLE_CONTROLLER_PATCHER
|
||||
endif
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_TCP_PORT),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -D_GNU_SOURCE
|
||||
|
||||
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
@@ -179,8 +236,8 @@ LIBS += -liosuhax
|
||||
endif
|
||||
|
||||
|
||||
RPX_OBJ = wiiu/system/stubs_rpl.o
|
||||
HBL_ELF_OBJ = wiiu/system/dynamic.o wiiu/system/stubs_elf.o
|
||||
RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o
|
||||
HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o $(BUILD_DIR)/wiiu/system/stubs_elf.o
|
||||
|
||||
RPX_LDFLAGS := -pie -fPIE
|
||||
RPX_LDFLAGS += -z common-page-size=64 -z max-page-size=64
|
||||
@@ -198,64 +255,67 @@ ifeq ($(BUILD_HBL_ELF), 1)
|
||||
TARGETS += $(TARGET).elf
|
||||
endif
|
||||
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp %.depend
|
||||
%: $(BUILD_DIR)/%
|
||||
cp $< $@
|
||||
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp %.depend
|
||||
@$(if $(Q), echo CXX $<,)
|
||||
$(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(Q)$(POSTCOMPILE)
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c %.depend
|
||||
$(BUILD_DIR)/%.o: %.c %.depend
|
||||
@$(if $(Q), echo CC $<,)
|
||||
$(Q)$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(Q)$(POSTCOMPILE)
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CC) -c -o $@ $< $(CFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
||||
|
||||
|
||||
%.o: %.S
|
||||
%.o: %.S %.depend
|
||||
$(BUILD_DIR)/%.o: %.S %.depend
|
||||
@$(if $(Q), echo AS $<,)
|
||||
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(Q)$(POSTCOMPILE)
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(DEFINES) $(INCDIRS) $(DEPFLAGS)
|
||||
|
||||
%.o: %.s
|
||||
%.o: %.s %.depend
|
||||
$(BUILD_DIR)/%.o: %.s %.depend
|
||||
@$(if $(Q), echo AS $<,)
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(Q)$(POSTCOMPILE)
|
||||
%.a:
|
||||
@$(if $(Q), echo AR $<,)
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q)$(AR) -rc $@ $^
|
||||
|
||||
%.depend: ;
|
||||
|
||||
%.last: ;
|
||||
|
||||
$(ELF2RPL):
|
||||
@$(if $(Q), echo MAKE $@,)
|
||||
$(Q)$(MAKE) -C wiiu/wut/elf2rpl/
|
||||
|
||||
$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld .$(TARGET).elf.last
|
||||
@$(if $(Q), echo LD $@,)
|
||||
@touch .$(TARGET).elf.last
|
||||
$(Q)$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
||||
$(BUILD_DIR)/$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
||||
@$(if $(Q), echo LD $@,)
|
||||
$(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(TARGET).rpx: $(TARGET).rpx.elf $(ELF2RPL)
|
||||
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.last
|
||||
@$(if $(Q), echo ELF2RPL $@,)
|
||||
$(Q)-$(ELF2RPL) $(TARGET).rpx.elf $@
|
||||
@touch .$(TARGET).rpx.last
|
||||
$(Q)-$(ELF2RPL) $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx
|
||||
rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).rpx
|
||||
rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.last
|
||||
rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
.PRECIOUS: %.depend %.last
|
||||
|
||||
-include $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
@@ -1,177 +0,0 @@
|
||||
TARGET := retroarch_wiiu_salamander
|
||||
BUILD_HBL_ELF = 1
|
||||
BUILD_RPX = 1
|
||||
DEBUG = 0
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS =
|
||||
PC_DEVELOPMENT_TCP_PORT =
|
||||
|
||||
OBJ :=
|
||||
OBJ += wiiu/system/memory.o
|
||||
OBJ += wiiu/system/exception_handler.o
|
||||
OBJ += wiiu/fs/sd_fat_devoptab.o
|
||||
OBJ += wiiu/fs/fs_utils.o
|
||||
OBJ += wiiu/hbl.o
|
||||
OBJ += frontend/frontend_salamander.o
|
||||
OBJ += frontend/frontend_driver.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
OBJ += frontend/drivers/platform_null.o
|
||||
OBJ += libretro-common/encodings/encoding_utf.o
|
||||
OBJ += libretro-common/compat/compat_strcasestr.o
|
||||
OBJ += libretro-common/file/file_path.o
|
||||
OBJ += libretro-common/string/stdstring.o
|
||||
OBJ += libretro-common/lists/string_list.o
|
||||
OBJ += libretro-common/lists/dir_list.o
|
||||
OBJ += libretro-common/file/retro_dirent.o
|
||||
OBJ += libretro-common/compat/compat_strl.o
|
||||
OBJ += libretro-common/file/config_file.o
|
||||
OBJ += libretro-common/streams/file_stream.o
|
||||
OBJ += libretro-common/vfs/vfs_implementation.o
|
||||
OBJ += libretro-common/hash/rhash.o
|
||||
OBJ += file_path_str.o
|
||||
OBJ += verbosity.o
|
||||
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
|
||||
endif
|
||||
|
||||
export PATH := $(PATH):$(DEVKITPPC)/bin
|
||||
|
||||
PREFIX := powerpc-eabi-
|
||||
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
AS := $(PREFIX)as
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
ELF2RPL := wiiu/wut/elf2rpl/elf2rpl
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
else
|
||||
ELF2RPL := $(ELF2RPL).exe
|
||||
endif
|
||||
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib
|
||||
|
||||
CFLAGS := -mwup -mcpu=750 -meabi -mhard-float
|
||||
LDFLAGS :=
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
LDFLAGS := $(CFLAGS)
|
||||
|
||||
ASFLAGS := $(CFLAGS) -mregnames
|
||||
|
||||
CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
||||
#CFLAGS += -Wall
|
||||
|
||||
#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__).
|
||||
CFLAGS += -DWIIU -DMSB_FIRST
|
||||
CFLAGS += -DHAVE_MAIN
|
||||
CFLAGS += -DRARCH_CONSOLE -DIS_SALAMANDER
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_TCP_PORT),)
|
||||
CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm -lfat -liosuhax
|
||||
|
||||
|
||||
RPX_OBJ = wiiu/system/stubs_rpl.o
|
||||
HBL_ELF_OBJ = wiiu/system/dynamic.o wiiu/system/stubs_elf.o
|
||||
|
||||
RPX_LDFLAGS := -pie -fPIE
|
||||
RPX_LDFLAGS += -z common-page-size=64 -z max-page-size=64
|
||||
RPX_LDFLAGS += -T wiiu/link_rpl.ld
|
||||
RPX_LDFLAGS += -nostartfiles
|
||||
|
||||
HBL_ELF_LDFLAGS := -T wiiu/link_elf.ld
|
||||
|
||||
TARGETS :=
|
||||
ifeq ($(BUILD_RPX), 1)
|
||||
TARGETS += $(TARGET).rpx
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_HBL_ELF), 1)
|
||||
TARGETS += $(TARGET).elf
|
||||
endif
|
||||
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp %.depend
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c %.depend
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
|
||||
%.o: %.S
|
||||
%.o: %.S %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.s
|
||||
%.o: %.s %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
%.a:
|
||||
$(AR) -rc $@ $^
|
||||
|
||||
%.depend: ;
|
||||
|
||||
|
||||
$(ELF2RPL):
|
||||
$(MAKE) -C wiiu/wut/elf2rpl/
|
||||
|
||||
$(TARGET).elf: $(OBJ) $(HBL_ELF_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
||||
$(LD) $(OBJ) $(HBL_ELF_OBJ) $(LDFLAGS) $(HBL_ELF_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.ld
|
||||
$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(TARGET).rpx: $(TARGET).rpx.elf $(ELF2RPL)
|
||||
-$(ELF2RPL) $(TARGET).rpx.elf $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx
|
||||
rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
-include $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
|
||||
@@ -66,16 +66,22 @@ RetroArch has been ported to the following platforms:
|
||||
- DOS
|
||||
- Windows
|
||||
- Linux
|
||||
- Emscripten
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- MacOS
|
||||
- OpenBSD
|
||||
- Haiku
|
||||
- Solaris
|
||||
- MacOS X
|
||||
- PlayStation 3
|
||||
- PlayStation Portable
|
||||
- Original Xbox
|
||||
- Xbox 360 (Libxenon/XeXDK)
|
||||
- Wii, GameCube (Libogc)
|
||||
- WiiU
|
||||
- PlayStation Vita
|
||||
- Original Microsoft Xbox
|
||||
- Microsoft Xbox 360 (Libxenon/XeXDK)
|
||||
- Nintendo Wii, GameCube (Libogc)
|
||||
- Nintendo WiiU
|
||||
- Nintendo 3DS
|
||||
- Nintendo Switch
|
||||
- Raspberry Pi
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
+60
-34
@@ -21,7 +21,6 @@
|
||||
#include <lists/string_list.h>
|
||||
#include <audio/conversion/float_to_s16.h>
|
||||
#include <audio/conversion/s16_to_float.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include <audio/dsp_filter.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/dir_list.h>
|
||||
@@ -115,6 +114,9 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef _3DS
|
||||
&audio_ctr_csnd,
|
||||
&audio_ctr_dsp,
|
||||
#endif
|
||||
#ifdef SWITCH
|
||||
&audio_switch,
|
||||
#endif
|
||||
&audio_null,
|
||||
NULL,
|
||||
@@ -144,8 +146,10 @@ 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;
|
||||
@@ -179,6 +183,17 @@ static void *audio_driver_resampler_data = NULL;
|
||||
static const audio_driver_t *current_audio = NULL;
|
||||
static void *audio_driver_context_audio_data = NULL;
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
return RESAMPLER_QUALITY_DONTCARE;
|
||||
|
||||
return (enum resampler_quality)settings->uints.audio_resampler_quality;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* compute_audio_buffer_statistics:
|
||||
*
|
||||
@@ -212,13 +227,22 @@ static void compute_audio_buffer_statistics(void)
|
||||
accum_var += diff * diff;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
#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;
|
||||
|
||||
RARCH_LOG("[Audio]: Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n",
|
||||
avg_filled * 100.0, deviation * 100.0);
|
||||
#endif
|
||||
|
||||
low_water_size = (unsigned)(audio_driver_buffer_size * 3 / 4);
|
||||
high_water_size = (unsigned)(audio_driver_buffer_size / 4);
|
||||
|
||||
@@ -230,12 +254,11 @@ static void compute_audio_buffer_statistics(void)
|
||||
high_water_count++;
|
||||
}
|
||||
|
||||
RARCH_LOG("[Audio]: Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n",
|
||||
avg_filled * 100.0, deviation * 100.0);
|
||||
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));
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* audio_driver_find_handle:
|
||||
@@ -320,7 +343,9 @@ static bool audio_driver_deinit_internal(void)
|
||||
|
||||
command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
compute_audio_buffer_statistics();
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -439,6 +464,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
&audio_driver_resampler_data,
|
||||
&audio_driver_resampler,
|
||||
settings->arrays.audio_resampler,
|
||||
audio_driver_get_resampler_quality(),
|
||||
audio_source_ratio_original))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n",
|
||||
@@ -488,7 +514,9 @@ 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);
|
||||
|
||||
@@ -528,11 +556,8 @@ void audio_driver_set_nonblocking_state(bool enable)
|
||||
*
|
||||
* Writes audio samples to audio driver. Will first
|
||||
* perform DSP processing (if enabled) and resampling.
|
||||
*
|
||||
* Returns: true (1) if audio samples were written to the audio
|
||||
* driver, false (0) in case of an error.
|
||||
**/
|
||||
static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
{
|
||||
struct resampler_data src_data;
|
||||
bool is_perfcnt_enable = false;
|
||||
@@ -556,10 +581,11 @@ static bool 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)
|
||||
return true;
|
||||
if (!audio_driver_active || !audio_driver_input_data)
|
||||
return false;
|
||||
if ( is_paused ||
|
||||
!audio_driver_active ||
|
||||
!audio_driver_input_data ||
|
||||
!audio_driver_output_samples_buf)
|
||||
return;
|
||||
|
||||
convert_s16_to_float(audio_driver_input_data, data, samples,
|
||||
audio_volume_gain);
|
||||
@@ -594,29 +620,31 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
if (audio_driver_control)
|
||||
{
|
||||
/* Readjust the audio input rate. */
|
||||
unsigned write_idx = audio_driver_free_samples_count++ &
|
||||
(AUDIO_BUFFER_FREE_SAMPLES_COUNT - 1);
|
||||
int half_size = (int)(audio_driver_buffer_size / 2);
|
||||
int avail =
|
||||
(int)current_audio->write_avail(audio_driver_context_audio_data);
|
||||
int delta_mid = avail - half_size;
|
||||
double direction = (double)delta_mid / half_size;
|
||||
double adjust = 1.0 + audio_driver_rate_control_delta * direction;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG_OUTPUT("[Audio]: Audio buffer is %u%% full\n",
|
||||
(unsigned)(100 - (avail * 100) / audio_driver_buffer_size));
|
||||
#endif
|
||||
#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;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG_OUTPUT("[Audio]: New rate: %lf, Orig rate: %lf\n",
|
||||
audio_source_ratio_current,
|
||||
audio_source_ratio_original);
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
RARCH_LOG_OUTPUT("[Audio]: Audio buffer is %u%% full\n",
|
||||
(unsigned)(100 - (avail * 100) / audio_driver_buffer_size));
|
||||
RARCH_LOG_OUTPUT("[Audio]: New rate: %lf, Orig rate: %lf\n",
|
||||
audio_source_ratio_current,
|
||||
audio_source_ratio_original);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -656,12 +684,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
|
||||
if (current_audio->write(audio_driver_context_audio_data,
|
||||
output_data, output_frames * 2) < 0)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -852,13 +875,16 @@ bool audio_driver_find_driver(void)
|
||||
current_audio = (const audio_driver_t*)audio_driver_find_handle(i);
|
||||
else
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any audio driver named \"%s\"\n",
|
||||
settings->arrays.audio_driver);
|
||||
RARCH_LOG_OUTPUT("Available audio drivers are:\n");
|
||||
for (d = 0; audio_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", audio_driver_find_ident(d));
|
||||
RARCH_WARN("Going to default to first audio driver...\n");
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any audio driver named \"%s\"\n",
|
||||
settings->arrays.audio_driver);
|
||||
RARCH_LOG_OUTPUT("Available audio drivers are:\n");
|
||||
for (d = 0; audio_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", audio_driver_find_ident(d));
|
||||
RARCH_WARN("Going to default to first audio driver...\n");
|
||||
}
|
||||
|
||||
current_audio = (const audio_driver_t*)audio_driver_find_handle(0);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <audio/audio_mixer.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
@@ -255,6 +256,8 @@ bool audio_driver_init(void);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
@@ -277,6 +280,7 @@ extern audio_driver_t audio_ax;
|
||||
extern audio_driver_t audio_psp;
|
||||
extern audio_driver_t audio_ctr_csnd;
|
||||
extern audio_driver_t audio_ctr_dsp;
|
||||
extern audio_driver_t audio_switch;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
extern audio_driver_t audio_null;
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || (string_is_equal_fast(io, "Output", 6)))
|
||||
if (!io || (string_is_equal(io, "Output")))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
||||
@@ -370,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || (string_is_equal_fast(io,"Output", 6)))
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
#ifndef _XBOX
|
||||
#include <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include <mmsystem.h>
|
||||
#include <mmreg.h>
|
||||
#endif
|
||||
|
||||
#include <dsound.h>
|
||||
|
||||
+66
-124
@@ -20,6 +20,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#ifdef VITA
|
||||
#include <psp2/kernel/processmgr.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
@@ -46,30 +49,21 @@ typedef struct psp_audio
|
||||
volatile uint16_t read_pos;
|
||||
volatile uint16_t write_pos;
|
||||
|
||||
#ifdef VITA
|
||||
char lock[32] __attribute__ ((aligned (8)));
|
||||
char cond_lock[32] __attribute__ ((aligned (8)));
|
||||
char cond[32] __attribute__ ((aligned (8)));
|
||||
#else
|
||||
SceUID lock;
|
||||
SceUID cond;
|
||||
#endif
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
|
||||
} psp_audio_t;
|
||||
|
||||
#define AUDIO_OUT_COUNT 512u
|
||||
#define AUDIO_BUFFER_SIZE (1u<<13u)
|
||||
#define AUDIO_BUFFER_SIZE_MASK (AUDIO_BUFFER_SIZE-1)
|
||||
|
||||
#ifdef VITA
|
||||
#define PSP_THREAD_STOPPED SCE_THREAD_STOPPED
|
||||
#else
|
||||
#define SceKernelThreadInfo SceKernelThreadRunStatus
|
||||
#define sceKernelGetThreadInfo sceKernelReferThreadRunStatus
|
||||
#endif
|
||||
|
||||
static int audioMainLoop(SceSize args, void* argp)
|
||||
static void audioMainLoop(void *data)
|
||||
{
|
||||
psp_audio_t* psp = *((psp_audio_t**)argp);
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
#ifdef VITA
|
||||
int port = sceAudioOutOpenPort(
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
||||
@@ -84,11 +78,7 @@ static int audioMainLoop(SceSize args, void* argp)
|
||||
uint16_t read_pos = psp->read_pos;
|
||||
uint16_t read_pos_2 = psp->read_pos;
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelLockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1, 0);
|
||||
#else
|
||||
sceKernelWaitSema(psp->lock, 1, 0);
|
||||
#endif
|
||||
slock_lock(psp->fifo_lock);
|
||||
|
||||
cond = ((uint16_t)(psp->write_pos - read_pos) & AUDIO_BUFFER_SIZE_MASK)
|
||||
< (AUDIO_OUT_COUNT * 2);
|
||||
@@ -100,18 +90,16 @@ static int audioMainLoop(SceSize args, void* argp)
|
||||
psp->read_pos = read_pos;
|
||||
}
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelUnlockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1);
|
||||
sceKernelSignalLwCond((struct SceKernelLwCondWork*)&psp->cond);
|
||||
slock_unlock(psp->fifo_lock);
|
||||
slock_lock(psp->cond_lock);
|
||||
scond_signal(psp->cond);
|
||||
slock_unlock(psp->cond_lock);
|
||||
|
||||
#ifdef VITA
|
||||
sceAudioOutOutput(port,
|
||||
cond ? (psp->zeroBuffer)
|
||||
: (psp->buffer + read_pos_2));
|
||||
#else
|
||||
sceKernelSignalSema(psp->lock, 1);
|
||||
if(!cond){
|
||||
sceKernelSignalSema(psp->cond, 1);
|
||||
}
|
||||
sceAudioSRCOutputBlocking(PSP_AUDIO_VOLUME_MAX, cond ? (psp->zeroBuffer)
|
||||
: (psp->buffer + read_pos));
|
||||
#endif
|
||||
@@ -121,9 +109,9 @@ static int audioMainLoop(SceSize args, void* argp)
|
||||
sceAudioOutReleasePort(port);
|
||||
#else
|
||||
sceAudioSRCChRelease();
|
||||
sceKernelExitThread(0);
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void *psp_audio_init(const char *device,
|
||||
@@ -139,7 +127,6 @@ static void *psp_audio_init(const char *device,
|
||||
(void)device;
|
||||
(void)latency;
|
||||
|
||||
|
||||
/* Cache aligned, not necessary but helpful. */
|
||||
psp->buffer = (uint32_t*)
|
||||
memalign(64, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
|
||||
@@ -151,79 +138,67 @@ static void *psp_audio_init(const char *device,
|
||||
psp->read_pos = 0;
|
||||
psp->write_pos = 0;
|
||||
psp->rate = rate;
|
||||
#if defined(VITA)
|
||||
|
||||
sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)&psp->lock, "audio_get_lock", 0, 0, 0);
|
||||
sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)&psp->cond_lock, "audio_get_cond_lock", 0, 0, 0);
|
||||
sceKernelCreateLwCond((struct SceKernelLwCondWork*)&psp->cond, "audio_get_cond", 0, (struct SceKernelLwMutexWork*)&psp->cond_lock, 0);
|
||||
psp->thread = sceKernelCreateThread
|
||||
("audioMainLoop", audioMainLoop, 0x10000100, 0x10000, 0, 0, NULL);
|
||||
#else
|
||||
psp->cond=sceKernelCreateSema("audio_start_sema", 0, 0, 1, NULL);
|
||||
psp->lock=sceKernelCreateSema("audio_lock_sema", 0, 1, 1, NULL);
|
||||
psp->thread = sceKernelCreateThread
|
||||
("audioMainLoop", audioMainLoop, 0x08, 0x10000, 0, NULL);
|
||||
#endif
|
||||
psp->fifo_lock = slock_new();
|
||||
psp->cond_lock = slock_new();
|
||||
psp->cond = scond_new();
|
||||
|
||||
psp->nonblocking = false;
|
||||
psp->running = true;
|
||||
sceKernelStartThread(psp->thread, sizeof(psp_audio_t*), &psp);
|
||||
psp->worker_thread = sthread_create(audioMainLoop, psp);
|
||||
|
||||
return psp;
|
||||
}
|
||||
|
||||
static void psp_audio_free(void *data)
|
||||
{
|
||||
SceUInt timeout = 100000;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
if(!psp)
|
||||
return;
|
||||
|
||||
psp->running = false;
|
||||
#if defined(VITA)
|
||||
sceKernelWaitThreadEnd(psp->thread, NULL, &timeout);
|
||||
sceKernelDeleteLwMutex((struct SceKernelLwMutexWork*)&psp->lock);
|
||||
sceKernelDeleteLwMutex((struct SceKernelLwMutexWork*)&psp->cond_lock);
|
||||
sceKernelDeleteLwCond((struct SceKernelLwCondWork*)&psp->cond);
|
||||
#else
|
||||
sceKernelWaitThreadEnd(psp->thread, &timeout);
|
||||
sceKernelDeleteSema(psp->lock);
|
||||
sceKernelDeleteSema(psp->cond);
|
||||
#endif
|
||||
if(psp->running){
|
||||
if (psp->worker_thread)
|
||||
{
|
||||
psp->running = false;
|
||||
sthread_join(psp->worker_thread);
|
||||
}
|
||||
|
||||
if (psp->cond)
|
||||
scond_free(psp->cond);
|
||||
if (psp->fifo_lock)
|
||||
slock_free(psp->fifo_lock);
|
||||
if (psp->cond_lock)
|
||||
slock_free(psp->cond_lock);
|
||||
}
|
||||
free(psp->buffer);
|
||||
sceKernelDeleteThread(psp->thread);
|
||||
psp->worker_thread = NULL;
|
||||
free(psp->zeroBuffer);
|
||||
free(psp);
|
||||
}
|
||||
|
||||
static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
uint16_t write_pos = psp->write_pos;
|
||||
uint16_t sampleCount = size / sizeof(uint32_t);
|
||||
|
||||
if (!psp->running)
|
||||
return -1;
|
||||
|
||||
if (psp->nonblocking)
|
||||
{
|
||||
//#ifdef VITA
|
||||
if (AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size)
|
||||
return 0;
|
||||
//#endif
|
||||
}
|
||||
|
||||
#ifdef VITA
|
||||
slock_lock(psp->cond_lock);
|
||||
while (AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size)
|
||||
sceKernelWaitLwCond((struct SceKernelLwCondWork*)&psp->cond, 0);
|
||||
|
||||
sceKernelLockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1, 0);
|
||||
#else
|
||||
while (AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size)
|
||||
sceKernelWaitSema(psp->cond, 1, 0);
|
||||
sceKernelWaitSema(psp->lock, 1, 0);
|
||||
#endif
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size)
|
||||
scond_wait(psp->cond, psp->cond_lock);
|
||||
slock_unlock(psp->cond_lock);
|
||||
|
||||
slock_lock(psp->fifo_lock);
|
||||
if((write_pos + sampleCount) > AUDIO_BUFFER_SIZE)
|
||||
{
|
||||
memcpy(psp->buffer + write_pos, buf,
|
||||
@@ -239,15 +214,10 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
write_pos &= AUDIO_BUFFER_SIZE_MASK;
|
||||
psp->write_pos = write_pos;
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelUnlockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1);
|
||||
slock_unlock(psp->fifo_lock);
|
||||
return size;
|
||||
|
||||
return size;
|
||||
#else
|
||||
sceKernelSignalSema(psp->lock, 1);
|
||||
|
||||
return size;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static bool psp_audio_alive(void *data)
|
||||
@@ -261,51 +231,32 @@ static bool psp_audio_alive(void *data)
|
||||
|
||||
static bool psp_audio_stop(void *data)
|
||||
{
|
||||
SceKernelThreadInfo info;
|
||||
SceUInt timeout = 100000;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
if(psp && !psp->running)
|
||||
if (psp){
|
||||
psp->running = false;
|
||||
|
||||
if (!psp->worker_thread)
|
||||
return true;
|
||||
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
if (sceKernelGetThreadInfo(
|
||||
psp->thread, &info) < 0) /* Error */
|
||||
return false;
|
||||
|
||||
if (info.status == PSP_THREAD_STOPPED)
|
||||
return false;
|
||||
|
||||
psp->running = false;
|
||||
#if defined(VITA)
|
||||
sceKernelWaitThreadEnd(psp->thread, NULL, &timeout);
|
||||
#else
|
||||
sceKernelWaitThreadEnd(psp->thread, &timeout);
|
||||
#endif
|
||||
sthread_join(psp->worker_thread);
|
||||
psp->worker_thread = NULL;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool psp_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
SceKernelThreadInfo info;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
if(psp && psp->running)
|
||||
return true;
|
||||
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
if (sceKernelGetThreadInfo(
|
||||
psp->thread, &info) < 0) /* Error */
|
||||
return false;
|
||||
|
||||
if (info.status != PSP_THREAD_STOPPED)
|
||||
return false;
|
||||
|
||||
psp->running = true;
|
||||
|
||||
sceKernelStartThread(psp->thread, sizeof(psp_audio_t*), &psp);
|
||||
if (!psp->worker_thread)
|
||||
{
|
||||
psp->running = true;
|
||||
psp->worker_thread = sthread_create(audioMainLoop, psp);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -328,21 +279,12 @@ static size_t psp_write_avail(void *data)
|
||||
size_t val;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelLockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1, 0);
|
||||
#else
|
||||
sceKernelWaitSema(psp->lock, 1, 0);
|
||||
#endif
|
||||
|
||||
if (!psp||!psp->running)
|
||||
return 0;
|
||||
slock_lock(psp->fifo_lock);
|
||||
val = AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK);
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelUnlockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1);
|
||||
#else
|
||||
sceKernelSignalSema(psp->lock, 1);
|
||||
#endif
|
||||
|
||||
slock_unlock(psp->fifo_lock);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <pulse/pulseaudio.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
@@ -14,14 +14,6 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_audio.h"
|
||||
|
||||
#include <boolean.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
@@ -31,6 +23,14 @@
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_audio.h"
|
||||
|
||||
typedef struct sdl_audio
|
||||
{
|
||||
bool nonblock;
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include<libtransistor/nx.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
static const int sample_rate = 48000;
|
||||
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;
|
||||
handle_t event;
|
||||
audio_output_buffer_t buffers[3];
|
||||
audio_output_buffer_t *current_buffer;
|
||||
bool blocking;
|
||||
bool is_paused;
|
||||
uint64_t last_append;
|
||||
unsigned latency;
|
||||
} switch_audio_t;
|
||||
|
||||
static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t to_write = size;
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("write %ld samples\n", size/sizeof(uint16_t));
|
||||
#endif
|
||||
|
||||
if (!swa->current_buffer)
|
||||
{
|
||||
uint32_t num;
|
||||
if (audio_ipc_output_get_released_buffer(&swa->output, &num, &swa->current_buffer) != RESULT_OK)
|
||||
{
|
||||
RARCH_LOG("Failed to get released buffer?\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("got buffer, num %d, ptr %p\n", num, swa->current_buffer);
|
||||
#endif
|
||||
|
||||
if (num < 1)
|
||||
swa->current_buffer = NULL;
|
||||
|
||||
if (!swa->current_buffer)
|
||||
{
|
||||
if (swa->blocking)
|
||||
{
|
||||
RARCH_LOG("No buffer, blocking...\n");
|
||||
|
||||
while(swa->current_buffer == NULL)
|
||||
{
|
||||
uint32_t num;
|
||||
uint32_t handle_idx;
|
||||
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
svcResetSignal(swa->event);
|
||||
|
||||
if (audio_ipc_output_get_released_buffer(&swa->output, &num, &swa->current_buffer) != RESULT_OK)
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
/* no buffer, nonblocking... */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
swa->current_buffer->data_size = 0;
|
||||
}
|
||||
|
||||
if (to_write > sample_buffer_size - swa->current_buffer->data_size)
|
||||
to_write = sample_buffer_size - swa->current_buffer->data_size;
|
||||
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
swa->current_buffer->data_size += to_write;
|
||||
swa->current_buffer->buffer_size = sample_buffer_size;
|
||||
|
||||
if (swa->current_buffer->data_size > (48000*swa->latency)/1000)
|
||||
{
|
||||
result_t r = audio_ipc_output_append_buffer(&swa->output, swa->current_buffer);
|
||||
if (r != RESULT_OK)
|
||||
{
|
||||
RARCH_ERR("failed to append buffer: 0x%x\n", r);
|
||||
return -1;
|
||||
}
|
||||
swa->current_buffer = NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("submitted %ld samples, %ld samples since last submit\n",
|
||||
to_write/num_channels/sizeof(uint16_t),
|
||||
(svcGetSystemTick() - swa->last_append) * sample_rate / 19200000);
|
||||
#endif
|
||||
swa->last_append = svcGetSystemTick();
|
||||
|
||||
return to_write;
|
||||
}
|
||||
|
||||
static bool switch_audio_stop(void *data)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
if(!swa->is_paused) {
|
||||
if(audio_ipc_output_stop(&swa->output) != RESULT_OK)
|
||||
return false;
|
||||
}
|
||||
|
||||
swa->is_paused = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool switch_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
if(swa->is_paused) {
|
||||
if (audio_ipc_output_start(&swa->output) != RESULT_OK)
|
||||
return false;
|
||||
}
|
||||
|
||||
swa->is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool switch_audio_alive(void *data)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
if (!swa)
|
||||
return false;
|
||||
return !swa->is_paused;
|
||||
}
|
||||
|
||||
static void switch_audio_free(void *data)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
audio_ipc_output_close(&swa->output);
|
||||
audio_ipc_finalize();
|
||||
free(swa);
|
||||
}
|
||||
|
||||
static bool switch_audio_use_float(void *data)
|
||||
{
|
||||
(void) data;
|
||||
return false; /* force INT16 */
|
||||
}
|
||||
|
||||
static size_t switch_audio_write_avail(void *data)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
if (!swa || !swa->current_buffer)
|
||||
return 0;
|
||||
|
||||
return swa->current_buffer->buffer_size;
|
||||
}
|
||||
|
||||
static void switch_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
if (swa)
|
||||
swa->blocking = !state;
|
||||
}
|
||||
|
||||
static void *switch_audio_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
result_t r;
|
||||
unsigned i;
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
||||
|
||||
if (!swa)
|
||||
return NULL;
|
||||
|
||||
r = audio_ipc_init();
|
||||
|
||||
if (r != RESULT_OK)
|
||||
goto fail;
|
||||
|
||||
if (audio_ipc_list_outputs(&names[0], 8, &num_names) != RESULT_OK)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (num_names != 1)
|
||||
{
|
||||
RARCH_ERR("got back more than one AudioOut\n");
|
||||
goto fail_audio_ipc;
|
||||
}
|
||||
|
||||
if (audio_ipc_open_output(names[0], &swa->output) != RESULT_OK)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (swa->output.sample_rate != sample_rate)
|
||||
{
|
||||
RARCH_ERR("expected sample rate of %d, got sample rate of %d\n",
|
||||
sample_rate, swa->output.sample_rate);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (swa->output.num_channels != num_channels)
|
||||
{
|
||||
RARCH_ERR("expected %d channels, got %d\n", num_channels,
|
||||
swa->output.num_channels);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (swa->output.sample_format != PCM_INT16)
|
||||
{
|
||||
RARCH_ERR("expected PCM_INT16, got %d\n", swa->output.sample_format);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (audio_ipc_output_register_buffer_event(&swa->output, &swa->event) != RESULT_OK)
|
||||
goto fail_audio_output;
|
||||
|
||||
swa->blocking = block_frames;
|
||||
|
||||
*new_rate = swa->output.sample_rate;
|
||||
|
||||
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].buffer_size = sample_buffer_size;
|
||||
swa->buffers[i].data_size = sample_buffer_size;
|
||||
swa->buffers[i].unknown = 0;
|
||||
|
||||
if (audio_ipc_output_append_buffer(&swa->output, &swa->buffers[i]) != RESULT_OK)
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
swa->current_buffer = NULL;
|
||||
swa->latency = latency;
|
||||
swa->last_append = svcGetSystemTick();
|
||||
|
||||
swa->is_paused = true;
|
||||
|
||||
return swa;
|
||||
|
||||
fail_audio_output:
|
||||
audio_ipc_output_close(&swa->output);
|
||||
fail_audio_ipc:
|
||||
audio_ipc_finalize();
|
||||
fail:
|
||||
free(swa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static size_t switch_audio_buffer_size(void *data)
|
||||
{
|
||||
(void) data;
|
||||
return sample_buffer_size;
|
||||
}
|
||||
|
||||
audio_driver_t audio_switch = {
|
||||
switch_audio_init,
|
||||
switch_audio_write,
|
||||
switch_audio_stop,
|
||||
switch_audio_start,
|
||||
switch_audio_alive,
|
||||
switch_audio_set_nonblock_state,
|
||||
switch_audio_free,
|
||||
switch_audio_use_float,
|
||||
"switch",
|
||||
NULL, /* device_list_new */
|
||||
NULL, /* device_list_free */
|
||||
switch_audio_write_avail,
|
||||
switch_audio_buffer_size, /* buffer_size */
|
||||
};
|
||||
@@ -753,9 +753,9 @@ struct pcm
|
||||
/** Flags that were passed to @ref pcm_open */
|
||||
unsigned int flags;
|
||||
/** Whether the PCM is running or not */
|
||||
int running:1;
|
||||
unsigned int running:1;
|
||||
/** Whether or not the PCM has been prepared */
|
||||
int prepared:1;
|
||||
unsigned int prepared:1;
|
||||
/** The number of underruns that have occured */
|
||||
int underruns;
|
||||
/** Size of the buffer */
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
#include <propidl.h>
|
||||
#include <initguid.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <mmreg.h>
|
||||
#include <audioclient.h>
|
||||
#include <propidl.h>
|
||||
|
||||
#include <lists/string_list.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
+11
-11
@@ -59,13 +59,13 @@ typedef struct
|
||||
size_t bufsize;
|
||||
} xa_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
struct xaudio2 : public IXAudio2VoiceCallback
|
||||
#else
|
||||
struct xaudio2
|
||||
#endif
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
xaudio2() :
|
||||
buf(0), pXAudio2(0), pMasterVoice(0),
|
||||
pSourceVoice(0), hEvent(0), buffers(0), bufsize(0),
|
||||
@@ -101,8 +101,8 @@ struct xaudio2
|
||||
unsigned write_buffer;
|
||||
};
|
||||
|
||||
#ifndef __cplusplus
|
||||
static void WINAPI voice_on_buffer_end(void *handle_, void *data)
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
static void WINAPI voice_on_buffer_end(IXAudio2VoiceCallback *handle_, void *data)
|
||||
{
|
||||
xaudio2_t *handle = (xaudio2_t*)handle_;
|
||||
(void)data;
|
||||
@@ -110,10 +110,10 @@ static void WINAPI voice_on_buffer_end(void *handle_, void *data)
|
||||
SetEvent(handle->hEvent);
|
||||
}
|
||||
|
||||
static void WINAPI dummy_voidp(void *handle, void *data) { (void)handle; (void)data; }
|
||||
static void WINAPI dummy_nil(void *handle) { (void)handle; }
|
||||
static void WINAPI dummy_uint32(void *handle, UINT32 dummy) { (void)handle; (void)dummy; }
|
||||
static void WINAPI dummy_voidp_hresult(void *handle, void *data, HRESULT dummy) { (void)handle; (void)data; (void)dummy; }
|
||||
static void WINAPI dummy_voidp(IXAudio2VoiceCallback *handle, void *data) { (void)handle; (void)data; }
|
||||
static void WINAPI dummy_nil(IXAudio2VoiceCallback *handle) { (void)handle; }
|
||||
static void WINAPI dummy_uint32(IXAudio2VoiceCallback *handle, UINT32 dummy) { (void)handle; (void)dummy; }
|
||||
static void WINAPI dummy_voidp_hresult(IXAudio2VoiceCallback *handle, void *data, HRESULT dummy) { (void)handle; (void)data; (void)dummy; }
|
||||
|
||||
const struct IXAudio2VoiceCallbackVtbl voice_vtable = {
|
||||
dummy_uint32,
|
||||
@@ -189,7 +189,7 @@ static void xaudio2_free(xaudio2_t *handle)
|
||||
|
||||
free(handle->buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
delete handle;
|
||||
#else
|
||||
free(handle);
|
||||
@@ -206,7 +206,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
handle = new xaudio2;
|
||||
#else
|
||||
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
@@ -215,7 +215,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
if (!handle)
|
||||
goto error;
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
handle->lpVtbl = &voice_vtable;
|
||||
#endif
|
||||
|
||||
|
||||
+27
-13
@@ -26,7 +26,7 @@
|
||||
/* All structures defined in this file use tight field packing */
|
||||
#pragma pack(push, 1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define X2DEFAULT(x) = (x)
|
||||
#else
|
||||
#define X2DEFAULT(x)
|
||||
@@ -183,6 +183,9 @@ typedef struct XAUDIO2_BUFFER
|
||||
void *pContext;
|
||||
} XAUDIO2_BUFFER;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2VoiceCallback
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
||||
{
|
||||
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
|
||||
@@ -194,6 +197,9 @@ DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
||||
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2Voice
|
||||
|
||||
DECLARE_INTERFACE(IXAudio2Voice)
|
||||
{
|
||||
#define Declare_IXAudio2Voice_Methods() \
|
||||
@@ -235,11 +241,17 @@ DECLARE_INTERFACE(IXAudio2Voice)
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2MasteringVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2SourceVoice
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
||||
{
|
||||
Declare_IXAudio2Voice_Methods();
|
||||
@@ -255,6 +267,8 @@ DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
||||
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IXAudio2
|
||||
|
||||
DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
{
|
||||
@@ -292,7 +306,7 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
void *pReserved X2DEFAULT(NULL)) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
/* C++ hooks */
|
||||
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
|
||||
@@ -305,17 +319,17 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
||||
#else
|
||||
/* C hooks */
|
||||
#define IXAudio2_Initialize(THIS,a,b) (THIS)->lpVtbl->Initialize(THIS, a, b)
|
||||
#define IXAudio2_Release(THIS) (THIS)->lpVtbl->Release(THIS)
|
||||
#define IXAudio2_CreateSourceVoice(THIS,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (THIS)->lpVtbl->CreateSourceVoice(THIS, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
||||
#define IXAudio2_CreateMasteringVoice(THIS,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (THIS)->lpVtbl->CreateMasteringVoice(THIS, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
||||
#define IXAudio2_GetDeviceCount(THIS, puCount) (THIS)->lpVtbl->GetDeviceCount(THIS, puCount)
|
||||
#define IXAudio2_GetDeviceDetails(THIS, Index,pDeviceDetails) (THIS)->lpVtbl->GetDeviceDetails(THIS, Index, pDeviceDetails)
|
||||
#define IXAudio2SourceVoice_Start(THIS, Flags, OperationSet) (THIS)->lpVtbl->Start(THIS, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_Stop(THIS, Flags, OperationSet) (THIS)->lpVtbl->Stop(THIS, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(THIS, pBuffer, pBufferWMA) (THIS)->lpVtbl->SubmitSourceBuffer(THIS, pBuffer, pBufferWMA)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(THIS) (THIS)->lpVtbl->DestroyVoice(THIS)
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(THIS) (THIS)->lpVtbl->DestroyVoice(THIS)
|
||||
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
|
||||
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
|
||||
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
||||
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
||||
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
|
||||
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
|
||||
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
|
||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
|
||||
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
|
||||
@@ -151,7 +151,9 @@ done:
|
||||
}
|
||||
|
||||
static void *resampler_CC_init(const struct resampler_config *config,
|
||||
double bandwidth_mod, resampler_simd_mask_t mask)
|
||||
double bandwidth_mod,
|
||||
enum resampler_quality quality,
|
||||
resampler_simd_mask_t mask)
|
||||
{
|
||||
(void)mask;
|
||||
(void)bandwidth_mod;
|
||||
@@ -492,7 +494,9 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
|
||||
|
||||
|
||||
static void *resampler_CC_init(const struct resampler_config *config,
|
||||
double bandwidth_mod, resampler_simd_mask_t mask)
|
||||
double bandwidth_mod,
|
||||
enum resampler_quality quality,
|
||||
resampler_simd_mask_t mask)
|
||||
{
|
||||
int i;
|
||||
rarch_CC_resampler_t *re = (rarch_CC_resampler_t*)
|
||||
|
||||
+10
-7
@@ -157,14 +157,17 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
camera_driver = (const camera_driver_t*)camera_driver_find_handle(i);
|
||||
else
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any camera driver named \"%s\"\n",
|
||||
settings->arrays.camera_driver);
|
||||
RARCH_LOG_OUTPUT("Available camera drivers are:\n");
|
||||
for (d = 0; camera_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", camera_driver_find_ident(d));
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any camera driver named \"%s\"\n",
|
||||
settings->arrays.camera_driver);
|
||||
RARCH_LOG_OUTPUT("Available camera drivers are:\n");
|
||||
for (d = 0; camera_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", camera_driver_find_ident(d));
|
||||
|
||||
RARCH_WARN("Going to default to first camera driver...\n");
|
||||
RARCH_WARN("Going to default to first camera driver...\n");
|
||||
}
|
||||
|
||||
camera_driver = (const camera_driver_t*)camera_driver_find_handle(0);
|
||||
|
||||
|
||||
+10
-9
@@ -2,6 +2,10 @@
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
@@ -18,23 +22,20 @@ bool badge_exists(const char* filepath)
|
||||
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
{
|
||||
char badge_file[16];
|
||||
char fullpath[PATH_MAX_LENGTH];
|
||||
const char * locked_suffix = (badges->badge_locked[i] == true)
|
||||
? "_lock.png" : ".png";
|
||||
unsigned int bufferSize = 16;
|
||||
|
||||
/* TODO/FIXME - variable length forbidden in C89 - rewrite this! */
|
||||
char badge_file[bufferSize];
|
||||
|
||||
snprintf(badge_file, bufferSize, "%s", badges->badge_id_list[i]);
|
||||
strcat(badge_file, locked_suffix);
|
||||
snprintf(badge_file, sizeof(badge_file), "%s%s", badges->badge_id_list[i],
|
||||
badges->badge_locked[i] ? "_lock.png" : ".png");
|
||||
|
||||
fill_pathname_application_special(fullpath,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||
#endif
|
||||
}
|
||||
|
||||
void set_badge_info (badges_ctx_t *badge_struct, int id,
|
||||
@@ -51,7 +52,7 @@ void set_badge_info (badges_ctx_t *badge_struct, int id,
|
||||
menu_texture_item get_badge_texture(int id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings->bools.cheevos_badges_enable)
|
||||
if (!settings || !settings->bools.cheevos_badges_enable)
|
||||
return (menu_texture_item)NULL;
|
||||
|
||||
return badges_ctx.menu_texture_list[id];
|
||||
|
||||
+1216
-842
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -63,7 +63,7 @@ typedef enum
|
||||
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
|
||||
CHEEVOS_CONSOLE_PLAYSTATION = 12,
|
||||
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
|
||||
CHEEVOS_CONSOLE_NEOGEO = 14,
|
||||
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
|
||||
CHEEVOS_CONSOLE_XBOX_360 = 15,
|
||||
CHEEVOS_CONSOLE_GAMECUBE = 16,
|
||||
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
|
||||
|
||||
+14
-22
@@ -18,8 +18,7 @@ Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
/* Use at the end of the coroutine */
|
||||
#define CORO_LEAVE() \
|
||||
} \
|
||||
} \
|
||||
} } \
|
||||
do { return 0; } while ( 0 )
|
||||
|
||||
/* Go to the x label */
|
||||
@@ -30,7 +29,6 @@ Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
} while ( 0 )
|
||||
|
||||
/* Go to a subroutine, execution continues until the subroutine returns via RET */
|
||||
/* x is the subroutine label, y and z are the A and B arguments */
|
||||
#define CORO_GOSUB( x ) \
|
||||
do { \
|
||||
coro->stack[ coro->sp++ ] = __LINE__; \
|
||||
@@ -54,30 +52,24 @@ Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* The coroutine entry point, never use 0 as a label */
|
||||
#define CORO_BEGIN 0
|
||||
|
||||
/* Sets up the coroutine */
|
||||
#define CORO_SETUP() \
|
||||
do { \
|
||||
coro->step = CORO_BEGIN; \
|
||||
coro->sp = 0; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_STOP() \
|
||||
do { \
|
||||
return 0; \
|
||||
} while ( 0 )
|
||||
|
||||
/* The coroutine entry point, never use 0 as a label */
|
||||
#define CORO_BEGIN 0
|
||||
|
||||
/* Sets up a coroutine, x is a pointer to coro_t */
|
||||
#define CORO_SETUP( x ) \
|
||||
do { \
|
||||
( x )->step = CORO_BEGIN; \
|
||||
( x )->sp = 0; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_VAR( x ) ( coro->x )
|
||||
|
||||
/* A coroutine */
|
||||
typedef struct
|
||||
{
|
||||
CORO_VARS
|
||||
int step, sp;
|
||||
/* Add this macro to your coro_t structure containing the variables for the coroutine */
|
||||
#define CORO_FIELDS \
|
||||
int step, sp; \
|
||||
int stack[ 8 ];
|
||||
}
|
||||
coro_t;
|
||||
|
||||
#endif /* CORO_H */
|
||||
@@ -191,6 +191,12 @@ 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)
|
||||
{
|
||||
|
||||
@@ -124,12 +124,14 @@ struct command
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
static bool command_read_ram(const char *arg);
|
||||
static bool command_write_ram(const char *arg);
|
||||
#endif
|
||||
|
||||
static const struct cmd_action_map action_map[] = {
|
||||
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
{ "READ_CORE_RAM", command_read_ram, "<address> <number of bytes>" },
|
||||
{ "WRITE_CORE_RAM", command_write_ram, "<address> <byte1> <byte2> ..." },
|
||||
#endif
|
||||
@@ -157,7 +159,6 @@ static const struct cmd_map map[] = {
|
||||
{ "SCREENSHOT", RARCH_SCREENSHOT },
|
||||
{ "MUTE", RARCH_MUTE },
|
||||
{ "OSK", RARCH_OSK },
|
||||
{ "NETPLAY_FLIP", RARCH_NETPLAY_FLIP },
|
||||
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
|
||||
{ "SLOWMOTION", RARCH_SLOWMOTION },
|
||||
{ "VOLUME_UP", RARCH_VOLUME_UP },
|
||||
@@ -219,6 +220,7 @@ 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();
|
||||
|
||||
switch (msg_hash_to_file_type(msg_hash_calculate(path_get_extension(arg))))
|
||||
{
|
||||
@@ -244,12 +246,13 @@ bool command_set_shader(const char *arg)
|
||||
msg_hash_to_str(MSG_APPLYING_SHADER),
|
||||
arg);
|
||||
|
||||
return video_driver_set_shader(type, arg);
|
||||
retroarch_set_shader_preset(arg);
|
||||
return menu_shader_manager_set_preset(shader, type, arg);
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
static bool command_read_ram(const char *arg)
|
||||
{
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
cheevos_var_t var;
|
||||
unsigned i;
|
||||
unsigned nbytes;
|
||||
@@ -283,14 +286,10 @@ static bool command_read_ram(const char *arg)
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool command_write_ram(const char *arg)
|
||||
{
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
int i;
|
||||
cheevos_var_t var;
|
||||
unsigned nbytes = 0;
|
||||
@@ -311,10 +310,9 @@ static bool command_write_ram(const char *arg)
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool command_get_arg(const char *tok,
|
||||
const char **arg, unsigned *index)
|
||||
@@ -357,28 +355,6 @@ static bool command_get_arg(const char *tok,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void command_parse_sub_msg(command_t *handle, const char *tok)
|
||||
{
|
||||
const char *arg = NULL;
|
||||
unsigned index = 0;
|
||||
|
||||
if (command_get_arg(tok, &arg, &index))
|
||||
{
|
||||
if (arg)
|
||||
{
|
||||
if (!action_map[index].action(arg))
|
||||
RARCH_ERR("Command \"%s\" failed.\n", arg);
|
||||
}
|
||||
else
|
||||
handle->state[map[index].id] = true;
|
||||
}
|
||||
else
|
||||
RARCH_WARN("%s \"%s\" %s.\n",
|
||||
msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND),
|
||||
tok,
|
||||
msg_hash_to_str(MSG_RECEIVED));
|
||||
}
|
||||
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||
static bool command_network_init(command_t *handle, uint16_t port)
|
||||
{
|
||||
@@ -434,6 +410,28 @@ static bool command_verify(const char *cmd)
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
static void command_parse_sub_msg(command_t *handle, const char *tok)
|
||||
{
|
||||
const char *arg = NULL;
|
||||
unsigned index = 0;
|
||||
|
||||
if (command_get_arg(tok, &arg, &index))
|
||||
{
|
||||
if (arg)
|
||||
{
|
||||
if (!action_map[index].action(arg))
|
||||
RARCH_ERR("Command \"%s\" failed.\n", arg);
|
||||
}
|
||||
else
|
||||
handle->state[map[index].id] = true;
|
||||
}
|
||||
else
|
||||
RARCH_WARN("%s \"%s\" %s.\n",
|
||||
msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND),
|
||||
tok,
|
||||
msg_hash_to_str(MSG_RECEIVED));
|
||||
}
|
||||
|
||||
static void command_parse_msg(command_t *handle, char *buf, enum cmd_source_t source)
|
||||
{
|
||||
char *save = NULL;
|
||||
@@ -1221,6 +1219,8 @@ static bool event_init_content(void)
|
||||
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
return true;
|
||||
|
||||
content_set_subsystem_info();
|
||||
|
||||
if (!contentless)
|
||||
path_fill_names();
|
||||
|
||||
@@ -1299,31 +1299,13 @@ static void command_event_disable_overrides(void)
|
||||
return;
|
||||
|
||||
/* reload the original config */
|
||||
|
||||
config_unload_override();
|
||||
rarch_ctl(RARCH_CTL_UNSET_OVERRIDES_ACTIVE, NULL);
|
||||
}
|
||||
|
||||
static void command_event_restore_default_shader_preset(void)
|
||||
{
|
||||
if (!path_is_empty(RARCH_PATH_DEFAULT_SHADER_PRESET))
|
||||
{
|
||||
/* auto shader preset: reload the original shader */
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_preset = path_get(RARCH_PATH_DEFAULT_SHADER_PRESET);
|
||||
|
||||
if (!string_is_empty(shader_preset))
|
||||
{
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO),
|
||||
shader_preset);
|
||||
strlcpy(settings->paths.path_shader,
|
||||
shader_preset,
|
||||
sizeof(settings->paths.path_shader));
|
||||
}
|
||||
}
|
||||
|
||||
path_clear(RARCH_PATH_DEFAULT_SHADER_PRESET);
|
||||
retroarch_unset_shader_preset();
|
||||
}
|
||||
|
||||
static void command_event_restore_remaps(void)
|
||||
@@ -1422,29 +1404,37 @@ static bool command_event_save_core_config(void)
|
||||
bool found_path = false;
|
||||
bool overrides_active = false;
|
||||
const char *core_path = NULL;
|
||||
char *config_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *config_name = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *config_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *config_name = NULL;
|
||||
char *config_path = NULL;
|
||||
char *config_dir = NULL;
|
||||
size_t config_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
config_dir[0] = config_name[0] =
|
||||
config_path[0] = msg[0] = '\0';
|
||||
msg[0] = '\0';
|
||||
|
||||
if (!string_is_empty(settings->paths.directory_menu_config))
|
||||
strlcpy(config_dir, settings->paths.directory_menu_config,
|
||||
config_size);
|
||||
if (settings && !string_is_empty(settings->paths.directory_menu_config))
|
||||
config_dir = strdup(settings->paths.directory_menu_config);
|
||||
else if (!path_is_empty(RARCH_PATH_CONFIG)) /* Fallback */
|
||||
{
|
||||
config_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
config_dir[0] = '\0';
|
||||
fill_pathname_basedir(config_dir, path_get(RARCH_PATH_CONFIG),
|
||||
config_size);
|
||||
else
|
||||
}
|
||||
|
||||
if (string_is_empty(config_dir))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true);
|
||||
RARCH_ERR("[Config]: %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
|
||||
goto error;
|
||||
free (config_dir);
|
||||
return false;
|
||||
}
|
||||
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
config_name = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
config_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
config_name[0] = '\0';
|
||||
config_path[0] = '\0';
|
||||
|
||||
/* Infer file name based on libretro core. */
|
||||
if (!string_is_empty(core_path) && filestream_exists(core_path))
|
||||
@@ -1518,12 +1508,6 @@ static bool command_event_save_core_config(void)
|
||||
free(config_name);
|
||||
free(config_path);
|
||||
return ret;
|
||||
|
||||
error:
|
||||
free(config_dir);
|
||||
free(config_name);
|
||||
free(config_path);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1769,6 +1753,7 @@ void command_playlist_update_write(
|
||||
**/
|
||||
bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool boolean = false;
|
||||
|
||||
switch (cmd)
|
||||
@@ -1962,15 +1947,25 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_REINIT_FROM_TOGGLE:
|
||||
retroarch_unset_forced_fullscreen();
|
||||
case CMD_EVENT_REINIT:
|
||||
video_driver_reinit();
|
||||
/* Poll input to avoid possibly stale data to corrupt things. */
|
||||
input_driver_poll();
|
||||
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, (void*)(intptr_t)-1);
|
||||
{
|
||||
video_driver_reinit();
|
||||
{
|
||||
const input_driver_t *input_drv = input_get_ptr();
|
||||
void *input_data = input_get_data();
|
||||
/* Poll input to avoid possibly stale data to corrupt things. */
|
||||
if (input_drv && input_drv->poll)
|
||||
input_drv->poll(input_data);
|
||||
}
|
||||
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, (void*)(intptr_t)-1);
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
if (menu_driver_is_alive())
|
||||
command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL);
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
if (settings->bools.video_fullscreen)
|
||||
video_driver_hide_mouse();
|
||||
|
||||
if (menu_driver_is_alive())
|
||||
command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_CHEATS_DEINIT:
|
||||
cheat_manager_state_free();
|
||||
@@ -2551,9 +2546,6 @@ TODO: Add a setting for these tweaks */
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_NETPLAY_FLIP_PLAYERS:
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_FLIP_PLAYERS, NULL);
|
||||
break;
|
||||
case CMD_EVENT_NETPLAY_GAME_WATCH:
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_GAME_WATCH, NULL);
|
||||
break;
|
||||
@@ -2564,7 +2556,6 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_NETPLAY_INIT:
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT:
|
||||
case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED:
|
||||
case CMD_EVENT_NETPLAY_FLIP_PLAYERS:
|
||||
case CMD_EVENT_NETPLAY_GAME_WATCH:
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -179,8 +179,6 @@ enum event_command
|
||||
CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED,
|
||||
/* Deinitializes netplay system. */
|
||||
CMD_EVENT_NETPLAY_DEINIT,
|
||||
/* Flip netplay players. */
|
||||
CMD_EVENT_NETPLAY_FLIP_PLAYERS,
|
||||
/* Switch between netplay gaming and watching. */
|
||||
CMD_EVENT_NETPLAY_GAME_WATCH,
|
||||
/* Initializes BSV movie. */
|
||||
|
||||
+53
-22
@@ -19,6 +19,7 @@
|
||||
#define __CONFIG_DEF_H
|
||||
|
||||
#include <boolean.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include "gfx/video_defines.h"
|
||||
#include "input/input_driver.h"
|
||||
|
||||
@@ -26,6 +27,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
#include "network/netplay/netplay.h"
|
||||
#endif
|
||||
|
||||
#if defined(HW_RVL)
|
||||
#define MAX_GAMMA_SETTING 30
|
||||
#elif defined(GEKKO)
|
||||
@@ -68,7 +73,7 @@ static const bool def_playlist_entry_rename = true;
|
||||
|
||||
static const unsigned int def_user_language = 0;
|
||||
|
||||
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS))
|
||||
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
|
||||
static const bool def_mouse_enable = true;
|
||||
#else
|
||||
static const bool def_mouse_enable = false;
|
||||
@@ -120,6 +125,9 @@ static const unsigned fullscreen_y = 0;
|
||||
*/
|
||||
static const unsigned window_opacity = 100;
|
||||
|
||||
/* Whether to show the usual window decorations like border, titlebar etc. */
|
||||
static const bool window_decorations = true;
|
||||
|
||||
#if defined(RARCH_CONSOLE) || defined(__APPLE__)
|
||||
static const bool load_dummy_on_core_shutdown = false;
|
||||
#else
|
||||
@@ -169,7 +177,7 @@ static unsigned swap_interval = 1;
|
||||
static const bool video_threaded = false;
|
||||
|
||||
#if defined(HAVE_THREADS)
|
||||
#if defined(GEKKO) || defined(PSP) || defined(_3DS) || defined(_XBOX1)
|
||||
#if defined(GEKKO) || defined(PSP) || defined(_3DS)
|
||||
/* For single-core consoles right now it's better to have this be disabled. */
|
||||
static const bool threaded_data_runloop_enable = false;
|
||||
#else
|
||||
@@ -263,16 +271,35 @@ static bool menu_show_configurations = true;
|
||||
static bool menu_show_help = true;
|
||||
static bool menu_show_quit_retroarch = true;
|
||||
static bool menu_show_reboot = true;
|
||||
|
||||
#if defined(HAVE_LAKKA) || defined(VITA)
|
||||
#if defined(HAVE_LAKKA) || defined(VITA) || defined(_3DS)
|
||||
static bool menu_show_core_updater = false;
|
||||
#else
|
||||
static bool menu_show_core_updater = true;
|
||||
#endif
|
||||
|
||||
static bool content_show_settings = true;
|
||||
static bool content_show_favorites = true;
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
static bool content_show_images = true;
|
||||
#endif
|
||||
static bool content_show_music = true;
|
||||
#ifdef HAVE_FFMPEG
|
||||
static bool content_show_video = true;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
static bool content_show_netplay = true;
|
||||
#endif
|
||||
static bool content_show_history = true;
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
static bool content_show_add = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XMB
|
||||
static unsigned xmb_scale_factor = 100;
|
||||
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_icon_theme = XMB_ICON_THEME_MONOCHROME;
|
||||
static unsigned xmb_theme = XMB_THEME_ELECTRIC_BLUE;
|
||||
#ifdef HAVE_LAKKA
|
||||
@@ -280,22 +307,6 @@ static bool xmb_shadows_enable = false;
|
||||
#else
|
||||
static bool xmb_shadows_enable = true;
|
||||
#endif
|
||||
static bool xmb_show_settings = true;
|
||||
static bool xmb_show_favorites = true;
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
static bool xmb_show_images = true;
|
||||
#endif
|
||||
static bool xmb_show_music = true;
|
||||
#ifdef HAVE_FFMPEG
|
||||
static bool xmb_show_video = true;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
static bool xmb_show_netplay = true;
|
||||
#endif
|
||||
static bool xmb_show_history = true;
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
static bool xmb_show_add = true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static bool automatically_add_content_to_playlist = false;
|
||||
@@ -321,6 +332,7 @@ static const uint32_t menu_title_color = 0xff64ff64;
|
||||
|
||||
#else
|
||||
static bool default_block_config_read = false;
|
||||
static bool automatically_add_content_to_playlist = false;
|
||||
#endif
|
||||
|
||||
static bool default_game_specific_options = true;
|
||||
@@ -395,6 +407,9 @@ static const bool post_filter_record = false;
|
||||
/* Screenshots post-shaded GPU output if available. */
|
||||
static const bool gpu_screenshot = true;
|
||||
|
||||
/* Watch shader files for changes and auto-apply as necessary. */
|
||||
static const bool video_shader_watch_files = false;
|
||||
|
||||
/* Screenshots named automatically. */
|
||||
static const bool auto_screenshot_filename = true;
|
||||
|
||||
@@ -539,6 +554,14 @@ static const int netplay_check_frames = 600;
|
||||
|
||||
static const bool netplay_use_mitm_server = false;
|
||||
|
||||
static const char *netplay_mitm_server = "nyc";
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
static const unsigned netplay_share_digital = RARCH_NETPLAY_SHARE_DIGITAL_NO_PREFERENCE;
|
||||
|
||||
static const unsigned netplay_share_analog = RARCH_NETPLAY_SHARE_ANALOG_NO_PREFERENCE;
|
||||
#endif
|
||||
|
||||
/* On save state load, block SRAM from being overwritten.
|
||||
* This could potentially lead to buggy games. */
|
||||
static const bool block_sram_overwrite = false;
|
||||
@@ -633,6 +656,14 @@ static const bool ui_companion_start_on_boot = true;
|
||||
|
||||
static const bool ui_companion_enable = false;
|
||||
|
||||
#if defined(__QNX__) || defined(_XBOX1) || defined(_XBOX360) || defined(__CELLOS_LV2__) || (defined(__MACH__) && defined(IOS)) || defined(ANDROID) || defined(WIIU) || defined(HAVE_NEON) || defined(GEKKO) || defined(__ARM_NEON__)
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWER;
|
||||
#elif defined(PSP) || defined(_3DS) || defined(VITA)
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWEST;
|
||||
#else
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_NORMAL;
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
#if defined(ANDROID_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/";
|
||||
@@ -657,7 +688,7 @@ static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/
|
||||
#endif
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#if _MSC_VER == 1600
|
||||
#if defined(__x86_64__)
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86/latest/";
|
||||
@@ -667,7 +698,7 @@ static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/window
|
||||
#elif _MSC_VER == 1310
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2003/x86/latest/";
|
||||
#else
|
||||
#if defined(__x86_64__)
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows/x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows/x86/latest/";
|
||||
|
||||
@@ -85,7 +85,6 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, 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 },
|
||||
@@ -160,7 +159,6 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_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 },
|
||||
|
||||
+381
-198
File diff suppressed because it is too large.
Load diff
+24
-11
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "gfx/video_driver.h"
|
||||
#include "input/input_defines.h"
|
||||
#include "led/led_defines.h"
|
||||
|
||||
#define configuration_set_float(settings, var, newvar) \
|
||||
{ \
|
||||
@@ -80,6 +81,7 @@ typedef struct settings
|
||||
bool video_aspect_ratio_auto;
|
||||
bool video_scale_integer;
|
||||
bool video_shader_enable;
|
||||
bool video_shader_watch_files;
|
||||
bool video_threaded;
|
||||
bool video_font_enable;
|
||||
bool video_disable_composition;
|
||||
@@ -145,14 +147,14 @@ typedef struct settings
|
||||
bool menu_show_reboot;
|
||||
bool menu_materialui_icons_enable;
|
||||
bool menu_xmb_shadows_enable;
|
||||
bool menu_xmb_show_settings;
|
||||
bool menu_xmb_show_favorites;
|
||||
bool menu_xmb_show_images;
|
||||
bool menu_xmb_show_music;
|
||||
bool menu_xmb_show_video;
|
||||
bool menu_xmb_show_netplay;
|
||||
bool menu_xmb_show_history;
|
||||
bool menu_xmb_show_add;
|
||||
bool menu_content_show_settings;
|
||||
bool menu_content_show_favorites;
|
||||
bool menu_content_show_images;
|
||||
bool menu_content_show_music;
|
||||
bool menu_content_show_video;
|
||||
bool menu_content_show_netplay;
|
||||
bool menu_content_show_history;
|
||||
bool menu_content_show_add;
|
||||
bool menu_unified_controls;
|
||||
bool quick_menu_show_take_screenshot;
|
||||
bool quick_menu_show_save_load_state;
|
||||
@@ -173,9 +175,9 @@ typedef struct settings
|
||||
bool netplay_allow_slaves;
|
||||
bool netplay_require_slaves;
|
||||
bool netplay_stateless_mode;
|
||||
bool netplay_swap_input;
|
||||
bool netplay_nat_traversal;
|
||||
bool netplay_use_mitm_server;
|
||||
bool netplay_request_devices[MAX_USERS];
|
||||
|
||||
/* Network */
|
||||
bool network_buildbot_auto_extract_archive;
|
||||
@@ -252,6 +254,7 @@ typedef struct settings
|
||||
bool bluetooth_enable;
|
||||
|
||||
bool automatically_add_content_to_playlist;
|
||||
bool video_window_show_decorations;
|
||||
} bools;
|
||||
|
||||
struct
|
||||
@@ -301,7 +304,7 @@ typedef struct settings
|
||||
unsigned audio_block_frames;
|
||||
unsigned audio_latency;
|
||||
|
||||
|
||||
unsigned audio_resampler_quality;
|
||||
|
||||
unsigned input_turbo_period;
|
||||
unsigned input_turbo_duty_cycle;
|
||||
@@ -314,6 +317,8 @@ typedef struct settings
|
||||
unsigned netplay_port;
|
||||
unsigned netplay_input_latency_frames_min;
|
||||
unsigned netplay_input_latency_frames_range;
|
||||
unsigned netplay_share_digital;
|
||||
unsigned netplay_share_analog;
|
||||
unsigned bundle_assets_extract_version_current;
|
||||
unsigned bundle_assets_extract_last_version;
|
||||
unsigned content_history_size;
|
||||
@@ -351,6 +356,9 @@ typedef struct settings
|
||||
unsigned menu_xmb_theme;
|
||||
unsigned menu_xmb_color_theme;
|
||||
unsigned menu_materialui_color_theme;
|
||||
unsigned menu_font_color_red;
|
||||
unsigned menu_font_color_green;
|
||||
unsigned menu_font_color_blue;
|
||||
|
||||
unsigned camera_width;
|
||||
unsigned camera_height;
|
||||
@@ -368,6 +376,8 @@ typedef struct settings
|
||||
unsigned input_keymapper_ids[RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
unsigned input_remap_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
unsigned led_map[MAX_LEDS];
|
||||
} uints;
|
||||
|
||||
struct
|
||||
@@ -378,6 +388,7 @@ typedef struct settings
|
||||
char record_driver[32];
|
||||
char camera_driver[32];
|
||||
char wifi_driver[32];
|
||||
char led_driver[32];
|
||||
char location_driver[32];
|
||||
char menu_driver[32];
|
||||
char cheevos_username[32];
|
||||
@@ -398,6 +409,8 @@ typedef struct settings
|
||||
char bundle_assets_src[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
|
||||
|
||||
char netplay_mitm_server[255];
|
||||
} arrays;
|
||||
|
||||
struct
|
||||
@@ -413,7 +426,7 @@ typedef struct settings
|
||||
char browse_url[4096];
|
||||
|
||||
char path_menu_xmb_font[PATH_MAX_LENGTH];
|
||||
char menu_xmb_show_settings_password[PATH_MAX_LENGTH];
|
||||
char menu_content_show_settings_password[PATH_MAX_LENGTH];
|
||||
char kiosk_mode_password[PATH_MAX_LENGTH];
|
||||
char path_cheat_database[PATH_MAX_LENGTH];
|
||||
char path_content_database[PATH_MAX_LENGTH];
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "frontend/frontend_driver.h"
|
||||
|
||||
@@ -81,6 +82,28 @@ bool content_reset_savestate_backups(void);
|
||||
bool content_undo_load_buf_is_empty(void);
|
||||
bool content_undo_save_buf_is_empty(void);
|
||||
|
||||
/* Clears the pending subsystem rom buffer*/
|
||||
bool content_is_subsystem_pending_load(void);
|
||||
|
||||
/* Clears the pending subsystem rom buffer*/
|
||||
void content_clear_subsystem(void);
|
||||
|
||||
/* Set the current subsystem*/
|
||||
void content_set_subsystem(unsigned subsystem);
|
||||
|
||||
/* Get the current subsystem*/
|
||||
int content_get_subsystem();
|
||||
|
||||
/* 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();
|
||||
|
||||
/* Set environment variables before a subsystem load */
|
||||
void content_set_subsystem_info();
|
||||
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+32
-32
@@ -185,22 +185,25 @@ static void core_info_list_free(core_info_list_t *core_info_list)
|
||||
|
||||
static bool core_info_list_iterate(
|
||||
char *s, size_t len,
|
||||
const char *path_basedir,
|
||||
struct string_list *contents, size_t i)
|
||||
{
|
||||
size_t info_path_base_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *info_path_base = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP) && !defined(_3DS) && !defined(VITA))
|
||||
char *info_path_base = NULL;
|
||||
char *substr = NULL;
|
||||
#endif
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *current_path = contents ? contents->elems[i].data : NULL;
|
||||
|
||||
if (!contents || !contents->elems[i].data)
|
||||
goto error;
|
||||
(void)substr;
|
||||
|
||||
if (!current_path)
|
||||
return false;
|
||||
|
||||
info_path_base = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
info_path_base[0] = '\0';
|
||||
|
||||
fill_pathname_base_noext(info_path_base,
|
||||
contents->elems[i].data,
|
||||
current_path,
|
||||
info_path_base_size);
|
||||
|
||||
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP) && !defined(_3DS) && !defined(VITA) && !defined(HW_WUP))
|
||||
@@ -214,17 +217,11 @@ static bool core_info_list_iterate(
|
||||
info_path_base_size);
|
||||
|
||||
fill_pathname_join(s,
|
||||
(!string_is_empty(settings->paths.path_libretro_info)) ?
|
||||
settings->paths.path_libretro_info :
|
||||
settings->paths.directory_libretro,
|
||||
path_basedir,
|
||||
info_path_base, len);
|
||||
|
||||
free(info_path_base);
|
||||
return true;
|
||||
|
||||
error:
|
||||
free(info_path_base);
|
||||
return false;
|
||||
}
|
||||
|
||||
static core_info_list_t *core_info_list_new(const char *path)
|
||||
@@ -234,10 +231,14 @@ static core_info_list_t *core_info_list_new(const char *path)
|
||||
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;
|
||||
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
||||
|
||||
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
|
||||
if (!core_info_list)
|
||||
goto error;
|
||||
@@ -258,7 +259,7 @@ static core_info_list_t *core_info_list_new(const char *path)
|
||||
|
||||
if (
|
||||
core_info_list_iterate(info_path, info_path_size,
|
||||
contents, i)
|
||||
path_basedir, contents, i)
|
||||
&& path_is_valid(info_path))
|
||||
{
|
||||
char *tmp = NULL;
|
||||
@@ -521,19 +522,21 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *info = NULL;
|
||||
char *path = NULL;
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
if (!core_info_list || !core)
|
||||
goto error;
|
||||
return false;
|
||||
|
||||
path[0] = '\0';
|
||||
info = core_info_find_internal(core_info_list, core);
|
||||
info = core_info_find_internal(core_info_list, core);
|
||||
|
||||
if (!info)
|
||||
goto error;
|
||||
return false;
|
||||
|
||||
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++)
|
||||
{
|
||||
if (string_is_empty(info->firmware[i].path))
|
||||
@@ -551,10 +554,6 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
|
||||
free(path);
|
||||
return true;
|
||||
|
||||
error:
|
||||
free(path);
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -759,6 +758,8 @@ void core_info_get_name(const char *path, char *s, size_t len)
|
||||
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;
|
||||
|
||||
if (!contents)
|
||||
return;
|
||||
@@ -766,20 +767,19 @@ void core_info_get_name(const char *path, char *s, size_t len)
|
||||
for (i = 0; i < contents->size; i++)
|
||||
{
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *info_path = NULL;
|
||||
config_file_t *conf = NULL;
|
||||
char *new_core_name = NULL;
|
||||
const char *current_path = contents->elems[i].data;
|
||||
|
||||
if (!string_is_equal(current_path, path))
|
||||
continue;
|
||||
|
||||
info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
info_path[0] = '\0';
|
||||
|
||||
if (!string_is_equal(contents->elems[i].data, path))
|
||||
{
|
||||
free(info_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!core_info_list_iterate(info_path,
|
||||
path_size, contents, i)
|
||||
path_size, path_basedir, contents, i)
|
||||
&& path_is_valid(info_path))
|
||||
{
|
||||
free(info_path);
|
||||
|
||||
@@ -20,11 +20,15 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_environment.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void libretro_dummy_retro_init(void);
|
||||
|
||||
void libretro_dummy_retro_deinit(void);
|
||||
@@ -300,4 +304,6 @@ size_t libretro_videoprocessor_retro_get_memory_size(unsigned id);
|
||||
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <retro_common_api.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Copyright 2010-2018 The RetroArch team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,159 @@
|
||||
STATIC_LINKING := 0
|
||||
AR := ar
|
||||
DEBUG := 0
|
||||
TARGET_NAME := mpv
|
||||
PREFIX := /usr
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
LIBRETRO_DIR := libretro
|
||||
|
||||
ifeq ($(platform),)
|
||||
platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
platform = win
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
platform = osx
|
||||
ifeq ($(shell uname -p),powerpc)
|
||||
arch = ppc
|
||||
else
|
||||
arch = intel
|
||||
endif
|
||||
else ifneq ($(findstring win,$(shell uname -s)),)
|
||||
platform = win
|
||||
endif
|
||||
else ifneq (,$(findstring armv,$(platform)))
|
||||
override platform += unix
|
||||
else ifneq (,$(findstring rpi3,$(platform)))
|
||||
override platform += unix
|
||||
endif
|
||||
|
||||
ifeq ($(ARCHFLAGS),)
|
||||
ifeq ($(archs),ppc)
|
||||
ARCHFLAGS = -arch ppc -arch ppc64
|
||||
else
|
||||
ARCHFLAGS = -arch i386 -arch x86_64
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(platform), osx)
|
||||
ifndef ($(NOUNIVERSAL))
|
||||
CFLAGS += $(ARCHFLAGS)
|
||||
LFLAGS += $(ARCHFLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
EXT := a
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring unix,$(platform)))
|
||||
EXT ?= so
|
||||
TARGET := $(TARGET_NAME)_libretro.$(EXT)
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||
else ifneq (,$(findstring osx,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
fpic := -fPIC
|
||||
SHARED := -dynamiclib
|
||||
else ifneq (,$(findstring ios,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||
fpic := -fPIC
|
||||
SHARED := -dynamiclib
|
||||
ifeq ($(IOSSDK),)
|
||||
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
|
||||
endif
|
||||
DEFINES := -DIOS
|
||||
CC = cc -arch armv7 -isysroot $(IOSSDK)
|
||||
ifeq ($(platform),ios9)
|
||||
CC += -miphoneos-version-min=8.0
|
||||
CFLAGS += -miphoneos-version-min=8.0
|
||||
else
|
||||
CC += -miphoneos-version-min=5.0
|
||||
CFLAGS += -miphoneos-version-min=5.0
|
||||
endif #ifneq ios
|
||||
else ifneq (,$(findstring qnx,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro_qnx.so
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||
else ifeq ($(platform), emscripten)
|
||||
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||
else ifeq ($(platform), vita)
|
||||
TARGET := $(TARGET_NAME)_vita.a
|
||||
CC = arm-vita-eabi-gcc
|
||||
AR = arm-vita-eabi-ar
|
||||
CFLAGS += -Wl,-q -Wall -O3
|
||||
STATIC_LINKING = 1
|
||||
else
|
||||
CC = gcc
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
SHARED := -shared -static-libgcc -static-libstdc++ \
|
||||
-Wl,--version-script=link.T -Wl,--no-undefined
|
||||
endif
|
||||
|
||||
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
|
||||
endif
|
||||
|
||||
# Always have some debugging information.
|
||||
CFLAGS += -g
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -Og
|
||||
else
|
||||
CFLAGS += -Ofast
|
||||
endif
|
||||
|
||||
CFLAGS += -I../../libretro-common/include
|
||||
|
||||
OBJECTS := mpv-libretro.o
|
||||
LDFLAGS += -lmpv
|
||||
CFLAGS += -Wall -pedantic
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
else
|
||||
$(CC) $(fpic) $(SHARED) $(CFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(fpic) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET)
|
||||
|
||||
install:
|
||||
install -D -m 755 $(TARGET) $(DESTDIR)$(LIBDIR)/$(LIBRETRO_DIR)/$(TARGET)
|
||||
|
||||
install-snip:
|
||||
install -D -s -m 755 $(TARGET) $(DESTDIR)$(LIBDIR)/$(LIBRETRO_DIR)/$(TARGET)
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)$(LIBDIR)/$(LIBRETRO_DIR)/$(TARGET)
|
||||
|
||||
help:
|
||||
@echo 'make <target> [flags]'
|
||||
@echo 'Targets:'
|
||||
@echo ' clean install install-snip uninstall help'
|
||||
@echo 'Flags:'
|
||||
@echo ' platform String containing platform details.'
|
||||
@echo ' locale Support toolchain with locale support.'
|
||||
@echo ' false: disable support, otherwise enabled (default).'
|
||||
|
||||
.PHONY: clean
|
||||
@@ -0,0 +1,17 @@
|
||||
# libretro-mpv
|
||||
|
||||
mpv media player as a libretro core. A proof of concept release is now available.
|
||||
|
||||
Aims to use features already established in mpv that are not currently available in Retroarch movieplayer.
|
||||
|
||||
I want to be able to use Retroarch as my movie player on my embedded devices (Raspberry Pi) and desktop using hardware acceleration without having to use Kodi or mpv directly. Thus allowing for a more integrated experience, and smaller root filesystem.
|
||||
|
||||
## Compiling
|
||||
|
||||
Retroarch must be compiled with `--disable-ffmpeg` to stop the integrated movieplayer from playing the input file.
|
||||
|
||||
FFmpeg (preferably master branch) must be compiled with `--enable-shared`.
|
||||
|
||||
mpv must be compiled with `--enable-libmpv-shared`.
|
||||
|
||||
Then run `make` in the mpv-libretro folder.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
global: retro_*;
|
||||
local: *;
|
||||
};
|
||||
@@ -0,0 +1,606 @@
|
||||
/* 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 <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#include <mpv/client.h>
|
||||
#include <mpv/opengl_cb.h>
|
||||
|
||||
#include "libretro.h"
|
||||
#include "version.h"
|
||||
|
||||
static struct retro_hw_render_callback hw_render;
|
||||
|
||||
static struct retro_log_callback logging;
|
||||
static retro_log_printf_t log_cb;
|
||||
|
||||
static retro_video_refresh_t video_cb;
|
||||
static retro_audio_sample_t audio_cb;
|
||||
static retro_audio_sample_batch_t audio_batch_cb;
|
||||
static retro_environment_t environ_cb;
|
||||
static retro_input_poll_t input_poll_cb;
|
||||
static retro_input_state_t input_state_cb;
|
||||
|
||||
static mpv_handle *mpv;
|
||||
static mpv_opengl_cb_context *mpv_gl;
|
||||
|
||||
/* Keep track of the number of events in mpv queue */
|
||||
static unsigned int event_waiting = 0;
|
||||
|
||||
/* Save the current playback time for context changes */
|
||||
static int64_t *playback_time = 0;
|
||||
|
||||
/* filepath required globaly as mpv is reopened on context change */
|
||||
static char *filepath = NULL;
|
||||
|
||||
static void fallback_log(enum retro_log_level level, const char *fmt, ...)
|
||||
{
|
||||
(void)level;
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
vfprintf(stderr, fmt, va);
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
static void print_mpv_logs(void)
|
||||
{
|
||||
/* Print out mpv logs */
|
||||
if(event_waiting > 0)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
mpv_event *mp_event = mpv_wait_event(mpv, 0);
|
||||
if(mp_event->event_id == MPV_EVENT_NONE)
|
||||
break;
|
||||
|
||||
if(mp_event->event_id == MPV_EVENT_LOG_MESSAGE)
|
||||
{
|
||||
struct mpv_event_log_message *msg =
|
||||
(struct mpv_event_log_message *)mp_event->data;
|
||||
log_cb(RETRO_LOG_INFO, "mpv: [%s] %s: %s",
|
||||
msg->prefix, msg->level, msg->text);
|
||||
}
|
||||
else if(mp_event->event_id == MPV_EVENT_END_FILE)
|
||||
{
|
||||
struct mpv_event_end_file *eof =
|
||||
(struct mpv_event_end_file *)mp_event->data;
|
||||
|
||||
if(eof->reason == MPV_END_FILE_REASON_EOF)
|
||||
environ_cb(RETRO_ENVIRONMENT_SHUTDOWN, NULL);
|
||||
#if 0
|
||||
/* The following could be done instead if the file was not
|
||||
* closed once the end was reached - allowing the user to seek
|
||||
* back without reopening the file.
|
||||
*/
|
||||
struct retro_message ra_msg = {
|
||||
"Finished playing file", 60 * 5, /* 5 seconds */
|
||||
};
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_MESSAGE, &ra_msg);RETRO_ENVIRONMENT_SHUTDOWN
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
log_cb(RETRO_LOG_INFO, "mpv: %s\n",
|
||||
mpv_event_name(mp_event->event_id));
|
||||
}
|
||||
}
|
||||
|
||||
event_waiting = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void *get_proc_address_mpv(void *fn_ctx, const char *name)
|
||||
{
|
||||
/* The "ISO C forbids conversion of function pointer to object pointer
|
||||
* type" warning is suppressed.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
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);
|
||||
|
||||
if (!h)
|
||||
h = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY);
|
||||
|
||||
if (h) {
|
||||
proc_addr = dlsym(h, name);
|
||||
dlclose(h);
|
||||
}
|
||||
}
|
||||
|
||||
if(proc_addr == NULL)
|
||||
log_cb(RETRO_LOG_ERROR, "Failure obtaining %s proc address\n", name);
|
||||
|
||||
return proc_addr;
|
||||
}
|
||||
|
||||
static void on_mpv_events(void *mpv)
|
||||
{
|
||||
event_waiting++;
|
||||
}
|
||||
|
||||
void retro_init(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void retro_deinit(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned retro_api_version(void)
|
||||
{
|
||||
return RETRO_API_VERSION;
|
||||
}
|
||||
|
||||
void retro_set_controller_port_device(unsigned port, unsigned device)
|
||||
{
|
||||
log_cb(RETRO_LOG_INFO, "Plugging device %u into port %u.\n", device, port);
|
||||
return;
|
||||
}
|
||||
|
||||
void retro_get_system_info(struct retro_system_info *info)
|
||||
{
|
||||
memset(info, 0, sizeof(*info));
|
||||
info->library_name = "mpv";
|
||||
info->library_version = LIBRETRO_MPV_VERSION;
|
||||
info->need_fullpath = true; /* Allow MPV to load the file on its own */
|
||||
info->valid_extensions = "264|265|302|669|722|3g2|3gp|aa|aa3|aac|abc|ac3|"
|
||||
"acm|adf|adp|ads|adx|aea|afc|aix|al|amf|ams|ans|ape|apl|aqt|art|asc|"
|
||||
"ast|avc|avi|avr|avs|bcstm|bfstm|bin|bit|bmv|brstm|cdata|cdg|cdxl|cgi|"
|
||||
"cif|daud|dbm|dif|diz|dmf|dsm|dss|dtk|dts|dtshd|dv|eac3|fap|far|flac|"
|
||||
"flm|flv|fsb|g722|g723_1|g729|genh|gsm|h261|h264|h265|h26l|hevc|ice|"
|
||||
"idf|idx|ircam|it|itgz|itr|itz|ivr|j2k|lvf|m2a|m3u8|m4a|m4s|m4v|mac|"
|
||||
"mdgz|mdl|mdr|mdz|med|mid|mj2|mjpeg|mjpg|mk3d|mka|mks|mkv|mlp|mod|mov|"
|
||||
"mp2|mp3|mp4|mpa|mpc|mpeg|mpegts|mpg|mpl2|mpo|msf|mt2|mtaf|mtm|musx|"
|
||||
"mvi|mxg|nfo|nist|nut|oga|ogg|ogv|okt|oma|omg|paf|pjs|psm|ptm|pvf|qcif|"
|
||||
"rco|rgb|rsd|rso|rt|s3gz|s3m|s3r|s3z|sami|sb|sbg|scc|sdr2|sds|sdx|sf|"
|
||||
"shn|sln|smi|son|sph|ss2|stl|stm|str|sub|sup|svag|sw|tak|tco|thd|ts|"
|
||||
"tta|txt|ub|ul|ult|umx|uw|v|v210|vag|vb|vc1|viv|vob|vpk|vqe|vqf|vql|vt|"
|
||||
"vtt|wav|wsd|xl|xm|xmgz|xmr|xmv|xmz|xvag|y4m|yop|yuv|yuv10";
|
||||
}
|
||||
|
||||
void retro_get_system_av_info(struct retro_system_av_info *info)
|
||||
{
|
||||
float sampling_rate = 48000.0f;
|
||||
|
||||
struct retro_variable var = { .key = "test_aspect" };
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
|
||||
var.key = "test_samplerate";
|
||||
|
||||
if(environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
sampling_rate = strtof(var.value, NULL);
|
||||
|
||||
info->timing = (struct retro_system_timing) {
|
||||
.fps = 60.0,
|
||||
.sample_rate = sampling_rate,
|
||||
};
|
||||
|
||||
/* We don't know the dimensions of the video yet, so we set some good
|
||||
* defaults in the meantime.
|
||||
*/
|
||||
info->geometry = (struct retro_game_geometry) {
|
||||
.base_width = 256,
|
||||
.base_height = 144,
|
||||
.max_width = 1920,
|
||||
.max_height = 1080,
|
||||
.aspect_ratio = -1,
|
||||
};
|
||||
}
|
||||
|
||||
void retro_set_environment(retro_environment_t cb)
|
||||
{
|
||||
environ_cb = cb;
|
||||
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "test_samplerate", "Sample Rate; 48000|30000|20000" },
|
||||
{ "test_opt0", "Test option #0; false|true" },
|
||||
{ "test_opt1", "Test option #1; 0" },
|
||||
{ "test_opt2", "Test option #2; 0|1|foo|3" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
||||
|
||||
if (cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logging))
|
||||
log_cb = logging.log;
|
||||
else
|
||||
log_cb = fallback_log;
|
||||
}
|
||||
|
||||
static void context_reset(void)
|
||||
{
|
||||
const char *cmd[] = {"loadfile", filepath, NULL};
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
#endif
|
||||
|
||||
mpv = mpv_create();
|
||||
|
||||
if(mpv == NULL)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed creating context\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(mpv_initialize(mpv) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "mpv init failed\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* When normal mpv events are available. */
|
||||
mpv_set_wakeup_callback(mpv, on_mpv_events, NULL);
|
||||
|
||||
if(mpv_request_log_messages(mpv, "v") < 0)
|
||||
log_cb(RETRO_LOG_ERROR, "mpv logging failed\n");
|
||||
|
||||
/* The OpenGL API is somewhat separate from the normal mpv API. This only
|
||||
* returns NULL if no OpenGL support is compiled.
|
||||
*/
|
||||
mpv_gl = mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB);
|
||||
|
||||
if(mpv_gl == NULL)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to create mpv GL API handle\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if(mpv_opengl_cb_init_gl(mpv_gl, NULL, get_proc_address_mpv, NULL) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to initialize mpv GL context\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Actually using the opengl_cb state has to be explicitly requested.
|
||||
* Otherwise, mpv will create a separate platform window.
|
||||
*/
|
||||
if(mpv_set_option_string(mpv, "vo", "opengl-cb") < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to set video output to OpenGL\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if(mpv_set_option_string(mpv, "hwdec", "auto") < 0)
|
||||
log_cb(RETRO_LOG_ERROR, "failed to set hwdec option\n");
|
||||
|
||||
if(mpv_command(mpv, cmd) != 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to issue mpv_command to load file\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
/* Keep trying until mpv accepts the property. This is done to seek to the
|
||||
* point in the file after the previous context was destroyed. If no
|
||||
* context was destroyed previously, the file seeks to 0.
|
||||
*
|
||||
* This also seems to fix some black screen issues.
|
||||
*/
|
||||
while(mpv_set_property(mpv,
|
||||
"playback-time", MPV_FORMAT_INT64, &playback_time) < 0)
|
||||
{
|
||||
/* Garbage fix to overflowing log */
|
||||
usleep(10);
|
||||
}
|
||||
|
||||
log_cb(RETRO_LOG_INFO, "Context reset.\n");
|
||||
|
||||
return;
|
||||
|
||||
err:
|
||||
/* Print mpv logs to see why mpv failed. */
|
||||
print_mpv_logs();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void context_destroy(void)
|
||||
{
|
||||
mpv_get_property(mpv, "playback-time", MPV_FORMAT_INT64, &playback_time);
|
||||
mpv_opengl_cb_uninit_gl(mpv_gl);
|
||||
mpv_terminate_destroy(mpv);
|
||||
log_cb(RETRO_LOG_INFO, "Context destroyed.\n");
|
||||
}
|
||||
|
||||
static bool retro_init_hw_context(void)
|
||||
{
|
||||
#if defined(HAVE_OPENGLES)
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL;
|
||||
#endif
|
||||
hw_render.context_reset = context_reset;
|
||||
hw_render.context_destroy = context_destroy;
|
||||
|
||||
if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void retro_set_audio_sample(retro_audio_sample_t cb)
|
||||
{
|
||||
audio_cb = cb;
|
||||
}
|
||||
|
||||
void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb)
|
||||
{
|
||||
audio_batch_cb = cb;
|
||||
}
|
||||
|
||||
void retro_set_input_poll(retro_input_poll_t cb)
|
||||
{
|
||||
input_poll_cb = cb;
|
||||
}
|
||||
|
||||
void retro_set_input_state(retro_input_state_t cb)
|
||||
{
|
||||
input_state_cb = cb;
|
||||
}
|
||||
|
||||
void retro_set_video_refresh(retro_video_refresh_t cb)
|
||||
{
|
||||
video_cb = cb;
|
||||
}
|
||||
|
||||
void retro_reset(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void audio_callback(void)
|
||||
{
|
||||
static unsigned phase;
|
||||
|
||||
for (unsigned i = 0; i < 30000 / 60; i++, phase++)
|
||||
{
|
||||
int16_t val = 0x800 * sinf(2.0f * M_PI * phase * 300.0f / 30000.0f);
|
||||
audio_cb(val, val);
|
||||
}
|
||||
|
||||
phase %= 100;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void retropad_update_input(void)
|
||||
{
|
||||
struct Input
|
||||
{
|
||||
unsigned int l : 1;
|
||||
unsigned int r : 1;
|
||||
unsigned int a : 1;
|
||||
};
|
||||
struct Input current;
|
||||
static struct Input last;
|
||||
|
||||
input_poll_cb();
|
||||
|
||||
/* Commands that are called on rising edge only */
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
current.l = input_state_cb(0, RETRO_DEVICE_JOYPAD,
|
||||
0, RETRO_DEVICE_ID_JOYPAD_L) != 0 ? 1 : 0;
|
||||
current.r = input_state_cb(0, RETRO_DEVICE_JOYPAD,
|
||||
0, RETRO_DEVICE_ID_JOYPAD_R) != 0 ? 1 : 0;
|
||||
current.a = input_state_cb(0, RETRO_DEVICE_JOYPAD,
|
||||
0, RETRO_DEVICE_ID_JOYPAD_A) != 0 ? 1 : 0;
|
||||
|
||||
if(current.l == 1 && last.l == 0)
|
||||
mpv_command_string(mpv, "cycle audio");
|
||||
|
||||
if(current.r == 1 && last.r == 0)
|
||||
mpv_command_string(mpv, "cycle sub");
|
||||
|
||||
if(current.a == 1 && last.a == 0)
|
||||
mpv_command_string(mpv, "cycle pause");
|
||||
|
||||
/* TODO #3: Press and hold commands with small delay */
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
mpv_command_string(mpv, "seek -5");
|
||||
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
mpv_command_string(mpv, "seek 5");
|
||||
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
mpv_command_string(mpv, "seek 60");
|
||||
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
mpv_command_string(mpv, "seek -60");
|
||||
|
||||
/* Press and hold commands */
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_X))
|
||||
mpv_command_string(mpv, "show-progress");
|
||||
|
||||
/* Instead of copying the structs as though they were a union, we assign
|
||||
* each variable one-by-one to avoid endian issues.
|
||||
*/
|
||||
last.l = current.l;
|
||||
last.r = current.r;
|
||||
last.a = current.a;
|
||||
}
|
||||
|
||||
void retro_run(void)
|
||||
{
|
||||
/* We only need to update the base video size once, and we do it here since
|
||||
* the input file is not processed during the first
|
||||
* retro_get_system_av_info() call.
|
||||
*/
|
||||
static bool updated_video_dimensions = false;
|
||||
static int64_t width, height;
|
||||
|
||||
if(updated_video_dimensions == false)
|
||||
{
|
||||
mpv_get_property(mpv, "dwidth", MPV_FORMAT_INT64, &width);
|
||||
mpv_get_property(mpv, "dheight", MPV_FORMAT_INT64, &height);
|
||||
|
||||
/* 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
|
||||
* the correct aspect ratio.
|
||||
* This is not a temporary change
|
||||
*/
|
||||
struct retro_game_geometry geometry = {
|
||||
.base_width = width,
|
||||
.base_height = height,
|
||||
/* max_width and max_height are ignored */
|
||||
.max_width = width,
|
||||
.max_height = height,
|
||||
/* Aspect ratio calculated automatically from base dimensions */
|
||||
.aspect_ratio = -1,
|
||||
};
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &geometry);
|
||||
updated_video_dimensions = true;
|
||||
}
|
||||
|
||||
print_mpv_logs();
|
||||
|
||||
retropad_update_input();
|
||||
/* TODO #2: Implement an audio callback feature in to libmpv */
|
||||
/* audio_callback(); */
|
||||
|
||||
mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), width, height);
|
||||
video_cb(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* No save-state support */
|
||||
size_t retro_serialize_size(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool retro_serialize(void *data_, size_t size)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_unserialize(const void *data_, size_t size)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_load_game(const struct retro_game_info *info)
|
||||
{
|
||||
/* Supported on most systems. */
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
|
||||
struct retro_input_descriptor desc[] = {
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A, "Pause/Play" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X, "Show Progress" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT, "Seek -5 seconds" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP, "Seek +60 seconds" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN, "Seek -60 seconds" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT, "Seek +5 seconds" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L, "Cycle Audio Track" },
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R, "Cycle Subtitle Track" },
|
||||
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
/* Copy the file path to a global variable as we need it in context_reset()
|
||||
* where mpv is initialised.
|
||||
*/
|
||||
filepath = strdup(info->path);
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc);
|
||||
|
||||
/* Not bothered if this fails. Assuming the default is selected anyway. */
|
||||
if(environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt) == false)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "XRGB8888 is not supported.\n");
|
||||
|
||||
/* Try RGB565 */
|
||||
fmt = RETRO_PIXEL_FORMAT_RGB565;
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt);
|
||||
}
|
||||
|
||||
if(retro_init_hw_context() == false)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "HW Context could not be initialized\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_load_game_special(unsigned type, const struct retro_game_info *info,
|
||||
size_t num)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void retro_unload_game(void)
|
||||
{
|
||||
free(filepath);
|
||||
filepath = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned retro_get_region(void)
|
||||
{
|
||||
return RETRO_REGION_NTSC;
|
||||
}
|
||||
|
||||
void *retro_get_memory_data(unsigned id)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t retro_get_memory_size(unsigned id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void retro_cheat_reset(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void retro_cheat_set(unsigned index, bool enabled, const char *code)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#ifndef LIBRETRO_MPV_VERSION
|
||||
#define LIBRETRO_MPV_VERSION "0.2.alpha"
|
||||
#endif
|
||||
+10
-37
@@ -61,36 +61,6 @@
|
||||
#define DB_CURSOR_SIZE 0x7c9dede0U
|
||||
#define DB_CURSOR_SERIAL 0x1b843ec5U
|
||||
|
||||
static void database_info_build_query_add_quote(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "\"", len);
|
||||
}
|
||||
|
||||
static void database_info_build_query_add_bracket_open(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "{'", len);
|
||||
}
|
||||
|
||||
static void database_info_build_query_add_bracket_close(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "}", len);
|
||||
}
|
||||
|
||||
static void database_info_build_query_add_colon(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "':", len);
|
||||
}
|
||||
|
||||
static void database_info_build_query_add_glob_open(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "glob('*", len);
|
||||
}
|
||||
|
||||
static void database_info_build_query_add_glob_close(char *s, size_t len)
|
||||
{
|
||||
strlcat(s, "*')", len);
|
||||
}
|
||||
|
||||
int database_info_build_query_enum(char *s, size_t len,
|
||||
enum database_query_type type,
|
||||
const char *path)
|
||||
@@ -98,7 +68,8 @@ int database_info_build_query_enum(char *s, size_t len,
|
||||
bool add_quotes = true;
|
||||
bool add_glob = false;
|
||||
|
||||
database_info_build_query_add_bracket_open(s, len);
|
||||
string_add_bracket_open(s, len);
|
||||
string_add_single_quote(s, len);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -169,17 +140,19 @@ int database_info_build_query_enum(char *s, size_t len,
|
||||
break;
|
||||
}
|
||||
|
||||
database_info_build_query_add_colon(s, len);
|
||||
string_add_single_quote(s, len);
|
||||
string_add_colon(s, len);
|
||||
if (add_glob)
|
||||
database_info_build_query_add_glob_open(s, len);
|
||||
string_add_glob_open(s, len);
|
||||
if (add_quotes)
|
||||
database_info_build_query_add_quote(s, len);
|
||||
string_add_quote(s, len);
|
||||
strlcat(s, path, len);
|
||||
if (add_glob)
|
||||
database_info_build_query_add_glob_close(s, len);
|
||||
string_add_glob_close(s, len);
|
||||
if (add_quotes)
|
||||
database_info_build_query_add_quote(s, len);
|
||||
database_info_build_query_add_bracket_close(s, len);
|
||||
string_add_quote(s, len);
|
||||
|
||||
string_add_bracket_close(s, len);
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("query: %s\n", s);
|
||||
|
||||
+15
-12
@@ -17,12 +17,17 @@
|
||||
#ifndef D3DVIDEO_DEFINES_H
|
||||
#define D3DVIDEO_DEFINES_H
|
||||
|
||||
#if defined(DEBUG) || defined(_DEBUG)
|
||||
#define D3D_DEBUG_INFO
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9)
|
||||
/* Direct3D 9 */
|
||||
#if 0
|
||||
#include <d3d9.h>
|
||||
#endif
|
||||
|
||||
#define ID3DSURFACE IDirect3DSurface9
|
||||
|
||||
#if 0
|
||||
#define LPDIRECT3D LPDIRECT3D9
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9
|
||||
@@ -36,48 +41,46 @@
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE9
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT9
|
||||
#define D3DVIEWPORT D3DVIEWPORT9
|
||||
|
||||
#define D3DCREATE_CTX Direct3DCreate9
|
||||
#endif
|
||||
|
||||
#ifndef D3DCREATE_SOFTWARE_VERTEXPROCESSING
|
||||
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_D3D8)
|
||||
#if 0
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#else
|
||||
#include "../gfx/include/d3d8/d3d8.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Direct3D 8 */
|
||||
#if 0
|
||||
#define LPDIRECT3D LPDIRECT3D8
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE8
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE8
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE8
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE8
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER8
|
||||
#define LPDIRECT3DVERTEXDECLARATION (void*)
|
||||
#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE8
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT8
|
||||
#define D3DVIEWPORT D3DVIEWPORT8
|
||||
|
||||
#define ID3DSURFACE IDirect3DSurface8
|
||||
#define D3DCREATE_CTX Direct3DCreate8
|
||||
#endif
|
||||
|
||||
#if !defined(D3DLOCK_NOSYSLOCK) && defined(_XBOX)
|
||||
#define D3DLOCK_NOSYSLOCK (0)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define D3DSAMP_ADDRESSU D3DTSS_ADDRESSU
|
||||
#define D3DSAMP_ADDRESSV D3DTSS_ADDRESSV
|
||||
#define D3DSAMP_MAGFILTER D3DTSS_MAGFILTER
|
||||
#define D3DSAMP_MINFILTER D3DTSS_MINFILTER
|
||||
#endif
|
||||
|
||||
#if defined(_XBOX360)
|
||||
#define D3DFVF_CUSTOMVERTEX 0
|
||||
#elif defined(HAVE_D3D8)
|
||||
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW | D3DFVF_TEX1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -13,5 +13,7 @@
|
||||
*.opensdf
|
||||
*.shader
|
||||
*.a
|
||||
*.bc
|
||||
/external
|
||||
|
||||
!CMakeLists.txt
|
||||
Vendored
+10
-3
@@ -2,25 +2,32 @@ language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode8.2
|
||||
|
||||
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
# We check out glslang at a specific revision to avoid test output mismatches
|
||||
# We check out glslang and SPIRV-Tools at specific revisions to avoid test output mismatches
|
||||
env:
|
||||
- GLSLANG_REV=b56f4ac72c57f5c50f14ddb0bf1f78eaaef21c2b
|
||||
- GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92 SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install 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
|
||||
|
||||
script:
|
||||
- git -C glslang checkout $GLSLANG_REV
|
||||
- git -C SPIRV-Tools checkout $SPIRV_TOOLS_REV
|
||||
- cd glslang && cmake . && make -j2 && cd ..
|
||||
- cd SPIRV-Tools && cmake . && make -j2 && cd ..
|
||||
- make -j2
|
||||
- PATH=./glslang/StandAlone:./SPIRV-Tools/tools:$PATH
|
||||
- ./test_shaders.py shaders
|
||||
- ./test_shaders.py --msl shaders-msl
|
||||
- ./test_shaders.py --hlsl shaders-hlsl
|
||||
- ./test_shaders.py shaders --opt
|
||||
- ./test_shaders.py --msl shaders-msl --opt
|
||||
- ./test_shaders.py --hlsl shaders-hlsl --opt
|
||||
Vendored
+87
-40
@@ -24,34 +24,6 @@ if(${CMAKE_GENERATOR} MATCHES "Makefile")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(spirv-cross-core STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.std.450.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_common.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.cpp)
|
||||
|
||||
add_library(spirv-cross-glsl STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.hpp)
|
||||
|
||||
add_library(spirv-cross-cpp STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.cpp)
|
||||
|
||||
add_library(spirv-cross-msl STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.cpp)
|
||||
|
||||
add_executable(spirv-cross main.cpp)
|
||||
target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-cpp spirv-cross-msl 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-cpp spirv-cross-glsl)
|
||||
target_include_directories(spirv-cross-core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(spirv-compiler-options "")
|
||||
set(spirv-compiler-defines "")
|
||||
|
||||
@@ -71,27 +43,102 @@ if (NOT "${MSVC}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_options(spirv-cross-core PRIVATE ${spirv-compiler-options})
|
||||
target_compile_options(spirv-cross-glsl PRIVATE ${spirv-compiler-options})
|
||||
target_compile_options(spirv-cross-msl PRIVATE ${spirv-compiler-options})
|
||||
target_compile_options(spirv-cross-cpp PRIVATE ${spirv-compiler-options})
|
||||
macro(extract_headers out_abs file_list)
|
||||
set(${out_abs}) # absolute paths
|
||||
foreach(_a ${file_list})
|
||||
# get_filename_component only returns the longest extension, so use a regex
|
||||
string(REGEX REPLACE ".*\\.(h|hpp)" "\\1" ext ${_a})
|
||||
if(("${ext}" STREQUAL "h") OR ("${ext}" STREQUAL "hpp"))
|
||||
list(APPEND ${out_abs} "${_a}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(spirv_cross_add_library name config_name)
|
||||
add_library(${name} ${ARGN})
|
||||
extract_headers(hdrs "${ARGN}")
|
||||
target_include_directories(${name} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include/spirv_cross>)
|
||||
set_target_properties(${name} PROPERTIES
|
||||
PUBLIC_HEADERS "${hdrs}")
|
||||
target_compile_options(${name} PRIVATE ${spirv-compiler-options})
|
||||
target_compile_definitions(${name} PRIVATE ${spirv-compiler-defines})
|
||||
install(TARGETS ${name}
|
||||
EXPORT ${config_name}Config
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include/spirv_cross)
|
||||
install(FILES ${hdrs} DESTINATION include/spirv_cross)
|
||||
install(EXPORT ${config_name}Config DESTINATION share/${config_name}/cmake)
|
||||
export(TARGETS ${targets} FILE ${config_name}Config.cmake)
|
||||
endmacro()
|
||||
|
||||
|
||||
spirv_cross_add_library(spirv-cross-core spirv_cross_core STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GLSL.std.450.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_common.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.cpp)
|
||||
|
||||
spirv_cross_add_library(spirv-cross-glsl spirv_cross_glsl STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.hpp)
|
||||
|
||||
spirv_cross_add_library(spirv-cross-cpp spirv_cross_cpp STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.cpp)
|
||||
|
||||
spirv_cross_add_library(spirv-cross-msl spirv_cross_msl STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.cpp)
|
||||
|
||||
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)
|
||||
|
||||
add_executable(spirv-cross main.cpp)
|
||||
target_compile_options(spirv-cross PRIVATE ${spirv-compiler-options})
|
||||
target_compile_definitions(spirv-cross-core PRIVATE ${spirv-compiler-defines})
|
||||
target_compile_definitions(spirv-cross-glsl PRIVATE ${spirv-compiler-defines})
|
||||
target_compile_definitions(spirv-cross-msl PRIVATE ${spirv-compiler-defines})
|
||||
target_compile_definitions(spirv-cross-cpp PRIVATE ${spirv-compiler-defines})
|
||||
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-glsl spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-msl spirv-cross-glsl)
|
||||
target_link_libraries(spirv-cross-hlsl spirv-cross-glsl)
|
||||
target_link_libraries(spirv-cross-cpp spirv-cross-glsl)
|
||||
|
||||
# Set up tests, using only the simplest modes of the test_shaders
|
||||
# script. You have to invoke the script manually to:
|
||||
# - Update the reference files
|
||||
# - Get cycle counts from malisc
|
||||
# - Keep failing outputs
|
||||
find_package(PythonInterp)
|
||||
if(${PYTHONINTERP_FOUND} AND ${PYTHON_VERSION_MAJOR} GREATER 2)
|
||||
add_test(NAME spirv-cross-test
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
if (${PYTHONINTERP_FOUND})
|
||||
if (${PYTHON_VERSION_MAJOR} GREATER 2)
|
||||
add_test(NAME spirv-cross-test
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
add_test(NAME spirv-cross-test-metal
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
|
||||
add_test(NAME spirv-cross-test-hlsl
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
|
||||
add_test(NAME spirv-cross-test-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --opt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
add_test(NAME spirv-cross-test-metal-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal --opt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
|
||||
add_test(NAME spirv-cross-test-hlsl-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl --opt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Testing disabled. Could not find python3. If you have python3 installed try running "
|
||||
"cmake with -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python3 to help it find the executable")
|
||||
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@
|
||||
**
|
||||
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
|
||||
Vendored
+142
-9
@@ -8,6 +8,7 @@ SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader
|
||||
|
||||
- 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 debuggable C++ [EXPERIMENTAL]
|
||||
- Reflection API to simplify the creation of Vulkan pipeline layouts
|
||||
- Reflection API to modify and tweak OpDecorations
|
||||
@@ -121,9 +122,15 @@ Please see `samples/cpp` where some GLSL shaders are compiled to SPIR-V, decompi
|
||||
Reading through the samples should explain how to use the C++ interface.
|
||||
A simple Makefile is included to build all shaders in the directory.
|
||||
|
||||
### Using SPIRV-Cross to output GLSL shaders from glslang HLSL
|
||||
### Implementation notes
|
||||
|
||||
#### Entry point
|
||||
When using SPIR-V and SPIRV-Cross as an intermediate step for cross-compiling between high level languages there are some considerations to take into account,
|
||||
as not all features used by one high-level language are necessarily supported natively by the target shader language.
|
||||
SPIRV-Cross aims to provide the tools needed to handle these scenarios in a clean and robust way, but some manual action is required to maintain compatibility.
|
||||
|
||||
#### HLSL source to GLSL
|
||||
|
||||
##### HLSL entry points
|
||||
|
||||
When using SPIR-V shaders compiled from HLSL, there are some extra things you need to take care of.
|
||||
First make sure that the entry point is used correctly.
|
||||
@@ -135,7 +142,73 @@ Cannot end a function before ending the current block.
|
||||
Likely cause: If this SPIR-V was created from glslang HLSL, make sure the entry point is valid.
|
||||
```
|
||||
|
||||
#### Separate image samplers
|
||||
##### Vertex/Fragment interface linking
|
||||
|
||||
HLSL relies on semantics in order to effectively link together shader stages. In the SPIR-V generated by glslang, the transformation from HLSL to GLSL ends up looking like
|
||||
|
||||
```
|
||||
struct VSOutput {
|
||||
// SV_Position is rerouted to gl_Position
|
||||
float4 position : SV_Position;
|
||||
float4 coord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VSOutput main(...) {}
|
||||
```
|
||||
|
||||
```
|
||||
struct VSOutput {
|
||||
float4 coord;
|
||||
}
|
||||
layout(location = 0) out VSOutput _magicNameGeneratedByGlslang;
|
||||
```
|
||||
|
||||
While this works, be aware of the type of the struct which is used in the vertex stage and the fragment stage.
|
||||
There may be issues if the structure type name differs in vertex stage and fragment stage.
|
||||
|
||||
You can make use of the reflection interface to force the name of the struct type.
|
||||
|
||||
```
|
||||
// Something like this for both vertex outputs and fragment inputs.
|
||||
compiler.set_name(varying_resource.base_type_id, "VertexFragmentLinkage");
|
||||
```
|
||||
|
||||
Some platform may require identical variable name for both vertex outputs and fragment inputs. (for example MacOSX)
|
||||
to rename varaible base on location, please add
|
||||
```
|
||||
--rename-interface-variable <in|out> <location> <new_variable_name>
|
||||
```
|
||||
|
||||
#### HLSL source to legacy GLSL/ESSL
|
||||
|
||||
HLSL tends to emit varying struct types to pass data between vertex and fragment.
|
||||
This is not supported in legacy GL/GLES targets, so to support this, varying structs are flattened.
|
||||
This is done automatically, but the API user might need to be aware that this is happening in order to support all cases.
|
||||
|
||||
Modern GLES code like this:
|
||||
```
|
||||
struct Output {
|
||||
vec4 a;
|
||||
vec2 b;
|
||||
};
|
||||
out Output vout;
|
||||
```
|
||||
|
||||
Is transformed into:
|
||||
```
|
||||
struct Output {
|
||||
vec4 a;
|
||||
vec2 b;
|
||||
};
|
||||
varying vec4 Output_a;
|
||||
varying vec2 Output_b;
|
||||
```
|
||||
|
||||
Note that now, both the struct name and the member names will participate in the linking interface between vertex and fragment, so
|
||||
API users might want to ensure that both the struct names and member names match so that vertex outputs and fragment inputs can link properly.
|
||||
|
||||
|
||||
#### Separate image samplers (HLSL/Vulkan) for backends which do not support it (GLSL)
|
||||
|
||||
Another thing you need to remember is when using samplers and textures in HLSL these are separable, and not directly compatible with GLSL. If you need to use this with desktop GL/GLES, you need to call `Compiler::build_combined_image_samplers` first before calling `Compiler::compile`, or you will get an exception.
|
||||
|
||||
@@ -154,7 +227,33 @@ for (auto &remap : compiler->get_combined_image_samplers())
|
||||
```
|
||||
|
||||
If your target is Vulkan GLSL, `--vulkan-semantics` will emit separate image samplers as you'd expect.
|
||||
The command line client does this automatically, but if you're calling the library, you'll need to do this yourself.
|
||||
The command line client calls `Compiler::build_combined_image_samplers` automatically, but if you're calling the library, you'll need to do this yourself.
|
||||
|
||||
#### Descriptor sets (Vulkan GLSL) for backends which do not support them (HLSL/GLSL/Metal)
|
||||
|
||||
Descriptor sets are unique to Vulkan, so make sure that descriptor set + binding is remapped to a flat binding scheme (set always 0), so that other APIs can make sense of the bindings.
|
||||
This can be done with `Compiler::set_decoration(id, spv::DecorationDescriptorSet)`.
|
||||
|
||||
#### Linking by name for targets which do not support explicit locations (legacy GLSL/ESSL)
|
||||
|
||||
Modern GLSL and HLSL sources (and SPIR-V) relies on explicit layout(location) qualifiers to guide the linking process between shader stages,
|
||||
but older GLSL relies on symbol names to perform the linking. When emitting shaders with older versions, these layout statements will be removed,
|
||||
so it is important that the API user ensures that the names of I/O variables are sanitized so that linking will work properly.
|
||||
The reflection API can rename variables, struct types and struct members to deal with these scenarios using `Compiler::set_name` and friends.
|
||||
|
||||
#### Clip-space conventions
|
||||
|
||||
SPIRV-Cross can perform some common clip space conversions on gl_Position/SV_Position by enabling `CompilerGLSL::Options.vertex.fixup_clipspace`.
|
||||
While this can be convenient, it is recommended to modify the projection matrices instead as that can achieve the same result.
|
||||
|
||||
For GLSL targets, enabling this will convert a shader which assumes `[0, w]` depth range (Vulkan / D3D / Metal) into `[-w, w]` range.
|
||||
For MSL and HLSL targets, enabling this will convert a shader in `[-w, w]` depth range (OpenGL) to `[0, w]` depth range.
|
||||
|
||||
By default, the CLI will not enable `fixup_clipspace`, but in the API you might want to set an explicit value using `CompilerGLSL::set_options()`.
|
||||
|
||||
Y-flipping of gl_Position and similar is also supported.
|
||||
The use of this is discouraged, because relying on vertex shader Y-flipping tends to get quite messy.
|
||||
To enable this, set `CompilerGLSL::Options.vertex.flip_vert_y` or `--flip-vert-y` in CLI.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -165,12 +264,38 @@ Contributions to SPIRV-Cross are welcome. See Testing and Licensing sections for
|
||||
SPIRV-Cross maintains a test suite of shaders with reference output of how the output looks after going through a roundtrip through
|
||||
glslangValidator then back through SPIRV-Cross again. The reference files are stored inside the repository in order to be able to track regressions.
|
||||
|
||||
All pull requests should ensure that test output does not change unexpectedly. This can be tested with `./test_shaders.py shaders`.
|
||||
However, when improving SPIRV-Cross there are of course legitimate cases where reference output should change.
|
||||
In these cases, run `./test_shaders.py shaders --update` to update the reference files and include these changes as part of the pull request.
|
||||
Always make sure you are running up to date glslangValidator as well as SPIRV-Tools when updating reference files.
|
||||
All pull requests should ensure that test output does not change unexpectedly. This can be tested with:
|
||||
|
||||
In short, the master branch should always be able to run `./test_shaders.py shaders` without failure.
|
||||
```
|
||||
./test_shaders.py shaders
|
||||
./test_shaders.py shaders --opt
|
||||
./test_shaders.py shaders-hlsl --hlsl
|
||||
./test_shaders.py shaders-hlsl --hlsl --opt
|
||||
./test_shaders.py shaders-msl --msl
|
||||
./test_shaders.py shaders-msl --msl --opt
|
||||
```
|
||||
|
||||
although there are a couple of convenience script for doing this:
|
||||
|
||||
```
|
||||
./checkout_glslang_spirv_tools.sh # Checks out glslang and SPIRV-Tools at a fixed revision which matches the reference output.
|
||||
./test_shaders.sh # Runs over all changes and makes sure that there are no deltas compared to reference files.
|
||||
```
|
||||
|
||||
However, when improving SPIRV-Cross there are of course legitimate cases where reference output should change.
|
||||
In these cases, run:
|
||||
|
||||
```
|
||||
./update_test_shaders.sh
|
||||
```
|
||||
|
||||
to update the reference files and include these changes as part of the pull request.
|
||||
Always make sure you are running the correct version of glslangValidator as well as SPIRV-Tools when updating reference files.
|
||||
See `checkout_glslang_spirv_tools.sh`.
|
||||
|
||||
In short, the master branch should always be able to run `./test_shaders.py shaders` and friends without failure.
|
||||
SPIRV-Cross uses Travis CI to test all pull requests, so it is not strictly needed to perform testing yourself if you have problems running it locally.
|
||||
A pull request which does not pass testing on Travis will not be accepted however.
|
||||
|
||||
When adding support for new features to SPIRV-Cross, a new shader and reference file should be added which covers usage of the new shader features in question.
|
||||
|
||||
@@ -205,6 +330,14 @@ The current reference output is contained in reference/.
|
||||
|
||||
See `./test_shaders.py --help` for more.
|
||||
|
||||
### Metal backend
|
||||
|
||||
To test the roundtrip path GLSL -> SPIR-V -> MSL, `--msl` can be added, e.g. `./test_shaders.py --msl shaders-msl`.
|
||||
|
||||
### HLSL backend
|
||||
|
||||
To test the roundtrip path GLSL -> SPIR-V -> HLSL, `--hlsl` can be added, e.g. `./test_shaders.py --hlsl shaders-hlsl`.
|
||||
|
||||
### Updating regression tests
|
||||
|
||||
When legitimate changes are found, use `--update` flag to update regression files.
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92
|
||||
SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
|
||||
if [ -d external/glslang ]; then
|
||||
echo "Updating glslang to revision $GLSLANG_REV."
|
||||
cd external/glslang
|
||||
git fetch origin
|
||||
git checkout $GLSLANG_REV
|
||||
else
|
||||
echo "Cloning glslang revision $GLSLANG_REV."
|
||||
mkdir -p external
|
||||
cd external
|
||||
git clone git://github.com/KhronosGroup/glslang.git
|
||||
cd glslang
|
||||
git checkout $GLSLANG_REV
|
||||
fi
|
||||
cd ../..
|
||||
|
||||
echo "Building glslang."
|
||||
mkdir -p external/glslang-build
|
||||
cd external/glslang-build
|
||||
cmake ../glslang -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
|
||||
make -j$(nproc)
|
||||
cd ../..
|
||||
|
||||
if [ -d external/spirv-tools ]; then
|
||||
echo "Updating SPIRV-Tools to revision $SPIRV_TOOLS_REV."
|
||||
cd external/spirv-tools
|
||||
git fetch origin
|
||||
git checkout $SPIRV_TOOLS_REV
|
||||
else
|
||||
echo "Cloning SPIRV-Tools revision $SPIRV_TOOLS_REV."
|
||||
mkdir -p external
|
||||
cd external
|
||||
git clone git://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
|
||||
cd spirv-tools
|
||||
git checkout $SPIRV_TOOLS_REV
|
||||
|
||||
if [ -d external/spirv-headers ]; then
|
||||
cd external/spirv-headers
|
||||
git pull origin master
|
||||
cd ../..
|
||||
else
|
||||
git clone git://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
|
||||
fi
|
||||
fi
|
||||
cd ../..
|
||||
|
||||
echo "Building SPIRV-Tools."
|
||||
mkdir -p external/spirv-tools-build
|
||||
cd external/spirv-tools-build
|
||||
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
|
||||
make -j$(nproc)
|
||||
cd ../..
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ template <typename T>
|
||||
struct image2DBase
|
||||
{
|
||||
virtual ~image2DBase() = default;
|
||||
inline virtual T load(glm::ivec2 coord)
|
||||
inline virtual T load(glm::ivec2 coord) const
|
||||
{
|
||||
return T(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
// This file must only be included by the shader generated by spirv-cross!
|
||||
|
||||
#ifndef GLM_SWIZZLE
|
||||
#define GLM_SWIZZLE
|
||||
#ifndef GLM_FORCE_SWIZZLE
|
||||
#define GLM_FORCE_SWIZZLE
|
||||
#endif
|
||||
|
||||
#ifndef GLM_FORCE_RADIANS
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
Vendored
+237
-26
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 ARM Limited
|
||||
* Copyright 2015-2017 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
#include "spirv_cpp.hpp"
|
||||
#include "spirv_glsl.hpp"
|
||||
#include "spirv_hlsl.hpp"
|
||||
#include "spirv_msl.hpp"
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
@@ -26,19 +28,23 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
using namespace spv;
|
||||
using namespace spirv_cross;
|
||||
using namespace std;
|
||||
|
||||
#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
#define THROW(x) \
|
||||
do \
|
||||
{ \
|
||||
fprintf(stderr, "%s.", x); \
|
||||
exit(1); \
|
||||
} while (0)
|
||||
static inline void THROW(const char *str)
|
||||
{
|
||||
fprintf(stderr, "SPIRV-Cross will abort: %s\n", str);
|
||||
fflush(stderr);
|
||||
abort();
|
||||
}
|
||||
#else
|
||||
#define THROW(x) runtime_error(x)
|
||||
#define THROW(x) throw runtime_error(x)
|
||||
#endif
|
||||
|
||||
struct CLIParser;
|
||||
@@ -187,7 +193,7 @@ static bool write_string_to_file(const char *path, const char *string)
|
||||
FILE *file = fopen(path, "w");
|
||||
if (!file)
|
||||
{
|
||||
fprintf(file, "Failed to write file: %s\n", path);
|
||||
fprintf(stderr, "Failed to write file: %s\n", path);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -200,11 +206,16 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
{
|
||||
fprintf(stderr, "%s\n", tag);
|
||||
fprintf(stderr, "=============\n\n");
|
||||
bool print_ssbo = !strcmp(tag, "ssbos");
|
||||
|
||||
for (auto &res : resources)
|
||||
{
|
||||
auto &type = compiler.get_type(res.type_id);
|
||||
auto mask = compiler.get_decoration_mask(res.id);
|
||||
|
||||
if (print_ssbo && compiler.buffer_is_hlsl_counter_buffer(res.id))
|
||||
continue;
|
||||
|
||||
// If we don't have a name, use the fallback for the type instead of the variable
|
||||
// for SSBOs and UBOs since those are the only meaningful names to use externally.
|
||||
// Push constant blocks are still accessed by name and not block name, even though they are technically Blocks.
|
||||
@@ -217,7 +228,7 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
|
||||
uint32_t block_size = 0;
|
||||
if (is_sized_block)
|
||||
block_size = compiler.get_declared_struct_size(compiler.get_type(res.base_type_id));
|
||||
block_size = uint32_t(compiler.get_declared_struct_size(compiler.get_type(res.base_type_id)));
|
||||
|
||||
string array;
|
||||
for (auto arr : type.array)
|
||||
@@ -234,8 +245,16 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
|
||||
if (mask & (1ull << DecorationInputAttachmentIndex))
|
||||
fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
|
||||
if (mask & (1ull << DecorationNonReadable))
|
||||
fprintf(stderr, " writeonly");
|
||||
if (mask & (1ull << DecorationNonWritable))
|
||||
fprintf(stderr, " readonly");
|
||||
if (is_sized_block)
|
||||
fprintf(stderr, " (BlockSize : %u bytes)", block_size);
|
||||
|
||||
uint32_t counter_id = 0;
|
||||
if (print_ssbo && compiler.buffer_get_hlsl_counter_buffer(res.id, counter_id))
|
||||
fprintf(stderr, " (HLSL counter buffer ID: %u)", counter_id);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
fprintf(stderr, "=============\n\n");
|
||||
@@ -380,6 +399,21 @@ static void print_spec_constants(const Compiler &compiler)
|
||||
fprintf(stderr, "==================\n\n");
|
||||
}
|
||||
|
||||
static void print_capabilities_and_extensions(const Compiler &compiler)
|
||||
{
|
||||
fprintf(stderr, "Capabilities\n");
|
||||
fprintf(stderr, "============\n");
|
||||
for (auto &capability : compiler.get_declared_capabilities())
|
||||
fprintf(stderr, "Capability: %u\n", static_cast<unsigned>(capability));
|
||||
fprintf(stderr, "============\n\n");
|
||||
|
||||
fprintf(stderr, "Extensions\n");
|
||||
fprintf(stderr, "============\n");
|
||||
for (auto &ext : compiler.get_declared_extensions())
|
||||
fprintf(stderr, "Extension: %s\n", ext.c_str());
|
||||
fprintf(stderr, "============\n\n");
|
||||
}
|
||||
|
||||
struct PLSArg
|
||||
{
|
||||
PlsFormat format;
|
||||
@@ -399,43 +433,71 @@ struct VariableTypeRemap
|
||||
string new_variable_type;
|
||||
};
|
||||
|
||||
struct InterfaceVariableRename
|
||||
{
|
||||
StorageClass storageClass;
|
||||
uint32_t location;
|
||||
string variable_name;
|
||||
};
|
||||
|
||||
struct CLIArguments
|
||||
{
|
||||
const char *input = nullptr;
|
||||
const char *output = nullptr;
|
||||
const char *cpp_interface_name = nullptr;
|
||||
uint32_t version = 0;
|
||||
uint32_t shader_model = 0;
|
||||
uint32_t msl_version = 0;
|
||||
bool es = false;
|
||||
bool set_version = false;
|
||||
bool set_shader_model = false;
|
||||
bool set_msl_version = false;
|
||||
bool set_es = false;
|
||||
bool dump_resources = false;
|
||||
bool force_temporary = false;
|
||||
bool flatten_ubo = false;
|
||||
bool fixup = false;
|
||||
bool yflip = false;
|
||||
bool sso = false;
|
||||
vector<PLSArg> pls_in;
|
||||
vector<PLSArg> pls_out;
|
||||
vector<Remap> remaps;
|
||||
vector<string> extensions;
|
||||
vector<VariableTypeRemap> variable_type_remaps;
|
||||
vector<InterfaceVariableRename> interface_variable_renames;
|
||||
vector<HLSLVertexAttributeRemap> hlsl_attr_remap;
|
||||
string entry;
|
||||
|
||||
vector<pair<string, string>> entry_point_rename;
|
||||
|
||||
uint32_t iterations = 1;
|
||||
bool cpp = false;
|
||||
bool metal = false;
|
||||
bool msl = false;
|
||||
bool hlsl = false;
|
||||
bool hlsl_compat = false;
|
||||
bool vulkan_semantics = false;
|
||||
bool flatten_multidimensional_arrays = false;
|
||||
bool use_420pack_extension = true;
|
||||
bool remove_unused = false;
|
||||
bool cfg_analysis = true;
|
||||
};
|
||||
|
||||
static void print_help()
|
||||
{
|
||||
fprintf(stderr, "Usage: spirv-cross [--output <output path>] [SPIR-V file] [--es] [--no-es] [--no-cfg-analysis] "
|
||||
"[--version <GLSL "
|
||||
"version>] [--dump-resources] [--help] [--force-temporary] [--cpp] [--cpp-interface-name <name>] "
|
||||
"[--metal] [--vulkan-semantics] [--flatten-ubo] [--fixup-clipspace] [--iterations iter] [--pls-in "
|
||||
"format input-name] [--pls-out format output-name] [--remap source_name target_name components] "
|
||||
"[--extension ext] [--entry name] [--remove-unused-variables] "
|
||||
"[--remap-variable-type <variable_name> <new_variable_type>]\n");
|
||||
fprintf(stderr, "Usage: spirv-cross [--output <output path>] [SPIR-V file] [--es] [--no-es] "
|
||||
"[--version <GLSL version>] [--dump-resources] [--help] [--force-temporary] "
|
||||
"[--vulkan-semantics] [--flatten-ubo] [--fixup-clipspace] [--flip-vert-y] [--iterations iter] "
|
||||
"[--cpp] [--cpp-interface-name <name>] "
|
||||
"[--msl] [--msl-version <MMmmpp>]"
|
||||
"[--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] "
|
||||
"[--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>] "
|
||||
"\n");
|
||||
}
|
||||
|
||||
static bool remap_generic(Compiler &compiler, const vector<Resource> &resources, const Remap &remap)
|
||||
@@ -522,7 +584,34 @@ static PlsFormat pls_format(const char *str)
|
||||
return PlsNone;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
void rename_interface_variable(Compiler &compiler, const vector<Resource> &resources,
|
||||
const InterfaceVariableRename &rename)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static int main_inner(int argc, char *argv[])
|
||||
{
|
||||
CLIArguments args;
|
||||
CLICallbacks cbs;
|
||||
@@ -544,18 +633,36 @@ int main(int argc, char *argv[])
|
||||
args.version = parser.next_uint();
|
||||
args.set_version = true;
|
||||
});
|
||||
cbs.add("--no-cfg-analysis", [&args](CLIParser &) { args.cfg_analysis = false; });
|
||||
cbs.add("--dump-resources", [&args](CLIParser &) { args.dump_resources = true; });
|
||||
cbs.add("--force-temporary", [&args](CLIParser &) { args.force_temporary = true; });
|
||||
cbs.add("--flatten-ubo", [&args](CLIParser &) { args.flatten_ubo = true; });
|
||||
cbs.add("--fixup-clipspace", [&args](CLIParser &) { args.fixup = true; });
|
||||
cbs.add("--flip-vert-y", [&args](CLIParser &) { args.yflip = true; });
|
||||
cbs.add("--iterations", [&args](CLIParser &parser) { args.iterations = parser.next_uint(); });
|
||||
cbs.add("--cpp", [&args](CLIParser &) { args.cpp = true; });
|
||||
cbs.add("--cpp-interface-name", [&args](CLIParser &parser) { args.cpp_interface_name = parser.next_string(); });
|
||||
cbs.add("--metal", [&args](CLIParser &) { args.metal = true; });
|
||||
cbs.add("--metal", [&args](CLIParser &) { args.msl = true; }); // Legacy compatibility
|
||||
cbs.add("--msl", [&args](CLIParser &) { args.msl = true; });
|
||||
cbs.add("--hlsl", [&args](CLIParser &) { args.hlsl = true; });
|
||||
cbs.add("--hlsl-enable-compat", [&args](CLIParser &) { args.hlsl_compat = true; });
|
||||
cbs.add("--vulkan-semantics", [&args](CLIParser &) { args.vulkan_semantics = true; });
|
||||
cbs.add("--flatten-multidimensional-arrays", [&args](CLIParser &) { args.flatten_multidimensional_arrays = true; });
|
||||
cbs.add("--no-420pack-extension", [&args](CLIParser &) { args.use_420pack_extension = false; });
|
||||
cbs.add("--extension", [&args](CLIParser &parser) { args.extensions.push_back(parser.next_string()); });
|
||||
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 });
|
||||
});
|
||||
cbs.add("--entry", [&args](CLIParser &parser) { args.entry = 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;
|
||||
remap.location = parser.next_uint();
|
||||
remap.semantic = parser.next_string();
|
||||
args.hlsl_attr_remap.push_back(move(remap));
|
||||
});
|
||||
|
||||
cbs.add("--remap", [&args](CLIParser &parser) {
|
||||
string src = parser.next_string();
|
||||
string dst = parser.next_string();
|
||||
@@ -569,6 +676,19 @@ int main(int argc, char *argv[])
|
||||
args.variable_type_remaps.push_back({ move(var_name), move(new_type) });
|
||||
});
|
||||
|
||||
cbs.add("--rename-interface-variable", [&args](CLIParser &parser) {
|
||||
StorageClass cls = StorageClassMax;
|
||||
string clsStr = parser.next_string();
|
||||
if (clsStr == "in")
|
||||
cls = StorageClassInput;
|
||||
else if (clsStr == "out")
|
||||
cls = StorageClassOutput;
|
||||
|
||||
uint32_t loc = parser.next_uint();
|
||||
string var_name = parser.next_string();
|
||||
args.interface_variable_renames.push_back({ cls, loc, move(var_name) });
|
||||
});
|
||||
|
||||
cbs.add("--pls-in", [&args](CLIParser &parser) {
|
||||
auto fmt = pls_format(parser.next_string());
|
||||
auto name = parser.next_string();
|
||||
@@ -579,6 +699,14 @@ int main(int argc, char *argv[])
|
||||
auto name = parser.next_string();
|
||||
args.pls_out.push_back({ move(fmt), move(name) });
|
||||
});
|
||||
cbs.add("--shader-model", [&args](CLIParser &parser) {
|
||||
args.shader_model = parser.next_uint();
|
||||
args.set_shader_model = true;
|
||||
});
|
||||
cbs.add("--msl-version", [&args](CLIParser &parser) {
|
||||
args.msl_version = parser.next_uint();
|
||||
args.set_msl_version = true;
|
||||
});
|
||||
|
||||
cbs.add("--remove-unused-variables", [&args](CLIParser &) { args.remove_unused = true; });
|
||||
|
||||
@@ -612,8 +740,18 @@ int main(int argc, char *argv[])
|
||||
if (args.cpp_interface_name)
|
||||
static_cast<CompilerCPP *>(compiler.get())->set_interface_name(args.cpp_interface_name);
|
||||
}
|
||||
else if (args.metal)
|
||||
else if (args.msl)
|
||||
{
|
||||
compiler = unique_ptr<CompilerMSL>(new CompilerMSL(read_spirv_file(args.input)));
|
||||
|
||||
auto *msl_comp = static_cast<CompilerMSL *>(compiler.get());
|
||||
auto msl_opts = msl_comp->get_options();
|
||||
if (args.set_msl_version)
|
||||
msl_opts.msl_version = args.msl_version;
|
||||
msl_comp->set_options(msl_opts);
|
||||
}
|
||||
else if (args.hlsl)
|
||||
compiler = unique_ptr<CompilerHLSL>(new CompilerHLSL(read_spirv_file(args.input)));
|
||||
else
|
||||
{
|
||||
combined_image_samplers = !args.vulkan_semantics;
|
||||
@@ -631,6 +769,9 @@ int main(int argc, char *argv[])
|
||||
compiler->set_variable_type_remap_callback(move(remap_cb));
|
||||
}
|
||||
|
||||
for (auto &rename : args.entry_point_rename)
|
||||
compiler->rename_entry_point(rename.first, rename.second);
|
||||
|
||||
if (!args.entry.empty())
|
||||
compiler->set_entry_point(args.entry);
|
||||
|
||||
@@ -647,11 +788,38 @@ int main(int argc, char *argv[])
|
||||
if (args.set_es)
|
||||
opts.es = args.es;
|
||||
opts.force_temporary = args.force_temporary;
|
||||
opts.separate_shader_objects = args.sso;
|
||||
opts.flatten_multidimensional_arrays = args.flatten_multidimensional_arrays;
|
||||
opts.enable_420pack_extension = args.use_420pack_extension;
|
||||
opts.vulkan_semantics = args.vulkan_semantics;
|
||||
opts.vertex.fixup_clipspace = args.fixup;
|
||||
opts.cfg_analysis = args.cfg_analysis;
|
||||
opts.vertex.flip_vert_y = args.yflip;
|
||||
compiler->set_options(opts);
|
||||
|
||||
// Set HLSL specific options.
|
||||
if (args.hlsl)
|
||||
{
|
||||
auto *hlsl = static_cast<CompilerHLSL *>(compiler.get());
|
||||
auto hlsl_opts = hlsl->get_options();
|
||||
if (args.set_shader_model)
|
||||
{
|
||||
if (args.shader_model < 30)
|
||||
{
|
||||
fprintf(stderr, "Shader model earlier than 30 (3.0) not supported.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
hlsl_opts.shader_model = args.shader_model;
|
||||
}
|
||||
|
||||
if (args.hlsl_compat)
|
||||
{
|
||||
// Enable all compat options.
|
||||
hlsl_opts.point_size_compat = true;
|
||||
}
|
||||
hlsl->set_options(hlsl_opts);
|
||||
}
|
||||
|
||||
ShaderResources res;
|
||||
if (args.remove_unused)
|
||||
{
|
||||
@@ -663,8 +831,12 @@ int main(int argc, char *argv[])
|
||||
res = compiler->get_shader_resources();
|
||||
|
||||
if (args.flatten_ubo)
|
||||
{
|
||||
for (auto &ubo : res.uniform_buffers)
|
||||
compiler->flatten_interface_block(ubo.id);
|
||||
compiler->flatten_buffer_block(ubo.id);
|
||||
for (auto &ubo : res.push_constant_buffers)
|
||||
compiler->flatten_buffer_block(ubo.id);
|
||||
}
|
||||
|
||||
auto pls_inputs = remap_pls(args.pls_in, res.stage_inputs, &res.subpass_inputs);
|
||||
auto pls_outputs = remap_pls(args.pls_out, res.stage_outputs, nullptr);
|
||||
@@ -683,11 +855,25 @@ int main(int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
|
||||
for (auto &rename : args.interface_variable_renames)
|
||||
{
|
||||
if (rename.storageClass == StorageClassInput)
|
||||
rename_interface_variable(*compiler, res.stage_inputs, rename);
|
||||
else if (rename.storageClass == StorageClassOutput)
|
||||
rename_interface_variable(*compiler, res.stage_outputs, rename);
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "error at --rename-interface-variable <in|out> ...\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.dump_resources)
|
||||
{
|
||||
print_resources(*compiler, res);
|
||||
print_push_constant_resources(*compiler, res.push_constant_buffers);
|
||||
print_spec_constants(*compiler);
|
||||
print_capabilities_and_extensions(*compiler);
|
||||
}
|
||||
|
||||
if (combined_image_samplers)
|
||||
@@ -703,10 +889,35 @@ int main(int argc, char *argv[])
|
||||
|
||||
string glsl;
|
||||
for (uint32_t i = 0; i < args.iterations; i++)
|
||||
glsl = compiler->compile();
|
||||
{
|
||||
if (args.hlsl)
|
||||
glsl = static_cast<CompilerHLSL *>(compiler.get())->compile(move(args.hlsl_attr_remap));
|
||||
else
|
||||
glsl = compiler->compile();
|
||||
}
|
||||
|
||||
if (args.output)
|
||||
write_string_to_file(args.output, glsl.c_str());
|
||||
else
|
||||
printf("%s", glsl.c_str());
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
return main_inner(argc, argv);
|
||||
#else
|
||||
// Make sure we catch the exception or it just disappears into the aether on Windows.
|
||||
try
|
||||
{
|
||||
return main_inner(argc, argv);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
fprintf(stderr, "SPIRV-Cross threw an exception: %s\n", e.what());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+2
@@ -127,6 +127,7 @@
|
||||
<ClCompile Include="..\spirv_cpp.cpp" />
|
||||
<ClCompile Include="..\spirv_cross.cpp" />
|
||||
<ClCompile Include="..\spirv_glsl.cpp" />
|
||||
<ClCompile Include="..\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="..\spirv_msl.cpp" />
|
||||
<ClCompile Include="..\spirv_cfg.cpp" />
|
||||
</ItemGroup>
|
||||
@@ -137,6 +138,7 @@
|
||||
<ClInclude Include="..\spirv_cross.hpp" />
|
||||
<ClInclude Include="..\spirv_glsl.hpp" />
|
||||
<ClInclude Include="..\spirv.hpp" />
|
||||
<ClInclude Include="..\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="..\spirv_msl.hpp" />
|
||||
<ClInclude Include="..\spirv_cfg.hpp" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<ClCompile Include="..\spirv_cfg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\spirv_hlsl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\GLSL.std.450.h">
|
||||
@@ -59,5 +62,8 @@
|
||||
<ClInclude Include="..\spirv_cfg.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\spirv_hlsl.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
static const uint _5 = 9u;
|
||||
static const uint _6 = 4u;
|
||||
static const uint3 gl_WorkGroupSize = uint3(_5, 20u, _6);
|
||||
|
||||
RWByteAddressBuffer _4 : register(u0);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_4.Store(0, asuint(asfloat(_4.Load(0)) + 1.0f));
|
||||
}
|
||||
|
||||
[numthreads(9, 20, 4)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
static const uint _3 = 1u;
|
||||
static const uint _4 = 3u;
|
||||
static const uint3 gl_WorkGroupSize = uint3(_3, 2u, _4);
|
||||
|
||||
RWByteAddressBuffer _8 : register(u0);
|
||||
RWByteAddressBuffer _9 : register(u1);
|
||||
|
||||
static uint3 gl_WorkGroupID;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint3 gl_WorkGroupID : SV_GroupID;
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0))));
|
||||
}
|
||||
|
||||
[numthreads(1, 2, 3)]
|
||||
void main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_WorkGroupID = stage_input.gl_WorkGroupID;
|
||||
comp_main();
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
cbuffer _5 : register(b0)
|
||||
{
|
||||
column_major float2x4 _5_m0 : packoffset(c0);
|
||||
float4 _5_m1 : packoffset(c4);
|
||||
};
|
||||
|
||||
static float2 _3;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float2 _3 : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
_3 = mul(_5_m0, _5_m1);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output._3 = _3;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
static int counter;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation int counter : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
float4 _21;
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float4 _33;
|
||||
do
|
||||
{
|
||||
if (counter == 10)
|
||||
{
|
||||
_33 = 10.0f.xxxx;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_33 = 30.0f.xxxx;
|
||||
break;
|
||||
}
|
||||
} while (false);
|
||||
FragColor = _33;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
counter = stage_input.counter;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
void vert_main()
|
||||
{
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vert_main();
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
static float4 gl_Position;
|
||||
static int gl_VertexID;
|
||||
static int gl_InstanceID;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint gl_VertexID : SV_VertexID;
|
||||
uint gl_InstanceID : SV_InstanceID;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = float(gl_VertexID + gl_InstanceID).xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_VertexID = int(stage_input.gl_VertexID);
|
||||
gl_InstanceID = int(stage_input.gl_InstanceID);
|
||||
vert_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_Position = gl_Position;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
RWByteAddressBuffer wo : register(u1);
|
||||
ByteAddressBuffer ro : register(t0);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
wo.Store4(gl_GlobalInvocationID.x * 64 + 272, asuint(asfloat(ro.Load4(gl_GlobalInvocationID.x * 64 + 160))));
|
||||
wo.Store4(gl_GlobalInvocationID.x * 16 + 480, asuint(asfloat(ro.Load4(gl_GlobalInvocationID.x * 16 + 480))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
RWByteAddressBuffer WriteOnly : register(u2);
|
||||
ByteAddressBuffer ReadOnly : register(t0);
|
||||
RWByteAddressBuffer ReadWrite : register(u1);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
WriteOnly.Store4(0, asuint(asfloat(ReadOnly.Load4(0))));
|
||||
ReadWrite.Store4(0, asuint(asfloat(ReadWrite.Load4(0)) + 10.0f.xxxx));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
RWByteAddressBuffer ssbo : register(u2);
|
||||
RWTexture2D<uint> uImage : register(u0);
|
||||
RWTexture2D<int> iImage : register(u1);
|
||||
|
||||
groupshared int int_atomic;
|
||||
groupshared uint uint_atomic;
|
||||
groupshared int int_atomic_array[1];
|
||||
groupshared uint uint_atomic_array[1];
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
uint _19;
|
||||
InterlockedAdd(uImage[int2(1, 5)], 1u, _19);
|
||||
uint _27;
|
||||
InterlockedAdd(uImage[int2(1, 5)], 1u, _27);
|
||||
iImage[int2(1, 6)] = int(_27).x;
|
||||
uint _32;
|
||||
InterlockedOr(uImage[int2(1, 5)], 1u, _32);
|
||||
uint _34;
|
||||
InterlockedXor(uImage[int2(1, 5)], 1u, _34);
|
||||
uint _36;
|
||||
InterlockedAnd(uImage[int2(1, 5)], 1u, _36);
|
||||
uint _38;
|
||||
InterlockedMin(uImage[int2(1, 5)], 1u, _38);
|
||||
uint _40;
|
||||
InterlockedMax(uImage[int2(1, 5)], 1u, _40);
|
||||
uint _44;
|
||||
InterlockedCompareExchange(uImage[int2(1, 5)], 10u, 2u, _44);
|
||||
int _47;
|
||||
InterlockedAdd(iImage[int2(1, 6)], 1, _47);
|
||||
int _49;
|
||||
InterlockedOr(iImage[int2(1, 6)], 1, _49);
|
||||
int _51;
|
||||
InterlockedXor(iImage[int2(1, 6)], 1, _51);
|
||||
int _53;
|
||||
InterlockedAnd(iImage[int2(1, 6)], 1, _53);
|
||||
int _55;
|
||||
InterlockedMin(iImage[int2(1, 6)], 1, _55);
|
||||
int _57;
|
||||
InterlockedMax(iImage[int2(1, 6)], 1, _57);
|
||||
int _61;
|
||||
InterlockedCompareExchange(iImage[int2(1, 5)], 10, 2, _61);
|
||||
uint _68;
|
||||
ssbo.InterlockedAdd(0, 1u, _68);
|
||||
uint _70;
|
||||
ssbo.InterlockedOr(0, 1u, _70);
|
||||
uint _72;
|
||||
ssbo.InterlockedXor(0, 1u, _72);
|
||||
uint _74;
|
||||
ssbo.InterlockedAnd(0, 1u, _74);
|
||||
uint _76;
|
||||
ssbo.InterlockedMin(0, 1u, _76);
|
||||
uint _78;
|
||||
ssbo.InterlockedMax(0, 1u, _78);
|
||||
uint _80;
|
||||
ssbo.InterlockedExchange(0, 1u, _80);
|
||||
uint _82;
|
||||
ssbo.InterlockedCompareExchange(0, 10u, 2u, _82);
|
||||
int _85;
|
||||
ssbo.InterlockedAdd(4, 1, _85);
|
||||
int _87;
|
||||
ssbo.InterlockedOr(4, 1, _87);
|
||||
int _89;
|
||||
ssbo.InterlockedXor(4, 1, _89);
|
||||
int _91;
|
||||
ssbo.InterlockedAnd(4, 1, _91);
|
||||
int _93;
|
||||
ssbo.InterlockedMin(4, 1, _93);
|
||||
int _95;
|
||||
ssbo.InterlockedMax(4, 1, _95);
|
||||
int _97;
|
||||
ssbo.InterlockedExchange(4, 1, _97);
|
||||
int _99;
|
||||
ssbo.InterlockedCompareExchange(4, 10, 2, _99);
|
||||
int _102;
|
||||
InterlockedAdd(int_atomic, 10, _102);
|
||||
uint _105;
|
||||
InterlockedAdd(uint_atomic, 10u, _105);
|
||||
int _110;
|
||||
InterlockedAdd(int_atomic_array[0], 10, _110);
|
||||
uint _115;
|
||||
InterlockedAdd(uint_atomic_array[0], 10u, _115);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
GroupMemoryBarrier();
|
||||
AllMemoryBarrier();
|
||||
DeviceMemoryBarrier();
|
||||
DeviceMemoryBarrier();
|
||||
AllMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
AllMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
DeviceMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
DeviceMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
AllMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
}
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
uint SPIRV_Cross_bitfieldInsert(uint Base, uint Insert, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : (((1u << Count) - 1) << (Offset & 31));
|
||||
return (Base & ~Mask) | ((Insert << Offset) & Mask);
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_bitfieldInsert(uint2 Base, uint2 Insert, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : (((1u << Count) - 1) << (Offset & 31));
|
||||
return (Base & ~Mask) | ((Insert << Offset) & Mask);
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_bitfieldInsert(uint3 Base, uint3 Insert, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : (((1u << Count) - 1) << (Offset & 31));
|
||||
return (Base & ~Mask) | ((Insert << Offset) & Mask);
|
||||
}
|
||||
|
||||
uint4 SPIRV_Cross_bitfieldInsert(uint4 Base, uint4 Insert, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : (((1u << Count) - 1) << (Offset & 31));
|
||||
return (Base & ~Mask) | ((Insert << Offset) & Mask);
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_bitfieldUExtract(uint Base, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : ((1 << Count) - 1);
|
||||
return (Base >> Offset) & Mask;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_bitfieldUExtract(uint2 Base, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : ((1 << Count) - 1);
|
||||
return (Base >> Offset) & Mask;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_bitfieldUExtract(uint3 Base, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : ((1 << Count) - 1);
|
||||
return (Base >> Offset) & Mask;
|
||||
}
|
||||
|
||||
uint4 SPIRV_Cross_bitfieldUExtract(uint4 Base, uint Offset, uint Count)
|
||||
{
|
||||
uint Mask = Count == 32 ? 0xffffffff : ((1 << Count) - 1);
|
||||
return (Base >> Offset) & Mask;
|
||||
}
|
||||
|
||||
int SPIRV_Cross_bitfieldSExtract(int Base, int Offset, int Count)
|
||||
{
|
||||
int Mask = Count == 32 ? -1 : ((1 << Count) - 1);
|
||||
int Masked = (Base >> Offset) & Mask;
|
||||
int ExtendShift = (32 - Count) & 31;
|
||||
return (Masked << ExtendShift) >> ExtendShift;
|
||||
}
|
||||
|
||||
int2 SPIRV_Cross_bitfieldSExtract(int2 Base, int Offset, int Count)
|
||||
{
|
||||
int Mask = Count == 32 ? -1 : ((1 << Count) - 1);
|
||||
int2 Masked = (Base >> Offset) & Mask;
|
||||
int ExtendShift = (32 - Count) & 31;
|
||||
return (Masked << ExtendShift) >> ExtendShift;
|
||||
}
|
||||
|
||||
int3 SPIRV_Cross_bitfieldSExtract(int3 Base, int Offset, int Count)
|
||||
{
|
||||
int Mask = Count == 32 ? -1 : ((1 << Count) - 1);
|
||||
int3 Masked = (Base >> Offset) & Mask;
|
||||
int ExtendShift = (32 - Count) & 31;
|
||||
return (Masked << ExtendShift) >> ExtendShift;
|
||||
}
|
||||
|
||||
int4 SPIRV_Cross_bitfieldSExtract(int4 Base, int Offset, int Count)
|
||||
{
|
||||
int Mask = Count == 32 ? -1 : ((1 << Count) - 1);
|
||||
int4 Masked = (Base >> Offset) & Mask;
|
||||
int ExtendShift = (32 - Count) & 31;
|
||||
return (Masked << ExtendShift) >> ExtendShift;
|
||||
}
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
int signed_value = 0;
|
||||
uint unsigned_value = 0u;
|
||||
int3 signed_values = int3(0, 0, 0);
|
||||
uint3 unsigned_values = uint3(0u, 0u, 0u);
|
||||
int s = SPIRV_Cross_bitfieldSExtract(signed_value, 5, 20);
|
||||
uint u = SPIRV_Cross_bitfieldUExtract(unsigned_value, 6, 21);
|
||||
s = int(SPIRV_Cross_bitfieldInsert(s, 40, 5, 4));
|
||||
u = SPIRV_Cross_bitfieldInsert(u, 60u, 5, 4);
|
||||
u = reversebits(u);
|
||||
s = reversebits(s);
|
||||
int v0 = countbits(u);
|
||||
int v1 = countbits(s);
|
||||
int v2 = firstbithigh(u);
|
||||
int v3 = firstbitlow(s);
|
||||
int3 s_1 = SPIRV_Cross_bitfieldSExtract(signed_values, 5, 20);
|
||||
uint3 u_1 = SPIRV_Cross_bitfieldUExtract(unsigned_values, 6, 21);
|
||||
s_1 = int3(SPIRV_Cross_bitfieldInsert(s_1, int3(40, 40, 40), 5, 4));
|
||||
u_1 = SPIRV_Cross_bitfieldInsert(u_1, uint3(60u, 60u, 60u), 5, 4);
|
||||
u_1 = reversebits(u_1);
|
||||
s_1 = reversebits(s_1);
|
||||
int3 v0_1 = countbits(u_1);
|
||||
int3 v1_1 = countbits(s_1);
|
||||
int3 v2_1 = firstbithigh(u_1);
|
||||
int3 v3_1 = firstbitlow(s_1);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
void comp_main()
|
||||
{
|
||||
}
|
||||
|
||||
[numthreads(8, 4, 2)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
RWTexture2D<float> uImageInF : register(u0);
|
||||
RWTexture2D<float> uImageOutF : register(u1);
|
||||
RWTexture2D<int> uImageInI : register(u2);
|
||||
RWTexture2D<int> uImageOutI : register(u3);
|
||||
RWTexture2D<uint> uImageInU : register(u4);
|
||||
RWTexture2D<uint> uImageOutU : register(u5);
|
||||
RWBuffer<float> uImageInBuffer : register(u6);
|
||||
RWBuffer<float> uImageOutBuffer : register(u7);
|
||||
RWTexture2D<float2> uImageInF2 : register(u8);
|
||||
RWTexture2D<float2> uImageOutF2 : register(u9);
|
||||
RWTexture2D<int2> uImageInI2 : register(u10);
|
||||
RWTexture2D<int2> uImageOutI2 : register(u11);
|
||||
RWTexture2D<uint2> uImageInU2 : register(u12);
|
||||
RWTexture2D<uint2> uImageOutU2 : register(u13);
|
||||
RWBuffer<float2> uImageInBuffer2 : register(u14);
|
||||
RWBuffer<float2> uImageOutBuffer2 : register(u15);
|
||||
RWTexture2D<float4> uImageInF4 : register(u16);
|
||||
RWTexture2D<float4> uImageOutF4 : register(u17);
|
||||
RWTexture2D<int4> uImageInI4 : register(u18);
|
||||
RWTexture2D<int4> uImageOutI4 : register(u19);
|
||||
RWTexture2D<uint4> uImageInU4 : register(u20);
|
||||
RWTexture2D<uint4> uImageOutU4 : register(u21);
|
||||
RWBuffer<float4> uImageInBuffer4 : register(u22);
|
||||
RWBuffer<float4> uImageOutBuffer4 : register(u23);
|
||||
RWTexture2D<float4> uImageNoFmtF : register(u24);
|
||||
RWTexture2D<uint4> uImageNoFmtU : register(u25);
|
||||
RWTexture2D<int4> uImageNoFmtI : register(u26);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
uImageOutF[int2(gl_GlobalInvocationID.xy)] = uImageInF[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutI[int2(gl_GlobalInvocationID.xy)] = uImageInI[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutU[int2(gl_GlobalInvocationID.xy)] = uImageInU[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutBuffer[int(gl_GlobalInvocationID.x)] = uImageInBuffer[int(gl_GlobalInvocationID.x)].x;
|
||||
uImageOutF2[int2(gl_GlobalInvocationID.xy)] = uImageInF2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
uImageOutI2[int2(gl_GlobalInvocationID.xy)] = uImageInI2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
uImageOutU2[int2(gl_GlobalInvocationID.xy)] = uImageInU2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
float4 _135 = uImageInBuffer2[int(gl_GlobalInvocationID.x)].xyyy;
|
||||
uImageOutBuffer2[int(gl_GlobalInvocationID.x)] = _135.xy;
|
||||
uImageOutF4[int2(gl_GlobalInvocationID.xy)] = uImageInF4[int2(gl_GlobalInvocationID.xy)];
|
||||
int4 _165 = uImageInI4[int2(gl_GlobalInvocationID.xy)];
|
||||
uImageOutI4[int2(gl_GlobalInvocationID.xy)] = _165;
|
||||
uint4 _180 = uImageInU4[int2(gl_GlobalInvocationID.xy)];
|
||||
uImageOutU4[int2(gl_GlobalInvocationID.xy)] = _180;
|
||||
uImageOutBuffer4[int(gl_GlobalInvocationID.x)] = uImageInBuffer4[int(gl_GlobalInvocationID.x)];
|
||||
uImageNoFmtF[int2(gl_GlobalInvocationID.xy)] = _135;
|
||||
uImageNoFmtU[int2(gl_GlobalInvocationID.xy)] = _180;
|
||||
uImageNoFmtI[int2(gl_GlobalInvocationID.xy)] = _165;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
RWByteAddressBuffer _28 : register(u0);
|
||||
cbuffer _68 : register(b1)
|
||||
{
|
||||
int _68_index0 : packoffset(c0);
|
||||
int _68_index1 : packoffset(c0.y);
|
||||
};
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
float4x4 _253 = asfloat(uint4x4(_28.Load(64), _28.Load(80), _28.Load(96), _28.Load(112), _28.Load(68), _28.Load(84), _28.Load(100), _28.Load(116), _28.Load(72), _28.Load(88), _28.Load(104), _28.Load(120), _28.Load(76), _28.Load(92), _28.Load(108), _28.Load(124)));
|
||||
_28.Store4(0, asuint(_253[0]));
|
||||
_28.Store4(16, asuint(_253[1]));
|
||||
_28.Store4(32, asuint(_253[2]));
|
||||
_28.Store4(48, asuint(_253[3]));
|
||||
float2x2 _256 = asfloat(uint2x2(_28.Load(144), _28.Load(152), _28.Load(148), _28.Load(156)));
|
||||
_28.Store2(128, asuint(_256[0]));
|
||||
_28.Store2(136, asuint(_256[1]));
|
||||
float2x3 _259 = asfloat(uint2x3(_28.Load(192), _28.Load(200), _28.Load(208), _28.Load(196), _28.Load(204), _28.Load(212)));
|
||||
_28.Store3(160, asuint(_259[0]));
|
||||
_28.Store3(176, asuint(_259[1]));
|
||||
float3x2 _262 = asfloat(uint3x2(_28.Load(240), _28.Load(256), _28.Load(244), _28.Load(260), _28.Load(248), _28.Load(264)));
|
||||
_28.Store2(216, asuint(_262[0]));
|
||||
_28.Store2(224, asuint(_262[1]));
|
||||
_28.Store2(232, asuint(_262[2]));
|
||||
float4x4 _265 = asfloat(uint4x4(_28.Load4(0), _28.Load4(16), _28.Load4(32), _28.Load4(48)));
|
||||
_28.Store(64, asuint(_265[0].x));
|
||||
_28.Store(68, asuint(_265[1].x));
|
||||
_28.Store(72, asuint(_265[2].x));
|
||||
_28.Store(76, asuint(_265[3].x));
|
||||
_28.Store(80, asuint(_265[0].y));
|
||||
_28.Store(84, asuint(_265[1].y));
|
||||
_28.Store(88, asuint(_265[2].y));
|
||||
_28.Store(92, asuint(_265[3].y));
|
||||
_28.Store(96, asuint(_265[0].z));
|
||||
_28.Store(100, asuint(_265[1].z));
|
||||
_28.Store(104, asuint(_265[2].z));
|
||||
_28.Store(108, asuint(_265[3].z));
|
||||
_28.Store(112, asuint(_265[0].w));
|
||||
_28.Store(116, asuint(_265[1].w));
|
||||
_28.Store(120, asuint(_265[2].w));
|
||||
_28.Store(124, asuint(_265[3].w));
|
||||
float2x2 _268 = asfloat(uint2x2(_28.Load2(128), _28.Load2(136)));
|
||||
_28.Store(144, asuint(_268[0].x));
|
||||
_28.Store(148, asuint(_268[1].x));
|
||||
_28.Store(152, asuint(_268[0].y));
|
||||
_28.Store(156, asuint(_268[1].y));
|
||||
float2x3 _271 = asfloat(uint2x3(_28.Load3(160), _28.Load3(176)));
|
||||
_28.Store(192, asuint(_271[0].x));
|
||||
_28.Store(196, asuint(_271[1].x));
|
||||
_28.Store(200, asuint(_271[0].y));
|
||||
_28.Store(204, asuint(_271[1].y));
|
||||
_28.Store(208, asuint(_271[0].z));
|
||||
_28.Store(212, asuint(_271[1].z));
|
||||
float3x2 _274 = asfloat(uint3x2(_28.Load2(216), _28.Load2(224), _28.Load2(232)));
|
||||
_28.Store(240, asuint(_274[0].x));
|
||||
_28.Store(244, asuint(_274[1].x));
|
||||
_28.Store(248, asuint(_274[2].x));
|
||||
_28.Store(256, asuint(_274[0].y));
|
||||
_28.Store(260, asuint(_274[1].y));
|
||||
_28.Store(264, asuint(_274[2].y));
|
||||
_28.Store(_68_index0 * 4 + _68_index1 * 16 + 64, asuint(1.0f));
|
||||
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 144, asuint(2.0f));
|
||||
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 192, asuint(3.0f));
|
||||
_28.Store(_68_index0 * 4 + _68_index1 * 16 + 240, asuint(4.0f));
|
||||
_28.Store(_68_index0 * 4 + 64, asuint(1.0f.x));
|
||||
_28.Store(_68_index0 * 4 + 80, asuint(1.0f.xxxx.y));
|
||||
_28.Store(_68_index0 * 4 + 96, asuint(1.0f.xxxx.z));
|
||||
_28.Store(_68_index0 * 4 + 112, asuint(1.0f.xxxx.w));
|
||||
_28.Store(_68_index0 * 4 + 144, asuint(2.0f.x));
|
||||
_28.Store(_68_index0 * 4 + 152, asuint(2.0f.xx.y));
|
||||
_28.Store(_68_index0 * 4 + 192, asuint(3.0f.x));
|
||||
_28.Store(_68_index0 * 4 + 200, asuint(3.0f.xxx.y));
|
||||
_28.Store(_68_index0 * 4 + 208, asuint(3.0f.xxx.z));
|
||||
_28.Store(_68_index0 * 4 + 240, asuint(4.0f.x));
|
||||
_28.Store(_68_index0 * 4 + 256, asuint(4.0f.xx.y));
|
||||
_28.Store(_68_index0 * 16 + _68_index1 * 4 + 0, asuint(1.0f));
|
||||
_28.Store(_68_index0 * 8 + _68_index1 * 4 + 128, asuint(2.0f));
|
||||
_28.Store(_68_index0 * 16 + _68_index1 * 4 + 160, asuint(3.0f));
|
||||
_28.Store(_68_index0 * 8 + _68_index1 * 4 + 216, asuint(4.0f));
|
||||
_28.Store4(_68_index0 * 16 + 0, asuint(1.0f.xxxx));
|
||||
_28.Store2(_68_index0 * 8 + 128, asuint(2.0f.xx));
|
||||
_28.Store3(_68_index0 * 16 + 160, asuint(3.0f.xxx));
|
||||
_28.Store2(_68_index0 * 8 + 216, asuint(4.0f.xx));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
ByteAddressBuffer _22 : register(t0);
|
||||
RWByteAddressBuffer _44 : register(u1);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
static uint gl_LocalInvocationIndex;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
|
||||
uint gl_LocalInvocationIndex : SV_GroupIndex;
|
||||
};
|
||||
|
||||
groupshared float sShared[4];
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
sShared[gl_LocalInvocationIndex] = asfloat(_22.Load(gl_GlobalInvocationID.x * 4 + 0));
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
_44.Store(gl_GlobalInvocationID.x * 4 + 0, asuint(sShared[(4u - gl_LocalInvocationIndex) - 1u]));
|
||||
}
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
|
||||
gl_LocalInvocationIndex = stage_input.gl_LocalInvocationIndex;
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
void comp_main()
|
||||
{
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
Texture2D<float4> uTex : register(t0);
|
||||
SamplerState _uTex_sampler : register(s0);
|
||||
|
||||
static float4 FragColor;
|
||||
static float4 vColor;
|
||||
static float2 vTex;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vColor : TEXCOORD0;
|
||||
float2 vTex : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = vColor * uTex.Sample(_uTex_sampler, vTex);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vColor = stage_input.vColor;
|
||||
vTex = stage_input.vTex;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
static float2 value;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float2 value : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float4(1.0f, 0.0f, asfloat(asint(value.x)), 1.0f);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
value = stage_input.value;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
static float2 FragColor;
|
||||
static float2 x0;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float2 x0 : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float2 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
bool2 _27 = (x0.x > x0.y).xx;
|
||||
FragColor = float2(_27.x ? float2(1.0f, 0.0f).x : float2(0.0f, 1.0f).x, _27.y ? float2(1.0f, 0.0f).y : float2(0.0f, 1.0f).y);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
x0 = stage_input.x0;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
static float4 gl_FragCoord;
|
||||
static float gl_FragDepth;
|
||||
static float4 FragColor;
|
||||
static float4 vColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vColor : TEXCOORD0;
|
||||
float4 gl_FragCoord : SV_Position;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
float gl_FragDepth : SV_Depth;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = gl_FragCoord + vColor;
|
||||
gl_FragDepth = 0.5f;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_FragCoord = stage_input.gl_FragCoord;
|
||||
vColor = stage_input.vColor;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_FragDepth = gl_FragDepth;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
static float2 value;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float2 value : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
bool2 _25 = bool2(value.x == 0.0f, value.y == 0.0f);
|
||||
FragColor = float4(1.0f, 0.0f, float(bool2(!_25.x, !_25.y).x), float(bool2(value.x <= float2(1.5f, 0.5f).x, value.y <= float2(1.5f, 0.5f).y).x));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
value = stage_input.value;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
Texture2D<float4> uSampler : register(t0);
|
||||
SamplerState _uSampler_sampler : register(s0);
|
||||
Texture2D<float4> uSamplerShadow : register(t1);
|
||||
SamplerComparisonState _uSamplerShadow_sampler : register(s1);
|
||||
|
||||
static float FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (uSampler.Sample(_uSampler_sampler, 1.0f.xx) + uSampler.Load(int3(int2(10, 10), 0))).x + uSamplerShadow.SampleCmp(_uSamplerShadow_sampler, 1.0f.xxx.xy, 1.0f);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
Texture2D<float4> uDepth : register(t2);
|
||||
SamplerComparisonState uSampler : register(s0);
|
||||
SamplerState uSampler1 : register(s1);
|
||||
|
||||
static float FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = uDepth.SampleCmp(uSampler, 1.0f.xxx.xy, 1.0f) + uDepth.Sample(uSampler1, 1.0f.xx).x;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
struct CBO_1
|
||||
{
|
||||
float4 a;
|
||||
float4 b;
|
||||
float4 c;
|
||||
float4 d;
|
||||
};
|
||||
|
||||
ConstantBuffer<CBO_1> cbo[2][4] : register(b4, space0);
|
||||
cbuffer push
|
||||
{
|
||||
float4 push_a : packoffset(c0);
|
||||
float4 push_b : packoffset(c1);
|
||||
float4 push_c : packoffset(c2);
|
||||
float4 push_d : packoffset(c3);
|
||||
};
|
||||
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = cbo[1][2].a;
|
||||
FragColor += cbo[1][2].b;
|
||||
FragColor += cbo[1][2].c;
|
||||
FragColor += cbo[1][2].d;
|
||||
FragColor += push_a;
|
||||
FragColor += push_b;
|
||||
FragColor += push_c;
|
||||
FragColor += push_d;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
struct Foo
|
||||
{
|
||||
float a;
|
||||
float b;
|
||||
};
|
||||
|
||||
static const float _16[4] = { 1.0f, 4.0f, 3.0f, 2.0f };
|
||||
static const Foo _24 = { 10.0f, 20.0f };
|
||||
static const Foo _27 = { 30.0f, 40.0f };
|
||||
static const Foo _28[2] = { { 10.0f, 20.0f }, { 30.0f, 40.0f } };
|
||||
|
||||
static float4 FragColor;
|
||||
static int _line;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation int _line : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
static float lut[4];
|
||||
static Foo foos[2];
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
lut = _16;
|
||||
foos = _28;
|
||||
FragColor = lut[_line].xxxx;
|
||||
FragColor += (foos[_line].a * (foos[1 - _line].a)).xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
_line = stage_input._line;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
void frag_main()
|
||||
{
|
||||
}
|
||||
|
||||
[earlydepthstencil]
|
||||
void main()
|
||||
{
|
||||
frag_main();
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
static float2 FP32Out;
|
||||
static uint FP16;
|
||||
static uint FP16Out;
|
||||
static float2 FP32;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation uint FP16 : TEXCOORD0;
|
||||
nointerpolation float2 FP32 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float2 FP32Out : SV_Target0;
|
||||
uint FP16Out : SV_Target1;
|
||||
};
|
||||
|
||||
uint SPIRV_Cross_packHalf2x16(float2 value)
|
||||
{
|
||||
uint2 Packed = f32tof16(value);
|
||||
return Packed.x | (Packed.y << 16);
|
||||
}
|
||||
|
||||
float2 SPIRV_Cross_unpackHalf2x16(uint value)
|
||||
{
|
||||
return f16tof32(uint2(value & 0xffff, value >> 16));
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FP32Out = SPIRV_Cross_unpackHalf2x16(FP16);
|
||||
FP16Out = SPIRV_Cross_packHalf2x16(FP32);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
FP16 = stage_input.FP16;
|
||||
FP32 = stage_input.FP32;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FP32Out = FP32Out;
|
||||
stage_output.FP16Out = FP16Out;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
Texture1D<uint4> uSampler1DUint : register(t0);
|
||||
SamplerState _uSampler1DUint_sampler : register(s0);
|
||||
Texture1D<int4> uSampler1DInt : register(t0);
|
||||
SamplerState _uSampler1DInt_sampler : register(s0);
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<int4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(Level, ret.x, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<uint4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(Level, ret.x, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
uint _17_dummy_parameter;
|
||||
uint _24_dummy_parameter;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
frag_main();
|
||||
}
|
||||
Loaded 100 of 1708 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user