mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 08:10:30 -10:00
Compare commits
1690
Commits
v1.7.2
...
qt_labeledit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd2e73d664 | ||
|
|
132faf3bf2 | ||
|
|
2ff8bdc14a | ||
|
|
e9a25e3022 | ||
|
|
fa30f49e16 | ||
|
|
9a6a797f90 | ||
|
|
448520ead2 | ||
|
|
4ab61c3f7d | ||
|
|
63f5281b67 | ||
|
|
74350ee184 | ||
|
|
0d7a169ea0 | ||
|
|
ef9258449c | ||
|
|
eb9e8c97d6 | ||
|
|
6d0409b6bd | ||
|
|
2d8eb9322a | ||
|
|
3aec8abca9 | ||
|
|
c40700e51b | ||
|
|
3c8ee6f26a | ||
|
|
4f85ca5f9a | ||
|
|
0fe713eb5f | ||
|
|
8c10abf8bb | ||
|
|
2dcc6ae046 | ||
|
|
2c959d8ff1 | ||
|
|
5fbf841fb2 | ||
|
|
9c88c6e3c5 | ||
|
|
04211662cf | ||
|
|
cb7d15bc2b | ||
|
|
b5c6586b12 | ||
|
|
369f8206d1 | ||
|
|
5d4a8f4497 | ||
|
|
71e8f00b27 | ||
|
|
07fd28b351 | ||
|
|
92b6854315 | ||
|
|
ac81ef680d | ||
|
|
004a2e335f | ||
|
|
60437f07fd | ||
|
|
394136f368 | ||
|
|
f24715ac1e | ||
|
|
efa62af78b | ||
|
|
1c85058e72 | ||
|
|
16bd85b118 | ||
|
|
9d490ace3b | ||
|
|
49214de125 | ||
|
|
50398c2a35 | ||
|
|
055eff653a | ||
|
|
13223c2225 | ||
|
|
f21493947d | ||
|
|
2fc08ce394 | ||
|
|
6ff2c96d03 | ||
|
|
db43033f9a | ||
|
|
c614cb05ec | ||
|
|
ea066625ba | ||
|
|
13c22c47b9 | ||
|
|
abd86058c6 | ||
|
|
8ed254f0c0 | ||
|
|
7072bbb829 | ||
|
|
fa76a3cb60 | ||
|
|
bde5905eba | ||
|
|
7bd705983e | ||
|
|
ec5d046f4c | ||
|
|
eac56c4382 | ||
|
|
19329fe7c7 | ||
|
|
09d27fc591 | ||
|
|
73e01b64ba | ||
|
|
3d611a2673 | ||
|
|
df5476f0c0 | ||
|
|
77923df4c1 | ||
|
|
0ff014c1ac | ||
|
|
3a6e410833 | ||
|
|
e567b3847c | ||
|
|
424d169cd9 | ||
|
|
7ed367c49b | ||
|
|
d41f41c5d0 | ||
|
|
e37bd41e86 | ||
|
|
899e35451a | ||
|
|
64edf5f879 | ||
|
|
3566171ea1 | ||
|
|
932b4c5ce1 | ||
|
|
2ff87fd663 | ||
|
|
7428fef4bc | ||
|
|
0158bbe4aa | ||
|
|
8f9dc13aa7 | ||
|
|
19b4ef3b2c | ||
|
|
cc8b458ee3 | ||
|
|
517b1b9089 | ||
|
|
6139f8846a | ||
|
|
213a56c59f | ||
|
|
677cb30982 | ||
|
|
fed74b9e70 | ||
|
|
4d0729187f | ||
|
|
2a7a2e7dee | ||
|
|
9cbd7ec6f3 | ||
|
|
bf75e6b9d7 | ||
|
|
9017e209e8 | ||
|
|
d52f5cc0d4 | ||
|
|
650c173125 | ||
|
|
3c160a6eb4 | ||
|
|
3f8e3547f4 | ||
|
|
58472cb696 | ||
|
|
914df58d2e | ||
|
|
98b20d4e5d | ||
|
|
9bf2fb8f79 | ||
|
|
3c0eadbdf2 | ||
|
|
b771a3e0f5 | ||
|
|
4738ef545c | ||
|
|
d8796732aa | ||
|
|
5d8c268afc | ||
|
|
c876342057 | ||
|
|
91b945e529 | ||
|
|
f96db78b3d | ||
|
|
83c3bd31c6 | ||
|
|
21684a80ad | ||
|
|
a0d87dd68d | ||
|
|
3a6290887a | ||
|
|
ae3a53185b | ||
|
|
7a76c6a4da | ||
|
|
90580d2ae1 | ||
|
|
f576266ace | ||
|
|
e403b8fb1e | ||
|
|
7e4d0b3b41 | ||
|
|
a1989afba9 | ||
|
|
d32993411e | ||
|
|
4328c075e8 | ||
|
|
c1e6de96a6 | ||
|
|
6c2d11b414 | ||
|
|
d4e43b15c1 | ||
|
|
7c05922d36 | ||
|
|
340515a9fa | ||
|
|
522d30d52d | ||
|
|
d8c36e5bb8 | ||
|
|
7e7f95f2fe | ||
|
|
30d7ef898d | ||
|
|
adb0542748 | ||
|
|
d8b4d1fdff | ||
|
|
ab384b8afb | ||
|
|
523ee65125 | ||
|
|
3a0c450e70 | ||
|
|
d96117533c | ||
|
|
0576c516c4 | ||
|
|
99debae18e | ||
|
|
1b4439413c | ||
|
|
557fe10bac | ||
|
|
cf4fff8d31 | ||
|
|
751ad68c50 | ||
|
|
9344391bfa | ||
|
|
bfdb75a30e | ||
|
|
4750342b33 | ||
|
|
5632ac9f72 | ||
|
|
5c6fc6db7e | ||
|
|
12e2fe9ca0 | ||
|
|
952b46f2c1 | ||
|
|
719cb86bc0 | ||
|
|
6ea292f2f5 | ||
|
|
18e249e85e | ||
|
|
d338dac277 | ||
|
|
d39f66a738 | ||
|
|
157d1e7e63 | ||
|
|
66c4f8fd35 | ||
|
|
9ebac87638 | ||
|
|
af534f0fa8 | ||
|
|
1155e11cfc | ||
|
|
1de3aaadeb | ||
|
|
61d56e07fa | ||
|
|
fb4f8ff550 | ||
|
|
4d7fe0e96c | ||
|
|
df059c585f | ||
|
|
7c2da36af9 | ||
|
|
27edbb58e3 | ||
|
|
b4081d9347 | ||
|
|
3e27a504ed | ||
|
|
428f895b6f | ||
|
|
c60fdf0b2e | ||
|
|
5d529f4ce4 | ||
|
|
a48cc2f9b5 | ||
|
|
c64a75c58a | ||
|
|
9da261c6d9 | ||
|
|
9214f6079f | ||
|
|
511dcb0d56 | ||
|
|
b2c704862a | ||
|
|
c57e259fa7 | ||
|
|
4409c61730 | ||
|
|
e224d1cd04 | ||
|
|
96d27b6ac6 | ||
|
|
9c53dc3797 | ||
|
|
99f497de85 | ||
|
|
9d22aacaa7 | ||
|
|
c41f331e2a | ||
|
|
8a63ace201 | ||
|
|
6463f7005b | ||
|
|
f1ad1ff444 | ||
|
|
611e484633 | ||
|
|
4d12eaf685 | ||
|
|
b592f254b9 | ||
|
|
d4cb24f8d1 | ||
|
|
a86454d30c | ||
|
|
eadc3f4a91 | ||
|
|
6b7572d166 | ||
|
|
4f4b1c182f | ||
|
|
1d7dfc5f47 | ||
|
|
802697fdec | ||
|
|
577d81071e | ||
|
|
1264e9c533 | ||
|
|
93b79fac90 | ||
|
|
4457bad631 | ||
|
|
c723f13753 | ||
|
|
4e0c2314d9 | ||
|
|
34e295ec51 | ||
|
|
2fb8831dcc | ||
|
|
31df00d52a | ||
|
|
fb047e4622 | ||
|
|
18203f4d30 | ||
|
|
6d29cde453 | ||
|
|
e83504002d | ||
|
|
93af9baf48 | ||
|
|
23eb1e981a | ||
|
|
d5fa379aa8 | ||
|
|
1ad6291c79 | ||
|
|
dd9db41403 | ||
|
|
09284dc6ce | ||
|
|
64459bda3a | ||
|
|
64cc28a487 | ||
|
|
c0c88173a0 | ||
|
|
65535a1259 | ||
|
|
10f374182f | ||
|
|
245f265098 | ||
|
|
85f093e042 | ||
|
|
8c3479f850 | ||
|
|
ad15f76ff5 | ||
|
|
bd43682341 | ||
|
|
832bf6d6e8 | ||
|
|
a58511ec00 | ||
|
|
70f9abe99f | ||
|
|
0b069c4ee3 | ||
|
|
1265d7546c | ||
|
|
c7af7ae00d | ||
|
|
91145e02c6 | ||
|
|
e2a650cb26 | ||
|
|
4a30ec5623 | ||
|
|
b86164cccb | ||
|
|
230787808c | ||
|
|
faaf84aef3 | ||
|
|
41f7de72cd | ||
|
|
30fb23ccbe | ||
|
|
c7e6eda438 | ||
|
|
7c22f265b8 | ||
|
|
02e23be127 | ||
|
|
75abd1f36e | ||
|
|
f16ec700a9 | ||
|
|
7f7f23d08b | ||
|
|
b8ab6c1e74 | ||
|
|
ab34a70873 | ||
|
|
f35b578c42 | ||
|
|
1222192afb | ||
|
|
d7899c51aa | ||
|
|
5af0e58288 | ||
|
|
dac4034954 | ||
|
|
b1643f9275 | ||
|
|
2e8361970b | ||
|
|
9d43f7f036 | ||
|
|
a157f2eedd | ||
|
|
5a0017a23e | ||
|
|
56c9a37e5a | ||
|
|
95ad8798ee | ||
|
|
c746115bbd | ||
|
|
7234544669 | ||
|
|
107cc364b5 | ||
|
|
945f57e3b4 | ||
|
|
2d9f00f358 | ||
|
|
d160775263 | ||
|
|
8f043d717c | ||
|
|
613ff650d0 | ||
|
|
3010ef8775 | ||
|
|
44eb97206a | ||
|
|
96e14c0b61 | ||
|
|
d8913d5d3a | ||
|
|
0c6eea5030 | ||
|
|
38f3d06d08 | ||
|
|
0116f675b9 | ||
|
|
fa110c5bb2 | ||
|
|
23836bfba9 | ||
|
|
ea87bb5a1d | ||
|
|
8a5d092e5b | ||
|
|
6d1e04dd9c | ||
|
|
aa0889ec29 | ||
|
|
503b42d161 | ||
|
|
d2d9989ef1 | ||
|
|
21f99b9965 | ||
|
|
98fadf9b1f | ||
|
|
4a951cb369 | ||
|
|
461dbf39ba | ||
|
|
32345e37f8 | ||
|
|
9638005332 | ||
|
|
12f1d003bb | ||
|
|
1d6a69d198 | ||
|
|
49e5fcd0cc | ||
|
|
7731db9ed8 | ||
|
|
78f5aba04b | ||
|
|
821462409e | ||
|
|
adb72755e1 | ||
|
|
6093a56919 | ||
|
|
8c7526d8ef | ||
|
|
3d056bc8c4 | ||
|
|
3c6e42ccf6 | ||
|
|
e9e424ec82 | ||
|
|
260ce526c2 | ||
|
|
a6d5931412 | ||
|
|
07509a8ec8 | ||
|
|
d8ea30881d | ||
|
|
8dfeaba30b | ||
|
|
b095511e97 | ||
|
|
c39ce0e04b | ||
|
|
f357526a57 | ||
|
|
6e9a8a9dd9 | ||
|
|
49b785b9dc | ||
|
|
6464003d5f | ||
|
|
ea35fe85f6 | ||
|
|
27147226a0 | ||
|
|
88cecc521a | ||
|
|
da3888dd68 | ||
|
|
fb15edebc3 | ||
|
|
376dd85715 | ||
|
|
947113d007 | ||
|
|
c93cf0f362 | ||
|
|
b118e45d49 | ||
|
|
8ff257290c | ||
|
|
67653ba5f0 | ||
|
|
0b9adb3938 | ||
|
|
498ed160bb | ||
|
|
0300e8a544 | ||
|
|
9740ede4da | ||
|
|
96023ea469 | ||
|
|
5bda0b3a61 | ||
|
|
dfe0a81206 | ||
|
|
fad5569d99 | ||
|
|
052424ffd2 | ||
|
|
8e76145278 | ||
|
|
06daa1f9ef | ||
|
|
94ec9233f6 | ||
|
|
8984162e0f | ||
|
|
1c8f2beca3 | ||
|
|
45bcd62f34 | ||
|
|
cc16c45069 | ||
|
|
f6a0b09e7d | ||
|
|
281966a14c | ||
|
|
c276f9349a | ||
|
|
6a4584e301 | ||
|
|
ff09503ac1 | ||
|
|
4d09ddde1c | ||
|
|
e9c68597ff | ||
|
|
ea561c8dfe | ||
|
|
f507905345 | ||
|
|
bb451d59e8 | ||
|
|
0ed43eb908 | ||
|
|
44180e55b1 | ||
|
|
7568d35086 | ||
|
|
3ad54bc9ca | ||
|
|
8380ad61f9 | ||
|
|
b60df44b59 | ||
|
|
d9f7afbf77 | ||
|
|
5ba4103f6e | ||
|
|
d571bfaf17 | ||
|
|
f6dc3345e9 | ||
|
|
821ffc9962 | ||
|
|
b0f21e7c2e | ||
|
|
9e9fb5803e | ||
|
|
c051bae1bd | ||
|
|
e6576c8239 | ||
|
|
a309400305 | ||
|
|
e35623d492 | ||
|
|
b1dde87ce5 | ||
|
|
b0146abd11 | ||
|
|
7755c9ae55 | ||
|
|
cdbe19e213 | ||
|
|
e0d99d7da2 | ||
|
|
c00fd41b93 | ||
|
|
380cd7ac53 | ||
|
|
70d0458180 | ||
|
|
ea946b5c97 | ||
|
|
b915fd095d | ||
|
|
d2e4832ebe | ||
|
|
105fba6abe | ||
|
|
f01894ebe4 | ||
|
|
894d460821 | ||
|
|
0a9891def1 | ||
|
|
e78f2f63f7 | ||
|
|
e4834250b9 | ||
|
|
90efa02718 | ||
|
|
f07b8b1965 | ||
|
|
646e64c28c | ||
|
|
0e34c12d5c | ||
|
|
ea6541b90f | ||
|
|
fd7d8d9424 | ||
|
|
a0cf6b6b5e | ||
|
|
849792dc2c | ||
|
|
dfd85125ad | ||
|
|
c59cbfc4e8 | ||
|
|
077ef86bab | ||
|
|
2f87f669f1 | ||
|
|
23d7fbcaf3 | ||
|
|
fbe08aa0c5 | ||
|
|
1d4cb967f0 | ||
|
|
16459bfa91 | ||
|
|
b76f3abfbc | ||
|
|
819e930b89 | ||
|
|
566d0fc0d9 | ||
|
|
ae0d9fd60d | ||
|
|
1fba7df859 | ||
|
|
7250181319 | ||
|
|
e2ff7478ca | ||
|
|
f130b261f4 | ||
|
|
1966b04832 | ||
|
|
648705154e | ||
|
|
6ef3567ea5 | ||
|
|
cfd15687d1 | ||
|
|
f9e8737476 | ||
|
|
35991f5feb | ||
|
|
b28af7734f | ||
|
|
4a54826d9b | ||
|
|
a1d5b0fd03 | ||
|
|
12539f310d | ||
|
|
d3c6fc1601 | ||
|
|
9221e4e845 | ||
|
|
220c84c7a3 | ||
|
|
6cd6bf993f | ||
|
|
0175effb00 | ||
|
|
f8521a5580 | ||
|
|
34e48bcbc9 | ||
|
|
e43462cc3e | ||
|
|
18a6467d4f | ||
|
|
f37898dd01 | ||
|
|
f750229693 | ||
|
|
6001c7f030 | ||
|
|
c699889f0c | ||
|
|
145d4d66f5 | ||
|
|
d2de72bfb7 | ||
|
|
a8826c766b | ||
|
|
fd532414f0 | ||
|
|
3f4cd71aa3 | ||
|
|
de8c98fdef | ||
|
|
3fb039f9f0 | ||
|
|
ba67623961 | ||
|
|
75a388cd67 | ||
|
|
c12baad087 | ||
|
|
6266065384 | ||
|
|
e2e43e6ade | ||
|
|
c74c3c9536 | ||
|
|
c663b0f87b | ||
|
|
921e52e64f | ||
|
|
9f60a6d17c | ||
|
|
32d1769968 | ||
|
|
eee287074c | ||
|
|
4d96fddf5e | ||
|
|
1b544d6879 | ||
|
|
c540d83850 | ||
|
|
f53349e3dd | ||
|
|
2d7cb40537 | ||
|
|
010412c895 | ||
|
|
bf9a8ac4a0 | ||
|
|
341cf63399 | ||
|
|
553394c266 | ||
|
|
560149857b | ||
|
|
4a86d29810 | ||
|
|
6de4384350 | ||
|
|
572c1ea2d3 | ||
|
|
4a9ef99759 | ||
|
|
135000a5f3 | ||
|
|
977eac2601 | ||
|
|
801bae65e3 | ||
|
|
4fc0d4a194 | ||
|
|
5ebe5de1b9 | ||
|
|
00c6fcde84 | ||
|
|
a6941fb4ed | ||
|
|
48956f3fe4 | ||
|
|
16ab69285b | ||
|
|
6a64e27e3d | ||
|
|
db9f4697f6 | ||
|
|
8c084c70b7 | ||
|
|
b35914fcc0 | ||
|
|
1b542a157d | ||
|
|
e52f90926d | ||
|
|
ae562614c4 | ||
|
|
66367d41a3 | ||
|
|
6e64a39044 | ||
|
|
8bbc0cb115 | ||
|
|
b93974faea | ||
|
|
f657391b2a | ||
|
|
116390b3e8 | ||
|
|
02eb650273 | ||
|
|
0c658debbf | ||
|
|
f37ffb7a65 | ||
|
|
be4f592e9e | ||
|
|
356c829f81 | ||
|
|
6b4cfdc043 | ||
|
|
5fd0664277 | ||
|
|
73f271021a | ||
|
|
a36442d72d | ||
|
|
7b24f884d6 | ||
|
|
23fe638add | ||
|
|
07b4aed245 | ||
|
|
325d30f062 | ||
|
|
3d9e7f2c60 | ||
|
|
d352de8133 | ||
|
|
376608aea0 | ||
|
|
177642ac2f | ||
|
|
e91c18f556 | ||
|
|
2cfae2a6e7 | ||
|
|
91a5b09627 | ||
|
|
8d5f2ad1de | ||
|
|
51f968c557 | ||
|
|
fe6dda917a | ||
|
|
45799ee034 | ||
|
|
e235a0991c | ||
|
|
a8dc7209b7 | ||
|
|
1af96360a5 | ||
|
|
ca769b0006 | ||
|
|
599fd8abe0 | ||
|
|
e48b9011bf | ||
|
|
50b23d6572 | ||
|
|
2a68b6e691 | ||
|
|
e74e306947 | ||
|
|
fc176c1fa6 | ||
|
|
27c2c6c6d7 | ||
|
|
a3847ed656 | ||
|
|
c59b054ef2 | ||
|
|
f14ae31e93 | ||
|
|
1becd89699 | ||
|
|
e6e35805a6 | ||
|
|
499fdc7e22 | ||
|
|
80227bfcdb | ||
|
|
b48321737d | ||
|
|
b648d70f27 | ||
|
|
59b620a1a6 | ||
|
|
2c9fda1798 | ||
|
|
137a39c705 | ||
|
|
7fdc516d8d | ||
|
|
653bcba2e0 | ||
|
|
f52708e205 | ||
|
|
c563eedb32 | ||
|
|
1bda6ba204 | ||
|
|
0fb7d6a9e4 | ||
|
|
9403489f2e | ||
|
|
79f87cbaee | ||
|
|
6155772c5e | ||
|
|
f523fec4d2 | ||
|
|
2bf3ec2000 | ||
|
|
d4ab18c188 | ||
|
|
4baecf84ca | ||
|
|
a1b831abdb | ||
|
|
00f252ad2d | ||
|
|
68f5c907fe | ||
|
|
5a727ce522 | ||
|
|
046ce64250 | ||
|
|
c19e26ebf6 | ||
|
|
dcc642876a | ||
|
|
d9f4675a51 | ||
|
|
54074f5c53 | ||
|
|
3f959637f2 | ||
|
|
ae69bf9d7b | ||
|
|
dae393d519 | ||
|
|
605565e87e | ||
|
|
bd4d462170 | ||
|
|
a1e338827c | ||
|
|
d2613d6e89 | ||
|
|
3019748b17 | ||
|
|
ad87ec871d | ||
|
|
5b3b3b4a89 | ||
|
|
01103dcd23 | ||
|
|
564c7805b0 | ||
|
|
c71b4ccca3 | ||
|
|
7b147a40ae | ||
|
|
b0e8775b55 | ||
|
|
0f634d563b | ||
|
|
2fb5d54130 | ||
|
|
93aed2bc87 | ||
|
|
2f1dd78a77 | ||
|
|
00ff8b59aa | ||
|
|
deff1de2b7 | ||
|
|
a82ea4dcc8 | ||
|
|
ce20a9acdf | ||
|
|
8fe519365c | ||
|
|
75d161e0bd | ||
|
|
5773f7071d | ||
|
|
421e6fe0f7 | ||
|
|
e5bc567765 | ||
|
|
36d16a9c94 | ||
|
|
43492c5fbd | ||
|
|
af4438406d | ||
|
|
b606572bce | ||
|
|
03854a0da1 | ||
|
|
c1bba50567 | ||
|
|
3bba9aeeaf | ||
|
|
5b9115c848 | ||
|
|
aec7ed40da | ||
|
|
bdf5efd4ab | ||
|
|
b60e35ce48 | ||
|
|
ea05b0f3cb | ||
|
|
d5ae00f3d8 | ||
|
|
e63edfa6d2 | ||
|
|
e1b2d752ab | ||
|
|
3e330bed7c | ||
|
|
1ceac715b3 | ||
|
|
50381a0463 | ||
|
|
b5d5fb4940 | ||
|
|
20a66e468e | ||
|
|
5273aa2861 | ||
|
|
157fbe07b6 | ||
|
|
ba8ceb8f84 | ||
|
|
c2825cb7c5 | ||
|
|
558a732330 | ||
|
|
0d157bc09f | ||
|
|
3d862bbdb4 | ||
|
|
565e916ef9 | ||
|
|
58dd8a1917 | ||
|
|
7426701b2f | ||
|
|
2516b7ad1e | ||
|
|
7131b969d8 | ||
|
|
9b79d150b4 | ||
|
|
77095247cc | ||
|
|
7ea94f57f6 | ||
|
|
0442aa5a31 | ||
|
|
18646e3af0 | ||
|
|
011cb61782 | ||
|
|
ef43e171ce | ||
|
|
2faa250174 | ||
|
|
fea09f7382 | ||
|
|
978edc7acf | ||
|
|
e579842620 | ||
|
|
3c0a8c0c10 | ||
|
|
d08f0f1234 | ||
|
|
89083fd093 | ||
|
|
367d6e7480 | ||
|
|
7c06e6f620 | ||
|
|
fb3b5df350 | ||
|
|
8835e2d9a2 | ||
|
|
c883a81c42 | ||
|
|
963e19b42b | ||
|
|
489601fadb | ||
|
|
45d38dcccf | ||
|
|
20335cd2b9 | ||
|
|
d802a7eaab | ||
|
|
0f63d1f851 | ||
|
|
fcdeebe672 | ||
|
|
c750235414 | ||
|
|
be952a9d14 | ||
|
|
e9c4192e9b | ||
|
|
0e86c664ce | ||
|
|
4b712fa750 | ||
|
|
5f35249216 | ||
|
|
665628e6c0 | ||
|
|
065318eb39 | ||
|
|
d6b273f60e | ||
|
|
5ff77d1833 | ||
|
|
f0b0be898a | ||
|
|
d17c17085c | ||
|
|
c7052f67df | ||
|
|
baa709632d | ||
|
|
b4cae22396 | ||
|
|
ab03c1818a | ||
|
|
8535fe11da | ||
|
|
ccb87f3a96 | ||
|
|
70a24ae421 | ||
|
|
ef10b7897d | ||
|
|
6150bd9772 | ||
|
|
3aac9a1693 | ||
|
|
6cee45ab99 | ||
|
|
a740d73d21 | ||
|
|
b52995dd30 | ||
|
|
c8a814ae40 | ||
|
|
48a722f4bc | ||
|
|
bbe1dcd48f | ||
|
|
1293447aab | ||
|
|
e5741eb9b2 | ||
|
|
f78337e02e | ||
|
|
75ce796c34 | ||
|
|
bea736865b | ||
|
|
0a710564e1 | ||
|
|
6ae4350883 | ||
|
|
454dbc6185 | ||
|
|
7403cfad99 | ||
|
|
c2d3727c09 | ||
|
|
aba179a910 | ||
|
|
9c0ed0f2c4 | ||
|
|
0addd1aca4 | ||
|
|
7e609d6a05 | ||
|
|
b878a94f76 | ||
|
|
62e89974af | ||
|
|
eb345019c2 | ||
|
|
5159f71cf5 | ||
|
|
ea09c29e04 | ||
|
|
9a1ac6d77b | ||
|
|
13431c7cbf | ||
|
|
98190294db | ||
|
|
d50850762b | ||
|
|
311b454a2c | ||
|
|
675b8bb9e2 | ||
|
|
a34e29c037 | ||
|
|
0291c41afa | ||
|
|
a68a22081c | ||
|
|
fa00eda625 | ||
|
|
d6c5c7f208 | ||
|
|
0df98a53a6 | ||
|
|
cc473a25b9 | ||
|
|
0d39701145 | ||
|
|
5ba2a621c0 | ||
|
|
600c2c1ca1 | ||
|
|
abc6eb7d8c | ||
|
|
4758caea74 | ||
|
|
52a55695ce | ||
|
|
76cbd54420 | ||
|
|
38a35e53fd | ||
|
|
308b053fee | ||
|
|
279c635b91 | ||
|
|
83da70586e | ||
|
|
367689a3f9 | ||
|
|
637ded4ef1 | ||
|
|
e160c70950 | ||
|
|
7dcc99980a | ||
|
|
11244d78b0 | ||
|
|
06318e3dd9 | ||
|
|
13a9aca88a | ||
|
|
36494d622a | ||
|
|
167ad3b57d | ||
|
|
dbfccb25dd | ||
|
|
42c4e8c687 | ||
|
|
dc807f25cf | ||
|
|
f8ea5cfd8d | ||
|
|
7e1074c40a | ||
|
|
44859fc06e | ||
|
|
ab27b7c85f | ||
|
|
6b5ade4ac3 | ||
|
|
fab08c9cfb | ||
|
|
60d7d1c793 | ||
|
|
140e657d51 | ||
|
|
7f7493d751 | ||
|
|
14e79e0a43 | ||
|
|
8a683c1626 | ||
|
|
c81aab345c | ||
|
|
7adce0050e | ||
|
|
cb137954f9 | ||
|
|
dc55bd13aa | ||
|
|
fd86140514 | ||
|
|
f25ef05d52 | ||
|
|
755a128d95 | ||
|
|
e4a8ef409a | ||
|
|
46d74971fd | ||
|
|
045606ce44 | ||
|
|
74eacd5a33 | ||
|
|
7fb147e8b3 | ||
|
|
40a1446c95 | ||
|
|
74e1f24e90 | ||
|
|
01df2c5e88 | ||
|
|
dc161a1cb3 | ||
|
|
0f39ef4247 | ||
|
|
e8fb22ba47 | ||
|
|
41ce61974d | ||
|
|
ceaa0259e5 | ||
|
|
c8366b0b0f | ||
|
|
22d6930488 | ||
|
|
974aa3c8ac | ||
|
|
838dcc8a5a | ||
|
|
544802e1a8 | ||
|
|
c3d469dd8e | ||
|
|
31e76458f7 | ||
|
|
aa9ebf5f29 | ||
|
|
c54532d77d | ||
|
|
d1712d7c5a | ||
|
|
a96b482d78 | ||
|
|
d8061ac0e9 | ||
|
|
95500f5631 | ||
|
|
155f797ccb | ||
|
|
2da12dca58 | ||
|
|
c7b21d5bd6 | ||
|
|
a19ea2ed07 | ||
|
|
4b6d6dd421 | ||
|
|
a0b1937584 | ||
|
|
7108628369 | ||
|
|
3deb56690a | ||
|
|
63a071b85a | ||
|
|
52cb0fe375 | ||
|
|
f1d2dac213 | ||
|
|
c8fc27099d | ||
|
|
048aa16599 | ||
|
|
2752651de9 | ||
|
|
844e5e15d0 | ||
|
|
c0dba89d43 | ||
|
|
5552838e34 | ||
|
|
06d8b1fbaa | ||
|
|
5575bdb449 | ||
|
|
17f0ef7dd8 | ||
|
|
8a298616aa | ||
|
|
5240efc857 | ||
|
|
30d2192338 | ||
|
|
905e9e83c0 | ||
|
|
44ca1062b0 | ||
|
|
a0900ec433 | ||
|
|
4a101734a1 | ||
|
|
1c5d94aca1 | ||
|
|
5e1f991e32 | ||
|
|
4135300b04 | ||
|
|
149f5b73a1 | ||
|
|
e0b71de5df | ||
|
|
7a001a07aa | ||
|
|
f8f620f268 | ||
|
|
04d5e6368e | ||
|
|
c4f34f3c6f | ||
|
|
30f97ebe52 | ||
|
|
4eb4c7b97d | ||
|
|
39a1e494c5 | ||
|
|
121ff2d4a5 | ||
|
|
9cdf477c59 | ||
|
|
f2cae17021 | ||
|
|
efe9fc7339 | ||
|
|
bf8e5c2e90 | ||
|
|
928cfacb11 | ||
|
|
ebabd9486b | ||
|
|
c4611f6379 | ||
|
|
c4ba8d26a0 | ||
|
|
a3ae537c02 | ||
|
|
5366fc1f29 | ||
|
|
717e45dc52 | ||
|
|
fef9b63bc0 | ||
|
|
91dd569a73 | ||
|
|
d73954085a | ||
|
|
70eda90d03 | ||
|
|
8a2b23de34 | ||
|
|
04311695aa | ||
|
|
15924e5d9b | ||
|
|
e786afe481 | ||
|
|
8a1c0be83c | ||
|
|
3bbf34aa58 | ||
|
|
0230c2f4d8 | ||
|
|
a078d40b80 | ||
|
|
f88f7419d7 | ||
|
|
893dbc6bee | ||
|
|
7bdf0fd9a6 | ||
|
|
3c6c9a8b08 | ||
|
|
2ef56e906c | ||
|
|
d967cbc879 | ||
|
|
0f4744bed7 | ||
|
|
8017f706d8 | ||
|
|
9d6de6b60d | ||
|
|
07d226a76d | ||
|
|
234102d475 | ||
|
|
e10d7d93df | ||
|
|
3bdc7ca352 | ||
|
|
e4fe33f437 | ||
|
|
8585617f69 | ||
|
|
8a96062ed0 | ||
|
|
da6b7987f1 | ||
|
|
1504a9ed2d | ||
|
|
367c15f488 | ||
|
|
e8e6f20f6c | ||
|
|
c10aab9830 | ||
|
|
eacd52f009 | ||
|
|
ee8d82dcfe | ||
|
|
536638eaf6 | ||
|
|
2a2e732a79 | ||
|
|
ab3d8979ea | ||
|
|
7566e09970 | ||
|
|
6868670136 | ||
|
|
1ff15fd071 | ||
|
|
bea3822331 | ||
|
|
cfa53dd694 | ||
|
|
e8b0d6974d | ||
|
|
48cb38619f | ||
|
|
e3d406808f | ||
|
|
8baffb3fdf | ||
|
|
3df1fd7993 | ||
|
|
ad593a1eae | ||
|
|
58351230d8 | ||
|
|
511044270b | ||
|
|
3799a33efa | ||
|
|
837cf84fc8 | ||
|
|
c0beef8365 | ||
|
|
863204b343 | ||
|
|
c68f2796b9 | ||
|
|
d14a3f0d1f | ||
|
|
5c25cc9076 | ||
|
|
0d8729daa6 | ||
|
|
944cac8352 | ||
|
|
697531dbdd | ||
|
|
3462fd248c | ||
|
|
b05026b69f | ||
|
|
fd11b205da | ||
|
|
2bdffff435 | ||
|
|
467aa30131 | ||
|
|
cede1e38f2 | ||
|
|
cd174c899a | ||
|
|
411bcf8bdd | ||
|
|
1a091a83af | ||
|
|
05464a469e | ||
|
|
b10f1faf7a | ||
|
|
8232265c8f | ||
|
|
fb2d27931d | ||
|
|
f8cad6f565 | ||
|
|
1f571be61d | ||
|
|
684b2f5722 | ||
|
|
abf7bf877e | ||
|
|
c15950a80c | ||
|
|
db3f820301 | ||
|
|
0328298474 | ||
|
|
4fb79dfffe | ||
|
|
e3d04fd14a | ||
|
|
cdbdd04cda | ||
|
|
e45692b70d | ||
|
|
2367c33887 | ||
|
|
d27b6265a0 | ||
|
|
0286829348 | ||
|
|
e51d8b6b0f | ||
|
|
f9f15dc5c5 | ||
|
|
dde650074a | ||
|
|
7385cc3d23 | ||
|
|
c7d565c6c2 | ||
|
|
c4da475384 | ||
|
|
76d540a075 | ||
|
|
aa083d1e4c | ||
|
|
981b0eec91 | ||
|
|
c1f16e156e | ||
|
|
48128a9b36 | ||
|
|
1feadee0cb | ||
|
|
707855beda | ||
|
|
8d99044fb4 | ||
|
|
612ed942d0 | ||
|
|
ca3b8149a8 | ||
|
|
798635bf8a | ||
|
|
54a95eed83 | ||
|
|
e39b92a1f0 | ||
|
|
7d3f62a816 | ||
|
|
a6b0dd9f57 | ||
|
|
e0405b2f5c | ||
|
|
49f3dacde5 | ||
|
|
76db13fda4 | ||
|
|
950525a370 | ||
|
|
fa1ec0780b | ||
|
|
3997b59cd6 | ||
|
|
22d30a0dbf | ||
|
|
7335db08dc | ||
|
|
ef1ec3131e | ||
|
|
6df3597f97 | ||
|
|
fde7796cb0 | ||
|
|
7176bb19ad | ||
|
|
b487c3cace | ||
|
|
cbc804783f | ||
|
|
9d0c0b77ee | ||
|
|
aa35b9da46 | ||
|
|
81e01da585 | ||
|
|
fd1c354811 | ||
|
|
a90008f7ed | ||
|
|
99b6757400 | ||
|
|
af02712712 | ||
|
|
19dd1c15eb | ||
|
|
ab9e00219d | ||
|
|
890c781a76 | ||
|
|
ce27e986e9 | ||
|
|
3f04c639b4 | ||
|
|
9ea16c0b3d | ||
|
|
8b87a53366 | ||
|
|
a4144dfe9b | ||
|
|
6ede99b47b | ||
|
|
9271a7505f | ||
|
|
ef8390dee1 | ||
|
|
a7a54800e8 | ||
|
|
0813de0392 | ||
|
|
16c797f057 | ||
|
|
6a9e73b7f2 | ||
|
|
d94f9bd921 | ||
|
|
75330a142d | ||
|
|
f22c337cfc | ||
|
|
21fd83f766 | ||
|
|
ec718c6f71 | ||
|
|
7bfe9e409a | ||
|
|
0ffe0f8513 | ||
|
|
5bc7acffd5 | ||
|
|
6040e1c0fc | ||
|
|
6ecf64d08f | ||
|
|
af357c1afe | ||
|
|
e4476ec61b | ||
|
|
861d87281e | ||
|
|
ab9a9e733e | ||
|
|
3f8235db28 | ||
|
|
430d674b4e | ||
|
|
adaac8a8cd | ||
|
|
c0da95559f | ||
|
|
ad79fbe4a9 | ||
|
|
49c08baaa7 | ||
|
|
97994b0684 | ||
|
|
1ef6b1d8e4 | ||
|
|
2c07561fc1 | ||
|
|
1404b63219 | ||
|
|
0045e1fff2 | ||
|
|
9cf843e349 | ||
|
|
a3a047b8ec | ||
|
|
b1ec722a75 | ||
|
|
65232d3ab4 | ||
|
|
34a75ba605 | ||
|
|
14c505117d | ||
|
|
ddbc0d53c0 | ||
|
|
81ce02cf74 | ||
|
|
6d81d31ef5 | ||
|
|
b5f6ae7931 | ||
|
|
406342479a | ||
|
|
1fb57857ea | ||
|
|
31e7894539 | ||
|
|
8ad1ddbac5 | ||
|
|
b4912a718f | ||
|
|
4a035f5b22 | ||
|
|
d488dfcafa | ||
|
|
e056cd8005 | ||
|
|
2848f1f2b1 | ||
|
|
00bb17588d | ||
|
|
6e7a18a598 | ||
|
|
f0082d710c | ||
|
|
0308191f88 | ||
|
|
b86df4ee09 | ||
|
|
d5c2bc90c1 | ||
|
|
8d886751b9 | ||
|
|
8c6bc4a678 | ||
|
|
b378566cb8 | ||
|
|
cdc2bdb327 | ||
|
|
adbc71ce46 | ||
|
|
e8b381680a | ||
|
|
becb6dee16 | ||
|
|
51f7746407 | ||
|
|
8cd8e7d3ae | ||
|
|
23b0444afe | ||
|
|
877766d0ae | ||
|
|
6ef5232f32 | ||
|
|
d00fe30f0e | ||
|
|
743ab2351c | ||
|
|
99c074e275 | ||
|
|
c2c5265916 | ||
|
|
3a96314bfd | ||
|
|
9af767163f | ||
|
|
488d142ebf | ||
|
|
7c50550fc3 | ||
|
|
06aab60307 | ||
|
|
05cf6fa114 | ||
|
|
b4996e6d41 | ||
|
|
31919e9a61 | ||
|
|
e6b2f5a734 | ||
|
|
a002297f37 | ||
|
|
f99540e9d0 | ||
|
|
9c03f99eb9 | ||
|
|
23ec5eed84 | ||
|
|
8a5dce2d25 | ||
|
|
a98ce80df0 | ||
|
|
0ecd571d0f | ||
|
|
e20e0b1cfd | ||
|
|
f9fb5ae659 | ||
|
|
25fbcb33e5 | ||
|
|
dd0ad28818 | ||
|
|
1b7fb1530a | ||
|
|
b2303b8ef4 | ||
|
|
a5b877b142 | ||
|
|
62bf39316f | ||
|
|
1530d6ce3e | ||
|
|
82a869b142 | ||
|
|
3c49c8c856 | ||
|
|
73287af8e4 | ||
|
|
6f1a80dafe | ||
|
|
430a79da5a | ||
|
|
056664ee7d | ||
|
|
5313aca11d | ||
|
|
0a45468af9 | ||
|
|
b2c767ee22 | ||
|
|
58e13ab6ca | ||
|
|
64c6f88512 | ||
|
|
dec45f0963 | ||
|
|
463348cb2e | ||
|
|
10ae93153a | ||
|
|
f3bad8b3e2 | ||
|
|
51b9b69828 | ||
|
|
f59913ab04 | ||
|
|
6c1e865d28 | ||
|
|
702dc1bb80 | ||
|
|
31c5cc9269 | ||
|
|
30a37af792 | ||
|
|
d42d9efd32 | ||
|
|
5b2ec62a41 | ||
|
|
496fbc1f50 | ||
|
|
c7c1983c91 | ||
|
|
eac9ce1818 | ||
|
|
9dea722c39 | ||
|
|
2bda59b8e4 | ||
|
|
6a291e0240 | ||
|
|
d604239f00 | ||
|
|
421c191049 | ||
|
|
3c1c6758c7 | ||
|
|
a36685d31f | ||
|
|
8014f10da4 | ||
|
|
ce79ff79d2 | ||
|
|
db184a470b | ||
|
|
c9de823e38 | ||
|
|
d457256bda | ||
|
|
48b9506299 | ||
|
|
076a8a6a97 | ||
|
|
5a84170efe | ||
|
|
c4a38f24d1 | ||
|
|
991882cbd6 | ||
|
|
8fadef7082 | ||
|
|
1d67334323 | ||
|
|
9adedbc01a | ||
|
|
eb27d014e8 | ||
|
|
f7b1007995 | ||
|
|
671be3c372 | ||
|
|
c412e2ec97 | ||
|
|
3b7a1a8a73 | ||
|
|
0df8ca030f | ||
|
|
c67dc034e9 | ||
|
|
34c5c84706 | ||
|
|
be9f643edb | ||
|
|
cabe5c6686 | ||
|
|
d946cf1ee5 | ||
|
|
2011453340 | ||
|
|
9d6777a87f | ||
|
|
6c392d3863 | ||
|
|
70074010e0 | ||
|
|
aec7ce3f4e | ||
|
|
ebc2cc6d5b | ||
|
|
cc1f503f57 | ||
|
|
9adc4d4a2f | ||
|
|
0de7e7bf46 | ||
|
|
bef7b481c6 | ||
|
|
5bb1b2ef7c | ||
|
|
da53ddc99b | ||
|
|
18b176c1ea | ||
|
|
3b7414bc4b | ||
|
|
d28aad6372 | ||
|
|
2a0fda0845 | ||
|
|
380308d7d0 | ||
|
|
fe1d3306af | ||
|
|
a9cede28b4 | ||
|
|
08425d978c | ||
|
|
c022190895 | ||
|
|
041d51b8d1 | ||
|
|
f8b7104ef2 | ||
|
|
a024da61f4 | ||
|
|
e01a028e24 | ||
|
|
e96463645d | ||
|
|
c46d84b799 | ||
|
|
6d2b5c8052 | ||
|
|
ad3cedfff1 | ||
|
|
ea5e4e9ae4 | ||
|
|
30b6366158 | ||
|
|
45f409b022 | ||
|
|
d369cde6c6 | ||
|
|
af2f679ff5 | ||
|
|
bc59b0345d | ||
|
|
517e42c9c7 | ||
|
|
8161add9e4 | ||
|
|
7afad7a84b | ||
|
|
fef586b887 | ||
|
|
8686c5e037 | ||
|
|
91fc81e76a | ||
|
|
62a2af1848 | ||
|
|
a999bff175 | ||
|
|
47551cec84 | ||
|
|
bc0185c313 | ||
|
|
1bd25a6f12 | ||
|
|
ce0d8bb5e0 | ||
|
|
8617690499 | ||
|
|
47f3855e1b | ||
|
|
4b5ea2877e | ||
|
|
efbfe85da4 | ||
|
|
3aba080434 | ||
|
|
1e44b4f9e7 | ||
|
|
dd3c9dd838 | ||
|
|
9e51d41fea | ||
|
|
756db4f264 | ||
|
|
052de6bcd2 | ||
|
|
2d540264e8 | ||
|
|
6afd100d2f | ||
|
|
52fcdd183a | ||
|
|
5cba3f0b25 | ||
|
|
9e63b108ae | ||
|
|
8361922034 | ||
|
|
c0cd08fa11 | ||
|
|
4e572d6f87 | ||
|
|
e1368a9209 | ||
|
|
39f45a17d2 | ||
|
|
c941b4e922 | ||
|
|
f37f8a1076 | ||
|
|
dc61c08006 | ||
|
|
15f2cde260 | ||
|
|
111aeb46b3 | ||
|
|
c1d949b017 | ||
|
|
8a607e72af | ||
|
|
e646366fd4 | ||
|
|
e8ae1e324f | ||
|
|
7a9bfa52b0 | ||
|
|
fd4aca1654 | ||
|
|
e9054159ec | ||
|
|
ecedf8b995 | ||
|
|
bf3122329b | ||
|
|
232d3f4d92 | ||
|
|
dad1e9e52a | ||
|
|
e5ec7d0fda | ||
|
|
f81ea09f20 | ||
|
|
0a0365e49a | ||
|
|
94955eb3b5 | ||
|
|
2c5112f3ac | ||
|
|
16c33b4f42 | ||
|
|
908d9b315b | ||
|
|
9b57b3658d | ||
|
|
c40c08375c | ||
|
|
cbe4c78979 | ||
|
|
606d700bf2 | ||
|
|
8733a41e58 | ||
|
|
6a9b39da3f | ||
|
|
5fe6c74b51 | ||
|
|
d1c1e4e2aa | ||
|
|
86c7e7c69f | ||
|
|
1de6bf550b | ||
|
|
8beed4c1ec | ||
|
|
1a55d4309c | ||
|
|
7617e3efd2 | ||
|
|
155c48d7fe | ||
|
|
2dae506e88 | ||
|
|
64e9cb1f5e | ||
|
|
b8233c15ae | ||
|
|
aea89bfde3 | ||
|
|
34eb78ad78 | ||
|
|
8a78b69689 | ||
|
|
45cd860835 | ||
|
|
2fdd4444ff | ||
|
|
d0a697ebf0 | ||
|
|
f3f0c6b1d1 | ||
|
|
599937cc4f | ||
|
|
693d12a67a | ||
|
|
0174e45026 | ||
|
|
96e1b862f6 | ||
|
|
7a88fafdb0 | ||
|
|
789933b333 | ||
|
|
0a4ff225be | ||
|
|
0d7d844462 | ||
|
|
b25a2b49c4 | ||
|
|
f3c29b43eb | ||
|
|
aa86d78183 | ||
|
|
1037093d45 | ||
|
|
7216726664 | ||
|
|
504317ac7e | ||
|
|
605d88751f | ||
|
|
64f2efe567 | ||
|
|
bcedf74fe4 | ||
|
|
380fa6fd5e | ||
|
|
85da5360d2 | ||
|
|
34149e510e | ||
|
|
33d2c2d422 | ||
|
|
46f23f9fbd | ||
|
|
53446cc0c8 | ||
|
|
c6cc2c930c | ||
|
|
8ecfd367ff | ||
|
|
5ff7cc6a4c | ||
|
|
770b39e769 | ||
|
|
3d7eaee7c9 | ||
|
|
659d8a4ec6 | ||
|
|
5bde17025a | ||
|
|
c88a7545a3 | ||
|
|
35b709768d | ||
|
|
08820b5245 | ||
|
|
1f944afff7 | ||
|
|
999f1db694 | ||
|
|
41295ef7b9 | ||
|
|
27170674a5 | ||
|
|
dee50349ba | ||
|
|
494ddb16d9 | ||
|
|
6996e72b49 | ||
|
|
3773482883 | ||
|
|
5e7ea8de19 | ||
|
|
a03ccae2ae | ||
|
|
432b320775 | ||
|
|
7c90933e3a | ||
|
|
1763b8ad55 | ||
|
|
ad2290df43 | ||
|
|
be502a39fd | ||
|
|
58ac7c320e | ||
|
|
cc5393e54d | ||
|
|
bf76005618 | ||
|
|
542294900f | ||
|
|
75aea82256 | ||
|
|
04a4578435 | ||
|
|
6ff58826d8 | ||
|
|
dd7ac99f27 | ||
|
|
9d5472cecf | ||
|
|
37aad93a58 | ||
|
|
768ebbfdb5 | ||
|
|
ce9ce1d353 | ||
|
|
0548349991 | ||
|
|
ed2ed873b8 | ||
|
|
f658bea4cd | ||
|
|
ae47b1f505 | ||
|
|
7da1813554 | ||
|
|
dcc87f4557 | ||
|
|
f22cc9f2dd | ||
|
|
5abdf50c04 | ||
|
|
b0aab23fd1 | ||
|
|
d2e1698426 | ||
|
|
3b738e0b2d | ||
|
|
c3c50bae29 | ||
|
|
cf5d42dbfe | ||
|
|
6d5115a50d | ||
|
|
5378e5d525 | ||
|
|
b5118391a9 | ||
|
|
ca00d93aac | ||
|
|
387d4d87eb | ||
|
|
f3f0d4f787 | ||
|
|
1a6f572405 | ||
|
|
06d411d6e7 | ||
|
|
72a77884fa | ||
|
|
36b9fd94ba | ||
|
|
bafb23edc3 | ||
|
|
6154a843e0 | ||
|
|
5f234f0dd1 | ||
|
|
911072fb69 | ||
|
|
f94c736945 | ||
|
|
46f7742afc | ||
|
|
c161813f10 | ||
|
|
171e222ebe | ||
|
|
61f445b159 | ||
|
|
b89b08d1ff | ||
|
|
e9739c2b14 | ||
|
|
1bd74718ee | ||
|
|
90839289c4 | ||
|
|
53140172ab | ||
|
|
a9e7bd9ee1 | ||
|
|
41d2ebf8b5 | ||
|
|
2c409c606e | ||
|
|
244f167dd5 | ||
|
|
03e0510fc4 | ||
|
|
70bbe0bdb1 | ||
|
|
c79950d707 | ||
|
|
4f549bc55c | ||
|
|
fb141343c3 | ||
|
|
2cfa05fbbb | ||
|
|
1e42e8f58c | ||
|
|
b2361987b7 | ||
|
|
648be7e181 | ||
|
|
555ffba328 | ||
|
|
3c73183a04 | ||
|
|
3753ff15fd | ||
|
|
8af8db59e0 | ||
|
|
45b841274a | ||
|
|
649216c700 | ||
|
|
faf52937c5 | ||
|
|
5b3dd70ac3 | ||
|
|
2a784ae1bc | ||
|
|
3cf12dbbf8 | ||
|
|
b647f6e019 | ||
|
|
7928c3b098 | ||
|
|
698999f129 | ||
|
|
d3c2393daf | ||
|
|
0384ed4535 | ||
|
|
96b0edf962 | ||
|
|
886170f505 | ||
|
|
05c272afd6 | ||
|
|
fd76c3b8b1 | ||
|
|
23f0a85446 | ||
|
|
ac0b2799c5 | ||
|
|
58e298ab8d | ||
|
|
e18f81eb74 | ||
|
|
72fa691c81 | ||
|
|
425da219c6 | ||
|
|
8484ea4154 | ||
|
|
0f87a06a67 | ||
|
|
68d789a4ea | ||
|
|
de71a4dee7 | ||
|
|
d55b1a0ad4 | ||
|
|
c2ad8d47d3 | ||
|
|
ec8f40c833 | ||
|
|
8e7e530747 | ||
|
|
bafd2af885 | ||
|
|
67784c85cf | ||
|
|
9008684651 | ||
|
|
2771f8cc41 | ||
|
|
a371a2f835 | ||
|
|
9e0a3f0794 | ||
|
|
9462e5aa93 | ||
|
|
a082ea7d76 | ||
|
|
91744d9dd0 | ||
|
|
658ffb8951 | ||
|
|
1bc304b26e | ||
|
|
b03a943dd9 | ||
|
|
e8a0e78d9e | ||
|
|
fc3251b6a9 | ||
|
|
b2ceb50897 | ||
|
|
6c95cbb6b4 | ||
|
|
cbd8f83288 | ||
|
|
bcb7a7a6c8 | ||
|
|
e372bb5320 | ||
|
|
0f2262f065 | ||
|
|
6cab8cf139 | ||
|
|
c10e65e99e | ||
|
|
c42ad9fbb9 | ||
|
|
758d484874 | ||
|
|
5fa0d75bd7 | ||
|
|
8752996018 | ||
|
|
f79ba4885a | ||
|
|
5f7abb068b | ||
|
|
19f6798947 | ||
|
|
756320755b | ||
|
|
ed9ce033d8 | ||
|
|
5c59e7f523 | ||
|
|
ad7ccf6d7b | ||
|
|
66dfae2234 | ||
|
|
14bb035026 | ||
|
|
6c09195f5e | ||
|
|
6d019284f8 | ||
|
|
82ebb9576f | ||
|
|
c4a03b6b45 | ||
|
|
9f80092bbb | ||
|
|
4a1fc9b598 | ||
|
|
8f861d438b | ||
|
|
de1bf58997 | ||
|
|
3796e52018 | ||
|
|
356cd47ce8 | ||
|
|
dd8a2df253 | ||
|
|
05404f9104 | ||
|
|
803373bb09 | ||
|
|
00c116051f | ||
|
|
909ffd4de4 | ||
|
|
7bc66ae710 | ||
|
|
268baca939 | ||
|
|
171bf76100 | ||
|
|
49177bdd93 | ||
|
|
4fac2b339c | ||
|
|
28025802da | ||
|
|
c9744c5ba4 | ||
|
|
78d571239c | ||
|
|
9feb9ec37c | ||
|
|
d877bccde5 | ||
|
|
7dab5b9ae3 | ||
|
|
c3beeb3ca9 | ||
|
|
84e9c93c35 | ||
|
|
7bdbd005a8 | ||
|
|
27bfcf3c77 | ||
|
|
81457d74d3 | ||
|
|
0d2f9b9b11 | ||
|
|
896ac3c89f | ||
|
|
27b399521f | ||
|
|
d45002779d | ||
|
|
4c212d460f | ||
|
|
1ab1d12398 | ||
|
|
965149d425 | ||
|
|
7b1d61da3d | ||
|
|
ea77fbbd38 | ||
|
|
cdc60481cf | ||
|
|
ab360ae3ac | ||
|
|
b480cdbe26 | ||
|
|
0d36993ceb | ||
|
|
68a2f18bfb | ||
|
|
44e935c64d | ||
|
|
5e32f7ab40 | ||
|
|
90c1ce8fcc | ||
|
|
51374fd2d1 | ||
|
|
9fbfd503af | ||
|
|
2fce9127d0 | ||
|
|
eff75a3bcd | ||
|
|
468b41f7bc | ||
|
|
3bdbe22e27 | ||
|
|
212e857656 | ||
|
|
eac899f573 | ||
|
|
7448fd3157 | ||
|
|
4785893847 | ||
|
|
0ed2a5307d | ||
|
|
237a705a82 | ||
|
|
6588969bb4 | ||
|
|
d68266d92e | ||
|
|
99e4271f29 | ||
|
|
3304dad729 | ||
|
|
95278d39f7 | ||
|
|
17524d5681 | ||
|
|
d5e62b731b | ||
|
|
eba3a1b72d | ||
|
|
eb549fdc17 | ||
|
|
b247962115 | ||
|
|
e3712182bd | ||
|
|
f0d25d2fd9 | ||
|
|
92e3e6c337 | ||
|
|
d1b834a301 | ||
|
|
511039330e | ||
|
|
87a45160f0 | ||
|
|
82a2fb955e | ||
|
|
53ee0a2cb3 | ||
|
|
97630d7fb1 | ||
|
|
cf1d9274d2 | ||
|
|
c9d89e234a | ||
|
|
cd8ae4d7d3 | ||
|
|
33c1d55801 | ||
|
|
65a0427471 | ||
|
|
8584e27a81 | ||
|
|
11374ddf12 | ||
|
|
11b0fe2a97 | ||
|
|
ab6acd1115 | ||
|
|
402b1432ee | ||
|
|
b2f508d72e | ||
|
|
533f762e52 | ||
|
|
e33a12c18f | ||
|
|
20cb92c185 | ||
|
|
6639d0ed89 | ||
|
|
974a04e692 | ||
|
|
eb498f56a6 | ||
|
|
12d72e26cc | ||
|
|
dcb7dd12c8 | ||
|
|
4b8fbf8682 | ||
|
|
2279870235 | ||
|
|
cc1024ddd0 | ||
|
|
50751e3f43 | ||
|
|
b2187d4b10 | ||
|
|
791aaa00e1 | ||
|
|
04cefd27d1 | ||
|
|
9ba9f9e8bd | ||
|
|
0058d734a2 | ||
|
|
b650d484f4 | ||
|
|
cc94cafa8f | ||
|
|
4df26353dd | ||
|
|
f2f37a3309 | ||
|
|
bf084da088 | ||
|
|
71257adb8e | ||
|
|
fc28edd821 | ||
|
|
dbdef08a90 | ||
|
|
b7ceedd891 | ||
|
|
62256b77c3 | ||
|
|
a1aefc901c | ||
|
|
4e057edb1e | ||
|
|
93bdb5c4f4 | ||
|
|
2226dec436 | ||
|
|
97ccfdf020 | ||
|
|
34ecc81484 | ||
|
|
675da4692e | ||
|
|
3e17cbd2e1 | ||
|
|
9400754a2b | ||
|
|
fdddbb713d | ||
|
|
db751b4241 | ||
|
|
73b5aff2e1 | ||
|
|
11b7f76526 | ||
|
|
54f54fce28 | ||
|
|
6ba2e72a3b | ||
|
|
1f2a543232 | ||
|
|
5aeab54ab7 | ||
|
|
9474b4be74 | ||
|
|
f672c7dc5c | ||
|
|
3edd7a6ac8 | ||
|
|
af3eb9e851 | ||
|
|
e6dd809c8a | ||
|
|
e57d0049f3 | ||
|
|
01e85b321b | ||
|
|
0cea2cf158 | ||
|
|
1c90866070 | ||
|
|
25a7cb0f66 | ||
|
|
49341bac26 | ||
|
|
eb4ee2d57c | ||
|
|
965859ddcb | ||
|
|
22e55e61de | ||
|
|
162d1fbfb5 | ||
|
|
05ea2cff96 | ||
|
|
e19b6faa7e | ||
|
|
bf64c1cf23 | ||
|
|
2285d19b90 | ||
|
|
29b8c47577 | ||
|
|
896041f468 | ||
|
|
db2eaf97e4 | ||
|
|
16ccbbc75a | ||
|
|
ec3ab4031b | ||
|
|
a0b46d9a38 | ||
|
|
51d1baa646 | ||
|
|
00092eb5ea | ||
|
|
ff928ddb7c | ||
|
|
7d53e6a16f | ||
|
|
d17ce844d5 | ||
|
|
0498ab6b86 | ||
|
|
8aa4d52367 | ||
|
|
a930afce31 | ||
|
|
4380bc52bd | ||
|
|
2d36a32bcd | ||
|
|
1eedb0406b | ||
|
|
6cd046a42a | ||
|
|
c73b4b26ba | ||
|
|
1f8540ca9d | ||
|
|
d36026575e | ||
|
|
91fcb49270 | ||
|
|
b0ef193117 | ||
|
|
773fc1ebad | ||
|
|
90d62fd0cc | ||
|
|
b51c8d62e7 | ||
|
|
6aa072b6cf | ||
|
|
46afabee6a | ||
|
|
686faa2407 | ||
|
|
b6df41d808 | ||
|
|
5a80a6046f | ||
|
|
80b480e855 | ||
|
|
7b82c8a9bc | ||
|
|
5e1a698fa2 | ||
|
|
f14735961a | ||
|
|
238091f182 | ||
|
|
e3ce768ad0 | ||
|
|
3583e1e501 | ||
|
|
e7272ddefa | ||
|
|
64f31f1ddd | ||
|
|
2439673dcf | ||
|
|
381f14fa9a | ||
|
|
9a6e069d6f | ||
|
|
89d765d6c7 | ||
|
|
437c4fbc0a | ||
|
|
3f7c318e3f | ||
|
|
71c031099b | ||
|
|
faa99bd323 | ||
|
|
714f7b7b13 | ||
|
|
958602d328 | ||
|
|
1f2ef858ab | ||
|
|
b693d76ebb | ||
|
|
6ad624f5bd | ||
|
|
c7f04102c7 | ||
|
|
0e013ced75 | ||
|
|
e52bb69b35 | ||
|
|
76b4b426af | ||
|
|
80025692c1 | ||
|
|
97215d5c8a | ||
|
|
f1d707a043 | ||
|
|
37b1c9e8e9 | ||
|
|
a097d5f6ac | ||
|
|
c6d6bb26c3 | ||
|
|
c482aff8b2 | ||
|
|
68a93e67e9 | ||
|
|
f378e2bfcf | ||
|
|
0964444e06 | ||
|
|
f0e057c8d0 | ||
|
|
6ac4032735 | ||
|
|
9663f5199e | ||
|
|
09394198b2 | ||
|
|
f04548a95d | ||
|
|
029ba3d2f6 | ||
|
|
07864aebb4 | ||
|
|
f33fa3d566 | ||
|
|
f6b33b1d30 | ||
|
|
1d84c0eca1 | ||
|
|
5061bc5a65 | ||
|
|
f7135bcee6 | ||
|
|
ed742c48e0 | ||
|
|
ef36744859 | ||
|
|
0c92fab0b9 | ||
|
|
53738e4a0d | ||
|
|
6eebbe4213 | ||
|
|
4cd301bd92 | ||
|
|
bc2cf0e215 | ||
|
|
cb21f3f33f | ||
|
|
559be4cff2 | ||
|
|
f9db4b9839 | ||
|
|
e39da99b87 | ||
|
|
6ab91a422e | ||
|
|
fb5b31faf3 | ||
|
|
bdf5a0c22b | ||
|
|
97e09d179f | ||
|
|
7a18305ed2 | ||
|
|
dca36ebaf8 | ||
|
|
617793df40 | ||
|
|
3a1e954284 | ||
|
|
1189d84543 | ||
|
|
4af704babe | ||
|
|
cef8477215 | ||
|
|
2ef3824554 | ||
|
|
a6e9107bd0 | ||
|
|
f2e71615fb | ||
|
|
3f32a7f1b7 | ||
|
|
34966e2ffc | ||
|
|
d1695c043c | ||
|
|
65626c188a | ||
|
|
7a7cb730c5 | ||
|
|
5a22d1cd8e | ||
|
|
061fe25c33 | ||
|
|
7601b740cc | ||
|
|
fcda6f7d96 | ||
|
|
1614519874 | ||
|
|
4433cbebc6 | ||
|
|
46dad14d5f | ||
|
|
af08e5015a | ||
|
|
9bc5a15c2d | ||
|
|
2cf89feb86 | ||
|
|
39e4167df6 | ||
|
|
d65bd90e67 | ||
|
|
5060c2aac4 | ||
|
|
89c1ba7929 | ||
|
|
1eea48d0c8 | ||
|
|
6b43defc98 | ||
|
|
8a4c5086fb | ||
|
|
180d6a28bf | ||
|
|
dc6f4c23ed | ||
|
|
4b9d5c0ab7 | ||
|
|
0100d58ffb | ||
|
|
41ce8853d7 | ||
|
|
ae19eed00f |
No files matched your search
+18
@@ -68,6 +68,12 @@ menu/driverspzarch.c
|
||||
.pc
|
||||
/media/shaders_glsl/
|
||||
/obj-w32/
|
||||
.cproject
|
||||
.settings
|
||||
libretro-super
|
||||
run.sh
|
||||
convert_rumble.awk
|
||||
*~
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -114,6 +120,9 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
|
||||
pkg/apple/iOS/build/
|
||||
pkg/apple/iOS/modules/
|
||||
pkg/apple/build/
|
||||
ui/drivers/qt/moc_*
|
||||
ui/drivers/moc_*
|
||||
|
||||
obj-unix/
|
||||
.vagrant/
|
||||
@@ -145,3 +154,12 @@ retroarch.js.mem
|
||||
|
||||
# only ignore .js files in the repo root
|
||||
/*.js
|
||||
|
||||
# Switch
|
||||
*.d
|
||||
exefs/*
|
||||
retroarch_switch.pfs0
|
||||
retroarch_switch.lst
|
||||
retroarch_switch.nacp
|
||||
retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
@@ -5,7 +5,23 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+16
-2
@@ -10,7 +10,7 @@ matrix:
|
||||
- g++-mingw-w64-i686
|
||||
- mingw-w64-i686-dev
|
||||
script:
|
||||
- CROSS_COMPILE=i686-w64-mingw32- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- compiler: mingw-x64
|
||||
addons:
|
||||
apt:
|
||||
@@ -18,7 +18,7 @@ matrix:
|
||||
- g++-mingw-w64-x86-64
|
||||
- mingw-w64-x86-64-dev
|
||||
script:
|
||||
- CROSS_COMPILE=x86_64-w64-mingw32- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
|
||||
- compiler: gcc
|
||||
- compiler: clang
|
||||
addons:
|
||||
@@ -34,6 +34,20 @@ matrix:
|
||||
osx_image: xcode7.3
|
||||
script:
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- os: osx
|
||||
osx_image: xcode9.3
|
||||
script:
|
||||
- cd ~/
|
||||
- brew install --force-bottle qt5
|
||||
- git clone --depth=50 https://github.com/libretro/libretro-super
|
||||
- cd libretro-super/travis
|
||||
- ./build-retroarch-metal.sh
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: cd ../retroarch; bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
|
||||
script:
|
||||
- ./configure
|
||||
|
||||
Vendored
+3
-2
@@ -5,7 +5,8 @@
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
@@ -123,5 +124,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 3
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+8
-1
@@ -12,7 +12,14 @@
|
||||
"files.associations": {
|
||||
"frontend_driver.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c"
|
||||
"*.rh": "c",
|
||||
"array": "c",
|
||||
"file_stream.h": "c",
|
||||
"driver.h": "c",
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
static const char *retroarch_contributors_list = R"(
|
||||
RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
Aaahh Ahh (Aaahh)
|
||||
Aaron Oneal (aarononeal)
|
||||
Adam Mechtley (amechtley)
|
||||
Adolfo Ketzer (reztek)
|
||||
AdrianoML
|
||||
ajefr
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
aliaspider
|
||||
alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Anthony J. Bentley (bentley)
|
||||
AridRayne
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asako (asakous)
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre64
|
||||
Avton1
|
||||
barbudreadmon
|
||||
bearoso
|
||||
blackgur
|
||||
Boris Timofeev (btimofeev)
|
||||
bparker06
|
||||
Brandon Johnson (Denu8thell)
|
||||
Brian Koropoff (bkoropoff)
|
||||
Brian S. Stephan (bsstephan)
|
||||
Brunnis
|
||||
bubuleur
|
||||
Casey Borders (CaseyB)
|
||||
ceb33
|
||||
celerizer
|
||||
Chris Merrett (chrisfu)
|
||||
chu (9chu)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
Conn O'Griofa (psyke83)
|
||||
cpsw
|
||||
Cray Elliott (MP2E)
|
||||
Cristian Sandu (crazyquark)
|
||||
ctult
|
||||
cubtekki
|
||||
cucholix
|
||||
cudencuden
|
||||
cxd4
|
||||
dalter
|
||||
Dan Weiss (Dwedit)
|
||||
danieljg
|
||||
Daniil Zhilin (GeneralFailer)
|
||||
dankcushions
|
||||
Danny Glover (DannyGlover)
|
||||
Dave (freakdave)
|
||||
Dave Leaver (danzel)
|
||||
David Demelier (markand)
|
||||
David Erickson (daviderickson)
|
||||
David Shah (daveshah1)
|
||||
David Walters (hiddenasbestos)
|
||||
DEX357
|
||||
diablodiab
|
||||
dibas
|
||||
Diego A. (SuperrSonic)
|
||||
Diego Viola (diegoviola)
|
||||
Diogo Barros (BlueKore)
|
||||
DogParty
|
||||
dor3k
|
||||
Dudu Akiva (duduke)
|
||||
duganchen
|
||||
duskgao
|
||||
ekipan
|
||||
ensra
|
||||
erbridge
|
||||
esoptron
|
||||
Ethan Lee (flibitijibibo)
|
||||
Ezio-PS
|
||||
Fabio (Oibaf66)
|
||||
Fabio Ritrovato (Sephiroth87)
|
||||
Fayne Aldan (FayneAldan)
|
||||
FIX94
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
Francisco José García García (frangarcj)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
Glenn Hevey (hevey)
|
||||
Googer
|
||||
gouchi
|
||||
Gregor Richards (GregorR)
|
||||
Gui Andrade (archshift)
|
||||
Gustavo Maciel Dias Vieira (gmdvieira)
|
||||
gvbr
|
||||
H. İbrahim Güngör (igungor)
|
||||
hadess
|
||||
Hans-Kristian Arntzen (Themaister)
|
||||
Henri Gomez (hgomez)
|
||||
Henri Gomez (hgomez-sonarsource)
|
||||
Higor Eurípedes (heuripedes)
|
||||
hizzlekizzle
|
||||
Hugo B. (777sha)
|
||||
hunterk
|
||||
Hyllian
|
||||
i30817
|
||||
iAmGhost
|
||||
Jack (jakcron)
|
||||
James Le Cuirot (chewi)
|
||||
James Sexton (Bezier89)
|
||||
Jan Holthuis (Holzhaus)
|
||||
Jay McCarthy (jeapostrophe)
|
||||
Jean-André Santoni (kivutar)
|
||||
Jean-Paul Mari (djipi)
|
||||
Jean-Sébastien Guay (Skylark13)
|
||||
Jesse Bryan (winneon)
|
||||
Joel (joel16)
|
||||
Joerg Sonnenberger (jsonn)
|
||||
Johannes Schickel (lordhoto)
|
||||
John Regan (jprjr)
|
||||
Jon Maddox (maddox)
|
||||
Jonathan Relf (jonathanrelf)
|
||||
Joohan Lee (losernator)
|
||||
Jools Wills (joolswills)
|
||||
Joseph Carter (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
Josh Palmer (ShiftyAxel)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
Ken Rossato (rossato)
|
||||
kurumushi
|
||||
kwyxz
|
||||
l3iggs
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
liffy (lifning)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
Lubosz Sarnecki (lubosz)
|
||||
lucianposton
|
||||
lxerandrew
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mat M. (lioncash)
|
||||
Matt Sephton (gingerbeardman)
|
||||
Maxime Gauduin (alucryd)
|
||||
mcrisostomo
|
||||
meancoot
|
||||
meepingsnesroms
|
||||
meleu
|
||||
Michael K. (kuxii2016)
|
||||
Michał Durak (micechal)
|
||||
Mico Chopitea (micochops)
|
||||
miguelpinheiro
|
||||
Mike Swanson (chungy)
|
||||
miqlas (extrowerk)
|
||||
misson20000
|
||||
Monroe88
|
||||
mprobinson
|
||||
MrHuu
|
||||
muzuiget
|
||||
mwtremblay
|
||||
Nathan S. (natinusala)
|
||||
nattycleopatra
|
||||
netux79
|
||||
nfnty
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Lopez Fernandez (pyroesp)
|
||||
Nikita Vakhrushev (JesterIOS)
|
||||
Nikola Kocic (nikola-kocic)
|
||||
Niouby
|
||||
nosh01
|
||||
not6 (r-type)
|
||||
notaz
|
||||
nstCactus
|
||||
nurupo
|
||||
Oggom
|
||||
Oleg Shevchenko (olsh)
|
||||
opendata26
|
||||
orbea
|
||||
OV2
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (a-shark)
|
||||
Pedro Ribeiro (pedrib)
|
||||
pinumbernumber
|
||||
pponso1
|
||||
Ramiro Morales (ramiro)
|
||||
retro-wertz
|
||||
Richard Howell (rmaz)
|
||||
Rob Loach (RobLoach)
|
||||
Romain Gay (vikbez)
|
||||
Romain Graillot (notnotme)
|
||||
Romain TISSERAND (rtissera)
|
||||
Roman Kalashnikov (lunixoid)
|
||||
Royerson
|
||||
rrooij
|
||||
rsn8887
|
||||
Ryunam
|
||||
rz5
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Stenvall (Jalle19)
|
||||
Scheiker
|
||||
Sebastien Ronsse (sronsse)
|
||||
Sergi Granell (xerpi)
|
||||
Sergio Padrino (sergiou87)
|
||||
sergio-br2 (sergiobenrocha2)
|
||||
Seth Kingsley (sethk)
|
||||
Shane Mouton (ismouton)
|
||||
Shizeeg Unadequatov (shizeeg)
|
||||
Skarsnik
|
||||
slotek
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
Sven (RetroSven)
|
||||
Swizzy
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
The Last Cabra (vanfanel)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
Toad King (ToadKing)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Torsten Paul (t-paul)
|
||||
TotalCaesar659
|
||||
TroggleMonkey
|
||||
Twinaphex
|
||||
URBANsUNITED
|
||||
vgmoose
|
||||
Vicky C Lau (vickychenglau)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Wiktor Strzębała (wiktorek140)
|
||||
xhp-creations
|
||||
Yarsan Hoessain (hyarsan)
|
||||
Yongwoon Cho (ssangkong)
|
||||
yoshisuga
|
||||
zeromus
|
||||
zlice
|
||||
Zoran Vuckovic (casdevel)
|
||||
)";
|
||||
+95
-2
@@ -1,4 +1,90 @@
|
||||
# 1.7.3 (future)
|
||||
# 1.7.5 (future)
|
||||
- CAMERA: Fix Video4Linux2 driver that broke years ago.
|
||||
- CHEEVOS: Support headerless NES hashing.
|
||||
- CRT: New porches and interlaced bug fix.
|
||||
- COMMON: Support for "OEM-102" key (usually '\' on Euro keyboards).
|
||||
- DISCORD: Add 'Ask To Join' Feature.
|
||||
- LOCALIZATION: Update Portuguese / Brazilian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- MENU/QT/WIMP: Add option to filter extensions inside archives when adding to a playlist.
|
||||
- MENU/QT/WIMP: Rename playlist entries with 2 single clicks.
|
||||
- METAL: Add screenshot support.
|
||||
- NETPLAY: Save lobby details received back from server after first announcement.
|
||||
- OPENGL/GLX: Implement Adaptive VSync - GLX_EXT_swap_control_tear.
|
||||
- OPENGL/WGL: Implement Adaptive VSync - WGL_EXT_swap_control_tear.
|
||||
- SWITCH: Merging of RetroNX Nintendo Switch port, based on libnx SDK.
|
||||
- VULKAN: Fix race condition in threaded mailbox emulation.
|
||||
- VULKAN: Maintenance fixes.
|
||||
|
||||
# 1.7.4
|
||||
- ANDROID: Add sustained performance mode, can be turned on/off in Power Management settings menu.
|
||||
- ANDROID: Powerstate/battery level support.
|
||||
- CHEEVOS: Fix crash when scrolling Achievement List while Unofficial Achievements enabled (#6732).
|
||||
- CHEEVOS: Added hitcounts support for PauseIf/ResetIf (#6817).
|
||||
- COMMON: Automatically hide "Configuration Override options" in Quick Menu.
|
||||
- COMMON: Small Bugfix to not trigger savestate code when pressing Reset.
|
||||
- COMMON: Added libsixel video driver.
|
||||
- EMSCRIPTEN: Fix Game Focus Toggle.
|
||||
- HID/OSX: Fix to set hid device registration deterministic (#6497), to address issue #6640 re-adding dynamic device registration.
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- LOCALIZATION: Update Portuguese / Brazilian translation.
|
||||
- LOCALIZATION: Update Russian translation.
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- MIDI: Add MIDI support to the libretro API. Dosbox is the first proof of concept core implementing libretro MIDI.
|
||||
- MIDI: Add a Windows driver for MIDI, based on winmm.
|
||||
- MENU/QT/WIMP: Qt QSlider styling for Dark Theme.
|
||||
- MENU/QT/WIMP: Remove button ghostly inside highlighting.
|
||||
- MENU/QT/WIMP: Initial grid view.
|
||||
- MENU/QT/WIMP: Drag&drop to add new playlist items, add option to add/edit/delete playlists.
|
||||
- MENU/QT/WIMP: Add menu option to update RetroArch (Windows only for now).
|
||||
- MENU/QT/WIMP: Add menu option to manage shaders.
|
||||
- MENU/QT/WIMP: Add menu option to manage core options.
|
||||
- MENU/XMB: Add new icons for the settings
|
||||
- MENU/XMB: Add an option to show the desktop ui
|
||||
- METAL: Initial work-in-progress video driver for Metal. macOS-only right now, and currently requires macOS 10.13.
|
||||
- METAL: Supports XMB/MaterialUI, has a menu display driver. Has a font rendering driver.
|
||||
- METAL/SLANG: Slang shaders should be compatible with Metal video driver.
|
||||
- NETWORK: Enable SSL/TLS support by default for desktop platforms.
|
||||
- QNX: Fix Game Focus Toggle.
|
||||
- PS3: Add audio mixer support for FLAC and MP3.
|
||||
- PSP: Use proper button labels, fix inverted R-Stick Y axis.
|
||||
- REMAPS: Fix the way offsets are calculated for keyboard remapping.
|
||||
- RUNAHEAD: Fix full-screen mode change breaking Secondary Core's environment variables.
|
||||
- VITA: Use proper button labels, fix inverted R-Stick Y axis.
|
||||
- VITA: Add imc0: mount.
|
||||
- VITA: Use sceCtrlIsMultiControllerSupported to detect.
|
||||
- VULKAN: Fix two validation errors.
|
||||
- VULKAN: Try to avoid creating swapchains redundantly. Should fix black screen and having to alt tab out of window again to get display working on Nvidia GPUs (Windows).
|
||||
- VULKAN/OSX: Initial MoltenVK support. Not enabled yet, several MoltenVK bugs should be fixed first before we can have it fully working.
|
||||
- WINDOWS/DINPUT: Add rumble support.
|
||||
- WINDOWS/DINPUT: Fix Game Focus Toggle.
|
||||
- WINDOWS/RAWINPUT: Fix Game Focus Toggle.
|
||||
- X11: Fix Game Focus Toggle.
|
||||
- WII: Change deflicker setting to work in 480p or higher, and always enables vfilter so that the user can easily change brightness.
|
||||
- WIIU: Fix out-of-bounds rendering bug
|
||||
- WIIU: Implement UDP broadcast network logging on Wii U.
|
||||
- WIIU: Audio should no longer clip.
|
||||
|
||||
# 1.7.3
|
||||
- AUDIO: Audio mixer supports FLAC/MP3 file types now!
|
||||
- COMMON: Fixed bug 'crashing in cores that don't range check retro_set_controller_type'. Some people were having crashes when device is set to RETRO_DEVICE_NONE and the cores don't check the number of ports, in VBAM's case it was overflowing and crashing. QuickNES was crashing too.
|
||||
- COMMON: Fixed buffer overflow in url encoding (affecting MSVC2010/2013).
|
||||
- COMMON: (QuickMenu) Added Configuration Override submenu.
|
||||
- HID: Merge new HID subsystem.
|
||||
- HID: Fix WaveBird support for the Wii U GCA.
|
||||
- HID/OSX: Fix regression with IODHIDManager - gamepads which are connected later would not be autoconfigured.
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- LOCALIZATION: Update Portuguese translation.
|
||||
- MENU: New WIMP Qt GUI!
|
||||
- MENU: Audio mixer now works in the menu without any cores loaded. You have to enable the setting 'Enable menu audio' for this to work.
|
||||
- REMAPPING/OVERLAYS: Fix regression - overlays could no longer be remapped.
|
||||
- SCANNER: Add Wii Backup File WBFS support.
|
||||
- X11: CRT SwitchRes support for X11/Linux.
|
||||
|
||||
# 1.7.2
|
||||
- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now).
|
||||
@@ -29,7 +115,7 @@ video drivers that implement it (D3D8/9/10/11/12/GL)
|
||||
- MENU/RGUI: D3D8/D3D9: Hookup Menu Linear Filter
|
||||
- MENU/XMB: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons.
|
||||
- MENU/XMB: Left/right thumbnails are now automatically scaled according to layout.
|
||||
- MENU/XMB: Add Left Thumbnails (additional to the right).
|
||||
- MENU/XMB: Add Left Thumbnails (additional to the right).
|
||||
- MENU/XMB: Fixed left/right tab regression.
|
||||
- MENU/XMB: Fix scaling of tall images that were cut on bottom previously.
|
||||
- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins.
|
||||
@@ -45,6 +131,13 @@ that support it (so far this includes - D3D8/D3D9, OpenGL, Vulkan)
|
||||
- IOS: Fixed crash when opening downloaded roms from Safari or using the "Open in.." functionality. Added the compiler flag to support keyboard remapping to controls.
|
||||
- IOS: Fixed buffer overlap that caused a crash while trying to download GLSL shaders from the buildbot.
|
||||
- PS3: fix URLS
|
||||
- REMAPS: Mapping keyboard keys from more than one gamepad (works with dosbox)
|
||||
- REMAPS: Mapping more than one button to the same action
|
||||
- REMAPS: Unmapping buttons
|
||||
- REMAPS: Unmapping analogs
|
||||
- REMAPS: Mapping a button to trigger an analog response (tested with mupen, can run on SM64 with the d-pad now, triggers a full analog tilt)
|
||||
- REMAPS: Mapping an analog to another analog (having more than one analog mapped to the same output causes issues)
|
||||
- REMAPS: Mapping an analog to produce a button response
|
||||
- SCANNER: Should be able to scan dual-layer Wii disc images now, filestream code now supports files larger than 4GB.
|
||||
- SHADERS/SLANG: Slang shaders should work again on Android version and MSVC versions (basically all the Griffin-based versions).
|
||||
- SHADERS: If GL context is GLES2/3/Core context, Cg shaders are unavailable. Applies to shader list too.
|
||||
|
||||
@@ -92,21 +92,22 @@ APPEND_CFLAGS := $(CFLAGS)
|
||||
CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
|
||||
|
||||
ifeq ($(CXX_BUILD), 1)
|
||||
LINK = $(CXX)
|
||||
CFLAGS := $(CXXFLAGS) -xc++
|
||||
CFLAGS += -DCXX_BUILD
|
||||
CXXFLAGS += -DCXX_BUILD
|
||||
else
|
||||
ifeq ($(NEED_CXX_LINKER),1)
|
||||
ifeq ($(HAVE_CXX), 1)
|
||||
ifeq ($(CXX_BUILD), 1)
|
||||
LINK = $(CXX)
|
||||
CFLAGS := $(CXXFLAGS) -xc++
|
||||
CFLAGS += -DCXX_BUILD
|
||||
CXXFLAGS += -DCXX_BUILD
|
||||
else ifeq ($(NEED_CXX_LINKER),1)
|
||||
LINK = $(CXX)
|
||||
else ifeq ($(findstring Win32,$(OS)),)
|
||||
LINK = $(CC)
|
||||
else
|
||||
# directx-related code is c++
|
||||
LINK = $(CXX)
|
||||
LINK = $(CC)
|
||||
endif
|
||||
else
|
||||
LINK = $(CC)
|
||||
endif
|
||||
|
||||
ifneq ($(CXX_BUILD), 1)
|
||||
ifneq ($(GNU90_BUILD), 1)
|
||||
ifneq ($(findstring icc,$(CC)),)
|
||||
CFLAGS += -std=c99 -D_GNU_SOURCE
|
||||
@@ -150,8 +151,29 @@ ifneq ($(findstring $(GPERFTOOLS),tcmalloc),)
|
||||
LIBS += -ltcmalloc
|
||||
endif
|
||||
|
||||
# Qt MOC generation, required for QObject-derived classes
|
||||
ifneq ($(MOC_HEADERS),)
|
||||
# prefix moc_ to base filename of paths and change extension from h to cpp, so a/b/foo.h becomes a/b/moc_foo.cpp
|
||||
MOC_SRC := $(join $(addsuffix moc_,$(addprefix $(OBJDIR)/,$(dir $(MOC_HEADERS)))), $(notdir $(MOC_HEADERS:.h=.cpp)))
|
||||
MOC_OBJ := $(patsubst %.cpp,%.o,$(MOC_SRC))
|
||||
RARCH_OBJ += $(MOC_OBJ)
|
||||
endif
|
||||
|
||||
all: $(TARGET) config.mk
|
||||
|
||||
$(MOC_SRC):
|
||||
@$(if $(Q), $(shell echo echo MOC $<),)
|
||||
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
|
||||
$(Q)$(MOC) -o $(MOC_TMP) $<
|
||||
|
||||
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
||||
|
||||
$(MOC_OBJ):
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(foreach x,$(join $(addsuffix :,$(MOC_OBJ)),$(MOC_SRC)),$(eval $x))
|
||||
|
||||
ifeq ($(MAKECMDGOALS),clean)
|
||||
config.mk:
|
||||
else
|
||||
@@ -250,3 +272,6 @@ clean:
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
@@ -0,0 +1,24 @@
|
||||
include Makefile.common
|
||||
|
||||
# Qt MOC generation, required for QObject-derived classes
|
||||
ifneq ($(MOC_HEADERS),)
|
||||
# prefix moc_ to base filename of paths and change extension from h to cpp, so a/b/foo.h becomes a/b/moc_foo.cpp
|
||||
MOC_SRC := $(join $(addsuffix moc_,$(dir $(MOC_HEADERS))), $(notdir $(MOC_HEADERS:.h=.cpp)))
|
||||
endif
|
||||
|
||||
MOC ?= $(error missing moc path)
|
||||
|
||||
.PHONY: generate
|
||||
|
||||
$(MOC_SRC):
|
||||
@$(if $(Q), $(shell echo echo MOC $<),)
|
||||
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
|
||||
$(MOC) -o $(MOC_TMP) $<
|
||||
|
||||
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
||||
|
||||
generate: $(MOC_SRC)
|
||||
@echo $(MOC_SRC)
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+221
-197
@@ -7,6 +7,10 @@ ifeq ($(HAVE_STACK_USAGE), 1)
|
||||
CFLAGS += -fstack-usage
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HAKCHI), 1)
|
||||
CFLAGS += -DHAVE_HAKCHI
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT),)
|
||||
HAVE_GL_CONTEXT=0
|
||||
|
||||
@@ -147,6 +151,8 @@ ifneq ($(GIT_VERSION),)
|
||||
endif
|
||||
|
||||
# General object files
|
||||
DEFINES += -DHAVE_DR_MP3
|
||||
CFLAGS += -DHAVE_DR_MP3
|
||||
|
||||
OBJ += frontend/frontend.o \
|
||||
frontend/frontend_driver.o \
|
||||
@@ -198,6 +204,7 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/hash/rhash.o \
|
||||
audio/audio_driver.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \
|
||||
input/common/input_common.o \
|
||||
input/input_driver.o \
|
||||
input/input_mapper.o \
|
||||
led/led_driver.o \
|
||||
@@ -261,6 +268,8 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
|
||||
performance_counters.o \
|
||||
verbosity.o \
|
||||
midi/midi_driver.o \
|
||||
midi/drivers/null_midi.o
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
@@ -321,12 +330,11 @@ DEFINES += -DHAVE_IMAGEVIEWER
|
||||
OBJ += cores/libretro-imageviewer/image_core.o
|
||||
endif
|
||||
|
||||
# Qt
|
||||
# Qt WIMP GUI
|
||||
|
||||
ifeq ($(HAVE_QT_WRAPPER), 1)
|
||||
OBJ += ui/drivers/ui_qt.o
|
||||
LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -L./ui/drivers/qt/build/release/
|
||||
LIBS += -lwrapper
|
||||
ifeq ($(HAVE_OPENSSL), 1)
|
||||
DEFINES += $(OPENSSL_CFLAGS)
|
||||
LIBS += $(OPENSSL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_QT), 1)
|
||||
@@ -334,10 +342,39 @@ OBJ += ui/drivers/ui_qt.o \
|
||||
ui/drivers/qt/ui_qt_application.o \
|
||||
ui/drivers/qt/ui_qt_window.o \
|
||||
ui/drivers/qt/ui_qt_browser_window.o \
|
||||
ui/drivers/qt/ui_qt_msg_window.o
|
||||
ui/drivers/qt/ui_qt_load_core_window.o \
|
||||
ui/drivers/qt/ui_qt_msg_window.o \
|
||||
ui/drivers/qt/flowlayout.o \
|
||||
ui/drivers/qt/shaderparamsdialog.o \
|
||||
ui/drivers/qt/coreoptionsdialog.o \
|
||||
ui/drivers/qt/filedropwidget.o \
|
||||
ui/drivers/qt/coreinfodialog.o \
|
||||
ui/drivers/qt/playlistentrydialog.o \
|
||||
ui/drivers/qt/viewoptionsdialog.o \
|
||||
ui/drivers/qt/playlist.o \
|
||||
ui/drivers/qt/updateretroarch.o \
|
||||
ui/drivers/qt/thumbnaildownload.o \
|
||||
ui/drivers/qt/thumbnailpackdownload.o \
|
||||
ui/drivers/qt/playlistthumbnaildownload.o
|
||||
|
||||
MOC_HEADERS += ui/drivers/ui_qt.h \
|
||||
ui/drivers/qt/ui_qt_load_core_window.h \
|
||||
ui/drivers/qt/flowlayout.h \
|
||||
ui/drivers/qt/shaderparamsdialog.h \
|
||||
ui/drivers/qt/coreoptionsdialog.h \
|
||||
ui/drivers/qt/filedropwidget.h \
|
||||
ui/drivers/qt/coreinfodialog.h \
|
||||
ui/drivers/qt/playlistentrydialog.h \
|
||||
ui/drivers/qt/viewoptionsdialog.h
|
||||
|
||||
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
|
||||
#DEFINES += $(QT5WEBENGINE_CFLAGS)
|
||||
LIBS += $(QT5CORE_LIBS) $(QT5GUI_LIBS) $(QT5WIDGETS_LIBS) $(QT5CONCURRENT_LIBS) $(QT5NETWORK_LIBS)
|
||||
#LIBS += $(QT5WEBENGINE_LIBS)
|
||||
NEED_CXX_LINKER = 1
|
||||
|
||||
ifneq ($(findstring Linux,$(OS)),)
|
||||
DEFINES += -I/usr/include/qt -fPIC
|
||||
DEFINES += -fPIC
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -359,199 +396,94 @@ OBJ += libretro-db/bintree.o \
|
||||
endif
|
||||
|
||||
ifneq ($(C89_BUILD), 1)
|
||||
HAVE_LIBUI = 0
|
||||
HAVE_GTKPLUS = 0
|
||||
|
||||
ifeq ($(HAVE_SSL), 1)
|
||||
DEFINES += -DHAVE_SSL
|
||||
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
|
||||
endif
|
||||
|
||||
# MinGW requires this for some reason, even though the include paths are relative to the source
|
||||
INCLUDE_DIRS += -Ideps/mbedtls
|
||||
|
||||
OBJS_TLS_CRYPTO = deps/mbedtls/aes.o deps/mbedtls/aesni.o deps/mbedtls/arc4.o \
|
||||
deps/mbedtls/asn1parse.o deps/mbedtls/asn1write.o deps/mbedtls/base64.o \
|
||||
deps/mbedtls/bignum.o deps/mbedtls/blowfish.o deps/mbedtls/camellia.o \
|
||||
deps/mbedtls/ccm.o deps/mbedtls/cipher.o deps/mbedtls/cipher_wrap.o \
|
||||
deps/mbedtls/cmac.o deps/mbedtls/ctr_drbg.o deps/mbedtls/des.o \
|
||||
deps/mbedtls/dhm.o deps/mbedtls/ecdh.o deps/mbedtls/ecdsa.o \
|
||||
deps/mbedtls/ecjpake.o deps/mbedtls/ecp.o \
|
||||
deps/mbedtls/ecp_curves.o deps/mbedtls/entropy.o deps/mbedtls/entropy_poll.o \
|
||||
deps/mbedtls/error.o deps/mbedtls/gcm.o deps/mbedtls/havege.o \
|
||||
deps/mbedtls/hmac_drbg.o deps/mbedtls/md.o deps/mbedtls/md2.o \
|
||||
deps/mbedtls/md4.o deps/mbedtls/md5.o deps/mbedtls/md_wrap.o \
|
||||
deps/mbedtls/memory_buffer_alloc.o deps/mbedtls/oid.o \
|
||||
deps/mbedtls/padlock.o deps/mbedtls/pem.o deps/mbedtls/pk.o \
|
||||
deps/mbedtls/pk_wrap.o deps/mbedtls/pkcs12.o deps/mbedtls/pkcs5.o \
|
||||
deps/mbedtls/pkparse.o deps/mbedtls/pkwrite.o deps/mbedtls/platform.o \
|
||||
deps/mbedtls/ripemd160.o deps/mbedtls/rsa.o deps/mbedtls/sha1.o \
|
||||
deps/mbedtls/sha256.o deps/mbedtls/sha512.o deps/mbedtls/threading.o \
|
||||
deps/mbedtls/timing.o deps/mbedtls/version.o \
|
||||
deps/mbedtls/version_features.o deps/mbedtls/xtea.o
|
||||
OBJS_TLS_CRYPTO = deps/mbedtls/aes.o \
|
||||
deps/mbedtls/aesni.o \
|
||||
deps/mbedtls/arc4.o \
|
||||
deps/mbedtls/asn1parse.o \
|
||||
deps/mbedtls/asn1write.o \
|
||||
deps/mbedtls/base64.o \
|
||||
deps/mbedtls/bignum.o \
|
||||
deps/mbedtls/blowfish.o \
|
||||
deps/mbedtls/camellia.o \
|
||||
deps/mbedtls/ccm.o \
|
||||
deps/mbedtls/cipher.o \
|
||||
deps/mbedtls/cipher_wrap.o \
|
||||
deps/mbedtls/cmac.o \
|
||||
deps/mbedtls/ctr_drbg.o \
|
||||
deps/mbedtls/des.o \
|
||||
deps/mbedtls/dhm.o \
|
||||
deps/mbedtls/ecdh.o \
|
||||
deps/mbedtls/ecdsa.o \
|
||||
deps/mbedtls/ecjpake.o \
|
||||
deps/mbedtls/ecp.o \
|
||||
deps/mbedtls/ecp_curves.o \
|
||||
deps/mbedtls/entropy.o \
|
||||
deps/mbedtls/entropy_poll.o \
|
||||
deps/mbedtls/error.o \
|
||||
deps/mbedtls/gcm.o \
|
||||
deps/mbedtls/havege.o \
|
||||
deps/mbedtls/hmac_drbg.o \
|
||||
deps/mbedtls/md.o \
|
||||
deps/mbedtls/md2.o \
|
||||
deps/mbedtls/md4.o \
|
||||
deps/mbedtls/md5.o \
|
||||
deps/mbedtls/md_wrap.o \
|
||||
deps/mbedtls/memory_buffer_alloc.o \
|
||||
deps/mbedtls/oid.o \
|
||||
deps/mbedtls/padlock.o \
|
||||
deps/mbedtls/pem.o \
|
||||
deps/mbedtls/pk.o \
|
||||
deps/mbedtls/pk_wrap.o \
|
||||
deps/mbedtls/pkcs12.o \
|
||||
deps/mbedtls/pkcs5.o \
|
||||
deps/mbedtls/pkparse.o \
|
||||
deps/mbedtls/pkwrite.o \
|
||||
deps/mbedtls/platform.o \
|
||||
deps/mbedtls/ripemd160.o \
|
||||
deps/mbedtls/rsa.o \
|
||||
deps/mbedtls/sha1.o \
|
||||
deps/mbedtls/sha256.o \
|
||||
deps/mbedtls/sha512.o \
|
||||
deps/mbedtls/threading.o \
|
||||
deps/mbedtls/timing.o \
|
||||
deps/mbedtls/version.o \
|
||||
deps/mbedtls/version_features.o \
|
||||
deps/mbedtls/xtea.o
|
||||
|
||||
OBJS_TLS_X509 = deps/mbedtls/certs.o deps/mbedtls/pkcs11.o deps/mbedtls/x509.o \
|
||||
deps/mbedtls/x509_create.o deps/mbedtls/x509_crl.o deps/mbedtls/x509_crt.o \
|
||||
deps/mbedtls/x509_csr.o deps/mbedtls/x509write_crt.o deps/mbedtls/x509write_csr.o
|
||||
OBJS_TLS_X509 = deps/mbedtls/certs.o \
|
||||
deps/mbedtls/pkcs11.o \
|
||||
deps/mbedtls/x509.o \
|
||||
deps/mbedtls/x509_create.o \
|
||||
deps/mbedtls/x509_crl.o \
|
||||
deps/mbedtls/x509_crt.o \
|
||||
deps/mbedtls/x509_csr.o \
|
||||
deps/mbedtls/x509write_crt.o \
|
||||
deps/mbedtls/x509write_csr.o
|
||||
|
||||
OBJS_TLS = deps/mbedtls/debug.o deps/mbedtls/net_sockets.o \
|
||||
deps/mbedtls/ssl_cache.o deps/mbedtls/ssl_ciphersuites.o \
|
||||
deps/mbedtls/ssl_cli.o deps/mbedtls/ssl_cookie.o \
|
||||
deps/mbedtls/ssl_srv.o deps/mbedtls/ssl_ticket.o \
|
||||
OBJS_TLS = deps/mbedtls/debug.o \
|
||||
deps/mbedtls/net_sockets.o \
|
||||
deps/mbedtls/ssl_cache.o \
|
||||
deps/mbedtls/ssl_ciphersuites.o \
|
||||
deps/mbedtls/ssl_cli.o \
|
||||
deps/mbedtls/ssl_cookie.o \
|
||||
deps/mbedtls/ssl_srv.o \
|
||||
deps/mbedtls/ssl_ticket.o \
|
||||
deps/mbedtls/ssl_tls.o
|
||||
|
||||
OBJ += $(OBJS_TLS_CRYPTO) $(OBJS_TLS_X509) $(OBJS_TLS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBUI), 1)
|
||||
DEFINES += -DHAVE_LIBUI
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += deps/libui/windows/alloc.o \
|
||||
deps/libui/windows/area.o \
|
||||
deps/libui/windows/areadraw.o \
|
||||
deps/libui/windows/areaevents.o \
|
||||
deps/libui/windows/areascroll.o \
|
||||
deps/libui/windows/areautil.o \
|
||||
deps/libui/windows/box.o \
|
||||
deps/libui/windows/button.o \
|
||||
deps/libui/windows/checkbox.o \
|
||||
deps/libui/windows/colorbutton.o \
|
||||
deps/libui/windows/colordialog.o \
|
||||
deps/libui/windows/combobox.o \
|
||||
deps/libui/windows/container.o \
|
||||
deps/libui/windows/control.o \
|
||||
deps/libui/windows/d2dscratch.o \
|
||||
deps/libui/windows/datetimepicker.o \
|
||||
deps/libui/windows/debug.o \
|
||||
deps/libui/windows/draw.o \
|
||||
deps/libui/windows/drawmatrix.o \
|
||||
deps/libui/windows/drawpath.o \
|
||||
deps/libui/windows/drawtext.o \
|
||||
deps/libui/windows/dwrite.o \
|
||||
deps/libui/windows/editablecombo.o \
|
||||
deps/libui/windows/entry.o \
|
||||
deps/libui/windows/events.o \
|
||||
deps/libui/windows/fontbutton.o \
|
||||
deps/libui/windows/fontdialog.o \
|
||||
deps/libui/windows/form.o \
|
||||
deps/libui/windows/graphemes.o \
|
||||
deps/libui/windows/grid.o \
|
||||
deps/libui/windows/group.o \
|
||||
deps/libui/windows/init.o \
|
||||
deps/libui/windows/label.o \
|
||||
deps/libui/windows/main.o \
|
||||
deps/libui/windows/menu.o \
|
||||
deps/libui/windows/multilineentry.o \
|
||||
deps/libui/windows/parent.o \
|
||||
deps/libui/windows/progressbar.o \
|
||||
deps/libui/windows/radiobuttons.o \
|
||||
deps/libui/windows/separator.o \
|
||||
deps/libui/windows/sizing.o \
|
||||
deps/libui/windows/slider.o \
|
||||
deps/libui/windows/spinbox.o \
|
||||
deps/libui/windows/stddialogs.o \
|
||||
deps/libui/windows/tab.o \
|
||||
deps/libui/windows/tabpage.o \
|
||||
deps/libui/windows/text.o \
|
||||
deps/libui/windows/utf16.o \
|
||||
deps/libui/windows/utilwin.o \
|
||||
deps/libui/windows/window.o \
|
||||
deps/libui/windows/winpublic.o \
|
||||
deps/libui/windows/winutil.o
|
||||
LIBS += -luxtheme -ld2d1 -ldwrite -lusp10
|
||||
else
|
||||
ifneq ($(findstring Darwin,$(OS)),)
|
||||
OBJ += deps/libui/darwin/alloc.o \
|
||||
deps/libui/darwin/area.o \
|
||||
deps/libui/darwin/areaevents.o \
|
||||
deps/libui/darwin/autolayout.o \
|
||||
deps/libui/darwin/box.o \
|
||||
deps/libui/darwin/button.o \
|
||||
deps/libui/darwin/checkbox.o \
|
||||
deps/libui/darwin/colorbutton.o \
|
||||
deps/libui/darwin/combobox.o \
|
||||
deps/libui/darwin/control.o \
|
||||
deps/libui/darwin/datetimepicker.o \
|
||||
deps/libui/darwin/debug.o \
|
||||
deps/libui/darwin/draw.o \
|
||||
deps/libui/darwin/drawtext.o \
|
||||
deps/libui/darwin/editablecombo.o \
|
||||
deps/libui/darwin/entry.o \
|
||||
deps/libui/darwin/fontbutton.o \
|
||||
deps/libui/darwin/form.o \
|
||||
deps/libui/darwin/grid.o \
|
||||
deps/libui/darwin/group.o \
|
||||
deps/libui/darwin/image.o \
|
||||
deps/libui/darwin/label.o \
|
||||
deps/libui/darwin/main.o \
|
||||
deps/libui/darwin/map.o \
|
||||
deps/libui/darwin/menu.o \
|
||||
deps/libui/darwin/multilineentry.o \
|
||||
deps/libui/darwin/progressbar.o \
|
||||
deps/libui/darwin/radiobuttons.o \
|
||||
deps/libui/darwin/scrollview.o \
|
||||
deps/libui/darwin/separator.o \
|
||||
deps/libui/darwin/slider.o \
|
||||
deps/libui/darwin/spinbox.o \
|
||||
deps/libui/darwin/stddialogs.o \
|
||||
deps/libui/darwin/tab.o \
|
||||
deps/libui/darwin/text.o \
|
||||
deps/libui/darwin/util.o \
|
||||
deps/libui/darwin/window.o \
|
||||
deps/libui/darwin/winmoveresize.o
|
||||
else
|
||||
CFLAGS += -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0
|
||||
LIBS += -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
|
||||
OBJ += deps/libui/unix/alloc.o \
|
||||
deps/libui/unix/area.o \
|
||||
deps/libui/unix/box.o \
|
||||
deps/libui/unix/button.o \
|
||||
deps/libui/unix/cellrendererbutton.o \
|
||||
deps/libui/unix/checkbox.o \
|
||||
deps/libui/unix/child.o \
|
||||
deps/libui/unix/colorbutton.o \
|
||||
deps/libui/unix/combobox.o \
|
||||
deps/libui/unix/control.o \
|
||||
deps/libui/unix/datetimepicker.o \
|
||||
deps/libui/unix/debug.o \
|
||||
deps/libui/unix/draw.o \
|
||||
deps/libui/unix/drawmatrix.o \
|
||||
deps/libui/unix/drawpath.o \
|
||||
deps/libui/unix/drawtext.o \
|
||||
deps/libui/unix/editablecombo.o \
|
||||
deps/libui/unix/entry.o \
|
||||
deps/libui/unix/fontbutton.o \
|
||||
deps/libui/unix/form.o \
|
||||
deps/libui/unix/future.o \
|
||||
deps/libui/unix/graphemes.o \
|
||||
deps/libui/unix/grid.o \
|
||||
deps/libui/unix/group.o \
|
||||
deps/libui/unix/image.o \
|
||||
deps/libui/unix/label.o \
|
||||
deps/libui/unix/main.o \
|
||||
deps/libui/unix/menu.o \
|
||||
deps/libui/unix/multilineentry.o \
|
||||
deps/libui/unix/progressbar.o \
|
||||
deps/libui/unix/radiobuttons.o \
|
||||
deps/libui/unix/separator.o \
|
||||
deps/libui/unix/slider.o \
|
||||
deps/libui/unix/spinbox.o \
|
||||
deps/libui/unix/stddialogs.o \
|
||||
deps/libui/unix/tab.o \
|
||||
deps/libui/unix/text.o \
|
||||
deps/libui/unix/util.o \
|
||||
deps/libui/unix/window.o
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJ += deps/libui/common/areaevents.o \
|
||||
deps/libui/common/control.o \
|
||||
deps/libui/common/debug.o \
|
||||
deps/libui/common/matrix.o \
|
||||
deps/libui/common/shouldquit.o \
|
||||
deps/libui/common/userbugs.o
|
||||
|
||||
OBJ += deps/libui/libui_main.o
|
||||
endif
|
||||
endif
|
||||
|
||||
# Miscellaneous
|
||||
@@ -593,6 +525,10 @@ ifeq ($(TARGET), retroarch_3ds)
|
||||
OBJ += gfx/drivers_font/ctr_font.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBNX), 1)
|
||||
OBJ += gfx/drivers_font/switch_font.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OSS), 1)
|
||||
OBJ += audio/drivers/oss.o
|
||||
else ifeq ($(HAVE_OSS_BSD), 1)
|
||||
@@ -679,6 +615,12 @@ ifeq ($(HAVE_XAUDIO), 1)
|
||||
LIBS += -lole32
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WINMM), 1)
|
||||
OBJ += midi/drivers/winmm_midi.o
|
||||
DEFINES += -DHAVE_WINMM
|
||||
LIBS += -lwinmm
|
||||
endif
|
||||
|
||||
# Audio Resamplers
|
||||
|
||||
ifeq ($(HAVE_NEON),1)
|
||||
@@ -726,11 +668,16 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
|
||||
ifeq ($(HAVE_XMB),)
|
||||
HAVE_XMB = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STRIPES),)
|
||||
HAVE_STRIPES = 1
|
||||
endif
|
||||
else
|
||||
HAVE_ZARCH ?= 0
|
||||
HAVE_MATERIALUI ?= 0
|
||||
#HAVE_NUKLEAR ?= 0
|
||||
HAVE_XMB ?= 0
|
||||
HAVE_STRIPES ?= 0
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RGUI), 1)
|
||||
@@ -762,6 +709,11 @@ ifeq ($(HAVE_XMB), 1)
|
||||
HAVE_MENU_COMMON = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STRIPES), 1)
|
||||
OBJ += menu/drivers/stripes.o
|
||||
DEFINES += -DHAVE_STRIPES
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LAKKA), 1)
|
||||
DEFINES += -DHAVE_LAKKA
|
||||
endif
|
||||
@@ -872,15 +824,25 @@ ifeq ($(TARGET), retroarch_3ds)
|
||||
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
|
||||
ifeq ($(HAVE_LIBNX), 1)
|
||||
OBJ += menu/drivers_display/menu_display_switch.o \
|
||||
gfx/drivers/switch_nx_gfx.o
|
||||
else
|
||||
OBJ += gfx/drivers/switch_gfx.o
|
||||
endif
|
||||
OBJ += audio/drivers/switch_audio.o \
|
||||
audio/drivers/switch_thread_audio.o \
|
||||
input/drivers/switch_input.o \
|
||||
input/drivers_joypad/switch_joypad.o \
|
||||
frontend/drivers/platform_switch.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WAYLAND), 1)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||
input/drivers/wayland_input.o
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
||||
endif
|
||||
@@ -1029,6 +991,18 @@ ifeq ($(HAVE_CACA), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SIXEL), 1)
|
||||
DEFINES += -DHAVE_SIXEL
|
||||
CFLAGS += -I/usr/include/sixel
|
||||
OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \
|
||||
gfx/drivers_context/sixel_ctx.o
|
||||
LIBS += -lsixel
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_sixel.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
OBJ += gfx/drivers/drm_gfx.o
|
||||
CFLAGS += -I/usr/include/libdrm
|
||||
@@ -1086,11 +1060,30 @@ ifneq ($(C89_BUILD), 1)
|
||||
ifneq ($(HAVE_OPENGLES), 1)
|
||||
OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o
|
||||
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
|
||||
NEED_CXX_LINKER=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_METAL), 1)
|
||||
DEFINES += -DHAVE_METAL
|
||||
OBJ += gfx/common/metal/Context.o \
|
||||
gfx/common/metal/Filter.o \
|
||||
gfx/common/metal/RendererCommon.o \
|
||||
gfx/common/metal/View.o \
|
||||
gfx/common/metal/TexturedView.o \
|
||||
gfx/common/metal/MenuDisplay.o \
|
||||
gfx/common/metal_common.o \
|
||||
gfx/drivers/metal.o \
|
||||
menu/drivers_display/menu_display_metal.o \
|
||||
gfx/drivers_font/metal_raster_font.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MPV), 1)
|
||||
OBJ += cores/libretro-mpv/mpv-libretro.o
|
||||
DEFINES += -I$(DEPS_DIR) -DHAVE_MPV
|
||||
LIBS += -lmpv
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGLES), 1)
|
||||
LIBS += $(OPENGLES_LIBS)
|
||||
DEFINES += $(OPENGLES_CFLAGS) -DHAVE_OPENGLES
|
||||
@@ -1168,7 +1161,7 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
CXXFLAGS += -fpermissive
|
||||
endif
|
||||
|
||||
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses
|
||||
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-reorder -Wno-parentheses
|
||||
|
||||
OBJ += gfx/drivers/vulkan.o \
|
||||
gfx/common/vulkan_common.o \
|
||||
@@ -1182,7 +1175,7 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_vulkan.o
|
||||
endif
|
||||
LIBS += -lstdc++
|
||||
NEED_CXX_LINKER = 1
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
INCLUDE_DIRS += -Igfx/include
|
||||
|
||||
@@ -1257,8 +1250,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o \
|
||||
gfx/drivers_shader/shader_hlsl.o
|
||||
OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1373,9 +1365,14 @@ ifeq ($(HAVE_GLSLANG), 1)
|
||||
$(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)
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
DEFINES += -DENABLE_HLSL
|
||||
GLSLANG_SOURCES += $(wildcard $(DEPS_DIR)/glslang/glslang/hlsl/*.cpp)
|
||||
endif
|
||||
|
||||
|
||||
OBJ += $(GLSLANG_SOURCES:.cpp=.o)
|
||||
endif
|
||||
|
||||
@@ -1436,6 +1433,8 @@ endif
|
||||
|
||||
ifeq ($(HAVE_BUILTINFLAC),1)
|
||||
HAVE_FLAC = 1
|
||||
DEFINES += -DHAVE_DR_FLAC -I$(DEPS_DIR)
|
||||
CFLAGS += -DHAVE_DR_FLAC
|
||||
CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include
|
||||
DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
|
||||
-DFLAC_PACKAGE_VERSION="\"retroarch\""
|
||||
@@ -1462,7 +1461,8 @@ ifeq ($(HAVE_BUILTINFLAC),1)
|
||||
endif
|
||||
OBJ += $(FLACOBJ)
|
||||
else ifeq ($(HAVE_FLAC),1)
|
||||
LIBS += $(FLAC_LIBS)
|
||||
DEFINES += -DHAVE_FLAC
|
||||
LIBS += $(FLAC_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
@@ -1614,6 +1614,30 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DISCORD), 1)
|
||||
NEED_CXX_LINKER = 1
|
||||
DEFINES += -DHAVE_DISCORD
|
||||
DEFINES += -Ideps/discord-rpc/include/ -Ideps/discord-rpc/thirdparty/rapidjson-1.1.0/include/
|
||||
OBJ += deps/discord-rpc/src/discord_rpc.o \
|
||||
deps/discord-rpc/src/rpc_connection.o \
|
||||
deps/discord-rpc/src/serialization.o \
|
||||
discord/discord.o
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += deps/discord-rpc/src/discord_register_win.o \
|
||||
deps/discord-rpc/src/connection_win.o
|
||||
LIBS += -lpsapi -ladvapi32
|
||||
endif
|
||||
ifneq ($(findstring Linux,$(OS)),)
|
||||
OBJ += deps/discord-rpc/src/discord_register_linux.o \
|
||||
deps/discord-rpc/src/connection_unix.o
|
||||
endif
|
||||
ifneq ($(findstring Darwin,$(OS)),)
|
||||
OBJ += deps/discord-rpc/src/discord_register_osx.o \
|
||||
deps/discord-rpc/src/connection_unix.o
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
|
||||
OBJ += input/input_remote.o \
|
||||
cores/libretro-net-retropad/net_retropad_core.o
|
||||
|
||||
+8
-6
@@ -5,7 +5,7 @@ DEBUG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
|
||||
@@ -31,6 +31,12 @@ OBJ += ctr/ctr_system.o
|
||||
OBJ += ctr/ctr_memory.o
|
||||
OBJ += ctr/ctr_linear.o
|
||||
OBJ += ctr/gpu_old.o
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
APP_USE_SVCHAX = 1
|
||||
@@ -162,7 +168,7 @@ endif
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).core
|
||||
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ) libretro_ctr.a
|
||||
|
||||
@@ -255,9 +261,6 @@ $(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
$(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
$(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false
|
||||
|
||||
$(TARGET).core: $(TARGET).elf
|
||||
echo $(APP_UNIQUE_ID) > $(TARGET).core
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ)
|
||||
@@ -265,7 +268,6 @@ clean:
|
||||
rm -f $(TARGET).elf
|
||||
rm -f $(TARGET).3ds
|
||||
rm -f $(TARGET).cia
|
||||
rm -f $(TARGET).core
|
||||
rm -f $(TARGET).smdh
|
||||
rm -f $(TARGET).bnr
|
||||
rm -f $(TARGET).icn
|
||||
|
||||
+11
-4
@@ -2,12 +2,12 @@ TARGET := retroarch_3ds_salamander
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
BUILD_3DSX = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
|
||||
APP_TITLE = Retroarch 3DS
|
||||
APP_DESCRIPTION = Retroarch 3DS
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
APP_AUTHOR = Team Libretro
|
||||
APP_PRODUCT_CODE = RETROARCH-3DS
|
||||
APP_UNIQUE_ID = 0xBAC00
|
||||
@@ -39,6 +39,13 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
@@ -182,7 +189,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
-3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
||||
endif
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
include $(DEVKITPRO)/libnx/switch_rules
|
||||
|
||||
TARGET := retroarch_switch
|
||||
|
||||
DEBUG ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
# For threading we need to overwrite some vars with global defines because devkitPro's includes
|
||||
# make it hard for us. This works for the pthread wrapper
|
||||
DEFINES_THREAD := -Dpthread_t=Thread -Dpthread_mutex_t=Mutex -Dpthread_mutexattr_t='void*' -Dpthread_attr_t=int -Dpthread_cond_t=CondVar -Dpthread_condattr_t='int' -D_SYS__PTHREADTYPES_H_
|
||||
DEFINES := -U__linux__ -U__linux -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD)
|
||||
|
||||
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
|
||||
HAVE_XMB = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_THREADS = 1
|
||||
HAVE_PTHREADS = 1
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_SWITCH = 1
|
||||
HAVE_LIBNX = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
#BLACKLIST += input/input_overlay.o
|
||||
#BLACKLIST += tasks/task_overlay.o
|
||||
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
||||
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
|
||||
#
|
||||
# NO_ICON: if set to anything, do not use icon.
|
||||
# NO_NACP: if set to anything, no .nacp file is generated.
|
||||
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
|
||||
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
|
||||
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
|
||||
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
|
||||
# ICON is the filename of the icon (.jpg), relative to the project folder.
|
||||
# If not set, it attempts to use one of the following (in this order):
|
||||
# - <Project name>.jpg
|
||||
# - icon.jpg
|
||||
# - <libnx folder>/default_icon.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD := build
|
||||
SOURCES := $(CURDIR)/source
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
EXEFS_SRC := exefs_src
|
||||
#ROMFS := switch/romfs
|
||||
|
||||
APP_TITLE := RetroArch
|
||||
APP_VERSION := 1.0.0
|
||||
APP_AUTHOR := libretro Team
|
||||
NO_ICON := 1
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBNX)/include -include $(LIBNX)/include/switch.h #$(shell $(DEVKITPRO)/portlibs/switch/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lnx -lm -lstdc++ -lbz2 -lpng -lz
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS := $(PORTLIBS) $(LIBNX)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OUTPUT := $(TARGET)
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
export DEPSDIR := $(CURDIR)/
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# use CXX for linking C++ projects, CC for standard C
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(CPPFILES)),)
|
||||
#---------------------------------------------------------------------------------
|
||||
export LD := $(CC)
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
#---------------------------------------------------------------------------------
|
||||
export LD := $(CXX)
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OFILES := $(OBJ) libretro_switch.a
|
||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD)
|
||||
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||
|
||||
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC)
|
||||
|
||||
ifeq ($(strip $(ICON)),)
|
||||
icons := $(wildcard *.jpg)
|
||||
ifneq (,$(findstring $(TARGET).jpg,$(icons)))
|
||||
export APP_ICON := $(TOPDIR)/$(TARGET).jpg
|
||||
else
|
||||
ifneq (,$(findstring icon.jpg,$(icons)))
|
||||
export APP_ICON := $(TOPDIR)/icon.jpg
|
||||
endif
|
||||
endif
|
||||
else
|
||||
export APP_ICON := $(TOPDIR)/$(ICON)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(NO_ICON)),)
|
||||
export NROFLAGS += --icon=$(APP_ICON)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(NO_NACP)),)
|
||||
export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp
|
||||
endif
|
||||
|
||||
ifneq ($(APP_TITLEID),)
|
||||
export NACPFLAGS += --titleid=$(APP_TITLEID)
|
||||
endif
|
||||
|
||||
ifneq ($(ROMFS),)
|
||||
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
all : $(OUTPUT).pfs0 $(OUTPUT).nro
|
||||
|
||||
$(OUTPUT).pfs0 : $(OUTPUT).nso
|
||||
|
||||
$(OUTPUT).nso : $(OUTPUT).elf
|
||||
|
||||
ifeq ($(strip $(NO_NACP)),)
|
||||
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp
|
||||
else
|
||||
$(OUTPUT).nro : $(OUTPUT).elf
|
||||
endif
|
||||
|
||||
$(OUTPUT).elf : $(OBJ)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(OUTPUT).pfs0 $(OUTPUT).nro $(OUTPUT).elf
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# you need a rule like this for each extension you use as binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
%.bin.o %_bin.h : %.bin
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
||||
@@ -25,6 +25,7 @@ HAVE_XAUDIO := 1
|
||||
HAVE_XINPUT := 1
|
||||
HAVE_WASAPI := 0
|
||||
HAVE_THREAD_STORAGE := 1
|
||||
HAVE_WINMM := 1
|
||||
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# Hakchi version added to ease confusion amongst Hakchi community due to messy past...
|
||||
#
|
||||
# Make sure you have readelf installed (sudo apt-get install readelf) to patch the binary
|
||||
# Might not be needed for your build but it's a useful tool and for safety it should be
|
||||
# run anyway to ensure the SDL2 link isn't broken...
|
||||
|
||||
HAKCHI_VER := Hakchi_Retroarch_Neo_v1_7_3b
|
||||
HAKCHI_NAME := "Hakchi RetroArch 'Neo' v1.7.3b
|
||||
MOD_CREATOR := TheOtherGuys
|
||||
MOD_CATEGORY := RetroArch
|
||||
|
||||
HAKCHI_DIR := hakchi
|
||||
TARGET := retroarch
|
||||
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
readelf -v #Check if you have readelf installed... (sudo apt-get install readelf)
|
||||
./configure --host=arm-linux-gnueabihf --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard
|
||||
make -f Makefile -j HAVE_HAKCHI=1
|
||||
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
|
||||
#/usr/bin/arm-linux-gnueabihf-strip retroarch
|
||||
rm -f $(HAKCHI_DIR)/bin/retroarch
|
||||
cp retroarch $(HAKCHI_DIR)/bin/retroarch
|
||||
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > $(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
cp $(HAKCHI_DIR)/readme.md $(HAKCHI_DIR)/readme_COPY.md
|
||||
printf "%s\n" \
|
||||
"---" \
|
||||
"Name: $(HAKCHI_VER)" \
|
||||
"Creator: $(MOD_CREATOR)" \
|
||||
"Category: $(MOD_CATEGORY)" \
|
||||
"Version: $(HAKCHI_VER)" \
|
||||
"Built on: $(shell date)" \
|
||||
"Git commit: $(GIT_COMMIT)" \
|
||||
"---" > $(HAKCHI_DIR)/readme.md
|
||||
cat $(HAKCHI_DIR)/readme_COPY.md >> $(HAKCHI_DIR)/readme.md
|
||||
rm $(HAKCHI_DIR)/readme_COPY.md
|
||||
@echo "** BUILDING HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
|
||||
cd $(HAKCHI_DIR)/; tar -czvf "$(HAKCHI_VER).hmod" *
|
||||
mv $(HAKCHI_DIR)/$(HAKCHI_VER).hmod .
|
||||
@echo "** BUILT HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
rm -f $(HAKCHI_DIR)/bin/retroarch
|
||||
rm -f $(HAKCHI_VER).hmod
|
||||
rm -f $(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
+1
-1
@@ -63,7 +63,7 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ TARGET = retroarchpsp
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
OPTIMIZE_LV := -O2
|
||||
OPTIMIZE_LV := -O3
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
@@ -22,7 +22,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
endif
|
||||
|
||||
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
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
+7
-4
@@ -6,12 +6,13 @@ WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_DYNAMIC
|
||||
|
||||
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
|
||||
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -29,6 +30,8 @@ else
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
@@ -39,17 +42,17 @@ endif
|
||||
|
||||
|
||||
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
|
||||
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path t>o libtransistor")
|
||||
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path/to/libtransistor/dist/>")
|
||||
endif
|
||||
|
||||
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/
|
||||
INCDIRS := -I. -Ideps -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
|
||||
CFLAGS += $(INCDIRS) $(DEFINES) -Wno-unused-command-line-argument -Werror-implicit-function-declaration
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
|
||||
+27
-24
@@ -6,11 +6,10 @@ DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_HID = 0
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
PC_DEVELOPMENT_IP_ADDRESS ?=
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
@@ -29,11 +28,11 @@ ifneq ($(V), 1)
|
||||
endif
|
||||
|
||||
OBJ :=
|
||||
OBJ += wiiu/input/wpad_driver.o
|
||||
OBJ += wiiu/input/kpad_driver.o
|
||||
OBJ += wiiu/input/pad_functions.o
|
||||
OBJ += wiiu/main.o
|
||||
OBJ += wiiu/system/memory.o
|
||||
OBJ += wiiu/system/atomic.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/hbl.o
|
||||
@@ -46,18 +45,14 @@ endif
|
||||
|
||||
ifeq ($(WIIU_HID),1)
|
||||
DEFINES += -DWIIU_HID
|
||||
OBJ += wiiu/input/hidpad_driver.o
|
||||
OBJ += wiiu/input/wiiu_hid.o
|
||||
OBJ += input/drivers_joypad/wiiu/hidpad_driver.o
|
||||
OBJ += input/drivers_hid/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
|
||||
input/common/hid/hid_device_driver.o \
|
||||
input/common/hid/device_wiiu_gca.o \
|
||||
input/common/hid/device_ds3.o \
|
||||
input/common/hid/device_ds4.o \
|
||||
input/common/hid/device_null.o
|
||||
endif
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
@@ -93,7 +88,6 @@ ifeq ($(HAVE_RUNAHEAD),1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
OBJ += gfx/drivers/gx2_shaders/sprite.o
|
||||
@@ -124,7 +118,7 @@ endif
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_BUILTINZLIB = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
@@ -151,6 +145,10 @@ endif
|
||||
OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += input/drivers/wiiu_input.o
|
||||
OBJ += input/drivers_joypad/wiiu_joypad.o
|
||||
OBJ += input/drivers_joypad/wiiu/wpad_driver.o
|
||||
OBJ += input/drivers_joypad/wiiu/kpad_driver.o
|
||||
OBJ += input/drivers_joypad/wiiu/pad_functions.o
|
||||
|
||||
OBJ += audio/drivers/wiiu_audio.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
endif
|
||||
@@ -164,10 +162,6 @@ DEFINES += -DWIIU -DMSB_FIRST -D__WUT__
|
||||
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
|
||||
@@ -200,7 +194,16 @@ 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
|
||||
INCDIRS := -I.
|
||||
INCDIRS += -Ideps
|
||||
INCDIRS += -Ideps/stb
|
||||
INCDIRS += -Ideps/libz
|
||||
INCDIRS += -Ideps/7zip
|
||||
INCDIRS += -Ilibretro-common/include
|
||||
INCDIRS += -Iinput/include
|
||||
INCDIRS += -Iwiiu
|
||||
INCDIRS += -Iwiiu/include
|
||||
INCDIRS += -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib
|
||||
|
||||
CFLAGS := -mwup -mcpu=750 -meabi -mhard-float
|
||||
@@ -229,7 +232,7 @@ CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm
|
||||
LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm -lpng -lz
|
||||
|
||||
ifneq ($(WANT_LIBFAT), 1)
|
||||
LIBS += -lfat
|
||||
|
||||
@@ -18,6 +18,7 @@ HAVE_PYTHON = 0
|
||||
DYNAMIC = 1
|
||||
|
||||
HAVE_XINPUT = 1
|
||||
HAVE_WINMM = 1
|
||||
|
||||
HAVE_SDL := 0
|
||||
HAVE_SDL2 := 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# RetroArch
|
||||
|
||||
RetroArch is the reference frontend for the libretro API.
|
||||
Popular examples of implementations for this API includes videogame system emulators and game engines as well as
|
||||
Popular examples of implementations for this API includes video game system emulators and game engines as well as
|
||||
more generalized 3D programs.
|
||||
These programs are instantiated as dynamic libraries. We refer to these as "libretro cores".
|
||||
|
||||
@@ -27,12 +27,11 @@ interface to include support for emulators and/or game engines. libretro is comp
|
||||
|
||||
## Binaries
|
||||
|
||||
Latest Windows binaries are currently hosted on the [buildbot](http://buildbot.libretro.com/).
|
||||
Latest binaries are currently hosted on the [buildbot](http://buildbot.libretro.com/).
|
||||
|
||||
## Support
|
||||
|
||||
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/),
|
||||
or visit our IRC channel: #retroarch @ irc.freenode.org.
|
||||
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), chat on [Discord](https://discord.gg/C4amCeV), or visit our IRC channel: #retroarch @ irc.freenode.org.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -51,13 +50,13 @@ More developer-centric stuff is found [here](https://github.com/libretro/libretr
|
||||
|
||||
RetroArch attempts to be small and lean
|
||||
while still having all the useful core features expected from an emulator.
|
||||
It is designed to be very portable and features a gamepad-centric UI.
|
||||
It is designed to be very portable and features a gamepad-centric and touchscreen UI.
|
||||
It also has a full-featured command-line interface.
|
||||
|
||||
In some areas, RetroArch goes beyond and emphasizes on not-so-common technical features such as multi-pass shader support,
|
||||
real-time rewind (Braid-style), video recording (using FFmpeg), etc.
|
||||
real-time rewind (Braid-style), video recording (using FFmpeg), run-ahead input latency removal, etc.
|
||||
|
||||
RetroArch also emphasizes on being easy to integrate into various launcher frontends.
|
||||
RetroArch also emphasizes being easy to integrate into various launcher frontends.
|
||||
|
||||
## Platforms
|
||||
|
||||
@@ -66,22 +65,24 @@ RetroArch has been ported to the following platforms:
|
||||
- DOS
|
||||
- Windows
|
||||
- Linux
|
||||
- Emscripten
|
||||
- Emscripten (WebAssembly and JavaScript)
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- OpenBSD
|
||||
- Haiku
|
||||
- Solaris
|
||||
- MacOS X
|
||||
- macOS (PPC, x86-32 and x86-64)
|
||||
- PlayStation 3
|
||||
- PlayStation Portable
|
||||
- PlayStation Vita
|
||||
- Original Microsoft Xbox
|
||||
- Microsoft Xbox 360 (Libxenon/XeXDK)
|
||||
- Nintendo Wii, GameCube (Libogc)
|
||||
- Nintendo WiiU
|
||||
- Nintendo GameCube
|
||||
- Nintendo Wii
|
||||
- Nintendo Wii U
|
||||
- Nintendo 3DS
|
||||
- Nintendo Switch
|
||||
- Nintendo NES/SNES Classic Edition
|
||||
- Raspberry Pi
|
||||
- Android
|
||||
- iOS
|
||||
@@ -147,9 +148,9 @@ Instructions for compiling and installing RetroArch can be found in the [Libretr
|
||||
|
||||
## CRT 15Khz Resolution Switching
|
||||
|
||||
CRT Switch res will turn on, on the fly. However, you will need to restart retroarch to disable it. With CRT SwitchRes enable Retroarch will start in 2560 x 480 @ 60.
|
||||
CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.
|
||||
|
||||
If you are running windows, before enabling the CRT SwitchRes options pleasae make sure you have installed CRTEmudriver and installed some modelines. The minimum modelins for all games to switch correctly are:
|
||||
If you are running Windows, before enabling the CRT SwitchRes options please make sure you have installed CRTEmudriver and installed some modelines. The minimum modelines for all games to switch correctly are:
|
||||
|
||||
- 2560 x 192 @ 60.000000
|
||||
- 2560 x 200 @ 60.000000
|
||||
@@ -161,7 +162,7 @@ If you are running windows, before enabling the CRT SwitchRes options pleasae ma
|
||||
- 2560 x 448 @ 60.000000
|
||||
- 2560 x 480 @ 60.000000
|
||||
|
||||
Install these modelines replacing 2560 with your desired super resuloution. The above resolutions are NTSC only so if you would be playing any PAL content please add pal modelines:
|
||||
Install these modelines replacing 2560 with your desired super resolution. The above resolutions are NTSC only so if you would be playing any PAL content please add PAL modelines:
|
||||
|
||||
- 2560 x 192 @ 50.000000
|
||||
- 2560 x 200 @ 50.000000
|
||||
@@ -173,7 +174,7 @@ Install these modelines replacing 2560 with your desired super resuloution. The
|
||||
- 2560 x 448 @ 50.000000
|
||||
- 2560 x 480 @ 50.000000
|
||||
|
||||
Some games will require heigher PAL resolutions which should also be installed:
|
||||
Some games will require higher PAL resolutions which should also be installed:
|
||||
|
||||
- 2560 x 512 @ 50.000000
|
||||
- 2560 x 576 @ 50.000000
|
||||
@@ -182,11 +183,11 @@ Ideally install all these modelines and everything will work great.
|
||||
|
||||
## Super Resolutions
|
||||
|
||||
The default super resolution is 2560. It is displayed just under the CRT switch option, which can be found in video settings. This can be changed within the retroarch.cfg. The only compatible resolutions are 1920, 2560 and 3840. Any other resolutions will be ignored and native swithing will be activated.
|
||||
The default super resolution is 2560. It is displayed just under the CRT switch option, which can be found in video settings. This can be changed within the retroarch.cfg. The only compatible resolutions are 1920, 2560 and 3840. Any other resolutions will be ignored and native switching will be activated.
|
||||
|
||||
## Native Resolutions
|
||||
|
||||
If native reolutions are activeted you will need a whole new set of modelines:
|
||||
If native resolutions are activated you will need a whole new set of modelines:
|
||||
|
||||
- 512 x 240 @ 50.006977 SNESpal
|
||||
- 512 x 224 @ 50.006977 SNESpal
|
||||
@@ -249,10 +250,10 @@ If native reolutions are activeted you will need a whole new set of modelines:
|
||||
- 400 x 254 @ 54.706841 MK
|
||||
- 384 x 224 @ 59.637405 CPS1
|
||||
|
||||
These modelines are more acurate giving exact hz. However, some games may have unwanted results. This is due to mid-scanline resolution chages on the orgiginal hardware. For the best results super resolutions are the way to go.
|
||||
These modelines are more accurate giving exact hz. However, some games may have unwanted results. This is due to mid-scanline resolution changes on the original hardware. For the best results super resolutions are the way to go.
|
||||
|
||||
## CRT resolution switching & Mame
|
||||
## CRT resolution switching & MAME
|
||||
|
||||
Some arecade resolutions can be alot different. There is resolution detection to ensure mame games will be diplayed in the closest available resolution but drawn at their native resolution within this resolution. Meaning that the mame game will look just like the original hardware.
|
||||
Some arcade resolutions can be very different from consumer CRTs. There is resolution detection to ensure MAME games will be displayed in the closest available resolution but drawn at their native resolution within this resolution. Meaning that the MAME game will look just like the original hardware.
|
||||
|
||||
Mame roms that run in a vertical aspect like DoDonPachi need to be roted within mame before rolution swithing and aspect correction will work. Do this before enableing CRT switchRes so that Retroarch will run in your desktop resolution. Once you have roted any games that may need it switch CRT SwitchRes on.
|
||||
MAME ROMs that run in a vertical aspect like DoDonPachi need to be rotated within MAME before resolution switching and aspect correction will work. Do this before enabling CRT SwitchRes so that RetroArch will run in your desktop resolution. Once you have rotated any games that may need it turn CRT SwitchRes on.
|
||||
+311
-91
@@ -45,7 +45,15 @@
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 8
|
||||
/**
|
||||
* db_to_gain:
|
||||
* @db : Decibels.
|
||||
*
|
||||
* Converts decibels to voltage gain.
|
||||
*
|
||||
* Returns: voltage gain value.
|
||||
**/
|
||||
#define db_to_gain(db) (powf(10.0f, (db) / 20.0f))
|
||||
|
||||
static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_ALSA
|
||||
@@ -117,23 +125,12 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#endif
|
||||
#ifdef SWITCH
|
||||
&audio_switch,
|
||||
&audio_switch_thread,
|
||||
#endif
|
||||
&audio_null,
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
enum audio_mixer_state state;
|
||||
float volume;
|
||||
void *buf;
|
||||
size_t bufsize;
|
||||
};
|
||||
|
||||
static unsigned audio_mixer_current_max_idx = 0;
|
||||
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}};
|
||||
|
||||
static size_t audio_driver_chunk_size = 0;
|
||||
@@ -183,6 +180,11 @@ static void *audio_driver_context_audio_data = NULL;
|
||||
|
||||
static bool audio_suspended = false;
|
||||
|
||||
static void audio_mixer_play_stop_sequential_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
static void audio_mixer_play_stop_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@@ -193,6 +195,22 @@ enum resampler_quality audio_driver_get_resampler_quality(void)
|
||||
return (enum resampler_quality)settings->uints.audio_resampler_quality;
|
||||
}
|
||||
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i)
|
||||
{
|
||||
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
|
||||
return NULL;
|
||||
return &audio_mixer_streams[i];
|
||||
}
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i)
|
||||
{
|
||||
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
|
||||
return "N/A";
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
return audio_mixer_streams[i].name;
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
/**
|
||||
* compute_audio_buffer_statistics:
|
||||
*
|
||||
@@ -368,6 +386,12 @@ static bool audio_driver_deinit_internal(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_init(unsigned out_rate)
|
||||
{
|
||||
audio_mixer_init(out_rate);
|
||||
}
|
||||
|
||||
|
||||
static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
{
|
||||
unsigned new_rate = 0;
|
||||
@@ -524,7 +548,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
{
|
||||
audio_driver_buffer_size =
|
||||
current_audio->buffer_size(audio_driver_context_audio_data);
|
||||
audio_driver_control = true;
|
||||
audio_driver_control = true;
|
||||
}
|
||||
else
|
||||
RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n");
|
||||
@@ -534,7 +558,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
|
||||
audio_driver_free_samples_count = 0;
|
||||
|
||||
audio_mixer_init(settings->uints.audio_out_rate);
|
||||
audio_driver_mixer_init(settings->uints.audio_out_rate);
|
||||
|
||||
/* Threaded driver is initially stopped. */
|
||||
if (
|
||||
@@ -576,20 +600,17 @@ void audio_driver_set_nonblocking_state(bool enable)
|
||||
static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
{
|
||||
struct resampler_data src_data;
|
||||
bool is_perfcnt_enable = false;
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
const void *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
float audio_volume_gain = !audio_driver_mute_enable ?
|
||||
bool is_perfcnt_enable = false;
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
const void *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
float audio_volume_gain = !audio_driver_mute_enable ?
|
||||
audio_driver_volume_gain : 0.0f;
|
||||
|
||||
src_data.data_in = NULL;
|
||||
src_data.data_out = NULL;
|
||||
src_data.input_frames = 0;
|
||||
src_data.output_frames = 0;
|
||||
src_data.ratio = 0.0f;
|
||||
src_data.data_out = NULL;
|
||||
src_data.output_frames = 0;
|
||||
|
||||
if (recording_data)
|
||||
recording_push_audio(data, samples);
|
||||
@@ -606,8 +627,8 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
convert_s16_to_float(audio_driver_input_data, data, samples,
|
||||
audio_volume_gain);
|
||||
|
||||
src_data.data_in = audio_driver_input_data;
|
||||
src_data.input_frames = samples >> 1;
|
||||
src_data.data_in = audio_driver_input_data;
|
||||
src_data.input_frames = samples >> 1;
|
||||
|
||||
|
||||
if (audio_driver_dsp)
|
||||
@@ -662,7 +683,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
#endif
|
||||
}
|
||||
|
||||
src_data.ratio = audio_source_ratio_current;
|
||||
src_data.ratio = audio_source_ratio_current;
|
||||
|
||||
if (is_slowmotion)
|
||||
{
|
||||
@@ -675,7 +696,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
||||
if (audio_mixer_active)
|
||||
{
|
||||
bool override = audio_driver_mixer_mute_enable ? true :
|
||||
(audio_driver_mixer_volume_gain != 0.0f) ? true : false;
|
||||
(audio_driver_mixer_volume_gain != 1.0f) ? true : false;
|
||||
float mixer_gain = !audio_driver_mixer_mute_enable ?
|
||||
audio_driver_mixer_volume_gain : 0.0f;
|
||||
audio_mixer_mix(audio_driver_output_samples_buf,
|
||||
@@ -725,6 +746,22 @@ void audio_driver_sample(int16_t left, int16_t right)
|
||||
audio_driver_data_ptr = 0;
|
||||
}
|
||||
|
||||
void audio_driver_menu_sample(void)
|
||||
{
|
||||
static int16_t samples_buf[1024] = {0};
|
||||
struct retro_system_av_info
|
||||
*av_info = video_viewport_get_system_av_info();
|
||||
const struct retro_system_timing *info =
|
||||
(const struct retro_system_timing*)&av_info->timing;
|
||||
unsigned sample_count = (info->sample_rate / info->fps) * 2;
|
||||
while (sample_count > 1024)
|
||||
{
|
||||
audio_driver_flush(samples_buf, 1024);
|
||||
sample_count -= 1024;
|
||||
}
|
||||
audio_driver_flush(samples_buf, sample_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch:
|
||||
* @data : pointer to audio buffer.
|
||||
@@ -840,19 +877,19 @@ void audio_driver_monitor_adjust_system_rates(void)
|
||||
{
|
||||
float timing_skew;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
float video_refresh_rate = settings->floats.video_refresh_rate;
|
||||
float max_timing_skew = settings->floats.audio_max_timing_skew;
|
||||
const struct retro_system_timing *info = av_info ?
|
||||
(const struct retro_system_timing*)&av_info->timing : NULL;
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
const struct retro_system_timing *info =
|
||||
(const struct retro_system_timing*)&av_info->timing;
|
||||
|
||||
if (!info || info->sample_rate <= 0.0)
|
||||
if (info->sample_rate <= 0.0)
|
||||
return;
|
||||
|
||||
timing_skew = fabs(1.0f - info->fps / video_refresh_rate);
|
||||
audio_driver_input = info->sample_rate;
|
||||
|
||||
if (timing_skew <= max_timing_skew)
|
||||
if (timing_skew <= max_timing_skew && !settings->bools.vrr_runloop_enable)
|
||||
audio_driver_input *= (video_refresh_rate / info->fps);
|
||||
|
||||
RARCH_LOG("[Audio]: Set audio input rate to: %.2f Hz.\n",
|
||||
@@ -976,6 +1013,12 @@ bool audio_driver_mixer_extension_supported(const char *ext)
|
||||
string_list_append(str_list, "mod", attr);
|
||||
string_list_append(str_list, "s3m", attr);
|
||||
string_list_append(str_list, "xm", attr);
|
||||
#endif
|
||||
#ifdef HAVE_DR_FLAC
|
||||
string_list_append(str_list, "flac", attr);
|
||||
#endif
|
||||
#ifdef HAVE_DR_MP3
|
||||
string_list_append(str_list, "mp3", attr);
|
||||
#endif
|
||||
string_list_append(str_list, "wav", attr);
|
||||
|
||||
@@ -1021,18 +1064,16 @@ static void audio_mixer_play_stop_cb(
|
||||
{
|
||||
unsigned i = (unsigned)idx;
|
||||
|
||||
#if 0
|
||||
if (audio_mixer_streams[i].buf != NULL)
|
||||
free(audio_mixer_streams[i].buf);
|
||||
#endif
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
free(audio_mixer_streams[i].name);
|
||||
|
||||
audio_mixer_streams[i].name = NULL;
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].buf = NULL;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
audio_mixer_current_max_idx--;
|
||||
}
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_STOPPED:
|
||||
@@ -1042,15 +1083,75 @@ static void audio_mixer_play_stop_cb(
|
||||
}
|
||||
}
|
||||
|
||||
static void audio_mixer_play_stop_sequential_cb(
|
||||
audio_mixer_sound_t *sound, unsigned reason)
|
||||
{
|
||||
int idx = audio_mixer_find_index(sound);
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
case AUDIO_MIXER_SOUND_FINISHED:
|
||||
audio_mixer_destroy(sound);
|
||||
|
||||
if (idx >= 0)
|
||||
{
|
||||
unsigned i = (unsigned)idx;
|
||||
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
free(audio_mixer_streams[i].name);
|
||||
|
||||
audio_mixer_streams[i].name = NULL;
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].buf = NULL;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
|
||||
i++;
|
||||
|
||||
for (; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
{
|
||||
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_STOPPED)
|
||||
{
|
||||
audio_driver_mixer_play_stream_sequential(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_STOPPED:
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_REPEATED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_get_free_stream_slot(unsigned *id)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
{
|
||||
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_NONE)
|
||||
{
|
||||
*id = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
{
|
||||
unsigned free_slot = 0;
|
||||
audio_mixer_voice_t *voice = NULL;
|
||||
audio_mixer_sound_t *handle = NULL;
|
||||
audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb;
|
||||
bool looped = false;
|
||||
void *buf = NULL;
|
||||
|
||||
if (audio_mixer_current_max_idx >= AUDIO_MIXER_MAX_STREAMS)
|
||||
|
||||
if (!audio_driver_mixer_get_free_stream_slot(&free_slot))
|
||||
return false;
|
||||
|
||||
if (params->state == AUDIO_STREAM_STATE_NONE)
|
||||
@@ -1074,9 +1175,18 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
case AUDIO_MIXER_TYPE_MOD:
|
||||
handle = audio_mixer_load_mod(buf, (int32_t)params->bufsize);
|
||||
break;
|
||||
case AUDIO_MIXER_TYPE_FLAC:
|
||||
#ifdef HAVE_DR_FLAC
|
||||
handle = audio_mixer_load_flac(buf, (int32_t)params->bufsize);
|
||||
#endif
|
||||
break;
|
||||
case AUDIO_MIXER_TYPE_MP3:
|
||||
#ifdef HAVE_DR_MP3
|
||||
handle = audio_mixer_load_mp3(buf, (int32_t)params->bufsize);
|
||||
#endif
|
||||
break;
|
||||
case AUDIO_MIXER_TYPE_NONE:
|
||||
free(buf);
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!handle)
|
||||
@@ -1085,74 +1195,193 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (params->state == AUDIO_STREAM_STATE_PLAYING)
|
||||
switch (params->state)
|
||||
{
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, true);
|
||||
}
|
||||
else if (params->state == AUDIO_STREAM_STATE_PLAYING_LOOPED)
|
||||
{
|
||||
looped = true;
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, true);
|
||||
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
|
||||
looped = true;
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_PLAYING:
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL:
|
||||
stop_cb = audio_mixer_play_stop_sequential_cb;
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].buf = buf;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].handle = handle;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].voice = voice;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].state = params->state;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].volume = params->volume;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].stop_cb = stop_cb;
|
||||
audio_mixer_active = true;
|
||||
|
||||
audio_mixer_current_max_idx++;
|
||||
audio_mixer_streams[free_slot].name = !string_is_empty(params->basename) ? strdup(params->basename) : NULL;
|
||||
audio_mixer_streams[free_slot].buf = buf;
|
||||
audio_mixer_streams[free_slot].handle = handle;
|
||||
audio_mixer_streams[free_slot].voice = voice;
|
||||
audio_mixer_streams[free_slot].state = params->state;
|
||||
audio_mixer_streams[free_slot].volume = params->volume;
|
||||
audio_mixer_streams[free_slot].stop_cb = stop_cb;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_remove_stream(unsigned i)
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i)
|
||||
{
|
||||
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
|
||||
audio_mixer_voice_t *voice = audio_mixer_streams[i].voice;
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return AUDIO_STREAM_STATE_NONE;
|
||||
|
||||
return audio_mixer_streams[i].state;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type)
|
||||
{
|
||||
bool set_state = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
{
|
||||
case AUDIO_STREAM_STATE_STOPPED:
|
||||
audio_mixer_streams[i].voice = audio_mixer_play(audio_mixer_streams[i].handle,
|
||||
(type == AUDIO_STREAM_STATE_PLAYING_LOOPED) ? true : false,
|
||||
1.0f, audio_mixer_streams[i].stop_cb);
|
||||
set_state = true;
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_PLAYING:
|
||||
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
|
||||
case AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL:
|
||||
case AUDIO_STREAM_STATE_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
if (set_state)
|
||||
audio_mixer_streams[i].state = (enum audio_mixer_state)type;
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_play_stop_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_play_stop_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING_LOOPED);
|
||||
}
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i)
|
||||
{
|
||||
audio_mixer_streams[i].stop_cb = audio_mixer_play_stop_sequential_cb;
|
||||
audio_driver_mixer_play_stream_internal(i, AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL);
|
||||
}
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i)
|
||||
{
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return 0.0f;
|
||||
|
||||
return audio_mixer_streams[i].volume;
|
||||
}
|
||||
|
||||
void audio_driver_mixer_set_stream_volume(unsigned i, float vol)
|
||||
{
|
||||
audio_mixer_voice_t *voice = NULL;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return;
|
||||
|
||||
audio_mixer_streams[i].volume = vol;
|
||||
|
||||
voice = audio_mixer_streams[i].voice;
|
||||
|
||||
if (voice)
|
||||
audio_mixer_voice_set_volume(voice, db_to_gain(vol));
|
||||
}
|
||||
|
||||
void audio_driver_mixer_stop_stream(unsigned i)
|
||||
{
|
||||
bool set_state = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
{
|
||||
case AUDIO_STREAM_STATE_PLAYING:
|
||||
if (voice)
|
||||
audio_mixer_stop(voice);
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
|
||||
if (voice)
|
||||
audio_mixer_stop(voice);
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
case AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL:
|
||||
set_state = true;
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_STOPPED:
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
case AUDIO_STREAM_STATE_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
if (set_state)
|
||||
{
|
||||
audio_mixer_voice_t *voice = audio_mixer_streams[i].voice;
|
||||
|
||||
if (voice)
|
||||
audio_mixer_stop(voice);
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_STOPPED;
|
||||
audio_mixer_streams[i].volume = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i)
|
||||
{
|
||||
bool destroy = false;
|
||||
|
||||
if (i >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
{
|
||||
case AUDIO_STREAM_STATE_PLAYING:
|
||||
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
|
||||
case AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL:
|
||||
audio_driver_mixer_stop_stream(i);
|
||||
destroy = true;
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_STOPPED:
|
||||
destroy = true;
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
if (destroy)
|
||||
{
|
||||
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
|
||||
if (!string_is_empty(audio_mixer_streams[i].name))
|
||||
free(audio_mixer_streams[i].name);
|
||||
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
audio_mixer_streams[i].name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_deinit(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, false);
|
||||
audio_mixer_active = false;
|
||||
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
{
|
||||
audio_driver_mixer_stop_stream(i);
|
||||
audio_driver_mixer_remove_stream(i);
|
||||
}
|
||||
|
||||
audio_mixer_current_max_idx = 0;
|
||||
audio_mixer_done();
|
||||
}
|
||||
|
||||
@@ -1351,15 +1580,6 @@ void audio_set_bool(enum audio_action action, bool val)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* db_to_gain:
|
||||
* @db : Decibels.
|
||||
*
|
||||
* Converts decibels to voltage gain.
|
||||
*
|
||||
* Returns: voltage gain value.
|
||||
**/
|
||||
#define db_to_gain(db) (powf(10.0f, (db) / 20.0f))
|
||||
|
||||
void audio_set_float(enum audio_action action, float val)
|
||||
{
|
||||
|
||||
+47
-8
@@ -35,6 +35,8 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_MAX_RATIO 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
enum audio_action
|
||||
{
|
||||
AUDIO_ACTION_NONE = 0,
|
||||
@@ -46,6 +48,27 @@ enum audio_action
|
||||
AUDIO_ACTION_MIXER
|
||||
};
|
||||
|
||||
enum audio_mixer_state
|
||||
{
|
||||
AUDIO_STREAM_STATE_NONE = 0,
|
||||
AUDIO_STREAM_STATE_STOPPED,
|
||||
AUDIO_STREAM_STATE_PLAYING,
|
||||
AUDIO_STREAM_STATE_PLAYING_LOOPED,
|
||||
AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL
|
||||
};
|
||||
|
||||
typedef struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
enum audio_mixer_state state;
|
||||
float volume;
|
||||
void *buf;
|
||||
char *name;
|
||||
size_t bufsize;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_statistics
|
||||
{
|
||||
float average_buffer_saturation;
|
||||
@@ -137,20 +160,13 @@ typedef struct audio_driver
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
enum audio_mixer_state
|
||||
{
|
||||
AUDIO_STREAM_STATE_NONE = 0,
|
||||
AUDIO_STREAM_STATE_STOPPED,
|
||||
AUDIO_STREAM_STATE_PLAYING,
|
||||
AUDIO_STREAM_STATE_PLAYING_LOOPED
|
||||
};
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
float volume;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
void *buf;
|
||||
char *basename;
|
||||
size_t bufsize;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
} audio_mixer_stream_params_t;
|
||||
@@ -271,10 +287,32 @@ bool audio_driver_deinit(void);
|
||||
|
||||
bool audio_driver_init(void);
|
||||
|
||||
void audio_driver_menu_sample(void);
|
||||
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_stop_stream(unsigned i);
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i);
|
||||
|
||||
void audio_driver_mixer_set_stream_volume(unsigned i, float vol);
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i);
|
||||
|
||||
enum resampler_quality audio_driver_get_resampler_quality(void);
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||
|
||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
@@ -300,6 +338,7 @@ 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_switch_thread;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
extern audio_driver_t audio_null;
|
||||
|
||||
|
||||
+27
-1
@@ -32,7 +32,9 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
#ifdef HAVE_THREADS
|
||||
#include <rthreads/rthreads.h>
|
||||
#endif
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
@@ -59,7 +61,11 @@ typedef struct dsound
|
||||
CRITICAL_SECTION crit;
|
||||
|
||||
HANDLE event;
|
||||
#ifdef HAVE_THREADS
|
||||
sthread_t *thread;
|
||||
#else
|
||||
HANDLE thread;
|
||||
#endif
|
||||
|
||||
unsigned buffer_size;
|
||||
|
||||
@@ -137,7 +143,11 @@ static INLINE void release_region(dsound_t *ds, const struct audio_lock *region)
|
||||
region->size1, region->chunk2, region->size2);
|
||||
}
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
static void dsound_thread(void *data)
|
||||
#else
|
||||
static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
#endif
|
||||
{
|
||||
DWORD write_ptr;
|
||||
dsound_t *ds = (dsound_t*)data;
|
||||
@@ -219,7 +229,13 @@ static void dsound_stop_thread(dsound_t *ds)
|
||||
|
||||
ds->thread_alive = false;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
sthread_join(ds->thread);
|
||||
#else
|
||||
WaitForSingleObject(ds->thread, INFINITE);
|
||||
CloseHandle(ds->thread);
|
||||
#endif
|
||||
|
||||
ds->thread = NULL;
|
||||
}
|
||||
|
||||
@@ -228,7 +244,12 @@ static bool dsound_start_thread(dsound_t *ds)
|
||||
if (!ds->thread)
|
||||
{
|
||||
ds->thread_alive = true;
|
||||
ds->thread = sthread_create(dsound_thread, ds);
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
ds->thread = sthread_create(dsound_thread, ds);
|
||||
#else
|
||||
ds->thread = CreateThread(NULL, 0, dsound_thread, ds, 0, NULL);
|
||||
#endif
|
||||
if (!ds->thread)
|
||||
return false;
|
||||
}
|
||||
@@ -261,7 +282,12 @@ static void dsound_free(void *data)
|
||||
if (ds->thread)
|
||||
{
|
||||
ds->thread_alive = false;
|
||||
#ifdef HAVE_THREADS
|
||||
sthread_join(ds->thread);
|
||||
#else
|
||||
WaitForSingleObject(ds->thread, INFINITE);
|
||||
CloseHandle(ds->thread);
|
||||
#endif
|
||||
}
|
||||
|
||||
DeleteCriticalSection(&ds->crit);
|
||||
|
||||
+136
-71
@@ -1,4 +1,6 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 - misson20000
|
||||
* Copyright (C) 2018 - m4xw
|
||||
*
|
||||
* 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-
|
||||
@@ -17,12 +19,16 @@
|
||||
#include <malloc.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include<libtransistor/nx.h>
|
||||
#include<libtransistor/alloc_pages.h>
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#define BUFFER_COUNT 5
|
||||
#else
|
||||
#define BUFFER_COUNT 3
|
||||
#endif
|
||||
|
||||
static const int sample_rate = 48000;
|
||||
static const int max_num_samples = sample_rate;
|
||||
static const int num_channels = 2;
|
||||
@@ -30,38 +36,57 @@ static const size_t sample_buffer_size = ((max_num_samples * num_channels * size
|
||||
|
||||
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;
|
||||
compat_audio_out_buffer buffers[BUFFER_COUNT];
|
||||
compat_audio_out_buffer *current_buffer;
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
audio_output_t output;
|
||||
handle_t event;
|
||||
#endif
|
||||
} switch_audio_t;
|
||||
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int samplecount = (sample_rate / framerate);
|
||||
return (samplecount * num_channels * sizeof(uint16_t));
|
||||
#else
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
static size_t switch_audio_buffer_size(void *data)
|
||||
{
|
||||
(void) data;
|
||||
#ifdef HAVE_LIBNX
|
||||
return (switch_audio_data_size() + 0xfff) & ~0xfff;
|
||||
#else
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
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)
|
||||
return -1;
|
||||
|
||||
if (!swa->current_buffer)
|
||||
{
|
||||
uint32_t num;
|
||||
if (audio_ipc_output_get_released_buffer(&swa->output, &num, &swa->current_buffer) != RESULT_OK)
|
||||
if (switch_audio_ipc_output_get_released_buffer(swa, num) != 0)
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -73,47 +98,46 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
|
||||
while(swa->current_buffer == NULL)
|
||||
{
|
||||
uint32_t num;
|
||||
uint32_t handle_idx;
|
||||
uint32_t handle_idx = 0;
|
||||
num = 0;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
if (audoutWaitPlayFinish(&swa->current_buffer, &num, U64_MAX) != 0) { }
|
||||
#else
|
||||
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)
|
||||
if (switch_audio_ipc_output_get_released_buffer(swa, num) != 0)
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
}
|
||||
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;
|
||||
if (to_write > switch_audio_buffer_size(NULL) - swa->current_buffer->data_size)
|
||||
to_write = switch_audio_buffer_size(NULL) - swa->current_buffer->data_size;
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
memcpy(((uint8_t*) swa->current_buffer->buffer) + swa->current_buffer->data_size, buf, to_write);
|
||||
#endif
|
||||
swa->current_buffer->data_size += to_write;
|
||||
swa->current_buffer->buffer_size = sample_buffer_size;
|
||||
swa->current_buffer->buffer_size = switch_audio_buffer_size(NULL);
|
||||
|
||||
if (swa->current_buffer->data_size > (48000*swa->latency)/1000)
|
||||
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;
|
||||
}
|
||||
if (switch_audio_ipc_output_append_buffer(swa, swa->current_buffer) != 0)
|
||||
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;
|
||||
@@ -125,25 +149,32 @@ static bool switch_audio_stop(void *data)
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
if(!swa->is_paused) {
|
||||
if(audio_ipc_output_stop(&swa->output) != RESULT_OK)
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
|
||||
if (!swa->is_paused)
|
||||
if (switch_audio_ipc_output_stop(swa) != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
swa->is_paused = true;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool switch_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
if(swa->is_paused) {
|
||||
if (audio_ipc_output_start(&swa->output) != RESULT_OK)
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
if (swa->is_paused)
|
||||
if (switch_audio_ipc_output_start(swa) != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
swa->is_paused = false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -159,8 +190,22 @@ static void switch_audio_free(void *data)
|
||||
{
|
||||
switch_audio_t *swa = (switch_audio_t*) data;
|
||||
|
||||
if (!swa)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
if (!swa->is_paused)
|
||||
audoutStopAudioOut();
|
||||
|
||||
audoutExit();
|
||||
|
||||
int i;
|
||||
for (i = 0; i < BUFFER_COUNT; i++)
|
||||
free(swa->buffers[i].buffer);
|
||||
#else
|
||||
audio_ipc_output_close(&swa->output);
|
||||
audio_ipc_finalize();
|
||||
#endif
|
||||
free(swa);
|
||||
}
|
||||
|
||||
@@ -189,11 +234,10 @@ static void switch_audio_set_nonblock_state(void *data, bool state)
|
||||
}
|
||||
|
||||
static void *switch_audio_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
result_t r;
|
||||
unsigned i;
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
@@ -202,12 +246,14 @@ static void *switch_audio_init(const char *device,
|
||||
if (!swa)
|
||||
return NULL;
|
||||
|
||||
r = audio_ipc_init();
|
||||
|
||||
if (r != RESULT_OK)
|
||||
if (switch_audio_ipc_init() != 0)
|
||||
goto fail;
|
||||
|
||||
if (audio_ipc_list_outputs(&names[0], 8, &num_names) != RESULT_OK)
|
||||
#ifdef HAVE_LIBNX
|
||||
if (audoutStartAudioOut() != 0)
|
||||
goto fail;
|
||||
#else
|
||||
if (audio_ipc_list_outputs(&names[0], 8, &num_names) != 0)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (num_names != 1)
|
||||
@@ -216,7 +262,7 @@ static void *switch_audio_init(const char *device,
|
||||
goto fail_audio_ipc;
|
||||
}
|
||||
|
||||
if (audio_ipc_open_output(names[0], &swa->output) != RESULT_OK)
|
||||
if (audio_ipc_open_output(names[0], &swa->output) != 0)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (swa->output.sample_rate != sample_rate)
|
||||
@@ -239,51 +285,70 @@ static void *switch_audio_init(const char *device,
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (audio_ipc_output_register_buffer_event(&swa->output, &swa->event) != RESULT_OK)
|
||||
if (audio_ipc_output_register_buffer_event(&swa->output, &swa->event) != 0)
|
||||
goto fail_audio_output;
|
||||
#endif
|
||||
|
||||
swa->blocking = block_frames;
|
||||
|
||||
*new_rate = swa->output.sample_rate;
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
for (i = 0; i < BUFFER_COUNT; i++)
|
||||
{
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].sample_data = alloc_pages(sample_buffer_size, sample_buffer_size, NULL);
|
||||
swa->buffers[i].buffer_size = sample_buffer_size;
|
||||
swa->buffers[i].data_size = sample_buffer_size;
|
||||
swa->buffers[i].unknown = 0;
|
||||
swa->buffers[i].buffer_size = switch_audio_buffer_size(NULL);
|
||||
swa->buffers[i].data_size = switch_audio_data_size();
|
||||
|
||||
if(swa->buffers[i].sample_data == NULL)
|
||||
#ifdef HAVE_LIBNX
|
||||
swa->buffers[i].next = NULL; /* Unused */
|
||||
swa->buffers[i].data_offset = 0;
|
||||
swa->buffers[i].buffer = memalign(0x1000, switch_audio_buffer_size(NULL));
|
||||
|
||||
if (swa->buffers[i].buffer == NULL)
|
||||
goto fail_audio_output;
|
||||
|
||||
memset(swa->buffers[i].buffer, 0, switch_audio_buffer_size(NULL));
|
||||
#else
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].unknown = 0;
|
||||
swa->buffers[i].sample_data = alloc_pages(sample_buffer_size, switch_audio_buffer_size(NULL), NULL);
|
||||
|
||||
if (swa->buffers[i].sample_data == NULL)
|
||||
goto fail_audio_output;
|
||||
|
||||
if (audio_ipc_output_append_buffer(&swa->output, &swa->buffers[i]) != RESULT_OK)
|
||||
#endif
|
||||
|
||||
if (switch_audio_ipc_output_append_buffer(swa, &swa->buffers[i]) != 0)
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
*new_rate = audoutGetSampleRate();
|
||||
#else
|
||||
*new_rate = swa->output.sample_rate;
|
||||
#endif
|
||||
|
||||
swa->current_buffer = NULL;
|
||||
swa->latency = latency;
|
||||
swa->last_append = svcGetSystemTick();
|
||||
|
||||
swa->blocking = block_frames;
|
||||
swa->is_paused = true;
|
||||
|
||||
RARCH_LOG("[Audio]: Audio initialized\n");
|
||||
|
||||
return swa;
|
||||
|
||||
fail_audio_output:
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
audio_ipc_output_close(&swa->output);
|
||||
#endif
|
||||
fail_audio_ipc:
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
audio_ipc_finalize();
|
||||
#endif
|
||||
fail:
|
||||
free(swa);
|
||||
if (swa)
|
||||
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,
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
#ifndef _SWITCH_AUDIO_COMPAT_H
|
||||
#define _SWITCH_AUDIO_COMPAT_H
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#include <switch.h>
|
||||
#else
|
||||
#include <libtransistor/nx.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
|
||||
/* libnx definitions */
|
||||
|
||||
/* threading */
|
||||
typedef Mutex compat_mutex;
|
||||
typedef Thread compat_thread;
|
||||
typedef CondVar compat_condvar;
|
||||
|
||||
#define compat_thread_create(thread, func, data, stack_size, prio, cpu) \
|
||||
threadCreate(thread, func, data, stack_size, prio, cpu)
|
||||
#define compat_thread_start(thread) \
|
||||
threadStart(thread)
|
||||
#define compat_thread_join(thread) \
|
||||
threadWaitForExit(thread)
|
||||
#define compat_thread_close(thread) \
|
||||
threadClose(thread)
|
||||
#define compat_mutex_create(mutex) \
|
||||
mutexInit(mutex)
|
||||
#define compat_mutex_lock(mutex) \
|
||||
mutexLock(mutex)
|
||||
#define compat_mutex_unlock(mutex) \
|
||||
mutexUnlock(mutex)
|
||||
#define compat_condvar_create(condvar) \
|
||||
condvarInit(condvar)
|
||||
#define compat_condvar_wait(condvar, mutex) \
|
||||
condvarWait(condvar, mutex)
|
||||
#define compat_condvar_wake_all(condvar) \
|
||||
condvarWakeAll(condvar)
|
||||
|
||||
/* audio */
|
||||
typedef AudioOutBuffer compat_audio_out_buffer;
|
||||
#define switch_audio_ipc_init audoutInitialize
|
||||
#define switch_audio_ipc_finalize audoutExit
|
||||
#define switch_audio_ipc_output_get_released_buffer(a, b) audoutGetReleasedAudioOutBuffer(&a->current_buffer, &b)
|
||||
#define switch_audio_ipc_output_append_buffer(a, b) audoutAppendAudioOutBuffer(b)
|
||||
#define switch_audio_ipc_output_stop(a) audoutStopAudioOut()
|
||||
#define switch_audio_ipc_output_start(a) audoutStartAudioOut()
|
||||
|
||||
#else
|
||||
|
||||
/* libtransistor definitions */
|
||||
|
||||
typedef result_t Result;
|
||||
#define R_FAILED(r) ((r) != RESULT_OK)
|
||||
|
||||
/* threading */
|
||||
typedef trn_mutex_t compat_mutex;
|
||||
typedef trn_thread_t compat_thread;
|
||||
typedef trn_condvar_t compat_condvar;
|
||||
|
||||
#define compat_thread_create(thread, func, data, stack_size, prio, cpu) \
|
||||
trn_thread_create(thread, func, data, prio, cpu, stack_size, NULL)
|
||||
#define compat_thread_start(thread) \
|
||||
trn_thread_start(thread)
|
||||
#define compat_thread_join(thread) \
|
||||
trn_thread_join(thread, -1)
|
||||
#define compat_thread_close(thread) \
|
||||
trn_thread_destroy(thread)
|
||||
#define compat_mutex_create(mutex) \
|
||||
trn_mutex_create(mutex)
|
||||
#define compat_mutex_lock(mutex) \
|
||||
trn_mutex_lock(mutex)
|
||||
#define compat_mutex_unlock(mutex) \
|
||||
trn_mutex_unlock(mutex)
|
||||
#define compat_condvar_create(condvar) \
|
||||
trn_condvar_create(condvar)
|
||||
#define compat_condvar_wait(condvar, mutex) \
|
||||
trn_condvar_wait(condvar, mutex, -1)
|
||||
#define compat_condvar_wake_all(condvar) \
|
||||
trn_condvar_signal(condvar, -1)
|
||||
|
||||
/* audio */
|
||||
typedef audio_output_buffer_t compat_audio_out_buffer;
|
||||
#define switch_audio_ipc_init audio_ipc_init
|
||||
#define switch_audio_ipc_finalize audio_ipc_finalize
|
||||
#define switch_audio_ipc_output_get_released_buffer(a, b) audio_ipc_output_get_released_buffer(&a->output, &b, &a->current_buffer)
|
||||
#define switch_audio_ipc_output_append_buffer(a, b) audio_ipc_output_append_buffer(&a->output, b)
|
||||
#define switch_audio_ipc_output_stop(a) audio_ipc_output_stop(&a->output)
|
||||
#define switch_audio_ipc_output_start(a) audio_ipc_output_start(&a->output)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,448 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 - misson20000
|
||||
* Copyright (C) 2018 - m4xw
|
||||
* Copyright (C) 2018 - lifajucejo
|
||||
*
|
||||
* 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 <sys/unistd.h>
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#include <switch.h>
|
||||
#else
|
||||
#include <libtransistor/nx.h>
|
||||
#endif
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
|
||||
static const size_t thread_stack_size = 1024 * 8;
|
||||
static const int thread_preferred_cpu = 2;
|
||||
static const int channel_count = 2;
|
||||
static const size_t sample_size = sizeof(uint16_t);
|
||||
static const size_t frame_size = channel_count * sample_size;
|
||||
|
||||
#define AUDIO_BUFFER_COUNT 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fifo_buffer_t* fifo;
|
||||
compat_mutex fifoLock;
|
||||
compat_condvar cond;
|
||||
compat_mutex condLock;
|
||||
|
||||
size_t fifoSize;
|
||||
|
||||
volatile bool running;
|
||||
bool nonblocking;
|
||||
bool is_paused;
|
||||
|
||||
compat_audio_out_buffer buffers[AUDIO_BUFFER_COUNT];
|
||||
compat_thread thread;
|
||||
|
||||
unsigned latency;
|
||||
uint32_t sampleRate;
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
audio_output_t output;
|
||||
handle_t event;
|
||||
#endif
|
||||
} switch_thread_audio_t;
|
||||
|
||||
static void mainLoop(void* data)
|
||||
{
|
||||
Result rc;
|
||||
uint32_t released_out_count = 0;
|
||||
compat_audio_out_buffer *released_out_buffer = NULL;
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t*)data;
|
||||
|
||||
if (!swa)
|
||||
return;
|
||||
|
||||
RARCH_LOG("[Audio]: start mainLoop cpu %u tid %u\n", svcGetCurrentProcessorNumber(), swa->thread.handle);
|
||||
|
||||
|
||||
while (swa->running)
|
||||
{
|
||||
size_t buf_avail, avail, to_write;
|
||||
|
||||
if (!released_out_buffer)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
rc = audoutWaitPlayFinish(&released_out_buffer, &released_out_count, U64_MAX);
|
||||
#else
|
||||
uint32_t handle_idx = 0;
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
svcResetSignal(swa->event);
|
||||
|
||||
rc = audio_ipc_output_get_released_buffer(&swa->output, &released_out_count, &released_out_buffer);
|
||||
#endif
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
swa->running = false;
|
||||
RARCH_LOG("[Audio]: audoutGetReleasedAudioOutBuffer failed: %d\n", (int)rc);
|
||||
break;
|
||||
}
|
||||
released_out_buffer->data_size = 0;
|
||||
}
|
||||
|
||||
buf_avail = released_out_buffer->buffer_size - released_out_buffer->data_size;
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
|
||||
avail = fifo_read_avail(swa->fifo);
|
||||
to_write = MIN(avail, buf_avail);
|
||||
if (to_write > 0)
|
||||
{
|
||||
uint8_t *base;
|
||||
#ifdef HAVE_LIBNX
|
||||
base = (uint8_t*) released_out_buffer->buffer;
|
||||
#else
|
||||
base = (uint8_t*) released_out_buffer->sample_data;
|
||||
#endif
|
||||
fifo_read(swa->fifo, base + released_out_buffer->data_size, to_write);
|
||||
}
|
||||
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
compat_condvar_wake_all(&swa->cond);
|
||||
|
||||
released_out_buffer->data_size += to_write;
|
||||
if (released_out_buffer->data_size >= released_out_buffer->buffer_size / 2)
|
||||
{
|
||||
rc = switch_audio_ipc_output_append_buffer(swa, released_out_buffer);
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
RARCH_LOG("[Audio]: audoutAppendAudioOutBuffer failed: %d\n", (int)rc);
|
||||
}
|
||||
released_out_buffer = NULL;
|
||||
}
|
||||
else
|
||||
svcSleepThread(16000000); /* 16ms */
|
||||
}
|
||||
}
|
||||
|
||||
static void *switch_thread_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
|
||||
{
|
||||
Result rc;
|
||||
unsigned i;
|
||||
uint32_t prio;
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)calloc(1, sizeof(*swa));
|
||||
|
||||
if (!swa)
|
||||
return NULL;
|
||||
|
||||
swa->running = true;
|
||||
swa->nonblocking = true;
|
||||
swa->is_paused = true;
|
||||
swa->latency = MAX(latency, 8);
|
||||
|
||||
rc = switch_audio_ipc_init();
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
RARCH_LOG("[Audio]: audio init failed %d\n", (int)rc);
|
||||
free(swa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
rc = audoutStartAudioOut();
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
RARCH_LOG("[Audio]: audio start init failed: %d\n", (int)rc);
|
||||
goto fail_audio_ipc;
|
||||
}
|
||||
|
||||
swa->sampleRate = audoutGetSampleRate();
|
||||
#else
|
||||
if (audio_ipc_list_outputs(&names[0], 8, &num_names) != RESULT_OK)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (num_names != 1)
|
||||
{
|
||||
RARCH_ERR("[Audio]: 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;
|
||||
|
||||
swa->sampleRate = swa->output.sample_rate;
|
||||
|
||||
if (swa->output.num_channels != 2)
|
||||
{
|
||||
RARCH_ERR("expected %d channels, got %d\n", 2,
|
||||
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) != 0)
|
||||
goto fail_audio_output;
|
||||
#endif
|
||||
|
||||
*new_rate = swa->sampleRate;
|
||||
swa->fifoSize = (swa->sampleRate * sample_size * swa->latency) / 1000;
|
||||
|
||||
for (i = 0; i < AUDIO_BUFFER_COUNT; i++)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
swa->buffers[i].next = NULL; /* Unused */
|
||||
swa->buffers[i].data_offset = 0;
|
||||
swa->buffers[i].buffer_size = swa->fifoSize;
|
||||
swa->buffers[i].data_size = swa->buffers[i].buffer_size;
|
||||
swa->buffers[i].buffer = memalign(0x1000, swa->buffers[i].buffer_size);
|
||||
|
||||
if (swa->buffers[i].buffer == NULL)
|
||||
goto fail;
|
||||
|
||||
memset(swa->buffers[i].buffer, 0, swa->buffers[i].buffer_size);
|
||||
#else
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].unknown = 0;
|
||||
swa->buffers[i].buffer_size = swa->fifoSize;
|
||||
swa->buffers[i].data_size = swa->buffers[i].buffer_size;
|
||||
swa->buffers[i].sample_data = alloc_pages(swa->buffers[i].buffer_size, swa->buffers[i].buffer_size, NULL);
|
||||
|
||||
if (swa->buffers[i].sample_data == NULL)
|
||||
goto fail_audio_output;
|
||||
|
||||
memset(swa->buffers[i].sample_data, 0, swa->buffers[i].buffer_size);
|
||||
#endif
|
||||
|
||||
if (switch_audio_ipc_output_append_buffer(swa, &swa->buffers[i]) != 0)
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
compat_mutex_create(&swa->fifoLock);
|
||||
swa->fifo = fifo_new(swa->fifoSize);
|
||||
|
||||
compat_condvar_create(&swa->cond);
|
||||
|
||||
RARCH_LOG("[Audio]: switch_thread_audio_init device %s requested rate %hu rate %hu latency %hu block_frames %hu fifoSize %lu\n",
|
||||
device, rate, swa->sampleRate, swa->latency, block_frames, swa->fifoSize);
|
||||
|
||||
svcGetThreadPriority(&prio, 0xffff8000);
|
||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, thread_stack_size, prio - 1, thread_preferred_cpu);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
RARCH_LOG("[Audio]: thread creation failed create %u\n", swa->thread.handle);
|
||||
swa->running = false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (R_FAILED(compat_thread_start(&swa->thread)))
|
||||
{
|
||||
RARCH_LOG("[Audio]: thread creation failed start %u\n", swa->thread.handle);
|
||||
compat_thread_close(&swa->thread);
|
||||
swa->running = false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return swa;
|
||||
|
||||
fail_audio_output:
|
||||
#ifndef HAVE_LIBNX
|
||||
audio_ipc_output_close(&swa->output);
|
||||
#endif
|
||||
fail_audio_ipc:
|
||||
switch_audio_ipc_finalize();
|
||||
fail:
|
||||
free(swa); // freeing a null ptr is valid
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool switch_thread_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
/* RARCH_LOG("[Audio]: switch_thread_audio_start\n"); */
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
swa->is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool switch_thread_audio_stop(void *data)
|
||||
{
|
||||
switch_thread_audio_t* swa = (switch_thread_audio_t*)data;
|
||||
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
swa->is_paused = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void switch_thread_audio_free(void *data)
|
||||
{
|
||||
unsigned i;
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (!swa)
|
||||
return;
|
||||
|
||||
if (swa->running)
|
||||
{
|
||||
swa->running = false;
|
||||
compat_thread_join(&swa->thread);
|
||||
compat_thread_close(&swa->thread);
|
||||
}
|
||||
|
||||
switch_audio_ipc_output_stop(swa);
|
||||
switch_audio_ipc_finalize();
|
||||
|
||||
if (swa->fifo)
|
||||
{
|
||||
fifo_free(swa->fifo);
|
||||
swa->fifo = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(swa->buffers); i++)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
free(swa->buffers[i].buffer);
|
||||
#else
|
||||
free_pages(swa->buffers[i].sample_data);
|
||||
#endif
|
||||
}
|
||||
|
||||
free(swa);
|
||||
swa = NULL;
|
||||
}
|
||||
|
||||
static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t avail, written;
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (!swa || !swa->running)
|
||||
return 0;
|
||||
|
||||
if (swa->nonblocking)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
written = MIN(avail, size);
|
||||
if (written > 0)
|
||||
fifo_write(swa->fifo, buf, written);
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
written = 0;
|
||||
while (written < size && swa->running)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
if (avail == 0)
|
||||
{
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
compat_mutex_lock(&swa->condLock);
|
||||
if (swa->running)
|
||||
compat_condvar_wait(&swa->cond, &swa->condLock);
|
||||
compat_mutex_unlock(&swa->condLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t write_amt = MIN(size - written, avail);
|
||||
fifo_write(swa->fifo, (const char*)buf + written, write_amt);
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
written += write_amt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
static bool switch_thread_audio_alive(void *data)
|
||||
{
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (!swa)
|
||||
return false;
|
||||
|
||||
return !swa->is_paused;
|
||||
}
|
||||
|
||||
static void switch_thread_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (swa)
|
||||
swa->nonblocking = state;
|
||||
}
|
||||
|
||||
static bool switch_thread_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t switch_thread_audio_write_avail(void *data)
|
||||
{
|
||||
size_t val;
|
||||
switch_thread_audio_t* swa = (switch_thread_audio_t*)data;
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
val = fifo_write_avail(swa->fifo);
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
size_t switch_thread_audio_buffer_size(void *data)
|
||||
{
|
||||
switch_thread_audio_t *swa = (switch_thread_audio_t *)data;
|
||||
|
||||
if (!swa)
|
||||
return 0;
|
||||
|
||||
return swa->fifoSize;
|
||||
}
|
||||
|
||||
audio_driver_t audio_switch_thread = {
|
||||
switch_thread_audio_init,
|
||||
switch_thread_audio_write,
|
||||
switch_thread_audio_stop,
|
||||
switch_thread_audio_start,
|
||||
switch_thread_audio_alive,
|
||||
switch_thread_audio_set_nonblock_state,
|
||||
switch_thread_audio_free,
|
||||
switch_thread_audio_use_float,
|
||||
"switch_thread",
|
||||
NULL, /* device_list_new */
|
||||
NULL, /* device_list_free */
|
||||
switch_thread_audio_write_avail,
|
||||
switch_thread_audio_buffer_size
|
||||
};
|
||||
|
||||
/* vim: set ts=3 sw=3 */
|
||||
@@ -84,7 +84,7 @@ static void* ax_audio_init(const char* device, unsigned rate, unsigned latency,
|
||||
u16 setup_buf[0x30] = {0};
|
||||
setup_buf[0x25] = 2; /* we request 2 channels */
|
||||
AXInitParams init = {AX_INIT_RENDERER_48KHZ, 0, 0};
|
||||
AXVoiceVeData ve = {0xF000, 0};
|
||||
AXVoiceVeData ve = {0x8000, 0};
|
||||
ax_audio_t* ax = (ax_audio_t*)calloc(1, sizeof(ax_audio_t));
|
||||
|
||||
if (!ax)
|
||||
|
||||
@@ -70,7 +70,7 @@ typedef struct video4linux
|
||||
char dev_name[255];
|
||||
} video4linux_t;
|
||||
|
||||
static int xioctl(int fd, int request, void *args)
|
||||
static int xioctl(int fd, unsigned long request, void *args)
|
||||
{
|
||||
int r;
|
||||
|
||||
@@ -91,7 +91,7 @@ static bool init_mmap(void *data)
|
||||
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
req.memory = V4L2_MEMORY_MMAP;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_REQBUFS, &req) == -1)
|
||||
if (xioctl(v4l->fd, VIDIOC_REQBUFS, &req) == -1)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
RARCH_ERR("[V4L2]: %s does not support memory mapping.\n", v4l->dev_name);
|
||||
@@ -122,7 +122,7 @@ static bool init_mmap(void *data)
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = v4l->n_buffers;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYBUF, &buf) == -1)
|
||||
if (xioctl(v4l->fd, VIDIOC_QUERYBUF, &buf) == -1)
|
||||
{
|
||||
RARCH_ERR("[V4L2]: Error - xioctl VIDIOC_QUERYBUF.\n");
|
||||
return false;
|
||||
@@ -152,7 +152,7 @@ static bool init_device(void *data)
|
||||
struct v4l2_cropcap cropcap = {0};
|
||||
video4linux_t *v4l = (video4linux_t*)data;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYCAP, &cap) < 0)
|
||||
if (xioctl(v4l->fd, VIDIOC_QUERYCAP, &cap) < 0)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
RARCH_ERR("[V4L2]: %s is no V4L2 device.\n", v4l->dev_name);
|
||||
@@ -176,7 +176,7 @@ static bool init_device(void *data)
|
||||
|
||||
cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_CROPCAP, &cropcap) == 0)
|
||||
if (xioctl(v4l->fd, VIDIOC_CROPCAP, &cropcap) == 0)
|
||||
{
|
||||
crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
crop.c = cropcap.defrect;
|
||||
@@ -190,7 +190,7 @@ static bool init_device(void *data)
|
||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
|
||||
fmt.fmt.pix.field = V4L2_FIELD_NONE;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_S_FMT, &fmt) < 0)
|
||||
if (xioctl(v4l->fd, VIDIOC_S_FMT, &fmt) < 0)
|
||||
{
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_S_FMT\n");
|
||||
return false;
|
||||
@@ -248,7 +248,7 @@ static bool v4l_start(void *data)
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
buf.index = i;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1)
|
||||
if (xioctl(v4l->fd, VIDIOC_QBUF, &buf) == -1)
|
||||
{
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_QBUF.\n");
|
||||
return false;
|
||||
@@ -364,7 +364,7 @@ static bool preprocess_image(void *data)
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_DQBUF, &buf) == -1)
|
||||
if (xioctl(v4l->fd, VIDIOC_DQBUF, &buf) == -1)
|
||||
{
|
||||
switch (errno)
|
||||
{
|
||||
@@ -384,7 +384,7 @@ static bool preprocess_image(void *data)
|
||||
|
||||
scaler_ctx_scale_direct(ctx, v4l->buffer_output, (const uint8_t*)v4l->buffers[buf.index].start);
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1)
|
||||
if (xioctl(v4l->fd, VIDIOC_QBUF, &buf) == -1)
|
||||
RARCH_ERR("[V4L2]: VIDIOC_QBUF\n");
|
||||
|
||||
return true;
|
||||
|
||||
+299
-555
File diff suppressed because it is too large.
Load diff
@@ -38,6 +38,20 @@ End of setup
|
||||
|
||||
#define CHEEVOS_TAG "[CHEEVOS]: "
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
|
||||
#define CHEEVOS_LOG RARCH_LOG
|
||||
#define CHEEVOS_ERR RARCH_ERR
|
||||
|
||||
#else
|
||||
|
||||
void cheevos_log(const char *fmt, ...);
|
||||
|
||||
#define CHEEVOS_LOG cheevos_log
|
||||
#define CHEEVOS_ERR cheevos_log
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct cheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
@@ -139,6 +153,8 @@ bool cheevos_get_support_cheevos(void);
|
||||
cheevos_console_t cheevos_get_console(void);
|
||||
|
||||
extern bool cheevos_loaded;
|
||||
extern bool cheevos_hardcore_active;
|
||||
extern bool cheevos_hardcore_paused;
|
||||
extern int cheats_are_enabled;
|
||||
extern int cheats_were_enabled;
|
||||
|
||||
|
||||
+1
-4
@@ -65,7 +65,7 @@ static cheevos_cond_op_t cheevos_cond_parse_operator(const char** memaddr)
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
|
||||
op = CHEEVOS_COND_OP_EQUALS;
|
||||
}
|
||||
|
||||
@@ -168,9 +168,6 @@ void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsign
|
||||
if (index == which)
|
||||
{
|
||||
cheevos_cond_parse(cond, &memaddr);
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
/*cheevos_log_cond(cond);*/
|
||||
#endif
|
||||
cond++;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -47,6 +47,7 @@ typedef struct
|
||||
cheevos_cond_type_t type;
|
||||
unsigned req_hits;
|
||||
unsigned curr_hits;
|
||||
char pause;
|
||||
|
||||
cheevos_var_t source;
|
||||
cheevos_cond_op_t op;
|
||||
|
||||
+1
-12
@@ -24,17 +24,6 @@
|
||||
#include "../core.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
static void STUB_LOG(const char *fmt, ...)
|
||||
{
|
||||
(void)fmt;
|
||||
}
|
||||
|
||||
#ifdef CHEEVOS_VERBOSE
|
||||
#define CHEEVOS_LOG RARCH_LOG
|
||||
#else
|
||||
#define CHEEVOS_LOG STUB_LOG
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
Parsing
|
||||
*****************************************************************************/
|
||||
@@ -327,7 +316,7 @@ uint8_t* cheevos_var_get_memory(const cheevos_var_t* var)
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
default:
|
||||
RARCH_ERR(CHEEVOS_TAG "invalid bank id: %s\n", var->bank_id);
|
||||
CHEEVOS_ERR(CHEEVOS_TAG "invalid bank id: %s\n", var->bank_id);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2015-2017 - Andres Suarez
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@@ -44,6 +44,12 @@
|
||||
#include "cheevos/var.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
#include "discord/discord.h"
|
||||
#endif
|
||||
|
||||
#include "midi/midi_driver.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
#include "menu/menu_content.h"
|
||||
@@ -87,10 +93,13 @@
|
||||
#include "retroarch.h"
|
||||
#include "configuration.h"
|
||||
#include "input/input_remapping.h"
|
||||
#include "version.h"
|
||||
|
||||
#define DEFAULT_NETWORK_CMD_PORT 55355
|
||||
#define STDIN_BUF_SIZE 4096
|
||||
|
||||
extern bool discord_is_inited;
|
||||
|
||||
enum cmd_source_t
|
||||
{
|
||||
CMD_NONE = 0,
|
||||
@@ -124,6 +133,8 @@ struct command
|
||||
#endif
|
||||
};
|
||||
|
||||
static bool command_version(const char *arg);
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
static bool command_read_ram(const char *arg);
|
||||
static bool command_write_ram(const char *arg);
|
||||
@@ -131,6 +142,7 @@ static bool command_write_ram(const char *arg);
|
||||
|
||||
static const struct cmd_action_map action_map[] = {
|
||||
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
||||
{ "VERSION", command_version, "No argument"},
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
{ "READ_CORE_RAM", command_read_ram, "<address> <number of bytes>" },
|
||||
{ "WRITE_CORE_RAM", command_write_ram, "<address> <byte1> <byte2> ..." },
|
||||
@@ -149,7 +161,7 @@ static const struct cmd_map map[] = {
|
||||
{ "STATE_SLOT_PLUS", RARCH_STATE_SLOT_PLUS },
|
||||
{ "STATE_SLOT_MINUS", RARCH_STATE_SLOT_MINUS },
|
||||
{ "REWIND", RARCH_REWIND },
|
||||
{ "MOVIE_RECORD_TOGGLE", RARCH_MOVIE_RECORD_TOGGLE },
|
||||
{ "BSV_RECORD_TOGGLE", RARCH_BSV_RECORD_TOGGLE },
|
||||
{ "PAUSE_TOGGLE", RARCH_PAUSE_TOGGLE },
|
||||
{ "FRAMEADVANCE", RARCH_FRAMEADVANCE },
|
||||
{ "RESET", RARCH_RESET },
|
||||
@@ -169,6 +181,7 @@ static const struct cmd_map map[] = {
|
||||
{ "DISK_NEXT", RARCH_DISK_NEXT },
|
||||
{ "DISK_PREV", RARCH_DISK_PREV },
|
||||
{ "GRAB_MOUSE_TOGGLE", RARCH_GRAB_MOUSE_TOGGLE },
|
||||
{ "UI_COMPANION_TOGGLE", RARCH_UI_COMPANION_TOGGLE },
|
||||
{ "GAME_FOCUS_TOGGLE", RARCH_GAME_FOCUS_TOGGLE },
|
||||
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
||||
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
||||
@@ -187,8 +200,7 @@ static struct sockaddr_storage lastcmd_net_source;
|
||||
static socklen_t lastcmd_net_source_len;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#if defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
static bool command_reply(const char * data, size_t len)
|
||||
{
|
||||
switch (lastcmd_source)
|
||||
@@ -215,15 +227,16 @@ static bool command_reply(const char * data, size_t len)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool command_set_shader(const char *arg)
|
||||
{
|
||||
char msg[256];
|
||||
bool is_preset = false;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
enum rarch_shader_type type = video_shader_get_type_from_ext(
|
||||
path_get_extension(arg), &is_preset);
|
||||
#ifdef HAVE_MENU
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
#endif
|
||||
|
||||
if (type == RARCH_SHADER_NONE)
|
||||
return false;
|
||||
@@ -235,32 +248,54 @@ bool command_set_shader(const char *arg)
|
||||
arg);
|
||||
|
||||
retroarch_set_shader_preset(arg);
|
||||
#ifdef HAVE_MENU
|
||||
return menu_shader_manager_set_preset(shader, type, arg);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool command_version(const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
command_reply(reply, strlen(reply));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#define SMY_CMD_STR "READ_CORE_RAM"
|
||||
static bool command_read_ram(const char *arg)
|
||||
{
|
||||
cheevos_var_t var;
|
||||
unsigned i;
|
||||
char reply[256] = {0};
|
||||
const uint8_t * data = NULL;
|
||||
char *reply_at = NULL;
|
||||
char *reply = NULL;
|
||||
const uint8_t * data = NULL;
|
||||
char *reply_at = NULL;
|
||||
unsigned int nbytes = 0;
|
||||
unsigned int alloc_size = 0;
|
||||
int addr = -1;
|
||||
|
||||
reply[0] = '\0';
|
||||
if (sscanf(arg, "%x %d", &addr, &nbytes) != 2)
|
||||
return true;
|
||||
|
||||
strlcpy(reply, "READ_CORE_RAM ", sizeof(reply));
|
||||
reply_at = reply + strlen("READ_CORE_RAM ");
|
||||
strlcpy(reply_at, arg, sizeof(reply)-strlen(reply));
|
||||
alloc_size = 40 + nbytes * 3; /* We alloc more than needed, saving 20 bytes is not really relevant */
|
||||
reply = (char*) malloc(alloc_size);
|
||||
reply[0] = '\0';
|
||||
reply_at = reply + sprintf(reply, SMY_CMD_STR " %x", addr);
|
||||
|
||||
var.value = addr;
|
||||
|
||||
var.value = strtoul(reply_at, (char**)&reply_at, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
data = cheevos_var_get_memory(&var);
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
|
||||
if (data)
|
||||
{
|
||||
unsigned nbytes = strtol(reply_at, NULL, 10);
|
||||
|
||||
for (i=0;i<nbytes;i++)
|
||||
sprintf(reply_at+3*i, " %.2X", data[i]);
|
||||
reply_at[3*nbytes] = '\n';
|
||||
@@ -271,9 +306,11 @@ static bool command_read_ram(const char *arg)
|
||||
strlcpy(reply_at, " -1\n", sizeof(reply)-strlen(reply));
|
||||
command_reply(reply, reply_at+strlen(" -1\n") - reply);
|
||||
}
|
||||
free(reply);
|
||||
|
||||
return true;
|
||||
}
|
||||
#undef SMY_CMD_STR
|
||||
|
||||
static bool command_write_ram(const char *arg)
|
||||
{
|
||||
@@ -300,6 +337,7 @@ static bool command_write_ram(const char *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
static bool command_get_arg(const char *tok,
|
||||
const char **arg, unsigned *index)
|
||||
{
|
||||
@@ -325,7 +363,7 @@ static bool command_get_arg(const char *tok,
|
||||
if (str == tok)
|
||||
{
|
||||
const char *argument = str + strlen(action_map[i].str);
|
||||
if (*argument != ' ')
|
||||
if (*argument != ' ' && *argument != '\0')
|
||||
return false;
|
||||
|
||||
if (arg)
|
||||
@@ -340,6 +378,7 @@ static bool command_get_arg(const char *tok,
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||
static bool command_network_init(command_t *handle, uint16_t port)
|
||||
@@ -520,10 +559,10 @@ bool command_network_send(const char *cmd_)
|
||||
}
|
||||
free(command);
|
||||
|
||||
return ret;
|
||||
#else
|
||||
return false;
|
||||
if (ret)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAVE_STDIN_CMD
|
||||
@@ -1015,7 +1054,7 @@ static void command_event_init_controllers(void)
|
||||
/* Ideally these checks shouldn't be required but if we always
|
||||
* call core_set_controller_port_device input won't work on
|
||||
* cores that don't set port information properly */
|
||||
if (info && info->ports.size != 0 && i < info->ports.size)
|
||||
if (info && info->ports.size != 0)
|
||||
set_controller = true;
|
||||
break;
|
||||
default:
|
||||
@@ -1029,7 +1068,7 @@ static void command_event_init_controllers(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (set_controller)
|
||||
if (set_controller && info && i < info->ports.size)
|
||||
{
|
||||
pad.device = device;
|
||||
pad.port = i;
|
||||
@@ -1044,8 +1083,11 @@ static void command_event_deinit_core(bool reinit)
|
||||
cheevos_unload();
|
||||
#endif
|
||||
|
||||
RARCH_LOG("Unloading game..\n");
|
||||
core_unload_game();
|
||||
RARCH_LOG("Unloading core..\n");
|
||||
core_unload();
|
||||
RARCH_LOG("Unloading core symbols..\n");
|
||||
core_uninit_symbols();
|
||||
|
||||
if (reinit)
|
||||
@@ -1058,7 +1100,9 @@ static void command_event_deinit_core(bool reinit)
|
||||
|
||||
static void command_event_init_cheats(void)
|
||||
{
|
||||
bool allow_cheats = true;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool allow_cheats = true;
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
allow_cheats &= !netplay_driver_ctl(
|
||||
RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL);
|
||||
@@ -1068,7 +1112,12 @@ static void command_event_init_cheats(void)
|
||||
if (!allow_cheats)
|
||||
return;
|
||||
|
||||
/* TODO/FIXME - add some stuff here. */
|
||||
cheat_manager_alloc_if_empty() ;
|
||||
cheat_manager_load_game_specific_cheats() ;
|
||||
|
||||
|
||||
if (settings != NULL && settings->bools.apply_cheats_after_load)
|
||||
cheat_manager_apply_cheats();
|
||||
}
|
||||
|
||||
static void command_event_load_auto_state(void)
|
||||
@@ -1087,7 +1136,7 @@ static void command_event_load_auto_state(void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_hardcore_active)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
@@ -1274,8 +1323,8 @@ static bool command_event_init_core(enum rarch_core_type *data)
|
||||
if (!core_load(settings->uints.input_poll_type_behavior))
|
||||
return false;
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1296,7 +1345,9 @@ static void command_event_restore_default_shader_preset(void)
|
||||
|
||||
static void command_event_restore_remaps(void)
|
||||
{
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_CORE_ACTIVE, NULL) ||
|
||||
rarch_ctl(RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE, NULL) ||
|
||||
rarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
input_remapping_set_defaults(true);
|
||||
}
|
||||
|
||||
@@ -1325,7 +1376,7 @@ static bool command_event_save_auto_state(void)
|
||||
goto error;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_hardcore_active)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
@@ -1386,7 +1437,6 @@ static bool command_event_save_config(
|
||||
static bool command_event_save_core_config(void)
|
||||
{
|
||||
char msg[128];
|
||||
bool ret = false;
|
||||
bool found_path = false;
|
||||
bool overrides_active = false;
|
||||
const char *core_path = NULL;
|
||||
@@ -1493,7 +1543,7 @@ static bool command_event_save_core_config(void)
|
||||
free(config_dir);
|
||||
free(config_name);
|
||||
free(config_path);
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1519,6 +1569,7 @@ static void command_event_save_current_config(enum override_type type)
|
||||
break;
|
||||
case OVERRIDE_GAME:
|
||||
case OVERRIDE_CORE:
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
if (config_save_overrides(type))
|
||||
{
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_SAVED_SUCCESSFULLY), sizeof(msg));
|
||||
@@ -1674,14 +1725,12 @@ static bool command_event_resize_windowed_scale(void)
|
||||
}
|
||||
|
||||
void command_playlist_push_write(
|
||||
void *data,
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
playlist_t *playlist = (playlist_t*)data;
|
||||
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
@@ -1698,16 +1747,15 @@ void command_playlist_push_write(
|
||||
}
|
||||
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
playlist_t *plist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name)
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *plist = (playlist_t*)data;
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (!playlist)
|
||||
@@ -1736,8 +1784,10 @@ void command_playlist_update_write(
|
||||
**/
|
||||
bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool boolean = false;
|
||||
#ifdef HAVE_DISCORD
|
||||
static bool discord_inited = false;
|
||||
#endif
|
||||
bool boolean = false;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@@ -1787,10 +1837,11 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
libretro_get_system_info(
|
||||
if (!libretro_get_system_info(
|
||||
core_path,
|
||||
system,
|
||||
&system_info->load_no_content);
|
||||
&system_info->load_no_content))
|
||||
return false;
|
||||
info_find.path = core_path;
|
||||
|
||||
if (!core_info_load(&info_find))
|
||||
@@ -1803,11 +1854,18 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_LOAD_CORE:
|
||||
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
{
|
||||
bool success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
(void)success;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
#else
|
||||
if (!success)
|
||||
return false;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case CMD_EVENT_LOAD_STATE:
|
||||
/* Immutable - disallow savestate load when
|
||||
* we absolutely cannot change game state. */
|
||||
@@ -1815,20 +1873,24 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
}
|
||||
if (cheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return command_event_main_state(cmd);
|
||||
if (!command_event_main_state(cmd))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_UNDO_LOAD_STATE:
|
||||
return command_event_main_state(cmd);
|
||||
if (!command_event_main_state(cmd))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_UNDO_SAVE_STATE:
|
||||
return command_event_main_state(cmd);
|
||||
if (!command_event_main_state(cmd))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_RESIZE_WINDOWED_SCALE:
|
||||
return command_event_resize_windowed_scale();
|
||||
if (!command_event_resize_windowed_scale())
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_MENU_TOGGLE:
|
||||
#ifdef HAVE_MENU
|
||||
if (menu_driver_is_alive())
|
||||
@@ -1854,12 +1916,12 @@ bool command_event(enum event_command cmd, void *data)
|
||||
#if HAVE_NETWORKING
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
|
||||
#endif
|
||||
return command_event_main_state(cmd);
|
||||
return false;
|
||||
case CMD_EVENT_SAVE_STATE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -1869,7 +1931,9 @@ bool command_event(enum event_command cmd, void *data)
|
||||
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
|
||||
}
|
||||
}
|
||||
return command_event_main_state(cmd);
|
||||
if (!command_event_main_state(cmd))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_SAVE_STATE_DECREMENT:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@@ -1890,7 +1954,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_TAKE_SCREENSHOT:
|
||||
if (!take_screenshot(path_get(RARCH_PATH_BASENAME), false,
|
||||
video_driver_cached_frame_has_valid_framebuffer()))
|
||||
video_driver_cached_frame_has_valid_framebuffer(), false, true))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_UNLOAD_CORE:
|
||||
@@ -1916,39 +1980,51 @@ bool command_event(enum event_command cmd, void *data)
|
||||
core_unload_game();
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
core_unload();
|
||||
#ifdef HAVE_DISCORD
|
||||
if (discord_is_inited)
|
||||
{
|
||||
discord_userdata_t userdata;
|
||||
userdata.status = DISCORD_PRESENCE_MENU;
|
||||
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_QUIT:
|
||||
return retroarch_main_quit();
|
||||
if (!retroarch_main_quit())
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_toggle_hardcore_mode();
|
||||
#endif
|
||||
break;
|
||||
/* this fallthrough is on purpose, it should do
|
||||
/* this fallthrough is on purpose, it should do
|
||||
a CMD_EVENT_REINIT too */
|
||||
case CMD_EVENT_REINIT_FROM_TOGGLE:
|
||||
retroarch_unset_forced_fullscreen();
|
||||
case CMD_EVENT_REINIT:
|
||||
video_driver_reinit();
|
||||
{
|
||||
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);
|
||||
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
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
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
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_CHEATS_DEINIT:
|
||||
cheat_manager_state_free();
|
||||
@@ -1961,21 +2037,17 @@ bool command_event(enum event_command cmd, void *data)
|
||||
cheat_manager_apply_cheats();
|
||||
break;
|
||||
case CMD_EVENT_REWIND_DEINIT:
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
if (cheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
state_manager_event_deinit();
|
||||
}
|
||||
state_manager_event_deinit();
|
||||
break;
|
||||
case CMD_EVENT_REWIND_INIT:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
if (settings->bools.rewind_enable)
|
||||
@@ -1986,7 +2058,7 @@ TODO: Add a setting for these tweaks */
|
||||
if (!netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL))
|
||||
#endif
|
||||
{
|
||||
state_manager_event_init((unsigned)settings->rewind_buffer_size);
|
||||
state_manager_event_init((unsigned)settings->sizes.rewind_buffer_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2010,7 +2082,7 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_AUTOSAVE_INIT:
|
||||
command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL);
|
||||
#ifdef HAVE_THREADS
|
||||
{
|
||||
{
|
||||
#ifdef HAVE_NETWORKING
|
||||
/* Only enable state manager if netplay is not underway
|
||||
TODO: Add a setting for these tweaks */
|
||||
@@ -2024,16 +2096,21 @@ TODO: Add a setting for these tweaks */
|
||||
else
|
||||
runloop_unset(RUNLOOP_ACTION_AUTOSAVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_AUTOSAVE_STATE:
|
||||
command_event_save_auto_state();
|
||||
break;
|
||||
case CMD_EVENT_AUDIO_STOP:
|
||||
return audio_driver_stop();
|
||||
midi_driver_set_all_sounds_off();
|
||||
if (!audio_driver_stop())
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_AUDIO_START:
|
||||
return audio_driver_start(rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL));
|
||||
if (!audio_driver_start(rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL)))
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_AUDIO_MUTE_TOGGLE:
|
||||
{
|
||||
bool audio_mute_enable = *(audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE));
|
||||
@@ -2092,13 +2169,18 @@ TODO: Add a setting for these tweaks */
|
||||
video_driver_gpu_record_deinit();
|
||||
break;
|
||||
case CMD_EVENT_RECORD_DEINIT:
|
||||
if (!recording_deinit())
|
||||
return false;
|
||||
{
|
||||
if (!recording_deinit())
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_RECORD_INIT:
|
||||
command_event(CMD_EVENT_HISTORY_DEINIT, NULL);
|
||||
if (!recording_init())
|
||||
return false;
|
||||
{
|
||||
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
|
||||
recording_set_state(true);
|
||||
if (!recording_init())
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_HISTORY_DEINIT:
|
||||
if (g_defaults.content_history)
|
||||
@@ -2122,7 +2204,7 @@ TODO: Add a setting for these tweaks */
|
||||
}
|
||||
g_defaults.music_history = NULL;
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
if (g_defaults.video_history)
|
||||
{
|
||||
playlist_write_file(g_defaults.video_history);
|
||||
@@ -2172,7 +2254,7 @@ TODO: Add a setting for these tweaks */
|
||||
settings->paths.path_content_music_history,
|
||||
content_history_size);
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
RARCH_LOG("%s: [%s].\n",
|
||||
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
|
||||
settings->paths.path_content_video_history);
|
||||
@@ -2193,6 +2275,7 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_CORE_INFO_DEINIT:
|
||||
core_info_deinit_list();
|
||||
core_info_free_current_core();
|
||||
break;
|
||||
case CMD_EVENT_CORE_INFO_INIT:
|
||||
{
|
||||
@@ -2306,7 +2389,7 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_RESUME:
|
||||
rarch_menu_running_finished();
|
||||
if (ui_companion_is_on_foreground())
|
||||
ui_companion_driver_toggle();
|
||||
ui_companion_driver_toggle(false);
|
||||
break;
|
||||
case CMD_EVENT_ADD_TO_FAVORITES:
|
||||
{
|
||||
@@ -2355,7 +2438,7 @@ TODO: Add a setting for these tweaks */
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
case CMD_EVENT_RESTART_RETROARCH:
|
||||
if (!frontend_driver_set_fork(FRONTEND_FORK_RESTART))
|
||||
return false;
|
||||
@@ -2369,6 +2452,9 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
command_event_save_current_config(OVERRIDE_CORE);
|
||||
break;
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
command_event_save_current_config(OVERRIDE_CONTENT_DIR);
|
||||
break;
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
command_event_save_current_config(OVERRIDE_GAME);
|
||||
break;
|
||||
@@ -2376,10 +2462,14 @@ TODO: Add a setting for these tweaks */
|
||||
if (!command_event_save_core_config())
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_SHADER_PRESET_LOADED:
|
||||
ui_companion_event_command(cmd);
|
||||
break;
|
||||
case CMD_EVENT_SHADERS_APPLY_CHANGES:
|
||||
#ifdef HAVE_MENU
|
||||
menu_shader_manager_apply_changes();
|
||||
#endif
|
||||
ui_companion_event_command(cmd);
|
||||
break;
|
||||
case CMD_EVENT_PAUSE_CHECKS:
|
||||
{
|
||||
@@ -2401,6 +2491,13 @@ TODO: Add a setting for these tweaks */
|
||||
|
||||
if (!is_idle)
|
||||
video_driver_cached_frame();
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_userdata_t userdata;
|
||||
userdata.status = DISCORD_PRESENCE_GAME_PAUSED;
|
||||
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2501,17 +2598,18 @@ TODO: Add a setting for these tweaks */
|
||||
/* buf is expected to be address|port */
|
||||
char *buf = (char *)data;
|
||||
static struct string_list *hostname = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
hostname = string_split(buf, "|");
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
|
||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : 55435);
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
|
||||
|
||||
if (!init_netplay(NULL, hostname->elems[0].data,
|
||||
!string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : 55435))
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port))
|
||||
{
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
string_list_free(hostname);
|
||||
@@ -2534,17 +2632,18 @@ TODO: Add a setting for these tweaks */
|
||||
/* buf is expected to be address|port */
|
||||
char *buf = (char *)data;
|
||||
static struct string_list *hostname = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
hostname = string_split(buf, "|");
|
||||
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
|
||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : 55435);
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
|
||||
|
||||
if (!init_netplay_deferred(hostname->elems[0].data,
|
||||
!string_is_empty(hostname->elems[1].data)
|
||||
? atoi(hostname->elems[1].data) : 55435))
|
||||
? atoi(hostname->elems[1].data) : settings->uints.netplay_port))
|
||||
{
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
string_list_free(hostname);
|
||||
@@ -2577,7 +2676,7 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_FULLSCREEN_TOGGLE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool new_fullscreen_state = !settings->bools.video_fullscreen
|
||||
bool new_fullscreen_state = !settings->bools.video_fullscreen
|
||||
&& !retroarch_is_forced_fullscreen();
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
@@ -2613,14 +2712,13 @@ TODO: Add a setting for these tweaks */
|
||||
command_event(CMD_EVENT_REMOTE_DEINIT, NULL);
|
||||
input_driver_init_remote();
|
||||
break;
|
||||
|
||||
case CMD_EVENT_MAPPER_DEINIT:
|
||||
input_driver_deinit_mapper();
|
||||
break;
|
||||
case CMD_EVENT_MAPPER_INIT:
|
||||
command_event(CMD_EVENT_MAPPER_DEINIT, NULL);
|
||||
input_driver_init_mapper();
|
||||
break;
|
||||
break;
|
||||
case CMD_EVENT_LOG_FILE_DEINIT:
|
||||
retro_main_log_file_deinit();
|
||||
break;
|
||||
@@ -2629,8 +2727,10 @@ TODO: Add a setting for these tweaks */
|
||||
const char *path = (const char*)data;
|
||||
if (string_is_empty(path))
|
||||
return false;
|
||||
return command_event_disk_control_append_image(path);
|
||||
if (!command_event_disk_control_append_image(path))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_DISK_EJECT_TOGGLE:
|
||||
{
|
||||
rarch_system_info_t *info = runloop_get_system_info();
|
||||
@@ -2736,6 +2836,9 @@ TODO: Add a setting for these tweaks */
|
||||
video_driver_show_mouse();
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_UI_COMPANION_TOGGLE:
|
||||
ui_companion_driver_toggle(true);
|
||||
break;
|
||||
case CMD_EVENT_GAME_FOCUS_TOGGLE:
|
||||
{
|
||||
static bool game_focus_state = false;
|
||||
@@ -2804,10 +2907,39 @@ TODO: Add a setting for these tweaks */
|
||||
case CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET:
|
||||
command_event_restore_default_shader_preset();
|
||||
break;
|
||||
case CMD_EVENT_LIBUI_TEST:
|
||||
#if HAVE_LIBUI
|
||||
extern int libui_main(void);
|
||||
libui_main();
|
||||
case CMD_EVENT_DISCORD_INIT:
|
||||
#ifdef HAVE_DISCORD
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->bools.discord_enable)
|
||||
return false;
|
||||
if (discord_inited)
|
||||
return true;
|
||||
|
||||
discord_init();
|
||||
discord_inited = true;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_DISCORD_DEINIT:
|
||||
#ifdef HAVE_DISCORD
|
||||
if (!discord_inited)
|
||||
return false;
|
||||
|
||||
discord_shutdown();
|
||||
discord_inited = false;
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_DISCORD_UPDATE:
|
||||
#ifdef HAVE_DISCORD
|
||||
if (!data || !discord_inited)
|
||||
return false;
|
||||
|
||||
{
|
||||
discord_userdata_t *userdata = (discord_userdata_t*)data;
|
||||
discord_update(userdata->status);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_NONE:
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "playlist.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct command command_t;
|
||||
@@ -139,7 +141,7 @@ enum event_command
|
||||
/* Add a playlist entry to favorites. */
|
||||
CMD_EVENT_ADD_TO_FAVORITES,
|
||||
/* Reset playlist entry associated core to DETECT */
|
||||
CMD_EVENT_RESET_CORE_ASSOCIATION,
|
||||
CMD_EVENT_RESET_CORE_ASSOCIATION,
|
||||
/* Toggles pause. */
|
||||
CMD_EVENT_PAUSE_TOGGLE,
|
||||
/* Pauses RetroArch. */
|
||||
@@ -149,6 +151,7 @@ enum event_command
|
||||
CMD_EVENT_PAUSE_CHECKS,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
CMD_EVENT_MENU_SAVE_CONFIG,
|
||||
CMD_EVENT_MENU_PAUSE_LIBRETRO,
|
||||
@@ -157,6 +160,8 @@ enum event_command
|
||||
CMD_EVENT_MENU_REFRESH,
|
||||
/* Applies shader changes. */
|
||||
CMD_EVENT_SHADERS_APPLY_CHANGES,
|
||||
/* A new shader preset has been loaded */
|
||||
CMD_EVENT_SHADER_PRESET_LOADED,
|
||||
/* Initializes shader directory. */
|
||||
CMD_EVENT_SHADER_DIR_INIT,
|
||||
/* Deinitializes shader directory. */
|
||||
@@ -218,6 +223,8 @@ enum event_command
|
||||
CMD_EVENT_GRAB_MOUSE_TOGGLE,
|
||||
/* Toggles game focus. */
|
||||
CMD_EVENT_GAME_FOCUS_TOGGLE,
|
||||
/* Toggles desktop menu. */
|
||||
CMD_EVENT_UI_COMPANION_TOGGLE,
|
||||
/* Toggles fullscreen mode. */
|
||||
CMD_EVENT_FULLSCREEN_TOGGLE,
|
||||
CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
@@ -228,7 +235,9 @@ enum event_command
|
||||
CMD_EVENT_DISABLE_OVERRIDES,
|
||||
CMD_EVENT_RESTORE_REMAPS,
|
||||
CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET,
|
||||
CMD_EVENT_LIBUI_TEST
|
||||
CMD_EVENT_DISCORD_INIT,
|
||||
CMD_EVENT_DISCORD_DEINIT,
|
||||
CMD_EVENT_DISCORD_UPDATE
|
||||
};
|
||||
|
||||
bool command_set_shader(const char *arg);
|
||||
@@ -262,16 +271,16 @@ bool command_free(command_t *handle);
|
||||
bool command_event(enum event_command action, void *data);
|
||||
|
||||
void command_playlist_push_write(
|
||||
void *data,
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
playlist_t *playlist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
|
||||
+78
-23
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <audio/audio_resampler.h>
|
||||
#include "configuration.h"
|
||||
#include "gfx/video_defines.h"
|
||||
#include "input/input_driver.h"
|
||||
|
||||
@@ -67,15 +68,15 @@ static bool bundle_assets_extract_enable = false;
|
||||
static bool materialui_icons_enable = true;
|
||||
#endif
|
||||
|
||||
static const bool crt_switch_resolution = false;
|
||||
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
|
||||
static const int crt_switch_resolution_super = 2560;
|
||||
static const int crt_switch_center_adjust = 0;
|
||||
|
||||
static const bool def_history_list_enable = true;
|
||||
static const bool def_playlist_entry_remove = true;
|
||||
static const bool def_playlist_entry_rename = true;
|
||||
|
||||
static const bool def_history_list_enable = true;
|
||||
static const bool def_playlist_entry_remove = true;
|
||||
static const bool def_playlist_entry_rename = true;
|
||||
|
||||
static const unsigned int def_user_language = 0;
|
||||
static const unsigned int def_user_language = 0;
|
||||
|
||||
#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;
|
||||
@@ -181,7 +182,7 @@ static unsigned swap_interval = 1;
|
||||
static const bool video_threaded = false;
|
||||
|
||||
#if defined(HAVE_THREADS)
|
||||
#if defined(GEKKO) || defined(PSP) || defined(_3DS)
|
||||
#if defined(GEKKO) || defined(PSP)
|
||||
/* For single-core consoles right now it's better to have this be disabled. */
|
||||
static const bool threaded_data_runloop_enable = false;
|
||||
#else
|
||||
@@ -248,22 +249,32 @@ static const bool overlay_hide_in_menu = true;
|
||||
|
||||
static const bool display_keyboard_overlay = false;
|
||||
|
||||
#ifdef HAKCHI
|
||||
static const float default_input_overlay_opacity = 0.5f;
|
||||
#else
|
||||
static const float default_input_overlay_opacity = 0.7f;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
|
||||
static bool default_block_config_read = true;
|
||||
|
||||
static bool quick_menu_show_take_screenshot = true;
|
||||
static bool quick_menu_show_save_load_state = true;
|
||||
static bool quick_menu_show_undo_save_load_state = true;
|
||||
static bool quick_menu_show_add_to_favorites = true;
|
||||
static bool quick_menu_show_options = true;
|
||||
static bool quick_menu_show_controls = true;
|
||||
static bool quick_menu_show_cheats = true;
|
||||
static bool quick_menu_show_shaders = true;
|
||||
static bool quick_menu_show_save_core_overrides = true;
|
||||
static bool quick_menu_show_save_game_overrides = true;
|
||||
static bool quick_menu_show_information = true;
|
||||
static bool quick_menu_show_take_screenshot = true;
|
||||
static bool quick_menu_show_save_load_state = true;
|
||||
static bool quick_menu_show_undo_save_load_state = true;
|
||||
static bool quick_menu_show_add_to_favorites = true;
|
||||
static bool quick_menu_show_options = true;
|
||||
static bool quick_menu_show_controls = true;
|
||||
static bool quick_menu_show_cheats = true;
|
||||
static bool quick_menu_show_shaders = true;
|
||||
static bool quick_menu_show_information = true;
|
||||
static bool quick_menu_show_recording = true;
|
||||
static bool quick_menu_show_streaming = true;
|
||||
|
||||
static bool quick_menu_show_save_core_overrides = true;
|
||||
static bool quick_menu_show_save_game_overrides = true;
|
||||
static bool quick_menu_show_save_content_dir_overrides = true;
|
||||
|
||||
static bool kiosk_mode_enable = false;
|
||||
|
||||
@@ -275,6 +286,7 @@ 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;
|
||||
static bool menu_show_shutdown = true;
|
||||
#if defined(HAVE_LAKKA) || defined(VITA) || defined(_3DS)
|
||||
static bool menu_show_core_updater = false;
|
||||
#else
|
||||
@@ -287,7 +299,7 @@ static bool content_show_favorites = true;
|
||||
static bool content_show_images = true;
|
||||
#endif
|
||||
static bool content_show_music = true;
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
static bool content_show_video = true;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -438,9 +450,11 @@ static const bool font_enable = true;
|
||||
* If your monitor does not run at 60Hz, or something close to it,
|
||||
* disable VSync, and leave this at its default. */
|
||||
#ifdef _3DS
|
||||
static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
||||
static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
||||
static const float crt_refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
||||
#else
|
||||
static const float refresh_rate = 60/1.001;
|
||||
static const float refresh_rate = 60/1.001;
|
||||
static const float crt_refresh_rate = 60/1.001;
|
||||
#endif
|
||||
|
||||
/* Allow games to set rotation. If false, rotation requests are
|
||||
@@ -517,10 +531,19 @@ static const bool framecount_show = true;
|
||||
* depending on the save state buffer. */
|
||||
static const bool rewind_enable = false;
|
||||
|
||||
/* When set, any time a cheat is toggled it is immediately applied. */
|
||||
static const bool apply_cheats_after_toggle = false;
|
||||
|
||||
/* When set, all enabled cheats are auto-applied when a game is loaded. */
|
||||
static const bool apply_cheats_after_load = false;
|
||||
|
||||
/* The buffer size for the rewind buffer. This needs to be about
|
||||
* 15-20MB per minute. Very game dependant. */
|
||||
static const unsigned rewind_buffer_size = 20 << 20; /* 20MiB */
|
||||
|
||||
/* The amount of MB to increase/decrease the rewind_buffer_size when it is changed via the UI. */
|
||||
static const unsigned rewind_buffer_size_step = 10; /* 10MB */
|
||||
|
||||
/* How many frames to rewind at a time. */
|
||||
static const unsigned rewind_granularity = 1;
|
||||
|
||||
@@ -595,12 +618,18 @@ static const float slowmotion_ratio = 3.0;
|
||||
/* Maximum fast forward ratio. */
|
||||
static const float fastforward_ratio = 0.0;
|
||||
|
||||
/* Enable runloop for variable refresh rate screens. Force x1 speed while handling fast forward too. */
|
||||
static const bool vrr_runloop_enable = false;
|
||||
|
||||
/* Run core logic one or more frames ahead then load the state back to reduce perceived input lag. */
|
||||
static const unsigned run_ahead_frames = 1;
|
||||
|
||||
/* When using the Run Ahead feature, use a secondary instance of the core. */
|
||||
static const bool run_ahead_secondary_instance = true;
|
||||
|
||||
/* Hide warning messages when using the Run Ahead feature. */
|
||||
static const bool run_ahead_hide_warnings = false;
|
||||
|
||||
/* Enable stdin/network command interface. */
|
||||
static const bool network_cmd_enable = false;
|
||||
static const uint16_t network_cmd_port = 55355;
|
||||
@@ -630,6 +659,10 @@ static const unsigned libretro_log_level = 1;
|
||||
#define RARCH_DEFAULT_PORT 55435
|
||||
#endif
|
||||
|
||||
#ifndef RARCH_STREAM_DEFAULT_PORT
|
||||
#define RARCH_STREAM_DEFAULT_PORT 56400
|
||||
#endif
|
||||
|
||||
/* KEYBINDS, JOYPAD */
|
||||
|
||||
/* Axis threshold (between 0.0 and 1.0)
|
||||
@@ -656,6 +689,8 @@ static const unsigned input_poll_type_behavior = 2;
|
||||
|
||||
static const unsigned input_bind_timeout = 5;
|
||||
|
||||
static const unsigned input_bind_hold = 2;
|
||||
|
||||
static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
@@ -670,6 +705,12 @@ static const bool ui_companion_start_on_boot = true;
|
||||
|
||||
static const bool ui_companion_enable = false;
|
||||
|
||||
/* Currently only used to show the WIMP UI on startup */
|
||||
static const bool ui_companion_toggle = false;
|
||||
|
||||
/* Only init the WIMP UI for this session if this is enabled */
|
||||
static const bool desktop_menu_enable = true;
|
||||
|
||||
#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)
|
||||
@@ -678,13 +719,27 @@ static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_NORMAL;
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
#if defined(ANDROID_ARM)
|
||||
/* MIDI */
|
||||
static const char *midi_input = "Off";
|
||||
static const char *midi_output = "Off";
|
||||
static const unsigned midi_volume = 100;
|
||||
|
||||
/* Only applies to Android 7.0 (API 24) and up */
|
||||
static const bool sustained_performance_mode = false;
|
||||
|
||||
#if defined(HAKCHI)
|
||||
static char buildbot_server_url[] = "http://hakchicloud.com/Libretro_Cores/";
|
||||
#elif defined(ANDROID)
|
||||
#if defined(ANDROID_ARM_V7)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/";
|
||||
#elif defined(ANDROID_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi/";
|
||||
#elif defined(ANDROID_AARCH64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/";
|
||||
#elif defined(ANDROID_X86)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/x86/";
|
||||
#elif defined(ANDROID_X64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/x86_64/";
|
||||
#else
|
||||
static char buildbot_server_url[] = "";
|
||||
#endif
|
||||
|
||||
@@ -75,7 +75,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -97,6 +97,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#else
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -150,7 +151,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_F7, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_F6, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_p, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@@ -172,6 +173,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_F11, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_F5, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -80,6 +80,12 @@ static const bool _vulkan_supp = true;
|
||||
static const bool _vulkan_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_METAL
|
||||
static const bool _metal_supp = true;
|
||||
#else
|
||||
static const bool _metal_supp = false;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2)
|
||||
static const bool _opengles_supp = true;
|
||||
#else
|
||||
@@ -272,6 +278,12 @@ static const bool _ffmpeg_supp = true;
|
||||
static const bool _ffmpeg_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MPV
|
||||
static const bool _mpv_supp = true;
|
||||
#else
|
||||
static const bool _mpv_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FREETYPE
|
||||
static const bool _freetype_supp = true;
|
||||
#else
|
||||
|
||||
+335
-40
@@ -52,6 +52,8 @@
|
||||
|
||||
#include "tasks/tasks_internal.h"
|
||||
|
||||
#include "../list_special.h"
|
||||
|
||||
static const char* invalid_filename_chars[] = {
|
||||
/* https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo */
|
||||
"~", "#", "%", "&", "*", "{", "}", "\\", ":", "[", "]", "?", "/", "|", "\'", "\"",
|
||||
@@ -90,6 +92,16 @@ struct config_uint_setting
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_size_setting
|
||||
{
|
||||
const char *ident;
|
||||
size_t *ptr;
|
||||
bool def_enable;
|
||||
size_t def;
|
||||
bool handle;
|
||||
enum rarch_override_setting override;
|
||||
};
|
||||
|
||||
struct config_float_setting
|
||||
{
|
||||
const char *ident;
|
||||
@@ -123,6 +135,7 @@ enum video_driver_enum
|
||||
{
|
||||
VIDEO_GL = 0,
|
||||
VIDEO_VULKAN,
|
||||
VIDEO_METAL,
|
||||
VIDEO_DRM,
|
||||
VIDEO_XVIDEO,
|
||||
VIDEO_SDL,
|
||||
@@ -271,6 +284,7 @@ enum menu_driver_enum
|
||||
MENU_XUI,
|
||||
MENU_MATERIALUI,
|
||||
MENU_XMB,
|
||||
MENU_STRIPES,
|
||||
MENU_NUKLEAR,
|
||||
MENU_NULL
|
||||
};
|
||||
@@ -281,9 +295,16 @@ enum record_driver_enum
|
||||
RECORD_NULL
|
||||
};
|
||||
|
||||
enum midi_driver_enum
|
||||
{
|
||||
MIDI_WINMM = RECORD_NULL + 1,
|
||||
MIDI_NULL
|
||||
};
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL;
|
||||
#elif defined(HAVE_METAL)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_METAL;
|
||||
#elif defined(GEKKO)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WII;
|
||||
#elif defined(WIIU)
|
||||
@@ -386,6 +407,12 @@ static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_FFMPEG;
|
||||
static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINMM
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM;
|
||||
#else
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(XENON)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XENON360;
|
||||
#elif defined(_XBOX360) || defined(_XBOX) || defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1)
|
||||
@@ -534,6 +561,9 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
||||
#define SETTING_UINT(key, configval, default_enable, default_setting, handle_setting) \
|
||||
GENERAL_SETTING(key, configval, default_enable, default_setting, struct config_uint_setting, handle_setting)
|
||||
|
||||
#define SETTING_SIZE(key, configval, default_enable, default_setting, handle_setting) \
|
||||
GENERAL_SETTING(key, configval, default_enable, default_setting, struct config_size_setting, handle_setting)
|
||||
|
||||
#define SETTING_PATH(key, configval, default_enable, default_setting, handle_setting) \
|
||||
GENERAL_SETTING(key, configval, default_enable, default_setting, struct config_path_setting, handle_setting)
|
||||
|
||||
@@ -698,6 +728,8 @@ const char *config_get_default_video(void)
|
||||
return "gl";
|
||||
case VIDEO_VULKAN:
|
||||
return "vulkan";
|
||||
case VIDEO_METAL:
|
||||
return "metal";
|
||||
case VIDEO_DRM:
|
||||
return "drm";
|
||||
case VIDEO_WII:
|
||||
@@ -995,6 +1027,8 @@ const char *config_get_default_menu(void)
|
||||
return "glui";
|
||||
case MENU_XMB:
|
||||
return "xmb";
|
||||
case MENU_STRIPES:
|
||||
return "stripes";
|
||||
case MENU_NUKLEAR:
|
||||
return "nuklear";
|
||||
case MENU_NULL:
|
||||
@@ -1005,6 +1039,26 @@ const char *config_get_default_menu(void)
|
||||
return "null";
|
||||
}
|
||||
|
||||
const char *config_get_default_midi(void)
|
||||
{
|
||||
enum midi_driver_enum default_driver = MIDI_DEFAULT_DRIVER;
|
||||
|
||||
switch (default_driver)
|
||||
{
|
||||
case MIDI_WINMM:
|
||||
return "winmm";
|
||||
case MIDI_NULL:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
||||
|
||||
const char *config_get_midi_driver_options(void)
|
||||
{
|
||||
return char_list_new_special(STRING_LIST_MIDI_DRIVERS, NULL);
|
||||
}
|
||||
|
||||
bool config_overlay_enable_default(void)
|
||||
{
|
||||
if (g_defaults.overlay.set)
|
||||
@@ -1015,7 +1069,7 @@ bool config_overlay_enable_default(void)
|
||||
static struct config_array_setting *populate_settings_array(settings_t *settings, int *size)
|
||||
{
|
||||
unsigned count = 0;
|
||||
struct config_array_setting *tmp = (struct config_array_setting*)malloc((*size + 1) * sizeof(struct config_array_setting));
|
||||
struct config_array_setting *tmp = (struct config_array_setting*)calloc(1, (*size + 1) * sizeof(struct config_array_setting));
|
||||
|
||||
/* Arrays */
|
||||
SETTING_ARRAY("playlist_names", settings->arrays.playlist_names, false, NULL, true);
|
||||
@@ -1046,6 +1100,9 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
SETTING_ARRAY("bundle_assets_dst_path_subdir", settings->arrays.bundle_assets_dst_subdir, false, NULL, true);
|
||||
SETTING_ARRAY("led_driver", settings->arrays.led_driver, false, NULL, true);
|
||||
SETTING_ARRAY("netplay_mitm_server", settings->arrays.netplay_mitm_server, false, NULL, true);
|
||||
SETTING_ARRAY("midi_driver", settings->arrays.midi_driver, false, NULL, true);
|
||||
SETTING_ARRAY("midi_input", settings->arrays.midi_input, true, midi_input, true);
|
||||
SETTING_ARRAY("midi_output", settings->arrays.midi_output, true, midi_output, true);
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1055,7 +1112,7 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
|
||||
{
|
||||
unsigned count = 0;
|
||||
global_t *global = global_get_ptr();
|
||||
struct config_path_setting *tmp = (struct config_path_setting*)malloc((*size + 1) * sizeof(struct config_path_setting));
|
||||
struct config_path_setting *tmp = (struct config_path_setting*)calloc(1, (*size + 1) * sizeof(struct config_path_setting));
|
||||
|
||||
/* Paths */
|
||||
#ifdef HAVE_XMB
|
||||
@@ -1102,6 +1159,14 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_PATH("input_overlay",
|
||||
settings->paths.path_overlay, false, NULL, true);
|
||||
#endif
|
||||
#ifdef HAVE_FFMPEG
|
||||
SETTING_PATH("video_record_config",
|
||||
settings->paths.path_record_config, false, NULL, true);
|
||||
SETTING_PATH("video_stream_config",
|
||||
settings->paths.path_stream_config, false, NULL, true);
|
||||
SETTING_PATH("video_stream_url",
|
||||
settings->paths.path_stream_url, false, NULL, true);
|
||||
#endif
|
||||
SETTING_PATH("video_font_path",
|
||||
settings->paths.path_font, false, NULL, true);
|
||||
@@ -1177,9 +1242,12 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
struct config_bool_setting *tmp = (struct config_bool_setting*)malloc((*size + 1) * sizeof(struct config_bool_setting));
|
||||
unsigned count = 0;
|
||||
|
||||
SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false);
|
||||
SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, automatically_add_content_to_playlist, false);
|
||||
SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false);
|
||||
SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false);
|
||||
SETTING_BOOL("ui_companion_toggle", &settings->bools.ui_companion_toggle, false, ui_companion_toggle, false);
|
||||
SETTING_BOOL("desktop_menu_enable", &settings->bools.desktop_menu_enable, true, desktop_menu_enable, false);
|
||||
SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, gpu_record, false);
|
||||
SETTING_BOOL("input_remap_binds_enable", &settings->bools.input_remap_binds_enable, true, true, false);
|
||||
SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, all_users_control_menu, false);
|
||||
@@ -1221,8 +1289,12 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, rewind_enable, false);
|
||||
SETTING_BOOL("vrr_runloop_enable", &settings->bools.vrr_runloop_enable, true, vrr_runloop_enable, false);
|
||||
SETTING_BOOL("apply_cheats_after_toggle", &settings->bools.apply_cheats_after_toggle, true, apply_cheats_after_toggle, false);
|
||||
SETTING_BOOL("apply_cheats_after_load", &settings->bools.apply_cheats_after_load, true, apply_cheats_after_load, false);
|
||||
SETTING_BOOL("run_ahead_enabled", &settings->bools.run_ahead_enabled, true, false, false);
|
||||
SETTING_BOOL("run_ahead_secondary_instance", &settings->bools.run_ahead_secondary_instance, true, false, false);
|
||||
SETTING_BOOL("run_ahead_hide_warnings", &settings->bools.run_ahead_hide_warnings, true, false, false);
|
||||
SETTING_BOOL("audio_sync", &settings->bools.audio_sync, true, audio_sync, false);
|
||||
SETTING_BOOL("video_shader_enable", &settings->bools.video_shader_enable, true, shader_enable, false);
|
||||
SETTING_BOOL("video_shader_watch_files", &settings->bools.video_shader_watch_files, true, video_shader_watch_files, false);
|
||||
@@ -1243,9 +1315,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, fullscreen, false);
|
||||
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, bundle_assets_extract_enable, false);
|
||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, vsync, false);
|
||||
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, false, false);
|
||||
SETTING_BOOL("video_hard_sync", &settings->bools.video_hard_sync, true, hard_sync, false);
|
||||
SETTING_BOOL("video_black_frame_insertion", &settings->bools.video_black_frame_insertion, true, black_frame_insertion, false);
|
||||
SETTING_BOOL("crt_switch_resolution", &settings->bools.crt_switch_resolution, true, crt_switch_resolution, false);
|
||||
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, disable_composition, false);
|
||||
SETTING_BOOL("pause_nonactive", &settings->bools.pause_nonactive, true, pause_nonactive, false);
|
||||
SETTING_BOOL("video_gpu_screenshot", &settings->bools.video_gpu_screenshot, true, gpu_screenshot, false);
|
||||
@@ -1253,12 +1325,14 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("keyboard_gamepad_enable", &settings->bools.input_keyboard_gamepad_enable, true, true, false);
|
||||
SETTING_BOOL("core_set_supports_no_game_enable", &settings->bools.set_supports_no_game_enable, true, true, false);
|
||||
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, audio_enable, false);
|
||||
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, false, false);
|
||||
SETTING_BOOL("audio_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE), true, false, false);
|
||||
SETTING_BOOL("audio_mixer_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MIXER_MUTE_ENABLE), true, false, false);
|
||||
SETTING_BOOL("location_allow", &settings->bools.location_allow, true, false, false);
|
||||
SETTING_BOOL("video_font_enable", &settings->bools.video_font_enable, true, font_enable, false);
|
||||
SETTING_BOOL("core_updater_auto_extract_archive", &settings->bools.network_buildbot_auto_extract_archive, true, true, false);
|
||||
SETTING_BOOL("camera_allow", &settings->bools.camera_allow, true, false, false);
|
||||
SETTING_BOOL("discord_allow", &settings->bools.discord_enable, true, false, false);
|
||||
#if defined(VITA)
|
||||
SETTING_BOOL("input_backtouch_enable", &settings->bools.input_backtouch_enable, false, false, false);
|
||||
SETTING_BOOL("input_backtouch_toggle", &settings->bools.input_backtouch_toggle, false, false, false);
|
||||
@@ -1285,6 +1359,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false);
|
||||
SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false);
|
||||
SETTING_BOOL("menu_dynamic_wallpaper_enable", &settings->bools.menu_dynamic_wallpaper_enable, true, false, false);
|
||||
SETTING_BOOL("quick_menu_show_recording", &settings->bools.quick_menu_show_recording, true, quick_menu_show_recording, false);
|
||||
SETTING_BOOL("quick_menu_show_streaming", &settings->bools.quick_menu_show_streaming, true, quick_menu_show_streaming, false);
|
||||
SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false);
|
||||
SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false);
|
||||
@@ -1295,6 +1372,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("quick_menu_show_shaders", &settings->bools.quick_menu_show_shaders, true, quick_menu_show_shaders, false);
|
||||
SETTING_BOOL("quick_menu_show_save_core_overrides", &settings->bools.quick_menu_show_save_core_overrides, true, quick_menu_show_save_core_overrides, false);
|
||||
SETTING_BOOL("quick_menu_show_save_game_overrides", &settings->bools.quick_menu_show_save_game_overrides, true, quick_menu_show_save_game_overrides, false);
|
||||
SETTING_BOOL("quick_menu_show_save_content_dir_overrides", &settings->bools.quick_menu_show_save_content_dir_overrides, true, quick_menu_show_save_content_dir_overrides, false);
|
||||
SETTING_BOOL("quick_menu_show_information", &settings->bools.quick_menu_show_information, true, quick_menu_show_information, false);
|
||||
SETTING_BOOL("kiosk_mode_enable", &settings->bools.kiosk_mode_enable, true, kiosk_mode_enable, false);
|
||||
SETTING_BOOL("content_show_settings", &settings->bools.menu_content_show_settings, true, content_show_settings, false);
|
||||
@@ -1303,7 +1381,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("content_show_images", &settings->bools.menu_content_show_images, true, content_show_images, false);
|
||||
#endif
|
||||
SETTING_BOOL("content_show_music", &settings->bools.menu_content_show_music, true, content_show_music, false);
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
SETTING_BOOL("content_show_video", &settings->bools.menu_content_show_video, true, content_show_video, false);
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -1324,6 +1402,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("menu_show_help", &settings->bools.menu_show_help, true, menu_show_help, false);
|
||||
SETTING_BOOL("menu_show_quit_retroarch", &settings->bools.menu_show_quit_retroarch, true, menu_show_quit_retroarch, false);
|
||||
SETTING_BOOL("menu_show_reboot", &settings->bools.menu_show_reboot, true, menu_show_reboot, false);
|
||||
SETTING_BOOL("menu_show_shutdown", &settings->bools.menu_show_shutdown, true, menu_show_shutdown, false);
|
||||
SETTING_BOOL("menu_show_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false);
|
||||
SETTING_BOOL("menu_show_core_updater", &settings->bools.menu_show_core_updater, true, menu_show_core_updater, false);
|
||||
SETTING_BOOL("filter_by_current_core", &settings->bools.filter_by_current_core, false, false /* TODO */, false);
|
||||
@@ -1403,6 +1482,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("video_msg_bgcolor_enable", &settings->bools.video_msg_bgcolor_enable, true, message_bgcolor_enable, false);
|
||||
SETTING_BOOL("video_window_show_decorations", &settings->bools.video_window_show_decorations, true, window_decorations, false);
|
||||
|
||||
SETTING_BOOL("sustained_performance_mode", &settings->bools.sustained_performance_mode, true, sustained_performance_mode, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1411,17 +1492,18 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
static struct config_float_setting *populate_settings_float(settings_t *settings, int *size)
|
||||
{
|
||||
unsigned count = 0;
|
||||
struct config_float_setting *tmp = (struct config_float_setting*)malloc((*size + 1) * sizeof(struct config_float_setting));
|
||||
struct config_float_setting *tmp = (struct config_float_setting*)calloc(1, (*size + 1) * sizeof(struct config_float_setting));
|
||||
|
||||
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false);
|
||||
SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false);
|
||||
SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false);
|
||||
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, refresh_rate, false);
|
||||
SETTING_FLOAT("audio_rate_control_delta", audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA), true, rate_control_delta, false);
|
||||
SETTING_FLOAT("audio_max_timing_skew", &settings->floats.audio_max_timing_skew, true, max_timing_skew, false);
|
||||
SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, audio_volume, false);
|
||||
SETTING_FLOAT("audio_mixer_volume", &settings->floats.audio_mixer_volume, true, audio_mixer_volume, false);
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_FLOAT("input_overlay_opacity", &settings->floats.input_overlay_opacity, true, 0.7f, false);
|
||||
SETTING_FLOAT("input_overlay_opacity", &settings->floats.input_overlay_opacity, true, default_input_overlay_opacity, false);
|
||||
SETTING_FLOAT("input_overlay_scale", &settings->floats.input_overlay_scale, true, 1.0f, false);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
@@ -1448,7 +1530,9 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
unsigned count = 0;
|
||||
struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting));
|
||||
|
||||
SETTING_UINT("crt_switch_resolution", &settings->uints.crt_switch_resolution, true, crt_switch_resolution, false);
|
||||
SETTING_UINT("input_bind_timeout", &settings->uints.input_bind_timeout, true, input_bind_timeout, false);
|
||||
SETTING_UINT("input_bind_hold", &settings->uints.input_bind_hold, true, input_bind_hold, false);
|
||||
SETTING_UINT("input_turbo_period", &settings->uints.input_turbo_period, true, turbo_period, false);
|
||||
SETTING_UINT("input_duty_cycle", &settings->uints.input_turbo_duty_cycle, true, turbo_duty_cycle, false);
|
||||
SETTING_UINT("input_max_users", input_driver_get_uint(INPUT_ACTION_MAX_USERS), true, input_max_users, false);
|
||||
@@ -1457,6 +1541,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("audio_resampler_quality", &settings->uints.audio_resampler_quality, true, audio_resampler_quality_level, false);
|
||||
SETTING_UINT("audio_block_frames", &settings->uints.audio_block_frames, true, 0, false);
|
||||
SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, rewind_granularity, false);
|
||||
SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, rewind_buffer_size_step, false);
|
||||
SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, autosave_interval, false);
|
||||
SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, libretro_log_level, false);
|
||||
SETTING_UINT("keyboard_gamepad_mapping_type",&settings->uints.input_keyboard_gamepad_mapping_type, true, 1, false);
|
||||
@@ -1508,6 +1593,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("aspect_ratio_index", &settings->uints.video_aspect_ratio_idx, true, aspect_ratio_idx, false);
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_UINT("netplay_ip_port", &settings->uints.netplay_port, true, RARCH_DEFAULT_PORT, false);
|
||||
SETTING_UINT("video_stream_port", &settings->uints.video_stream_port, true, RARCH_STREAM_DEFAULT_PORT, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT);
|
||||
SETTING_UINT("netplay_input_latency_frames_min",&settings->uints.netplay_input_latency_frames_min, true, 0, false);
|
||||
SETTING_UINT("netplay_input_latency_frames_range",&settings->uints.netplay_input_latency_frames_range, true, 0, false);
|
||||
@@ -1526,6 +1612,20 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
|
||||
SETTING_UINT("run_ahead_frames", &settings->uints.run_ahead_frames, true, 1, false);
|
||||
|
||||
SETTING_UINT("midi_volume", &settings->uints.midi_volume, true, midi_volume, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static struct config_size_setting *populate_settings_size(settings_t *settings, int *size)
|
||||
{
|
||||
unsigned count = 0;
|
||||
struct config_size_setting *tmp = (struct config_size_setting*)calloc((*size + 1), sizeof(struct config_size_setting));
|
||||
|
||||
SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, rewind_buffer_size, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
@@ -1544,6 +1644,7 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
|
||||
#ifdef HAVE_WASAPI
|
||||
SETTING_INT("audio_wasapi_sh_buffer_length", &settings->ints.audio_wasapi_sh_buffer_length, true, wasapi_sh_buffer_length, false);
|
||||
#endif
|
||||
SETTING_INT("crt_switch_center_adjust", &settings->ints.crt_switch_center_adjust, false, 0 /* TODO */, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
@@ -1566,6 +1667,7 @@ static void config_set_defaults(void)
|
||||
int float_settings_size = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
int int_settings_size = sizeof(settings->ints) / sizeof(settings->ints.placeholder);
|
||||
int uint_settings_size = sizeof(settings->uints) / sizeof(settings->uints.placeholder);
|
||||
int size_settings_size = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
const char *def_video = config_get_default_video();
|
||||
const char *def_audio = config_get_default_audio();
|
||||
const char *def_audio_resampler = config_get_default_audio_resampler();
|
||||
@@ -1579,11 +1681,13 @@ static void config_set_defaults(void)
|
||||
const char *def_led = config_get_default_led();
|
||||
const char *def_location = config_get_default_location();
|
||||
const char *def_record = config_get_default_record();
|
||||
const char *def_midi = config_get_default_midi();
|
||||
const char *def_mitm = netplay_mitm_server;
|
||||
struct config_float_setting *float_settings = populate_settings_float (settings, &float_settings_size);
|
||||
struct config_bool_setting *bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||
struct config_int_setting *int_settings = populate_settings_int (settings, &int_settings_size);
|
||||
struct config_uint_setting *uint_settings = populate_settings_uint (settings, &uint_settings_size);
|
||||
struct config_size_setting *size_settings = populate_settings_size (settings, &size_settings_size);
|
||||
|
||||
if (bool_settings && (bool_settings_size > 0))
|
||||
{
|
||||
@@ -1618,6 +1722,17 @@ static void config_set_defaults(void)
|
||||
free(uint_settings);
|
||||
}
|
||||
|
||||
if (size_settings && (size_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
{
|
||||
if (size_settings[i].def_enable)
|
||||
*size_settings[i].ptr = size_settings[i].def;
|
||||
}
|
||||
|
||||
free(size_settings);
|
||||
}
|
||||
|
||||
if (float_settings && (float_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
@@ -1659,6 +1774,9 @@ static void config_set_defaults(void)
|
||||
if (def_record)
|
||||
strlcpy(settings->arrays.record_driver,
|
||||
def_record, sizeof(settings->arrays.record_driver));
|
||||
if (def_midi)
|
||||
strlcpy(settings->arrays.midi_driver,
|
||||
def_midi, sizeof(settings->arrays.midi_driver));
|
||||
if (def_mitm)
|
||||
strlcpy(settings->arrays.netplay_mitm_server,
|
||||
def_mitm, sizeof(settings->arrays.netplay_mitm_server));
|
||||
@@ -1676,7 +1794,7 @@ static void config_set_defaults(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
configuration_set_bool(settings, settings->bools.multimedia_builtin_mediaplayer_enable, true);
|
||||
#else
|
||||
configuration_set_bool(settings, settings->bools.multimedia_builtin_mediaplayer_enable, false);
|
||||
@@ -1706,8 +1824,6 @@ static void config_set_defaults(void)
|
||||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, settings->floats.audio_volume);
|
||||
audio_set_float(AUDIO_ACTION_MIXER_VOLUME_GAIN, settings->floats.audio_mixer_volume);
|
||||
|
||||
settings->rewind_buffer_size = rewind_buffer_size;
|
||||
|
||||
#ifdef HAVE_LAKKA
|
||||
settings->bools.ssh_enable = filestream_exists(LAKKA_SSH_PATH);
|
||||
settings->bools.samba_enable = filestream_exists(LAKKA_SAMBA_PATH);
|
||||
@@ -1820,6 +1936,9 @@ static void config_set_defaults(void)
|
||||
*settings->paths.path_menu_wallpaper = '\0';
|
||||
*settings->paths.path_content_database = '\0';
|
||||
*settings->paths.path_overlay = '\0';
|
||||
*settings->paths.path_record_config = '\0';
|
||||
*settings->paths.path_stream_config = '\0';
|
||||
*settings->paths.path_stream_url = '\0';
|
||||
*settings->paths.path_softfilter_plugin = '\0';
|
||||
|
||||
*settings->arrays.playlist_names = '\0';
|
||||
@@ -1976,6 +2095,13 @@ static void config_set_defaults(void)
|
||||
free(temp_str);
|
||||
}
|
||||
|
||||
if (midi_input)
|
||||
strlcpy(settings->arrays.midi_input,
|
||||
midi_input, sizeof(settings->arrays.midi_input));
|
||||
if (midi_output)
|
||||
strlcpy(settings->arrays.midi_output,
|
||||
midi_output, sizeof(settings->arrays.midi_output));
|
||||
|
||||
/* Avoid reloading config on every content load */
|
||||
if (default_block_config_read)
|
||||
rarch_ctl(RARCH_CTL_SET_BLOCK_CONFIG_READ, NULL);
|
||||
@@ -2009,7 +2135,7 @@ static config_file_t *open_default_config_file(void)
|
||||
|
||||
(void)path_size;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
fill_pathname_application_path(app_path, path_size);
|
||||
fill_pathname_resolve_relative(conf_path, app_path,
|
||||
file_path_str(FILE_PATH_MAIN_CONFIG), path_size);
|
||||
@@ -2298,6 +2424,7 @@ static bool check_shader_compatibility(enum file_path_enum enum_idx)
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (string_is_equal(settings->arrays.video_driver, "vulkan") ||
|
||||
string_is_equal(settings->arrays.video_driver, "metal") ||
|
||||
string_is_equal(settings->arrays.video_driver, "d3d11") ||
|
||||
string_is_equal(settings->arrays.video_driver, "d3d12") ||
|
||||
string_is_equal(settings->arrays.video_driver, "gx2"))
|
||||
@@ -2398,12 +2525,14 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
int float_settings_size = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
int int_settings_size = sizeof(settings->ints) / sizeof(settings->ints.placeholder);
|
||||
int uint_settings_size = sizeof(settings->uints) / sizeof(settings->uints.placeholder);
|
||||
int size_settings_size = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
int array_settings_size = sizeof(settings->arrays) / sizeof(settings->arrays.placeholder);
|
||||
int path_settings_size = sizeof(settings->paths) / sizeof(settings->paths.placeholder);
|
||||
struct config_bool_setting *bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||
struct config_float_setting *float_settings = populate_settings_float (settings, &float_settings_size);
|
||||
struct config_int_setting *int_settings = populate_settings_int (settings, &int_settings_size);
|
||||
struct config_uint_setting *uint_settings = populate_settings_uint (settings, &uint_settings_size);
|
||||
struct config_size_setting *size_settings = populate_settings_size (settings, &size_settings_size);
|
||||
struct config_array_setting *array_settings = populate_settings_array (settings, &array_settings_size);
|
||||
struct config_path_setting *path_settings = populate_settings_path (settings, &path_settings_size);
|
||||
|
||||
@@ -2528,6 +2657,21 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
*uint_settings[i].ptr = tmp;
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
{
|
||||
size_t tmp = 0;
|
||||
if (config_get_size_t(conf, size_settings[i].ident, &tmp))
|
||||
*size_settings[i].ptr = tmp ;
|
||||
/* Special case for rewind_buffer_size - need to convert low values to what they were
|
||||
* intended to be based on the default value in config.def.h
|
||||
* If the value is less than 10000 then multiple by 1MB because if the retroarch.cfg
|
||||
* file contains rewind_buffer_size = "100" then that ultimately gets interpreted as
|
||||
* 100MB, so ensure the internal values represent that.*/
|
||||
if (string_is_equal(size_settings[i].ident, "rewind_buffer_size"))
|
||||
if (*size_settings[i].ptr < 10000)
|
||||
*size_settings[i].ptr = *size_settings[i].ptr * 1024 * 1024;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char buf[64];
|
||||
@@ -2559,13 +2703,6 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.led_map[i], buf);
|
||||
}
|
||||
|
||||
{
|
||||
/* ugly hack around C89 not allowing mixing declarations and code */
|
||||
int buffer_size = 0;
|
||||
if (config_get_int(conf, "rewind_buffer_size", &buffer_size))
|
||||
settings->rewind_buffer_size = buffer_size * UINT64_C(1000000);
|
||||
}
|
||||
|
||||
|
||||
/* Hexadecimal settings */
|
||||
|
||||
@@ -2886,8 +3023,10 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
settings->arrays.video_driver);
|
||||
settings->paths.path_shader[0] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
|
||||
|
||||
ret = true;
|
||||
|
||||
@@ -2907,6 +3046,8 @@ end:
|
||||
free(array_settings);
|
||||
if (path_settings)
|
||||
free(path_settings);
|
||||
if (size_settings)
|
||||
free(size_settings);
|
||||
free(tmp_str);
|
||||
return ret;
|
||||
}
|
||||
@@ -2936,6 +3077,7 @@ bool config_load_override(void)
|
||||
char *buf = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
char *content_path = NULL;
|
||||
char *config_directory = NULL;
|
||||
config_file_t *new_conf = NULL;
|
||||
bool should_append = false;
|
||||
@@ -2943,6 +3085,10 @@ bool config_load_override(void)
|
||||
const char *core_name = system ?
|
||||
system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
|
||||
if (!string_is_empty(path_get(RARCH_PATH_BASENAME)))
|
||||
fill_pathname_parent_dir_name(content_dir_name, path_get(RARCH_PATH_BASENAME), sizeof(content_dir_name));
|
||||
|
||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||
return false;
|
||||
@@ -2951,6 +3097,8 @@ bool config_load_override(void)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
core_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
content_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
buf = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
config_directory = (char*)
|
||||
@@ -2960,23 +3108,29 @@ bool config_load_override(void)
|
||||
fill_pathname_application_special(config_directory, path_size,
|
||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
/* Concatenate strings into full paths for core_path, game_path */
|
||||
/* Concatenate strings into full paths for core_path, game_path, content_path */
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
path_size);
|
||||
|
||||
/* per-core overrides */
|
||||
/* Create a new config file from core_path */
|
||||
new_conf = config_file_new(core_path);
|
||||
|
||||
/* If a core override exists, add its location to append_config_path */
|
||||
if (new_conf)
|
||||
{
|
||||
RARCH_LOG("[overrides] core-specific overrides found at %s.\n",
|
||||
@@ -2991,10 +3145,45 @@ bool config_load_override(void)
|
||||
RARCH_LOG("[overrides] no core-specific overrides found at %s.\n",
|
||||
core_path);
|
||||
|
||||
/* per-content-dir overrides */
|
||||
/* Create a new config file from content_path */
|
||||
new_conf = config_file_new(content_path);
|
||||
|
||||
if (new_conf)
|
||||
{
|
||||
char *temp_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
temp_path[0] = '\0';
|
||||
|
||||
config_file_free(new_conf);
|
||||
|
||||
RARCH_LOG("[overrides] content-dir-specific overrides found at %s.\n",
|
||||
game_path);
|
||||
|
||||
if (should_append)
|
||||
{
|
||||
RARCH_LOG("[overrides] content-dir-specific overrides stacking on top of previous overrides.\n");
|
||||
strlcpy(temp_path, path_get(RARCH_PATH_CONFIG_APPEND), path_size);
|
||||
strlcat(temp_path, "|", path_size);
|
||||
strlcat(temp_path, content_path, path_size);
|
||||
}
|
||||
else
|
||||
strlcpy(temp_path, content_path, path_size);
|
||||
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, temp_path);
|
||||
|
||||
free(temp_path);
|
||||
|
||||
should_append = true;
|
||||
}
|
||||
else
|
||||
RARCH_LOG("[overrides] no content-dir-specific overrides found at %s.\n",
|
||||
content_path);
|
||||
|
||||
/* per-game overrides */
|
||||
/* Create a new config file from game_path */
|
||||
new_conf = config_file_new(game_path);
|
||||
|
||||
/* If a game override exists, add it's location to append_config_path */
|
||||
if (new_conf)
|
||||
{
|
||||
char *temp_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
@@ -3008,6 +3197,7 @@ bool config_load_override(void)
|
||||
|
||||
if (should_append)
|
||||
{
|
||||
RARCH_LOG("[overrides] game-specific overrides stacking on top of previous overrides\n");
|
||||
strlcpy(temp_path, path_get(RARCH_PATH_CONFIG_APPEND), path_size);
|
||||
strlcat(temp_path, "|", path_size);
|
||||
strlcat(temp_path, game_path, path_size);
|
||||
@@ -3058,6 +3248,7 @@ bool config_load_override(void)
|
||||
free(buf);
|
||||
free(config_directory);
|
||||
free(core_path);
|
||||
free(content_path);
|
||||
free(game_path);
|
||||
return true;
|
||||
|
||||
@@ -3065,6 +3256,7 @@ error:
|
||||
free(buf);
|
||||
free(config_directory);
|
||||
free(core_path);
|
||||
free(content_path);
|
||||
free(game_path);
|
||||
return false;
|
||||
}
|
||||
@@ -3116,11 +3308,16 @@ bool config_load_remap(void)
|
||||
char *remap_directory = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
char *content_path = NULL;
|
||||
config_file_t *new_conf = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system ? system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
|
||||
if (!string_is_empty(path_get(RARCH_PATH_BASENAME)))
|
||||
fill_pathname_parent_dir_name(content_dir_name, path_get(RARCH_PATH_BASENAME), sizeof(content_dir_name));
|
||||
|
||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||
return false;
|
||||
@@ -3139,8 +3336,12 @@ bool config_load_remap(void)
|
||||
/* final path for game-specific configuration (prefix+suffix) */
|
||||
game_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for content-dir-specific configuration (prefix+suffix) */
|
||||
content_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
remap_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
|
||||
|
||||
strlcpy(remap_directory,
|
||||
settings->paths.directory_input_remapping,
|
||||
path_size);
|
||||
@@ -3153,6 +3354,12 @@ bool config_load_remap(void)
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
remap_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
remap_directory, core_name,
|
||||
game_name,
|
||||
@@ -3180,6 +3387,28 @@ bool config_load_remap(void)
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
/* Create a new config file from content_path */
|
||||
new_conf = config_file_new(content_path);
|
||||
|
||||
/* If a content-dir remap file exists, load it. */
|
||||
if (new_conf)
|
||||
{
|
||||
RARCH_LOG("Remaps: content-dir-specific remap found at %s.\n", content_path);
|
||||
if (input_remapping_load_file(new_conf, content_path))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(
|
||||
MSG_GAME_REMAP_FILE_LOADED), 1, 100, true);
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Remaps: no content-dir-specific remap found at %s.\n", content_path);
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
|
||||
/* Create a new config file from core_path */
|
||||
new_conf = config_file_new(core_path);
|
||||
|
||||
@@ -3203,12 +3432,14 @@ bool config_load_remap(void)
|
||||
|
||||
new_conf = NULL;
|
||||
|
||||
free(content_path);
|
||||
free(remap_directory);
|
||||
free(core_path);
|
||||
free(game_path);
|
||||
return false;
|
||||
|
||||
success:
|
||||
free(content_path);
|
||||
free(remap_directory);
|
||||
free(core_path);
|
||||
free(game_path);
|
||||
@@ -3231,21 +3462,21 @@ success:
|
||||
bool config_load_shader_preset(void)
|
||||
{
|
||||
unsigned idx;
|
||||
char parent_name[PATH_MAX_LENGTH];
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
config_file_t *new_conf = NULL;
|
||||
char *shader_directory = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
char *parent_path = NULL;
|
||||
char *content_path = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system
|
||||
? system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
|
||||
if (!string_is_empty(path_get(RARCH_PATH_BASENAME)))
|
||||
fill_pathname_parent_dir_name(parent_name, path_get(RARCH_PATH_BASENAME), sizeof(parent_name));
|
||||
fill_pathname_parent_dir_name(content_dir_name, path_get(RARCH_PATH_BASENAME), sizeof(content_dir_name));
|
||||
|
||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||
return false;
|
||||
@@ -3265,7 +3496,7 @@ bool config_load_shader_preset(void)
|
||||
game_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for parent-dir-specific configuration (prefix+suffix) */
|
||||
parent_path = (char*)
|
||||
content_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
shader_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
@@ -3316,26 +3547,26 @@ bool config_load_shader_preset(void)
|
||||
if (!check_shader_compatibility((enum file_path_enum)(idx)))
|
||||
continue;
|
||||
/* Concatenate strings into full paths for core_path, parent path */
|
||||
fill_pathname_join_special_ext(parent_path,
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
shader_directory, core_name,
|
||||
parent_name,
|
||||
content_dir_name,
|
||||
file_path_str((enum file_path_enum)(idx)),
|
||||
path_size);
|
||||
|
||||
/* Create a new config file from parent path */
|
||||
new_conf = config_file_new(parent_path);
|
||||
new_conf = config_file_new(content_path);
|
||||
|
||||
if (!new_conf)
|
||||
{
|
||||
RARCH_LOG("Shaders: no parent-dir-specific preset found at %s.\n",
|
||||
parent_path);
|
||||
RARCH_LOG("Shaders: no content-dir-specific preset found at %s.\n",
|
||||
content_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Parent-dir shader preset exists, load it. */
|
||||
RARCH_LOG("Shaders: parent-dir-specific shader preset found at %s.\n",
|
||||
parent_path);
|
||||
retroarch_set_shader_preset(parent_path);
|
||||
RARCH_LOG("Shaders: content-dir-specific shader preset found at %s.\n",
|
||||
content_path);
|
||||
retroarch_set_shader_preset(content_path);
|
||||
goto success;
|
||||
}
|
||||
|
||||
@@ -3370,14 +3601,14 @@ bool config_load_shader_preset(void)
|
||||
free(shader_directory);
|
||||
free(core_path);
|
||||
free(game_path);
|
||||
free(parent_path);
|
||||
free(content_path);
|
||||
return false;
|
||||
|
||||
success:
|
||||
free(shader_directory);
|
||||
free(core_path);
|
||||
free(game_path);
|
||||
free(parent_path);
|
||||
free(content_path);
|
||||
config_file_free(new_conf);
|
||||
return true;
|
||||
}
|
||||
@@ -3525,14 +3756,14 @@ static void save_keybind_mbutton(config_file_t *conf,
|
||||
const char *base,
|
||||
const struct retro_keybind *bind, bool save_empty)
|
||||
{
|
||||
char key[64];
|
||||
char key[64];
|
||||
|
||||
key[0] = '\0';
|
||||
key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim_concat(key, prefix,
|
||||
base, '_', "_mbtn", sizeof(key));
|
||||
fill_pathname_join_delim_concat(key, prefix,
|
||||
base, '_', "_mbtn", sizeof(key));
|
||||
|
||||
switch ( bind->mbutton )
|
||||
switch ( bind->mbutton )
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
config_set_uint64(conf, key, 1);
|
||||
@@ -3799,6 +4030,7 @@ bool config_save_file(const char *path)
|
||||
struct config_bool_setting *bool_settings = NULL;
|
||||
struct config_int_setting *int_settings = NULL;
|
||||
struct config_uint_setting *uint_settings = NULL;
|
||||
struct config_size_setting *size_settings = NULL;
|
||||
struct config_float_setting *float_settings = NULL;
|
||||
struct config_array_setting *array_settings = NULL;
|
||||
struct config_path_setting *path_settings = NULL;
|
||||
@@ -3808,6 +4040,7 @@ bool config_save_file(const char *path)
|
||||
int float_settings_size = sizeof(settings->floats)/ sizeof(settings->floats.placeholder);
|
||||
int int_settings_size = sizeof(settings->ints) / sizeof(settings->ints.placeholder);
|
||||
int uint_settings_size = sizeof(settings->uints) / sizeof(settings->uints.placeholder);
|
||||
int size_settings_size = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
int array_settings_size = sizeof(settings->arrays)/ sizeof(settings->arrays.placeholder);
|
||||
int path_settings_size = sizeof(settings->paths) / sizeof(settings->paths.placeholder);
|
||||
|
||||
@@ -3824,6 +4057,7 @@ bool config_save_file(const char *path)
|
||||
bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||
int_settings = populate_settings_int (settings, &int_settings_size);
|
||||
uint_settings = populate_settings_uint (settings, &uint_settings_size);
|
||||
size_settings = populate_settings_size (settings, &size_settings_size);
|
||||
float_settings = populate_settings_float (settings, &float_settings_size);
|
||||
array_settings = populate_settings_array (settings, &array_settings_size);
|
||||
path_settings = populate_settings_path (settings, &path_settings_size);
|
||||
@@ -3901,6 +4135,18 @@ bool config_save_file(const char *path)
|
||||
free(uint_settings);
|
||||
}
|
||||
|
||||
if (size_settings && (size_settings_size > 0))
|
||||
{
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
if (!size_settings[i].override ||
|
||||
!retroarch_override_setting_is_set(size_settings[i].override, NULL))
|
||||
config_set_int(conf,
|
||||
size_settings[i].ident,
|
||||
(int)*size_settings[i].ptr);
|
||||
|
||||
free(size_settings);
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char cfg[64];
|
||||
@@ -4020,8 +4266,10 @@ bool config_save_overrides(int override_type)
|
||||
struct config_bool_setting *bool_overrides = NULL;
|
||||
struct config_int_setting *int_settings = NULL;
|
||||
struct config_uint_setting *uint_settings = NULL;
|
||||
struct config_size_setting *size_settings = NULL;
|
||||
struct config_int_setting *int_overrides = NULL;
|
||||
struct config_uint_setting *uint_overrides = NULL;
|
||||
struct config_size_setting *size_overrides = NULL;
|
||||
struct config_float_setting *float_settings = NULL;
|
||||
struct config_float_setting *float_overrides= NULL;
|
||||
struct config_array_setting *array_settings = NULL;
|
||||
@@ -4032,16 +4280,22 @@ bool config_save_overrides(int override_type)
|
||||
char *override_directory = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
char *content_path = NULL;
|
||||
settings_t *overrides = config_get_ptr();
|
||||
int bool_settings_size = sizeof(settings->bools) / sizeof(settings->bools.placeholder);
|
||||
int float_settings_size = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
int int_settings_size = sizeof(settings->ints) / sizeof(settings->ints.placeholder);
|
||||
int uint_settings_size = sizeof(settings->uints) / sizeof(settings->uints.placeholder);
|
||||
int size_settings_size = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
int array_settings_size = sizeof(settings->arrays) / sizeof(settings->arrays.placeholder);
|
||||
int path_settings_size = sizeof(settings->paths) / sizeof(settings->paths.placeholder);
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system ? system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
|
||||
if (!string_is_empty(path_get(RARCH_PATH_BASENAME)))
|
||||
fill_pathname_parent_dir_name(content_dir_name, path_get(RARCH_PATH_BASENAME), sizeof(content_dir_name));
|
||||
|
||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||
return false;
|
||||
@@ -4051,6 +4305,7 @@ bool config_save_overrides(int override_type)
|
||||
override_directory = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
core_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
game_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
content_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
config_directory[0] = override_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
|
||||
@@ -4070,6 +4325,12 @@ bool config_save_overrides(int override_type)
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
@@ -4094,6 +4355,10 @@ bool config_save_overrides(int override_type)
|
||||
tmp_i = sizeof(settings->uints) / sizeof(settings->uints.placeholder);
|
||||
uint_overrides = populate_settings_uint (overrides, &tmp_i);
|
||||
|
||||
size_settings = populate_settings_size(settings, &size_settings_size);
|
||||
tmp_i = sizeof(settings->sizes) / sizeof(settings->sizes.placeholder);
|
||||
size_overrides = populate_settings_size (overrides, &tmp_i);
|
||||
|
||||
float_settings = populate_settings_float(settings, &float_settings_size);
|
||||
tmp_i = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
float_overrides = populate_settings_float(overrides, &tmp_i);
|
||||
@@ -4146,6 +4411,18 @@ bool config_save_overrides(int override_type)
|
||||
(*uint_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
{
|
||||
if ((*size_settings[i].ptr) != (*size_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%d\n",
|
||||
size_settings[i].ident, (*size_settings[i].ptr));
|
||||
RARCH_LOG(" override: %s=%d\n",
|
||||
size_overrides[i].ident, (*size_overrides[i].ptr));
|
||||
config_set_int(conf, size_overrides[i].ident,
|
||||
(int)(*size_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
{
|
||||
if ((*float_settings[i].ptr) != (*float_overrides[i].ptr))
|
||||
@@ -4174,6 +4451,11 @@ bool config_save_overrides(int override_type)
|
||||
|
||||
for (i = 0; i < (unsigned)path_settings_size; i++)
|
||||
{
|
||||
|
||||
/* blacklist video_shader, better handled by shader presets*/
|
||||
/* to-do: add setting to control blacklisting */
|
||||
if (string_is_equal(path_settings[i].ident, "video_shader"))
|
||||
continue;
|
||||
if (!string_is_equal(path_settings[i].ptr, path_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%s\n",
|
||||
@@ -4204,6 +4486,9 @@ bool config_save_overrides(int override_type)
|
||||
config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]);
|
||||
}
|
||||
|
||||
|
||||
/* blacklist these since they are handled by remaps */
|
||||
/* to-do: add setting to control blacklisting
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
!= overrides->uints.input_libretro_device[i])
|
||||
{
|
||||
@@ -4217,6 +4502,7 @@ bool config_save_overrides(int override_type)
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_analog_dpad_mode", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_analog_dpad_mode[i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
ret = false;
|
||||
@@ -4233,6 +4519,11 @@ bool config_save_overrides(int override_type)
|
||||
RARCH_LOG ("[overrides] path %s\n", game_path);
|
||||
ret = config_file_write(conf, game_path);
|
||||
break;
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
/* Create a new config file from content_path */
|
||||
RARCH_LOG ("[overrides] path %s\n", content_path);
|
||||
ret = config_file_write(conf, content_path);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4248,6 +4539,8 @@ bool config_save_overrides(int override_type)
|
||||
free(int_settings);
|
||||
if (uint_settings)
|
||||
free(uint_settings);
|
||||
if (size_settings)
|
||||
free(size_settings);
|
||||
if (int_overrides)
|
||||
free(int_overrides);
|
||||
if (uint_overrides)
|
||||
@@ -4264,6 +4557,8 @@ bool config_save_overrides(int override_type)
|
||||
free(path_settings);
|
||||
if (path_overrides)
|
||||
free(path_overrides);
|
||||
if (size_overrides)
|
||||
free(size_overrides);
|
||||
free(settings);
|
||||
free(config_directory);
|
||||
free(override_directory);
|
||||
|
||||
+50
-4
@@ -53,10 +53,18 @@
|
||||
var = newvar; \
|
||||
}
|
||||
|
||||
enum crt_switch_type
|
||||
{
|
||||
CRT_SWITCH_NONE = 0,
|
||||
CRT_SWITCH_15KHZ,
|
||||
CRT_SWITCH_31KHZ
|
||||
};
|
||||
|
||||
enum override_type
|
||||
{
|
||||
OVERRIDE_NONE = 0,
|
||||
OVERRIDE_CORE,
|
||||
OVERRIDE_CONTENT_DIR,
|
||||
OVERRIDE_GAME
|
||||
};
|
||||
|
||||
@@ -72,6 +80,7 @@ typedef struct settings
|
||||
bool video_fullscreen;
|
||||
bool video_windowed_fullscreen;
|
||||
bool video_vsync;
|
||||
bool video_adaptive_vsync;
|
||||
bool video_hard_sync;
|
||||
bool video_black_frame_insertion;
|
||||
bool video_vfilter;
|
||||
@@ -95,10 +104,10 @@ typedef struct settings
|
||||
bool video_statistics_show;
|
||||
bool video_framecount_show;
|
||||
bool video_msg_bgcolor_enable;
|
||||
bool crt_switch_resolution;
|
||||
|
||||
/* Audio */
|
||||
bool audio_enable;
|
||||
bool audio_enable_menu;
|
||||
bool audio_sync;
|
||||
bool audio_rate_control;
|
||||
bool audio_wasapi_exclusive_mode;
|
||||
@@ -147,6 +156,7 @@ typedef struct settings
|
||||
bool menu_show_help;
|
||||
bool menu_show_quit_retroarch;
|
||||
bool menu_show_reboot;
|
||||
bool menu_show_shutdown;
|
||||
bool menu_show_latency;
|
||||
bool menu_show_rewind;
|
||||
bool menu_show_overlays;
|
||||
@@ -176,9 +186,14 @@ typedef struct settings
|
||||
bool quick_menu_show_shaders;
|
||||
bool quick_menu_show_save_core_overrides;
|
||||
bool quick_menu_show_save_game_overrides;
|
||||
bool quick_menu_show_save_content_dir_overrides;
|
||||
bool quick_menu_show_information;
|
||||
bool quick_menu_show_recording;
|
||||
bool quick_menu_show_streaming;
|
||||
bool kiosk_mode_enable;
|
||||
|
||||
bool crt_switch_custom_refresh_enable;
|
||||
|
||||
/* Netplay */
|
||||
bool netplay_public_announce;
|
||||
bool netplay_start_as_spectator;
|
||||
@@ -197,6 +212,8 @@ typedef struct settings
|
||||
bool ui_suspend_screensaver_enable;
|
||||
bool ui_companion_start_on_boot;
|
||||
bool ui_companion_enable;
|
||||
bool ui_companion_toggle;
|
||||
bool desktop_menu_enable;
|
||||
|
||||
/* Cheevos */
|
||||
bool cheevos_enable;
|
||||
@@ -225,6 +242,7 @@ typedef struct settings
|
||||
bool bundle_assets_extract_enable;
|
||||
|
||||
/* Misc. */
|
||||
bool discord_enable;
|
||||
bool threaded_data_runloop_enable;
|
||||
bool set_supports_no_game_enable;
|
||||
bool auto_screenshot_filename;
|
||||
@@ -232,8 +250,12 @@ typedef struct settings
|
||||
bool playlist_entry_remove;
|
||||
bool playlist_entry_rename;
|
||||
bool rewind_enable;
|
||||
bool vrr_runloop_enable;
|
||||
bool apply_cheats_after_toggle;
|
||||
bool apply_cheats_after_load;
|
||||
bool run_ahead_enabled;
|
||||
bool run_ahead_secondary_instance;
|
||||
bool run_ahead_hide_warnings;
|
||||
bool pause_nonactive;
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
@@ -268,6 +290,8 @@ typedef struct settings
|
||||
|
||||
bool automatically_add_content_to_playlist;
|
||||
bool video_window_show_decorations;
|
||||
|
||||
bool sustained_performance_mode;
|
||||
} bools;
|
||||
|
||||
struct
|
||||
@@ -276,6 +300,7 @@ typedef struct settings
|
||||
float video_scale;
|
||||
float video_aspect_ratio;
|
||||
float video_refresh_rate;
|
||||
float crt_video_refresh_rate;
|
||||
float video_font_size;
|
||||
float video_msg_pos_x;
|
||||
float video_msg_pos_y;
|
||||
@@ -308,6 +333,7 @@ typedef struct settings
|
||||
int location_update_interval_distance;
|
||||
int state_slot;
|
||||
int audio_wasapi_sh_buffer_length;
|
||||
int crt_switch_center_adjust;
|
||||
} ints;
|
||||
|
||||
struct
|
||||
@@ -323,6 +349,7 @@ typedef struct settings
|
||||
unsigned input_turbo_duty_cycle;
|
||||
|
||||
unsigned input_bind_timeout;
|
||||
unsigned input_bind_hold;
|
||||
|
||||
unsigned input_menu_toggle_gamepad_combo;
|
||||
unsigned input_keyboard_gamepad_mapping_type;
|
||||
@@ -337,6 +364,7 @@ typedef struct settings
|
||||
unsigned content_history_size;
|
||||
unsigned libretro_log_level;
|
||||
unsigned rewind_granularity;
|
||||
unsigned rewind_buffer_size_step;
|
||||
unsigned autosave_interval;
|
||||
unsigned network_cmd_port;
|
||||
unsigned network_remote_base_port;
|
||||
@@ -344,7 +372,8 @@ typedef struct settings
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_window_opacity;
|
||||
unsigned crt_switch_resolution_super;
|
||||
unsigned crt_switch_resolution;
|
||||
unsigned crt_switch_resolution_super;
|
||||
unsigned video_monitor_index;
|
||||
unsigned video_fullscreen_x;
|
||||
unsigned video_fullscreen_y;
|
||||
@@ -358,6 +387,7 @@ typedef struct settings
|
||||
unsigned video_msg_bgcolor_red;
|
||||
unsigned video_msg_bgcolor_green;
|
||||
unsigned video_msg_bgcolor_blue;
|
||||
unsigned video_stream_port;
|
||||
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
@@ -396,8 +426,16 @@ typedef struct settings
|
||||
unsigned led_map[MAX_LEDS];
|
||||
|
||||
unsigned run_ahead_frames;
|
||||
|
||||
unsigned midi_volume;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
{
|
||||
size_t placeholder;
|
||||
size_t rewind_buffer_size;
|
||||
} sizes;
|
||||
|
||||
struct
|
||||
{
|
||||
char placeholder;
|
||||
@@ -417,6 +455,7 @@ typedef struct settings
|
||||
char audio_resampler[32];
|
||||
char input_driver[32];
|
||||
char input_joypad_driver[32];
|
||||
char midi_driver[32];
|
||||
|
||||
char input_keyboard_layout[64];
|
||||
|
||||
@@ -430,6 +469,9 @@ typedef struct settings
|
||||
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
|
||||
|
||||
char netplay_mitm_server[255];
|
||||
|
||||
char midi_input[32];
|
||||
char midi_output[32];
|
||||
} arrays;
|
||||
|
||||
struct
|
||||
@@ -450,6 +492,9 @@ typedef struct settings
|
||||
char path_cheat_database[PATH_MAX_LENGTH];
|
||||
char path_content_database[PATH_MAX_LENGTH];
|
||||
char path_overlay[PATH_MAX_LENGTH];
|
||||
char path_record_config[PATH_MAX_LENGTH];
|
||||
char path_stream_config[PATH_MAX_LENGTH];
|
||||
char path_stream_url[PATH_MAX_LENGTH];
|
||||
char path_menu_wallpaper[PATH_MAX_LENGTH];
|
||||
char path_audio_dsp_plugin[PATH_MAX_LENGTH];
|
||||
char path_softfilter_plugin[PATH_MAX_LENGTH];
|
||||
@@ -464,7 +509,6 @@ typedef struct settings
|
||||
char path_shader[PATH_MAX_LENGTH];
|
||||
char path_font[PATH_MAX_LENGTH];
|
||||
|
||||
|
||||
char directory_audio_filter[PATH_MAX_LENGTH];
|
||||
char directory_autoconfig[PATH_MAX_LENGTH];
|
||||
char directory_video_filter[PATH_MAX_LENGTH];
|
||||
@@ -492,7 +536,6 @@ typedef struct settings
|
||||
|
||||
video_viewport_t video_viewport_custom;
|
||||
|
||||
size_t rewind_buffer_size;
|
||||
} settings_t;
|
||||
|
||||
/**
|
||||
@@ -576,6 +619,9 @@ const char *config_get_default_joypad(void);
|
||||
**/
|
||||
const char *config_get_default_menu(void);
|
||||
|
||||
const char *config_get_default_midi(void);
|
||||
const char *config_get_midi_driver_options(void);
|
||||
|
||||
const char *config_get_default_record(void);
|
||||
|
||||
/**
|
||||
|
||||
+15
-1
@@ -43,6 +43,7 @@
|
||||
#include "verbosity.h"
|
||||
#include "gfx/video_driver.h"
|
||||
#include "audio/audio_driver.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "runahead/copy_load_info.h"
|
||||
@@ -290,12 +291,15 @@ bool core_load_game(retro_ctx_load_content_info_t *load_info)
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
set_load_content_info(load_info);
|
||||
clear_controller_port_map();
|
||||
#endif
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
set_save_state_in_background(false);
|
||||
|
||||
if (load_info && load_info->special)
|
||||
current_core.game_loaded = current_core.retro_load_game_special(
|
||||
@@ -373,12 +377,16 @@ bool core_get_system_av_info(struct retro_system_av_info *av_info)
|
||||
|
||||
bool core_reset(void)
|
||||
{
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_init(void)
|
||||
{
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_init();
|
||||
current_core.inited = true;
|
||||
return true;
|
||||
@@ -386,6 +394,8 @@ bool core_init(void)
|
||||
|
||||
bool core_unload(void)
|
||||
{
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_deinit();
|
||||
return true;
|
||||
}
|
||||
@@ -394,11 +404,15 @@ bool core_unload(void)
|
||||
bool core_unload_game(void)
|
||||
{
|
||||
video_driver_free_hw_context();
|
||||
audio_driver_stop();
|
||||
|
||||
video_driver_set_cached_frame_ptr(NULL);
|
||||
|
||||
current_core.retro_unload_game();
|
||||
|
||||
current_core.game_loaded = false;
|
||||
|
||||
audio_driver_stop();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -149,8 +149,10 @@ static void core_info_list_free(core_info_list_t *core_info_list)
|
||||
free(info->path);
|
||||
free(info->core_name);
|
||||
free(info->systemname);
|
||||
free(info->system_id);
|
||||
free(info->system_manufacturer);
|
||||
free(info->display_name);
|
||||
free(info->display_version);
|
||||
free(info->supported_extensions);
|
||||
free(info->authors);
|
||||
free(info->permissions);
|
||||
@@ -278,6 +280,13 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
}
|
||||
if (config_get_string(conf, "display_version", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
{
|
||||
core_info[i].display_version = strdup(tmp);
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
}
|
||||
if (config_get_string(conf, "corename", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
{
|
||||
@@ -294,6 +303,14 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "systemid", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
{
|
||||
core_info[i].system_id = strdup(tmp);
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "manufacturer", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
{
|
||||
@@ -671,6 +688,9 @@ bool core_info_load(core_info_ctx_find_t *info)
|
||||
if (!info)
|
||||
return false;
|
||||
|
||||
if (!core_info_current)
|
||||
core_info_init_current_core();
|
||||
|
||||
core_info_get_current_core(&core_info);
|
||||
|
||||
if (!core_info_curr_list)
|
||||
|
||||
@@ -43,9 +43,11 @@ typedef struct
|
||||
char *path;
|
||||
void *config_data;
|
||||
char *display_name;
|
||||
char *display_version;
|
||||
char *core_name;
|
||||
char *system_manufacturer;
|
||||
char *systemname;
|
||||
char *system_id;
|
||||
char *supported_extensions;
|
||||
char *authors;
|
||||
char *permissions;
|
||||
|
||||
@@ -21,6 +21,7 @@ enum rarch_core_type
|
||||
CORE_TYPE_PLAIN = 0,
|
||||
CORE_TYPE_DUMMY,
|
||||
CORE_TYPE_FFMPEG,
|
||||
CORE_TYPE_MPV,
|
||||
CORE_TYPE_IMAGEVIEWER,
|
||||
CORE_TYPE_NETRETROPAD,
|
||||
CORE_TYPE_VIDEO_PROCESSOR
|
||||
|
||||
@@ -136,6 +136,62 @@ size_t libretro_ffmpeg_retro_get_memory_size(unsigned id);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MPV
|
||||
/* Internal mpv core. */
|
||||
|
||||
void libretro_mpv_retro_init(void);
|
||||
|
||||
void libretro_mpv_retro_deinit(void);
|
||||
|
||||
unsigned libretro_mpv_retro_api_version(void);
|
||||
|
||||
void libretro_mpv_retro_get_system_info(struct retro_system_info *info);
|
||||
|
||||
void libretro_mpv_retro_get_system_av_info(struct retro_system_av_info *info);
|
||||
|
||||
void libretro_mpv_retro_set_environment(retro_environment_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_video_refresh(retro_video_refresh_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_audio_sample(retro_audio_sample_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_audio_sample_batch(retro_audio_sample_batch_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_input_poll(retro_input_poll_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_input_state(retro_input_state_t cb);
|
||||
|
||||
void libretro_mpv_retro_set_controller_port_device(unsigned port, unsigned device);
|
||||
|
||||
void libretro_mpv_retro_reset(void);
|
||||
|
||||
void libretro_mpv_retro_run(void);
|
||||
|
||||
size_t libretro_mpv_retro_serialize_size(void);
|
||||
|
||||
bool libretro_mpv_retro_serialize(void *data, size_t size);
|
||||
|
||||
bool libretro_mpv_retro_unserialize(const void *data, size_t size);
|
||||
|
||||
void libretro_mpv_retro_cheat_reset(void);
|
||||
|
||||
void libretro_mpv_retro_cheat_set(unsigned index, bool enabled, const char *code);
|
||||
|
||||
bool libretro_mpv_retro_load_game(const struct retro_game_info *game);
|
||||
|
||||
bool libretro_mpv_retro_load_game_special(unsigned game_type,
|
||||
const struct retro_game_info *info, size_t num_info);
|
||||
|
||||
void libretro_mpv_retro_unload_game(void);
|
||||
|
||||
unsigned libretro_mpv_retro_get_region(void);
|
||||
|
||||
void *libretro_mpv_retro_get_memory_data(unsigned id);
|
||||
|
||||
size_t libretro_mpv_retro_get_memory_size(unsigned id);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
/* Internal image viewer core. */
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ endif
|
||||
CFLAGS += -I../../libretro-common/include
|
||||
|
||||
OBJECTS := mpv-libretro.o
|
||||
LDFLAGS += -lmpv -ldl -lm
|
||||
LDFLAGS += -lmpv -lm
|
||||
CFLAGS += -Wall -pedantic
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
@@ -1,17 +1,46 @@
|
||||
# libretro-mpv
|
||||
|
||||
mpv media player as a libretro core. A proof of concept release is now available.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
### Overview
|
||||
|
||||
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.
|
||||
|
||||
### Compiling with Mingw-w64 on Windows
|
||||
|
||||
RetroArch must be compiled with `--disable-ffmpeg` and have OpenGL or
|
||||
OpenGLES enabled. Compiling RetroArch is not described here.
|
||||
|
||||
1. Open `Minwg-w64 64 bit` (not MSYS2 shell).
|
||||
2. Install ffmpeg using `pacman -S mingw64/mingw-w64-x86_64-ffmpeg`.
|
||||
3. Clone the ao_cb branch of https://github.com/deltabeard/mpv.git . This fork has the audio
|
||||
callback patches required for libretro-mpv.
|
||||
4. Follow the instructions at https://github.com/mpv-player/mpv/blob/master/DOCS/compile-windows.md#native-compilation-with-msys2 to compile mpv.
|
||||
5. Download libretro-mpv release 0.3.alpha by either checking out the
|
||||
`audio-cb-new` branch of `https://github.com/libretro/libretro-mpv.git` or
|
||||
by downloading
|
||||
https://github.com/libretro/libretro-mpv/archive/0.3.alpha.tar.gz .
|
||||
6. Run `make` in the libretro-mpv folder. If using OpenGLES, run `make
|
||||
platform=gles` instead.
|
||||
|
||||
Overall, the dependencies required to build libretro-mpv are:
|
||||
- ffmpeg 4.0 (provided by mingw64/mingw-w64-x86_64-ffmpeg)
|
||||
- mpv from https://github.com/deltabeard/mpv.git fork.
|
||||
@@ -0,0 +1 @@
|
||||
#include "../internal_cores.h"
|
||||
+227
-208
@@ -14,26 +14,28 @@
|
||||
* 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 <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#include <mpv/client.h>
|
||||
#include <mpv/opengl_cb.h>
|
||||
#include <mpv/render_gl.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include "internal_cores.h"
|
||||
#define CORE_PREFIX(s) libretro_mpv_##s
|
||||
#else
|
||||
#define CORE_PREFIX(s) s
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
|
||||
static struct retro_hw_render_callback hw_render;
|
||||
@@ -41,28 +43,25 @@ 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 retro_video_refresh_t CORE_PREFIX(video_cb);
|
||||
static retro_audio_sample_t CORE_PREFIX(audio_cb);
|
||||
static retro_audio_sample_batch_t CORE_PREFIX(audio_batch_cb);
|
||||
static retro_environment_t CORE_PREFIX(environ_cb);
|
||||
static retro_input_poll_t CORE_PREFIX(input_poll_cb);
|
||||
static retro_input_state_t CORE_PREFIX(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;
|
||||
static mpv_render_context *mpv_gl;
|
||||
|
||||
/* Save the current playback time for context changes */
|
||||
static int64_t *playback_time = 0;
|
||||
static int64_t playback_time = 0;
|
||||
|
||||
/* filepath required globaly as mpv is reopened on context change */
|
||||
static char *filepath = NULL;
|
||||
|
||||
static volatile int frame_queue = 0;
|
||||
|
||||
void queue_new_frame(void *cb_ctx)
|
||||
void on_mpv_redraw(void *cb_ctx)
|
||||
{
|
||||
frame_queue++;
|
||||
}
|
||||
@@ -76,52 +75,59 @@ static void fallback_log(enum retro_log_level level, const char *fmt, ...)
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
static void print_mpv_logs(void)
|
||||
/**
|
||||
* Process various events triggered by mpv, such as printing log messages.
|
||||
*
|
||||
* \param event_block Wait until the mpv triggers specified event. Should be
|
||||
* NULL if no wait is required.
|
||||
*/
|
||||
static void process_mpv_events(mpv_event_id event_block)
|
||||
{
|
||||
/* Print out mpv logs */
|
||||
if(event_waiting > 0)
|
||||
do
|
||||
{
|
||||
while(1)
|
||||
mpv_event *mp_event = mpv_wait_event(mpv, 0);
|
||||
if(event_block == MPV_EVENT_NONE &&
|
||||
mp_event->event_id == MPV_EVENT_NONE)
|
||||
break;
|
||||
|
||||
if(mp_event->event_id == event_block)
|
||||
event_block = MPV_EVENT_NONE;
|
||||
|
||||
if(mp_event->event_id == MPV_EVENT_LOG_MESSAGE)
|
||||
{
|
||||
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));
|
||||
}
|
||||
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;
|
||||
|
||||
event_waiting = 0;
|
||||
if(eof->reason == MPV_END_FILE_REASON_EOF)
|
||||
CORE_PREFIX(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 */
|
||||
};
|
||||
|
||||
CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE, &ra_msg);RETRO_ENVIRONMENT_SHUTDOWN
|
||||
#endif
|
||||
}
|
||||
else if(mp_event->event_id == MPV_EVENT_NONE)
|
||||
continue;
|
||||
else
|
||||
{
|
||||
log_cb(RETRO_LOG_INFO, "mpv: %s\n",
|
||||
mpv_event_name(mp_event->event_id));
|
||||
}
|
||||
}
|
||||
while(1);
|
||||
}
|
||||
|
||||
static void *get_proc_address_mpv(void *fn_ctx, const char *name)
|
||||
@@ -134,58 +140,38 @@ static void *get_proc_address_mpv(void *fn_ctx, const char *name)
|
||||
void *proc_addr = (void *) hw_render.get_proc_address(name);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
/* EGL 1.4 (supported by the RPI firmware) does not necessarily return
|
||||
* function pointers for core functions.
|
||||
*/
|
||||
if (!proc_addr)
|
||||
{
|
||||
void *h = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_LAZY);
|
||||
|
||||
if (!h)
|
||||
h = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY);
|
||||
|
||||
if (h)
|
||||
{
|
||||
proc_addr = dlsym(h, name);
|
||||
dlclose(h);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
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)
|
||||
void CORE_PREFIX(retro_init)(void)
|
||||
{
|
||||
event_waiting++;
|
||||
}
|
||||
if(mpv_client_api_version() != MPV_CLIENT_API_VERSION)
|
||||
{
|
||||
log_cb(RETRO_LOG_WARN, "libmpv version mismatch. Please update or "
|
||||
"recompile mpv-libretro after updating libmpv.");
|
||||
}
|
||||
|
||||
void retro_init(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void retro_deinit(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
void CORE_PREFIX(retro_deinit)(void)
|
||||
{}
|
||||
|
||||
unsigned retro_api_version(void)
|
||||
unsigned CORE_PREFIX(retro_api_version)(void)
|
||||
{
|
||||
return RETRO_API_VERSION;
|
||||
}
|
||||
|
||||
void retro_set_controller_port_device(unsigned port, unsigned device)
|
||||
void CORE_PREFIX(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)
|
||||
void CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)
|
||||
{
|
||||
memset(info, 0, sizeof(*info));
|
||||
info->library_name = "mpv";
|
||||
@@ -206,18 +192,19 @@ void retro_get_system_info(struct retro_system_info *info)
|
||||
"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)
|
||||
void CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *info)
|
||||
{
|
||||
float sampling_rate = 48000.0f;
|
||||
|
||||
#if 0
|
||||
struct retro_variable var = { .key = "test_aspect" };
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
|
||||
var.key = "test_samplerate";
|
||||
|
||||
if(environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
if(CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
sampling_rate = strtof(var.value, NULL);
|
||||
|
||||
#endif
|
||||
info->timing = (struct retro_system_timing) {
|
||||
.fps = 60.0,
|
||||
.sample_rate = sampling_rate,
|
||||
@@ -235,15 +222,17 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
|
||||
};
|
||||
}
|
||||
|
||||
void retro_set_environment(retro_environment_t cb)
|
||||
void CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
|
||||
{
|
||||
environ_cb = cb;
|
||||
CORE_PREFIX(environ_cb) = cb;
|
||||
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "test_samplerate", "Sample Rate; 48000|30000|20000" },
|
||||
#if 0
|
||||
{ "test_samplerate", "Sample Rate; 48000" },
|
||||
{ "test_opt0", "Test option #0; false|true" },
|
||||
{ "test_opt1", "Test option #1; 0" },
|
||||
{ "test_opt2", "Test option #2; 0|1|foo|3" },
|
||||
#endif
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
@@ -258,6 +247,7 @@ void retro_set_environment(retro_environment_t cb)
|
||||
static void context_reset(void)
|
||||
{
|
||||
const char *cmd[] = {"loadfile", filepath, NULL};
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
@@ -265,66 +255,68 @@ static void context_reset(void)
|
||||
|
||||
mpv = mpv_create();
|
||||
|
||||
if(mpv == NULL)
|
||||
if(!mpv)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed creating context\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(mpv_initialize(mpv) < 0)
|
||||
if((ret = mpv_initialize(mpv)) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "mpv init failed\n");
|
||||
log_cb(RETRO_LOG_ERROR, "mpv init failed: %s\n", mpv_error_string(ret));
|
||||
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)
|
||||
if((ret = mpv_request_log_messages(mpv, "v")) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to create mpv GL API handle\n");
|
||||
log_cb(RETRO_LOG_ERROR, "mpv logging failed: %s\n",
|
||||
mpv_error_string(ret));
|
||||
}
|
||||
|
||||
mpv_render_param params[] = {
|
||||
{MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL},
|
||||
{MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &(mpv_opengl_init_params){
|
||||
.get_proc_address = get_proc_address_mpv,
|
||||
}},
|
||||
{0}
|
||||
};
|
||||
|
||||
if((ret = mpv_render_context_create(&mpv_gl, mpv, params)) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to initialize mpv GL context: %s\n",
|
||||
mpv_error_string(ret));
|
||||
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;
|
||||
}
|
||||
mpv_render_context_set_update_callback(mpv_gl, on_mpv_redraw, NULL);
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
mpv_opengl_cb_set_update_callback(mpv_gl, queue_new_frame, NULL);
|
||||
|
||||
mpv_set_option_string(mpv, "ao", "audio-cb");
|
||||
mpv_set_option_string(mpv, "ao", "libmpv");
|
||||
|
||||
/* Attempt to enable hardware acceleration. MPV will fallback to software
|
||||
* decoding on failure.
|
||||
*/
|
||||
if(mpv_set_option_string(mpv, "hwdec", "auto") < 0)
|
||||
log_cb(RETRO_LOG_ERROR, "failed to set hwdec option\n");
|
||||
|
||||
if(mpv_command(mpv, cmd) != 0)
|
||||
if((ret = mpv_set_option_string(mpv, "hwdec", "auto")) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "failed to issue mpv_command to load file\n");
|
||||
log_cb(RETRO_LOG_ERROR, "failed to set hwdec option: %s\n",
|
||||
mpv_error_string(ret));
|
||||
}
|
||||
|
||||
if((ret = mpv_command(mpv, cmd)) != 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "mpv_command failed to load input file: %s\n",
|
||||
mpv_error_string(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* TODO #2: Check for the highest samplerate in audio stream, and use that.
|
||||
* Fall back to 48kHz otherwise.
|
||||
* We currently force the audio to be sampled at 48KHz.
|
||||
*/
|
||||
mpv_set_option_string(mpv, "af", "format=s16:48000:stereo");
|
||||
//mpv_set_option_string(mpv, "opengl-swapinterval", "0");
|
||||
|
||||
/* Process any events whilst we wait for playback to begin. */
|
||||
process_mpv_events(MPV_EVENT_NONE);
|
||||
|
||||
/* 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
|
||||
@@ -332,20 +324,14 @@ static void context_reset(void)
|
||||
*
|
||||
* This also seems to fix some black screen issues.
|
||||
*/
|
||||
while(mpv_set_property(mpv,
|
||||
"playback-time", MPV_FORMAT_INT64, &playback_time) < 0)
|
||||
if(playback_time != 0)
|
||||
{
|
||||
/* Garbage fix to overflowing log */
|
||||
usleep(10);
|
||||
process_mpv_events(MPV_EVENT_PLAYBACK_RESTART);
|
||||
while(mpv_set_property(mpv,
|
||||
"playback-time", MPV_FORMAT_INT64, &playback_time) < 0)
|
||||
{}
|
||||
}
|
||||
|
||||
/* TODO #2: Check for the highest samplerate in audio stream, and use that.
|
||||
* Fall back to 48kHz otherwise.
|
||||
* We currently force the audio to be sampled at 48KHz.
|
||||
*/
|
||||
mpv_set_option_string(mpv, "audio-samplerate", "48000");
|
||||
mpv_set_option_string(mpv, "opengl-swapinterval", "0");
|
||||
|
||||
/* The following works best when vsync is switched off in Retroarch. */
|
||||
//mpv_set_option_string(mpv, "video-sync", "display-resample");
|
||||
//mpv_set_option_string(mpv, "display-fps", "60");
|
||||
@@ -356,14 +342,14 @@ static void context_reset(void)
|
||||
|
||||
err:
|
||||
/* Print mpv logs to see why mpv failed. */
|
||||
print_mpv_logs();
|
||||
process_mpv_events(MPV_EVENT_NONE);
|
||||
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_render_context_free(mpv_gl);
|
||||
mpv_terminate_destroy(mpv);
|
||||
log_cb(RETRO_LOG_INFO, "Context destroyed.\n");
|
||||
}
|
||||
@@ -378,60 +364,77 @@ static bool retro_init_hw_context(void)
|
||||
hw_render.context_reset = context_reset;
|
||||
hw_render.context_destroy = context_destroy;
|
||||
|
||||
if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
|
||||
if (!CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void retro_set_audio_sample(retro_audio_sample_t cb)
|
||||
void CORE_PREFIX(retro_set_audio_sample)(retro_audio_sample_t cb)
|
||||
{
|
||||
audio_cb = cb;
|
||||
CORE_PREFIX(audio_cb) = cb;
|
||||
}
|
||||
|
||||
void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb)
|
||||
void CORE_PREFIX(retro_set_audio_sample_batch)(retro_audio_sample_batch_t cb)
|
||||
{
|
||||
audio_batch_cb = cb;
|
||||
CORE_PREFIX(audio_batch_cb) = cb;
|
||||
}
|
||||
|
||||
void retro_set_input_poll(retro_input_poll_t cb)
|
||||
void CORE_PREFIX(retro_set_input_poll)(retro_input_poll_t cb)
|
||||
{
|
||||
input_poll_cb = cb;
|
||||
CORE_PREFIX(input_poll_cb) = cb;
|
||||
}
|
||||
|
||||
void retro_set_input_state(retro_input_state_t cb)
|
||||
void CORE_PREFIX(retro_set_input_state)(retro_input_state_t cb)
|
||||
{
|
||||
input_state_cb = cb;
|
||||
CORE_PREFIX(input_state_cb) = cb;
|
||||
}
|
||||
|
||||
void retro_set_video_refresh(retro_video_refresh_t cb)
|
||||
void CORE_PREFIX(retro_set_video_refresh)(retro_video_refresh_t cb)
|
||||
{
|
||||
video_cb = cb;
|
||||
CORE_PREFIX(video_cb) = cb;
|
||||
}
|
||||
|
||||
void retro_reset(void)
|
||||
void CORE_PREFIX(retro_reset)(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static void audio_callback(double fps)
|
||||
{
|
||||
/* Obtain len samples to reduce lag. */
|
||||
int len = 48000 / (int)floor(fps);
|
||||
static int16_t frames[512];
|
||||
const unsigned int buff_len = 1024;
|
||||
uint8_t buff[buff_len];
|
||||
|
||||
while(len > 0)
|
||||
if(len < 4)
|
||||
len = 4;
|
||||
|
||||
do
|
||||
{
|
||||
int mpv_len = mpv_audio_callback(&frames, len > 512 ? 512*2 : len*2);
|
||||
//printf("mpv cb: %d\n", mpv_len);
|
||||
if(mpv_len < 1)
|
||||
return;
|
||||
len = len - (len % 4);
|
||||
|
||||
len -= mpv_len;
|
||||
int ret = mpv_audio_callback(mpv, &buff,
|
||||
len > buff_len ? buff_len : len);
|
||||
|
||||
//printf("acb: %lu\n", audio_batch_cb(frames, mpv_len));
|
||||
audio_batch_cb(frames, mpv_len);
|
||||
if(ret < 0)
|
||||
{
|
||||
#if 0
|
||||
log_cb(RETRO_LOG_ERROR, "mpv encountered an error in audio "
|
||||
"callback: %d.\n", ret);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* mpv may refuse to buffer audio if the first video frame has not
|
||||
* displayed yet. */
|
||||
if(ret == 0)
|
||||
return;
|
||||
|
||||
len -= ret;
|
||||
|
||||
CORE_PREFIX(audio_batch_cb)((const int16_t*)buff, ret);
|
||||
}
|
||||
while(len > 4);
|
||||
}
|
||||
|
||||
static void retropad_update_input(void)
|
||||
@@ -445,7 +448,7 @@ static void retropad_update_input(void)
|
||||
struct Input current;
|
||||
static struct Input last;
|
||||
|
||||
input_poll_cb();
|
||||
CORE_PREFIX(input_poll_cb)();
|
||||
|
||||
/* Commands that are called on rising edge only */
|
||||
|
||||
@@ -456,11 +459,11 @@ static void retropad_update_input(void)
|
||||
* 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,
|
||||
current.l = CORE_PREFIX(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,
|
||||
current.r = CORE_PREFIX(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,
|
||||
current.a = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD,
|
||||
0, RETRO_DEVICE_ID_JOYPAD_A) != 0 ? 1 : 0;
|
||||
|
||||
if(current.l == 1 && last.l == 0)
|
||||
@@ -473,24 +476,24 @@ static void retropad_update_input(void)
|
||||
mpv_command_string(mpv, "cycle pause");
|
||||
|
||||
/* TODO #3: Press and hold commands with small delay */
|
||||
if(input_state_cb(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
if (CORE_PREFIX(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,
|
||||
if (CORE_PREFIX(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,
|
||||
if (CORE_PREFIX(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,
|
||||
if (CORE_PREFIX(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,
|
||||
if (CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0,
|
||||
RETRO_DEVICE_ID_JOYPAD_X))
|
||||
mpv_command_string(mpv, "show-progress");
|
||||
|
||||
@@ -502,7 +505,7 @@ static void retropad_update_input(void)
|
||||
last.a = current.a;
|
||||
}
|
||||
|
||||
void retro_run(void)
|
||||
void CORE_PREFIX(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
|
||||
@@ -546,51 +549,60 @@ void retro_run(void)
|
||||
};
|
||||
|
||||
if(width > 0 && height > 0)
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &av_info);
|
||||
CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &av_info);
|
||||
|
||||
updated_video_dimensions = true;
|
||||
}
|
||||
|
||||
print_mpv_logs();
|
||||
|
||||
retropad_update_input();
|
||||
|
||||
/* TODO #2: Implement an audio callback feature in to libmpv */
|
||||
audio_callback(container_fps);
|
||||
|
||||
process_mpv_events(MPV_EVENT_NONE);
|
||||
|
||||
#if 1
|
||||
if(frame_queue > 0)
|
||||
{
|
||||
mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), width, height);
|
||||
video_cb(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
mpv_render_param params[] = {
|
||||
{MPV_RENDER_PARAM_OPENGL_FBO, &(mpv_opengl_fbo){
|
||||
.fbo = hw_render.get_current_framebuffer(),
|
||||
.w = width,
|
||||
.h = height,
|
||||
}},
|
||||
{0}
|
||||
};
|
||||
mpv_render_context_render(mpv_gl, params);
|
||||
CORE_PREFIX(video_cb)(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
frame_queue--;
|
||||
}
|
||||
else
|
||||
video_cb(NULL, width, height, 0);
|
||||
CORE_PREFIX(video_cb)(NULL, width, height, 0);
|
||||
#else
|
||||
mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), width, height);
|
||||
video_cb(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
CORE_PREFIX(video_cb)(RETRO_HW_FRAME_BUFFER_VALID, width, height, 0);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* No save-state support */
|
||||
size_t retro_serialize_size(void)
|
||||
size_t CORE_PREFIX(retro_serialize_size)(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool retro_serialize(void *data_, size_t size)
|
||||
bool CORE_PREFIX(retro_serialize)(void *data_, size_t size)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_unserialize(const void *data_, size_t size)
|
||||
bool CORE_PREFIX(retro_unserialize)(const void *data_, size_t size)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_load_game(const struct retro_game_info *info)
|
||||
bool CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
|
||||
{
|
||||
/* Supported on most systems. */
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
|
||||
@@ -607,21 +619,30 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
if(info->path == NULL)
|
||||
return false;
|
||||
|
||||
/* Copy the file path to a global variable as we need it in context_reset()
|
||||
* where mpv is initialised.
|
||||
*/
|
||||
filepath = strdup(info->path);
|
||||
if((filepath = malloc(strlen(info->path)+1)) == NULL)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "Unable to allocate memory for filepath\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc);
|
||||
strcpy(filepath,info->path);
|
||||
|
||||
CORE_PREFIX(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)
|
||||
if(CORE_PREFIX(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);
|
||||
CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt);
|
||||
}
|
||||
|
||||
if(retro_init_hw_context() == false)
|
||||
@@ -633,41 +654,39 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool retro_load_game_special(unsigned type, const struct retro_game_info *info,
|
||||
bool CORE_PREFIX(retro_load_game_special)(unsigned type, const struct retro_game_info *info,
|
||||
size_t num)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void retro_unload_game(void)
|
||||
void CORE_PREFIX(retro_unload_game)(void)
|
||||
{
|
||||
free(filepath);
|
||||
filepath = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned retro_get_region(void)
|
||||
unsigned CORE_PREFIX(retro_get_region)(void)
|
||||
{
|
||||
return RETRO_REGION_NTSC;
|
||||
}
|
||||
|
||||
void *retro_get_memory_data(unsigned id)
|
||||
void *CORE_PREFIX(retro_get_memory_data)(unsigned id)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t retro_get_memory_size(unsigned id)
|
||||
size_t CORE_PREFIX(retro_get_memory_size)(unsigned id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void retro_cheat_reset(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
void CORE_PREFIX(retro_cheat_reset)(void)
|
||||
{}
|
||||
|
||||
void retro_cheat_set(unsigned index, bool enabled, const char *code)
|
||||
void CORE_PREFIX(retro_cheat_set)(unsigned index, bool enabled, const char *code)
|
||||
{
|
||||
return;
|
||||
(void)index;
|
||||
(void)enabled;
|
||||
(void)code;
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
#ifndef LIBRETRO_MPV_VERSION
|
||||
#define LIBRETRO_MPV_VERSION "0.2.alpha"
|
||||
#define LIBRETRO_MPV_VERSION "0.3.alpha"
|
||||
#endif
|
||||
@@ -0,0 +1,85 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "mini-hb-menu/common.h"
|
||||
|
||||
|
||||
extern const loaderFuncs_s loader_Ninjhax1;
|
||||
extern const loaderFuncs_s loader_Ninjhax2;
|
||||
extern const loaderFuncs_s loader_Rosalina;
|
||||
|
||||
static void (*launch_3dsx)(const char* path, argData_s* args, executableMetadata_s* em);
|
||||
|
||||
|
||||
static int exec_3dsx_actual(const char* path, const char** args, bool appendPath){
|
||||
struct stat sBuff;
|
||||
argData_s newProgramArgs;
|
||||
unsigned int argChars = 0;
|
||||
unsigned int argNum = 0;
|
||||
bool fileExists;
|
||||
bool inited;
|
||||
|
||||
if(path == NULL || path[0] == '\0'){
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
fileExists = stat(path, &sBuff) == 0;
|
||||
if(!fileExists){
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
else if(S_ISDIR(sBuff.st_mode)){
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//args the string functions write to the passed string, this will cause a write to read only memory sot the string must be cloned
|
||||
memset(newProgramArgs.buf, '\0', sizeof(newProgramArgs.buf));
|
||||
newProgramArgs.dst = (char*)&newProgramArgs.buf[1];
|
||||
if(appendPath){
|
||||
strcpy(newProgramArgs.dst, path);
|
||||
newProgramArgs.dst += strlen(path) + 1;
|
||||
newProgramArgs.buf[0]++;
|
||||
|
||||
}
|
||||
while(args[argNum] != NULL){
|
||||
strcpy(newProgramArgs.dst, args[argNum]);
|
||||
newProgramArgs.dst += strlen(args[argNum]) + 1;
|
||||
newProgramArgs.buf[0]++;
|
||||
argNum++;
|
||||
}
|
||||
|
||||
inited = loader_Rosalina.init();
|
||||
launch_3dsx = loader_Rosalina.launchFile;
|
||||
|
||||
if(!inited){
|
||||
inited = loader_Ninjhax2.init();
|
||||
launch_3dsx = loader_Ninjhax2.launchFile;
|
||||
}
|
||||
|
||||
if(!inited){
|
||||
inited = loader_Ninjhax1.init();
|
||||
launch_3dsx = loader_Ninjhax1.launchFile;
|
||||
}
|
||||
|
||||
if(inited){
|
||||
osSetSpeedupEnable(false);
|
||||
launch_3dsx(path, &newProgramArgs, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
//should never be reached
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int exec_3dsx(const char* path, const char** args){
|
||||
return exec_3dsx_actual(path, args, true/*appendPath*/);
|
||||
}
|
||||
|
||||
int exec_3dsx_no_path_in_args(const char* path, const char** args){
|
||||
return exec_3dsx_actual(path, args, false/*appendPath*/);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef EXEC_3DSX_H
|
||||
#define EXEC_3DSX_H
|
||||
|
||||
//since 3dsx programs are not guaranteed access to the OS, the 3dsx bootloader run by the exploit must run the next program
|
||||
//your program must have no extra threads running when this is called, these limits do not apply to exec_cia
|
||||
int exec_3dsx_no_path_in_args(const char* path, const char** args);
|
||||
int exec_3dsx(const char* path, const char** args);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,203 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <3ds.h>
|
||||
|
||||
|
||||
#define FILE_CHUNK_SIZE 4096
|
||||
|
||||
|
||||
typedef struct{
|
||||
u32 argc;
|
||||
char args[0x300 - 0x4];
|
||||
}ciaParam;
|
||||
|
||||
|
||||
char argvHmac[0x20] = {0x1d, 0x78, 0xff, 0xb9, 0xc5, 0xbc, 0x78, 0xb7, 0xac, 0x29, 0x1d, 0x3e, 0x16, 0xd0, 0xcf, 0x53, 0xef, 0x12, 0x58, 0x83, 0xb6, 0x9e, 0x2f, 0x79, 0x47, 0xf9, 0x35, 0x61, 0xeb, 0x50, 0xd7, 0x67};
|
||||
|
||||
|
||||
static void errorAndQuit(const char* errorStr){
|
||||
errorConf error;
|
||||
|
||||
errorInit(&error, ERROR_TEXT, CFG_LANGUAGE_EN);
|
||||
errorText(&error, errorStr);
|
||||
errorDisp(&error);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static int isCiaInstalled(u64 titleId, u16 version){
|
||||
u32 titlesToRetrieve;
|
||||
u32 titlesRetrieved;
|
||||
u64* titleIds;
|
||||
bool titleExists = false;
|
||||
AM_TitleEntry titleInfo;
|
||||
Result failed;
|
||||
|
||||
failed = AM_GetTitleCount(MEDIATYPE_SD, &titlesToRetrieve);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
titleIds = malloc(titlesToRetrieve * sizeof(uint64_t));
|
||||
if(titleIds == NULL)
|
||||
return -1;
|
||||
|
||||
failed = AM_GetTitleList(&titlesRetrieved, MEDIATYPE_SD, titlesToRetrieve, titleIds);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
for(u32 titlesToCheck = 0; titlesToCheck < titlesRetrieved; titlesToCheck++){
|
||||
if(titleIds[titlesToCheck] == titleId){
|
||||
titleExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
free(titleIds);
|
||||
|
||||
if(titleExists){
|
||||
failed = AM_GetTitleInfo(MEDIATYPE_SD, 1 /*titleCount*/, &titleId, &titleInfo);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
if(titleInfo.version == version)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int installCia(Handle ciaFile){
|
||||
Result failed;
|
||||
Handle outputHandle;
|
||||
u64 fileSize;
|
||||
u64 fileOffset = 0;
|
||||
u32 bytesRead;
|
||||
u32 bytesWritten;
|
||||
u8 transferBuffer[FILE_CHUNK_SIZE];
|
||||
|
||||
failed = AM_StartCiaInstall(MEDIATYPE_SD, &outputHandle);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
failed = FSFILE_GetSize(ciaFile, &fileSize);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
while(fileOffset < fileSize){
|
||||
u64 bytesRemaining = fileSize - fileOffset;
|
||||
failed = FSFILE_Read(ciaFile, &bytesRead, fileOffset, transferBuffer, bytesRemaining < FILE_CHUNK_SIZE ? bytesRemaining : FILE_CHUNK_SIZE);
|
||||
if(R_FAILED(failed)){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
failed = FSFILE_Write(outputHandle, &bytesWritten, fileOffset, transferBuffer, bytesRead, 0);
|
||||
if(R_FAILED(failed)){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
if(R_DESCRIPTION(failed) == RD_ALREADY_EXISTS)
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(bytesWritten != bytesRead){
|
||||
AM_CancelCIAInstall(outputHandle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
fileOffset += bytesWritten;
|
||||
}
|
||||
|
||||
failed = AM_FinishCiaInstall(outputHandle);
|
||||
if(R_FAILED(failed))
|
||||
return -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int exec_cia(const char* path, const char** args){
|
||||
struct stat sBuff;
|
||||
bool fileExists;
|
||||
bool inited;
|
||||
|
||||
if(path == NULL || path[0] == '\0'){
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
fileExists = stat(path, &sBuff) == 0;
|
||||
if(!fileExists){
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
else if(S_ISDIR(sBuff.st_mode)){
|
||||
errno = EINVAL;;
|
||||
return -1;
|
||||
}
|
||||
|
||||
inited = R_SUCCEEDED(amInit()) && R_SUCCEEDED(fsInit());
|
||||
if(inited){
|
||||
Result res;
|
||||
AM_TitleEntry ciaInfo;
|
||||
FS_Archive ciaArchive;
|
||||
Handle ciaFile;
|
||||
int ciaInstalled;
|
||||
ciaParam param;
|
||||
int argsLength;
|
||||
|
||||
//open cia file
|
||||
res = FSUSER_OpenArchive(&ciaArchive, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""));
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant open SD FS archive.");
|
||||
|
||||
res = FSUSER_OpenFile(&ciaFile, ciaArchive, fsMakePath(PATH_ASCII, path + 5/*skip "sdmc:"*/), FS_OPEN_READ, 0);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant open CIA file.");
|
||||
|
||||
res = AM_GetCiaFileInfo(MEDIATYPE_SD, &ciaInfo, ciaFile);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("Cant get CIA file info.");
|
||||
|
||||
ciaInstalled = isCiaInstalled(ciaInfo.titleID, ciaInfo.version);
|
||||
if(ciaInstalled == -1){
|
||||
//error
|
||||
errorAndQuit("Could not read title id list.");
|
||||
}
|
||||
else if(ciaInstalled == 0){
|
||||
//not installed
|
||||
int error = installCia(ciaFile);
|
||||
if(error == -1)
|
||||
errorAndQuit("Cant install CIA.");
|
||||
}
|
||||
|
||||
FSFILE_Close(ciaFile);
|
||||
FSUSER_CloseArchive(ciaArchive);
|
||||
|
||||
param.argc = 0;
|
||||
argsLength = 0;
|
||||
char* argLocation = param.args;
|
||||
while(args[param.argc] != NULL){
|
||||
strcpy(argLocation, args[param.argc]);
|
||||
argLocation += strlen(args[param.argc]) + 1;
|
||||
argsLength += strlen(args[param.argc]) + 1;
|
||||
param.argc++;
|
||||
}
|
||||
|
||||
res = APT_PrepareToDoApplicationJump(0, ciaInfo.titleID, 0x1);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("CIA cant run, cant prepare.");
|
||||
|
||||
res = APT_DoApplicationJump(¶m, sizeof(param.argc) + argsLength, argvHmac);
|
||||
if(R_FAILED(res))
|
||||
errorAndQuit("CIA cant run, cant jump.");
|
||||
|
||||
//wait for application jump, for some reason its not instant
|
||||
while(1);
|
||||
}
|
||||
|
||||
//should never be reached
|
||||
amExit();
|
||||
fsExit();
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef EXEC_CIA_H
|
||||
#define EXEC_CIA_H
|
||||
|
||||
int exec_cia(const char* path, const char** args);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,95 @@
|
||||
#pragma once
|
||||
|
||||
// C stdlib includes
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
// 3DS includes
|
||||
#include <3ds.h>
|
||||
|
||||
|
||||
#define ENTRY_ARGBUFSIZE 0x400
|
||||
#define NUM_SERVICESTHATMATTER 5
|
||||
|
||||
typedef enum
|
||||
{
|
||||
StrId_Loading = 0,
|
||||
StrId_Directory,
|
||||
StrId_DefaultLongTitle,
|
||||
StrId_DefaultPublisher,
|
||||
StrId_IOError,
|
||||
StrId_CouldNotOpenFile,
|
||||
|
||||
StrId_NoAppsFound_Title,
|
||||
StrId_NoAppsFound_Msg,
|
||||
|
||||
StrId_Reboot,
|
||||
StrId_ReturnToHome,
|
||||
|
||||
StrId_TitleSelector,
|
||||
StrId_ErrorReadingTitleMetadata,
|
||||
StrId_NoTitlesFound,
|
||||
StrId_SelectTitle,
|
||||
|
||||
StrId_NoTargetTitleSupport,
|
||||
StrId_MissingTargetTitle,
|
||||
|
||||
StrId_NetLoader,
|
||||
StrId_NetLoaderUnavailable,
|
||||
StrId_NetLoaderOffline,
|
||||
StrId_NetLoaderError,
|
||||
StrId_NetLoaderActive,
|
||||
StrId_NetLoaderTransferring,
|
||||
|
||||
StrId_Max,
|
||||
} StrId;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char* dst;
|
||||
u32 buf[ENTRY_ARGBUFSIZE/sizeof(u32)];
|
||||
} argData_s;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool scanned;
|
||||
u32 sectionSizes[3];
|
||||
bool servicesThatMatter[NUM_SERVICESTHATMATTER];
|
||||
} executableMetadata_s;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 num;
|
||||
u32 text_end;
|
||||
u32 data_address;
|
||||
u32 data_size;
|
||||
u32 processLinearOffset;
|
||||
u32 processHookAddress;
|
||||
u32 processAppCodeAddress;
|
||||
u32 processHookTidLow, processHookTidHigh;
|
||||
u32 mediatype;
|
||||
bool capabilities[0x10]; // {socuAccess, csndAccess, qtmAccess, nfcAccess, httpcAccess, reserved...}
|
||||
} memmap_header_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 src, dst, size;
|
||||
} memmap_entry_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
memmap_header_t header;
|
||||
memmap_entry_t map[];
|
||||
} memmap_t;
|
||||
|
||||
#define memmapSize(m) (sizeof(memmap_header_t) + sizeof(memmap_entry_t)*(m)->header.num)
|
||||
|
||||
|
||||
#include "launch.h"
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "common.h"
|
||||
|
||||
Handle launchOpenFile(const char* path)
|
||||
{
|
||||
if (strncmp(path, "sdmc:/", 6) == 0)
|
||||
path += 5;
|
||||
else if (*path != '/')
|
||||
return 0;
|
||||
|
||||
// Convert the executable path to UTF-16
|
||||
static uint16_t __utf16path[PATH_MAX+1];
|
||||
ssize_t units = utf8_to_utf16(__utf16path, (const uint8_t*)path, PATH_MAX);
|
||||
if (units < 0 || units >= PATH_MAX) return 0;
|
||||
__utf16path[units] = 0;
|
||||
|
||||
// Open the file directly
|
||||
FS_Path apath = { PATH_EMPTY, 1, (u8*)"" };
|
||||
FS_Path fpath = { PATH_UTF16, (units+1)*2, (u8*)__utf16path };
|
||||
Handle file;
|
||||
Result res = FSUSER_OpenFileDirectly(&file, ARCHIVE_SDMC, apath, fpath, FS_OPEN_READ, 0);
|
||||
return R_SUCCEEDED(res) ? file : 0;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern void (*__system_retAddr)(void);
|
||||
|
||||
enum
|
||||
{
|
||||
LOADER_SHOW_REBOOT = 0x01,
|
||||
LOADER_NEED_SCAN = 0x02
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Mandatory fields
|
||||
const char* name;
|
||||
u32 flags;
|
||||
bool (* init)(void);
|
||||
void (* deinit)(void);
|
||||
void (* launchFile)(const char* path, argData_s* args, executableMetadata_s* em);
|
||||
|
||||
// Optional fields
|
||||
void (* useTitle)(u64 tid, u8 mediatype);
|
||||
} loaderFuncs_s;
|
||||
|
||||
Handle launchOpenFile(const char* path);
|
||||
@@ -0,0 +1,73 @@
|
||||
#include "../common.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
s32 processId;
|
||||
bool capabilities[0x10];
|
||||
} processEntry_s;
|
||||
|
||||
typedef void (*callBootloader_2x_fn)(Handle file, u32* argbuf, u32 arglength);
|
||||
typedef void (*callBootloaderNewProcess_2x_fn)(s32 processId, u32* argbuf, u32 arglength);
|
||||
typedef void (*callBootloaderRunTitle_2x_fn)(u8 mediatype, u32* argbuf, u32 argbuflength, u32 tid_low, u32 tid_high);
|
||||
typedef void (*callBootloaderRunTitleCustom_2x_fn)(u8 mediatype, u32* argbuf, u32 argbuflength, u32 tid_low, u32 tid_high, memmap_t* mmap);
|
||||
typedef void (*getBestProcess_2x_fn)(u32 sectionSizes[3], bool* requirements, int num_requirements, processEntry_s* out, int out_size, int* out_len);
|
||||
|
||||
#define callBootloader_2x ((callBootloader_2x_fn)0x00100000)
|
||||
#define callBootloaderNewProcess_2x ((callBootloaderNewProcess_2x_fn)0x00100008)
|
||||
#define callBootloaderRunTitle_2x ((callBootloaderRunTitle_2x_fn)0x00100010)
|
||||
#define callBootloaderRunTitleCustom_2x ((callBootloaderRunTitleCustom_2x_fn)0x00100014)
|
||||
#define getBestProcess_2x ((getBestProcess_2x_fn)0x0010000C)
|
||||
|
||||
static s32 targetProcess = -1;
|
||||
static u64 targetTid;
|
||||
static u8 targetMediatype;
|
||||
static Handle fileHandle;
|
||||
static u32 argBuf[ENTRY_ARGBUFSIZE/sizeof(u32)];
|
||||
static u32 argBufLen;
|
||||
static u32 memMapBuf[0x40];
|
||||
static bool useMemMap;
|
||||
|
||||
static bool init(void)
|
||||
{
|
||||
return R_SUCCEEDED(amInit());
|
||||
}
|
||||
|
||||
static void deinit(void)
|
||||
{
|
||||
amExit();
|
||||
}
|
||||
|
||||
static void bootloaderJump(void)
|
||||
{
|
||||
if (targetProcess == -1)
|
||||
callBootloader_2x(fileHandle, argBuf, argBufLen);
|
||||
else if (targetProcess == -2)
|
||||
{
|
||||
if (useMemMap)
|
||||
callBootloaderRunTitleCustom_2x(targetMediatype, argBuf, argBufLen, (u32)targetTid, (u32)(targetTid>>32), (memmap_t*)memMapBuf);
|
||||
else
|
||||
callBootloaderRunTitle_2x(targetMediatype, argBuf, argBufLen, (u32)targetTid, (u32)(targetTid>>32));
|
||||
}
|
||||
else
|
||||
callBootloaderNewProcess_2x(targetProcess, argBuf, argBufLen);
|
||||
}
|
||||
|
||||
static void launchFile(const char* path, argData_s* args, executableMetadata_s* em)
|
||||
{
|
||||
fileHandle = launchOpenFile(path);
|
||||
if (fileHandle==0)
|
||||
return;
|
||||
argBufLen = args->dst - (char*)args->buf;
|
||||
memcpy(argBuf, args->buf, argBufLen);
|
||||
__system_retAddr = bootloaderJump;
|
||||
}
|
||||
|
||||
const loaderFuncs_s loader_Ninjhax2 =
|
||||
{
|
||||
.name = "hax 2.x",
|
||||
.flags = LOADER_SHOW_REBOOT | LOADER_NEED_SCAN,
|
||||
.init = init,
|
||||
.deinit = deinit,
|
||||
.launchFile = launchFile,
|
||||
//.useTitle = useTitle,
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
#include "../common.h"
|
||||
|
||||
static void (*callBootloader_1x)(Handle hb, Handle file);
|
||||
static void (*setArgs_1x)(u32* src, u32 length);
|
||||
static Handle fileHandle;
|
||||
|
||||
static bool init(void)
|
||||
{
|
||||
Result res = hbInit();
|
||||
if (R_FAILED(res))
|
||||
return false;
|
||||
|
||||
HB_GetBootloaderAddresses((void**)&callBootloader_1x, (void**)&setArgs_1x);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void deinit(void)
|
||||
{
|
||||
hbExit();
|
||||
}
|
||||
|
||||
static void bootloaderJump(void)
|
||||
{
|
||||
callBootloader_1x(0x00000000, fileHandle);
|
||||
}
|
||||
|
||||
static void launchFile(const char* path, argData_s* args, executableMetadata_s* em)
|
||||
{
|
||||
fileHandle = launchOpenFile(path);
|
||||
if (fileHandle==0)
|
||||
return;
|
||||
setArgs_1x(args->buf, sizeof(args->buf));
|
||||
__system_retAddr = bootloaderJump;
|
||||
}
|
||||
|
||||
const loaderFuncs_s loader_Ninjhax1 =
|
||||
{
|
||||
.name = "ninjhax 1.x",
|
||||
.flags = LOADER_SHOW_REBOOT,
|
||||
.init = init,
|
||||
.deinit = deinit,
|
||||
.launchFile = launchFile,
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "../common.h"
|
||||
|
||||
static Handle hbldrHandle;
|
||||
|
||||
static bool init(void)
|
||||
{
|
||||
return R_SUCCEEDED(svcConnectToPort(&hbldrHandle, "hb:ldr"));
|
||||
}
|
||||
|
||||
static Result HBLDR_SetTarget(const char* path)
|
||||
{
|
||||
u32 pathLen = strlen(path) + 1;
|
||||
u32* cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(2, 0, 2); //0x20002
|
||||
cmdbuf[1] = IPC_Desc_StaticBuffer(pathLen, 0);
|
||||
cmdbuf[2] = (u32)path;
|
||||
|
||||
Result rc = svcSendSyncRequest(hbldrHandle);
|
||||
if (R_SUCCEEDED(rc)) rc = cmdbuf[1];
|
||||
return rc;
|
||||
}
|
||||
|
||||
static Result HBLDR_SetArgv(const void* buffer, u32 size)
|
||||
{
|
||||
u32* cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(3, 0, 2); //0x30002
|
||||
cmdbuf[1] = IPC_Desc_StaticBuffer(size, 1);
|
||||
cmdbuf[2] = (u32)buffer;
|
||||
|
||||
Result rc = svcSendSyncRequest(hbldrHandle);
|
||||
if (R_SUCCEEDED(rc)) rc = cmdbuf[1];
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void deinit(void)
|
||||
{
|
||||
svcCloseHandle(hbldrHandle);
|
||||
}
|
||||
|
||||
static void launchFile(const char* path, argData_s* args, executableMetadata_s* em)
|
||||
{
|
||||
if (strncmp(path, "sdmc:/",6) == 0)
|
||||
path += 5;
|
||||
HBLDR_SetTarget(path);
|
||||
HBLDR_SetArgv(args->buf, sizeof(args->buf));
|
||||
}
|
||||
|
||||
const loaderFuncs_s loader_Rosalina =
|
||||
{
|
||||
.name = "Rosalina",
|
||||
.init = init,
|
||||
.deinit = deinit,
|
||||
.launchFile = launchFile,
|
||||
};
|
||||
@@ -478,6 +478,36 @@ database_info_list_t *database_info_list_new(
|
||||
|
||||
if (!new_ptr)
|
||||
{
|
||||
if (db_info.bbfc_rating)
|
||||
free(db_info.bbfc_rating);
|
||||
if (db_info.cero_rating)
|
||||
free(db_info.cero_rating);
|
||||
if (db_info.description)
|
||||
free(db_info.description);
|
||||
if (db_info.edge_magazine_review)
|
||||
free(db_info.edge_magazine_review);
|
||||
if (db_info.elspa_rating)
|
||||
free(db_info.elspa_rating);
|
||||
if (db_info.enhancement_hw)
|
||||
free(db_info.enhancement_hw);
|
||||
if (db_info.esrb_rating)
|
||||
free(db_info.esrb_rating);
|
||||
if (db_info.franchise)
|
||||
free(db_info.franchise);
|
||||
if (db_info.genre)
|
||||
free(db_info.genre);
|
||||
if (db_info.name)
|
||||
free(db_info.name);
|
||||
if (db_info.origin)
|
||||
free(db_info.origin);
|
||||
if (db_info.pegi_rating)
|
||||
free(db_info.pegi_rating);
|
||||
if (db_info.publisher)
|
||||
free(db_info.publisher);
|
||||
if (db_info.rom_name)
|
||||
free(db_info.rom_name);
|
||||
if (db_info.serial)
|
||||
free(db_info.serial);
|
||||
database_info_list_free(database_info_list);
|
||||
free(database_info);
|
||||
free(database_info_list);
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ struct defaults
|
||||
playlist_t *image_history;
|
||||
#endif
|
||||
playlist_t *music_history;
|
||||
#ifdef HAVE_FFMPEG
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
playlist_t *video_history;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Vendored
+4
-19
@@ -2,32 +2,17 @@ language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode8.3
|
||||
osx_image: xcode9.3beta
|
||||
|
||||
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
# We check out glslang and SPIRV-Tools at specific revisions to avoid test output mismatches
|
||||
env:
|
||||
- GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92 SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python3; fi
|
||||
- git clone https://github.com/KhronosGroup/glslang.git glslang
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Tools/external/spirv-headers
|
||||
- ./checkout_glslang_spirv_tools.sh
|
||||
|
||||
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 ..
|
||||
- ./build_glslang_spirv_tools.sh Debug 2
|
||||
- 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
|
||||
- ./test_shaders.sh
|
||||
Vendored
+14
-1
@@ -93,6 +93,10 @@ 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-reflect spirv_cross_reflect STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_reflect.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv_reflect.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)
|
||||
@@ -110,7 +114,7 @@ target_compile_options(spirv-cross PRIVATE ${spirv-compiler-options})
|
||||
target_compile_definitions(spirv-cross PRIVATE ${spirv-compiler-defines})
|
||||
|
||||
install(TARGETS spirv-cross RUNTIME DESTINATION bin)
|
||||
target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-hlsl spirv-cross-cpp spirv-cross-msl spirv-cross-util spirv-cross-core)
|
||||
target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-hlsl spirv-cross-cpp spirv-cross-reflect spirv-cross-msl spirv-cross-util spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-util spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-glsl spirv-cross-core)
|
||||
target_link_libraries(spirv-cross-msl spirv-cross-glsl)
|
||||
@@ -128,12 +132,21 @@ if (${PYTHONINTERP_FOUND})
|
||||
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-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-no-opt)
|
||||
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-metal-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl-no-opt)
|
||||
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-hlsl-no-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl-no-opt)
|
||||
add_test(NAME spirv-cross-test-opt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --opt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders)
|
||||
|
||||
Vendored
+6
-1
@@ -3,6 +3,7 @@
|
||||
SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.
|
||||
|
||||
[](https://travis-ci.org/KhronosGroup/SPIRV-Cross)
|
||||
[](https://ci.appveyor.com/project/HansKristian-ARM/SPIRV-Cross)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -10,6 +11,7 @@ SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader
|
||||
- Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL)
|
||||
- Convert SPIR-V to readable, usable and efficient HLSL
|
||||
- Convert SPIR-V to debuggable C++ [EXPERIMENTAL]
|
||||
- Convert SPIR-V to a JSON reflection format [EXPERIMENTAL]
|
||||
- Reflection API to simplify the creation of Vulkan pipeline layouts
|
||||
- Reflection API to modify and tweak OpDecorations
|
||||
- Supports "all" of vertex, fragment, tessellation, geometry and compute shaders.
|
||||
@@ -24,7 +26,7 @@ However, most missing features are expected to be "trivial" improvements at this
|
||||
|
||||
SPIRV-Cross has been tested on Linux, OSX and Windows.
|
||||
|
||||
The make and CMake build flavors offer the option to treat exceptions as assertions. To disable exceptions for make just append SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=1 to the command line. For CMake append -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=ON. By default exceptions are enabled.
|
||||
The make and CMake build flavors offer the option to treat exceptions as assertions. To disable exceptions for make just append `SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=1` to the command line. For CMake append `-DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=ON`. By default exceptions are enabled.
|
||||
|
||||
### Linux and macOS
|
||||
|
||||
@@ -38,6 +40,8 @@ MinGW-w64 based compilation works with `make`, and an MSVC 2013 solution is also
|
||||
|
||||
### Using the C++ API
|
||||
|
||||
For more in-depth documentation than what's provided in this README, please have a look at the [Wiki](https://github.com/KhronosGroup/SPIRV-Cross/wiki).
|
||||
|
||||
To perform reflection and convert to other shader languages you can use the SPIRV-Cross API.
|
||||
For example:
|
||||
|
||||
@@ -279,6 +283,7 @@ 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.
|
||||
./build_glslang_spirv_tools.sh # Builds glslang and SPIRV-Tools.
|
||||
./test_shaders.sh # Runs over all changes and makes sure that there are no deltas compared to reference files.
|
||||
```
|
||||
|
||||
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- GENERATOR: "Visual Studio 12 2013 Win64"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013 Win64"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 12 2013"
|
||||
CONFIG: Release
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015"
|
||||
CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 14 2015"
|
||||
CONFIG: Release
|
||||
|
||||
build_script:
|
||||
- git submodule update --init
|
||||
- cmake "-G%GENERATOR%" -H. -B_builds
|
||||
- cmake --build _builds --config "%CONFIG%"
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
PROFILE=Release
|
||||
if [ ! -z $1 ]; then
|
||||
PROFILE=$1
|
||||
fi
|
||||
|
||||
NPROC=$(nproc)
|
||||
if [ ! -z $2 ]; then
|
||||
NPROC=$2
|
||||
fi
|
||||
|
||||
echo "Building glslang."
|
||||
mkdir -p external/glslang-build
|
||||
cd external/glslang-build
|
||||
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles"
|
||||
make -j$NPROC
|
||||
cd ../..
|
||||
|
||||
echo "Building SPIRV-Tools."
|
||||
mkdir -p external/spirv-tools-build
|
||||
cd external/spirv-tools-build
|
||||
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles" -DSPIRV_WERROR=OFF
|
||||
make -j$NPROC
|
||||
cd ../..
|
||||
|
||||
+10
-23
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92
|
||||
SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
GLSLANG_REV=461ea09943e0e88ea854ab9e3b42d17d728af2ad
|
||||
SPIRV_TOOLS_REV=53bc1623ecd3cc304d0d6feed8385e70c7ab30d3
|
||||
|
||||
if [ -d external/glslang ]; then
|
||||
echo "Updating glslang to revision $GLSLANG_REV."
|
||||
@@ -18,13 +18,6 @@ else
|
||||
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
|
||||
@@ -37,21 +30,15 @@ else
|
||||
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)
|
||||
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
|
||||
|
||||
cd ../..
|
||||
|
||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h} samples/cpp/*.cpp main.cpp
|
||||
#for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h} samples/cpp/*.cpp main.cpp
|
||||
for file in spirv_*.{cpp,hpp} main.cpp
|
||||
do
|
||||
echo "Formatting file: $file ..."
|
||||
clang-format -style=file -i $file
|
||||
|
||||
Vendored
+115
-42
@@ -19,6 +19,7 @@
|
||||
#include "spirv_glsl.hpp"
|
||||
#include "spirv_hlsl.hpp"
|
||||
#include "spirv_msl.hpp"
|
||||
#include "spirv_reflect.hpp"
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
@@ -122,7 +123,7 @@ struct CLIParser
|
||||
THROW("Tried to parse uint, but nothing left in arguments");
|
||||
}
|
||||
|
||||
uint32_t val = stoul(*argv);
|
||||
uint64_t val = stoul(*argv);
|
||||
if (val > numeric_limits<uint32_t>::max())
|
||||
{
|
||||
THROW("next_uint() out of range");
|
||||
@@ -131,7 +132,7 @@ struct CLIParser
|
||||
argc--;
|
||||
argv++;
|
||||
|
||||
return val;
|
||||
return uint32_t(val);
|
||||
}
|
||||
|
||||
double next_double()
|
||||
@@ -149,6 +150,22 @@ struct CLIParser
|
||||
return val;
|
||||
}
|
||||
|
||||
// Return a string only if it's not prefixed with `--`, otherwise return the default value
|
||||
const char *next_value_string(const char *default_value)
|
||||
{
|
||||
if (!argc)
|
||||
{
|
||||
return default_value;
|
||||
}
|
||||
|
||||
if (0 == strncmp("--", *argv, 2))
|
||||
{
|
||||
return default_value;
|
||||
}
|
||||
|
||||
return next_string();
|
||||
}
|
||||
|
||||
const char *next_string()
|
||||
{
|
||||
if (!argc)
|
||||
@@ -212,7 +229,6 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
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;
|
||||
@@ -221,8 +237,8 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
// 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.
|
||||
bool is_push_constant = compiler.get_storage_class(res.id) == StorageClassPushConstant;
|
||||
bool is_block = (compiler.get_decoration_mask(type.self) &
|
||||
((1ull << DecorationBlock) | (1ull << DecorationBufferBlock))) != 0;
|
||||
bool is_block = compiler.get_decoration_bitset(type.self).get(DecorationBlock) ||
|
||||
compiler.get_decoration_bitset(type.self).get(DecorationBufferBlock);
|
||||
bool is_sized_block = is_block && (compiler.get_storage_class(res.id) == StorageClassUniform ||
|
||||
compiler.get_storage_class(res.id) == StorageClassUniformConstant);
|
||||
uint32_t fallback_id = !is_push_constant && is_block ? res.base_type_id : res.id;
|
||||
@@ -231,6 +247,12 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
if (is_sized_block)
|
||||
block_size = uint32_t(compiler.get_declared_struct_size(compiler.get_type(res.base_type_id)));
|
||||
|
||||
Bitset mask;
|
||||
if (print_ssbo)
|
||||
mask = compiler.get_buffer_block_flags(res.id);
|
||||
else
|
||||
mask = compiler.get_decoration_bitset(res.id);
|
||||
|
||||
string array;
|
||||
for (auto arr : type.array)
|
||||
array = join("[", arr ? convert_to_string(arr) : "", "]") + array;
|
||||
@@ -238,17 +260,17 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
||||
fprintf(stderr, " ID %03u : %s%s", res.id,
|
||||
!res.name.empty() ? res.name.c_str() : compiler.get_fallback_name(fallback_id).c_str(), array.c_str());
|
||||
|
||||
if (mask & (1ull << DecorationLocation))
|
||||
if (mask.get(DecorationLocation))
|
||||
fprintf(stderr, " (Location : %u)", compiler.get_decoration(res.id, DecorationLocation));
|
||||
if (mask & (1ull << DecorationDescriptorSet))
|
||||
if (mask.get(DecorationDescriptorSet))
|
||||
fprintf(stderr, " (Set : %u)", compiler.get_decoration(res.id, DecorationDescriptorSet));
|
||||
if (mask & (1ull << DecorationBinding))
|
||||
if (mask.get(DecorationBinding))
|
||||
fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
|
||||
if (mask & (1ull << DecorationInputAttachmentIndex))
|
||||
if (mask.get(DecorationInputAttachmentIndex))
|
||||
fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
|
||||
if (mask & (1ull << DecorationNonReadable))
|
||||
if (mask.get(DecorationNonReadable))
|
||||
fprintf(stderr, " writeonly");
|
||||
if (mask & (1ull << DecorationNonWritable))
|
||||
if (mask.get(DecorationNonWritable))
|
||||
fprintf(stderr, " readonly");
|
||||
if (is_sized_block)
|
||||
fprintf(stderr, " (BlockSize : %u bytes)", block_size);
|
||||
@@ -284,7 +306,7 @@ static const char *execution_model_to_str(spv::ExecutionModel model)
|
||||
|
||||
static void print_resources(const Compiler &compiler, const ShaderResources &res)
|
||||
{
|
||||
uint64_t modes = compiler.get_execution_mode_mask();
|
||||
auto &modes = compiler.get_execution_mode_bitset();
|
||||
|
||||
fprintf(stderr, "Entry points:\n");
|
||||
auto entry_points = compiler.get_entry_points_and_stages();
|
||||
@@ -293,11 +315,7 @@ static void print_resources(const Compiler &compiler, const ShaderResources &res
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Execution modes:\n");
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
{
|
||||
if (!(modes & (1ull << i)))
|
||||
continue;
|
||||
|
||||
modes.for_each_bit([&](uint32_t i) {
|
||||
auto mode = static_cast<ExecutionMode>(i);
|
||||
uint32_t arg0 = compiler.get_execution_mode_argument(mode, 0);
|
||||
uint32_t arg1 = compiler.get_execution_mode_argument(mode, 1);
|
||||
@@ -353,7 +371,7 @@ static void print_resources(const Compiler &compiler, const ShaderResources &res
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
print_resources(compiler, "subpass inputs", res.subpass_inputs);
|
||||
@@ -460,6 +478,7 @@ struct CLIArguments
|
||||
bool fixup = false;
|
||||
bool yflip = false;
|
||||
bool sso = false;
|
||||
bool support_nonzero_baseinstance = true;
|
||||
vector<PLSArg> pls_in;
|
||||
vector<PLSArg> pls_out;
|
||||
vector<Remap> remaps;
|
||||
@@ -480,6 +499,7 @@ struct CLIArguments
|
||||
|
||||
uint32_t iterations = 1;
|
||||
bool cpp = false;
|
||||
string reflect;
|
||||
bool msl = false;
|
||||
bool hlsl = false;
|
||||
bool hlsl_compat = false;
|
||||
@@ -487,25 +507,49 @@ struct CLIArguments
|
||||
bool flatten_multidimensional_arrays = false;
|
||||
bool use_420pack_extension = true;
|
||||
bool remove_unused = false;
|
||||
bool combined_samplers_inherit_bindings = false;
|
||||
};
|
||||
|
||||
static void print_help()
|
||||
{
|
||||
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] [--stage <stage (vert, frag, geom, tesc, tese, "
|
||||
"comp)>] [--remove-unused-variables] "
|
||||
"[--flatten-multidimensional-arrays] [--no-420pack-extension] "
|
||||
"[--remap-variable-type <variable_name> <new_variable_type>] "
|
||||
"[--rename-interface-variable <in|out> <location> <new_variable_name>] "
|
||||
"[--set-hlsl-vertex-input-semantic <location> <semantic>] "
|
||||
"[--rename-entry-point <old> <new> <stage>] "
|
||||
fprintf(stderr, "Usage: spirv-cross\n"
|
||||
"\t[--output <output path>]\n"
|
||||
"\t[SPIR-V file]\n"
|
||||
"\t[--es]\n"
|
||||
"\t[--no-es]\n"
|
||||
"\t[--version <GLSL version>]\n"
|
||||
"\t[--dump-resources]\n"
|
||||
"\t[--help]\n"
|
||||
"\t[--force-temporary]\n"
|
||||
"\t[--vulkan-semantics]\n"
|
||||
"\t[--flatten-ubo]\n"
|
||||
"\t[--fixup-clipspace]\n"
|
||||
"\t[--flip-vert-y]\n"
|
||||
"\t[--iterations iter]\n"
|
||||
"\t[--cpp]\n"
|
||||
"\t[--cpp-interface-name <name>]\n"
|
||||
"\t[--msl]\n"
|
||||
"\t[--msl-version <MMmmpp>]\n"
|
||||
"\t[--hlsl]\n"
|
||||
"\t[--reflect]\n"
|
||||
"\t[--shader-model]\n"
|
||||
"\t[--hlsl-enable-compat]\n"
|
||||
"\t[--separate-shader-objects]\n"
|
||||
"\t[--pls-in format input-name]\n"
|
||||
"\t[--pls-out format output-name]\n"
|
||||
"\t[--remap source_name target_name components]\n"
|
||||
"\t[--extension ext]\n"
|
||||
"\t[--entry name]\n"
|
||||
"\t[--stage <stage (vert, frag, geom, tesc, tese comp)>]\n"
|
||||
"\t[--remove-unused-variables]\n"
|
||||
"\t[--flatten-multidimensional-arrays]\n"
|
||||
"\t[--no-420pack-extension]\n"
|
||||
"\t[--remap-variable-type <variable_name> <new_variable_type>]\n"
|
||||
"\t[--rename-interface-variable <in|out> <location> <new_variable_name>]\n"
|
||||
"\t[--set-hlsl-vertex-input-semantic <location> <semantic>]\n"
|
||||
"\t[--rename-entry-point <old> <new> <stage>]\n"
|
||||
"\t[--combined-samplers-inherit-bindings]\n"
|
||||
"\t[--no-support-nonzero-baseinstance]\n"
|
||||
"\n");
|
||||
}
|
||||
|
||||
@@ -640,6 +684,7 @@ static int main_inner(int argc, char *argv[])
|
||||
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("--reflect", [&args](CLIParser &parser) { args.reflect = parser.next_value_string("json"); });
|
||||
cbs.add("--cpp-interface-name", [&args](CLIParser &parser) { args.cpp_interface_name = parser.next_string(); });
|
||||
cbs.add("--metal", [&args](CLIParser &) { args.msl = true; }); // Legacy compatibility
|
||||
cbs.add("--msl", [&args](CLIParser &) { args.msl = true; });
|
||||
@@ -711,6 +756,10 @@ static int main_inner(int argc, char *argv[])
|
||||
});
|
||||
|
||||
cbs.add("--remove-unused-variables", [&args](CLIParser &) { args.remove_unused = true; });
|
||||
cbs.add("--combined-samplers-inherit-bindings",
|
||||
[&args](CLIParser &) { args.combined_samplers_inherit_bindings = true; });
|
||||
|
||||
cbs.add("--no-support-nonzero-baseinstance", [&](CLIParser &) { args.support_nonzero_baseinstance = false; });
|
||||
|
||||
cbs.default_handler = [&args](const char *value) { args.input = value; };
|
||||
cbs.error_handler = [] { print_help(); };
|
||||
@@ -732,8 +781,20 @@ static int main_inner(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
unique_ptr<CompilerGLSL> compiler;
|
||||
// Special case reflection because it has little to do with the path followed by code-outputting compilers
|
||||
if (!args.reflect.empty())
|
||||
{
|
||||
CompilerReflection compiler(read_spirv_file(args.input));
|
||||
compiler.set_format(args.reflect);
|
||||
auto json = compiler.compile();
|
||||
if (args.output)
|
||||
write_string_to_file(args.output, json.c_str());
|
||||
else
|
||||
printf("%s", json.c_str());
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
unique_ptr<CompilerGLSL> compiler;
|
||||
bool combined_image_samplers = false;
|
||||
bool build_dummy_sampler = false;
|
||||
|
||||
@@ -748,10 +809,10 @@ static int main_inner(int argc, char *argv[])
|
||||
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();
|
||||
auto msl_opts = msl_comp->get_msl_options();
|
||||
if (args.set_msl_version)
|
||||
msl_opts.msl_version = args.msl_version;
|
||||
msl_comp->set_options(msl_opts);
|
||||
msl_comp->set_msl_options(msl_opts);
|
||||
}
|
||||
else if (args.hlsl)
|
||||
compiler = unique_ptr<CompilerHLSL>(new CompilerHLSL(read_spirv_file(args.input)));
|
||||
@@ -851,14 +912,14 @@ static int main_inner(int argc, char *argv[])
|
||||
if (!entry_point.empty())
|
||||
compiler->set_entry_point(entry_point, model);
|
||||
|
||||
if (!args.set_version && !compiler->get_options().version)
|
||||
if (!args.set_version && !compiler->get_common_options().version)
|
||||
{
|
||||
fprintf(stderr, "Didn't specify GLSL version and SPIR-V did not specify language.\n");
|
||||
print_help();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
CompilerGLSL::Options opts = compiler->get_options();
|
||||
CompilerGLSL::Options opts = compiler->get_common_options();
|
||||
if (args.set_version)
|
||||
opts.version = args.version;
|
||||
if (args.set_es)
|
||||
@@ -870,13 +931,14 @@ static int main_inner(int argc, char *argv[])
|
||||
opts.vulkan_semantics = args.vulkan_semantics;
|
||||
opts.vertex.fixup_clipspace = args.fixup;
|
||||
opts.vertex.flip_vert_y = args.yflip;
|
||||
compiler->set_options(opts);
|
||||
opts.vertex.support_nonzero_base_instance = args.support_nonzero_baseinstance;
|
||||
compiler->set_common_options(opts);
|
||||
|
||||
// Set HLSL specific options.
|
||||
if (args.hlsl)
|
||||
{
|
||||
auto *hlsl = static_cast<CompilerHLSL *>(compiler.get());
|
||||
auto hlsl_opts = hlsl->get_options();
|
||||
auto hlsl_opts = hlsl->get_hlsl_options();
|
||||
if (args.set_shader_model)
|
||||
{
|
||||
if (args.shader_model < 30)
|
||||
@@ -894,11 +956,19 @@ static int main_inner(int argc, char *argv[])
|
||||
hlsl_opts.point_size_compat = true;
|
||||
hlsl_opts.point_coord_compat = true;
|
||||
}
|
||||
hlsl->set_options(hlsl_opts);
|
||||
hlsl->set_hlsl_options(hlsl_opts);
|
||||
}
|
||||
|
||||
if (build_dummy_sampler)
|
||||
compiler->build_dummy_sampler_for_combined_images();
|
||||
{
|
||||
uint32_t sampler = compiler->build_dummy_sampler_for_combined_images();
|
||||
if (sampler != 0)
|
||||
{
|
||||
// Set some defaults to make validation happy.
|
||||
compiler->set_decoration(sampler, DecorationDescriptorSet, 0);
|
||||
compiler->set_decoration(sampler, DecorationBinding, 0);
|
||||
}
|
||||
}
|
||||
|
||||
ShaderResources res;
|
||||
if (args.remove_unused)
|
||||
@@ -961,6 +1031,9 @@ static int main_inner(int argc, char *argv[])
|
||||
if (combined_image_samplers)
|
||||
{
|
||||
compiler->build_combined_image_samplers();
|
||||
if (args.combined_samplers_inherit_bindings)
|
||||
spirv_cross_util::inherit_combined_sampler_bindings(*compiler);
|
||||
|
||||
// Give the remapped combined samplers new names.
|
||||
for (auto &remap : compiler->get_combined_image_samplers())
|
||||
{
|
||||
|
||||
+2
@@ -127,6 +127,7 @@
|
||||
<ClCompile Include="..\spirv_cpp.cpp" />
|
||||
<ClCompile Include="..\spirv_cross.cpp" />
|
||||
<ClCompile Include="..\spirv_glsl.cpp" />
|
||||
<ClCompile Include="..\spirv_reflect.cpp" />
|
||||
<ClCompile Include="..\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="..\spirv_msl.cpp" />
|
||||
<ClCompile Include="..\spirv_cfg.cpp" />
|
||||
@@ -138,6 +139,7 @@
|
||||
<ClInclude Include="..\spirv_cpp.hpp" />
|
||||
<ClInclude Include="..\spirv_cross.hpp" />
|
||||
<ClInclude Include="..\spirv_glsl.hpp" />
|
||||
<ClInclude Include="..\spirv_reflect.hpp" />
|
||||
<ClInclude Include="..\spirv.hpp" />
|
||||
<ClInclude Include="..\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="..\spirv_msl.hpp" />
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<ClCompile Include="..\spirv_glsl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\spirv_reflect.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\spirv_cpp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -50,6 +53,9 @@
|
||||
<ClInclude Include="..\spirv_glsl.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\spirv_reflect.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\spirv.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
RWByteAddressBuffer bar : register(u0);
|
||||
RWByteAddressBuffer foo : register(u1);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
[unroll]
|
||||
for (int _135 = 0; _135 < 16; )
|
||||
{
|
||||
bar.Store4(_135 * 16 + 0, asuint(asfloat(foo.Load4(_135 * 16 + 0))));
|
||||
_135++;
|
||||
continue;
|
||||
}
|
||||
[loop]
|
||||
for (int _136 = 0; _136 < 16; )
|
||||
{
|
||||
bar.Store4((15 - _136) * 16 + 0, asuint(asfloat(foo.Load4(_136 * 16 + 0))));
|
||||
_136++;
|
||||
continue;
|
||||
}
|
||||
[branch]
|
||||
if (asfloat(bar.Load(160)) > 10.0f)
|
||||
{
|
||||
foo.Store4(320, asuint(5.0f.xxxx));
|
||||
}
|
||||
foo.Store4(320, asuint(20.0f.xxxx));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
File renamed without changes.
+30
@@ -0,0 +1,30 @@
|
||||
Texture2D<float4> uTex : register(t1);
|
||||
SamplerState uSampler : register(s0);
|
||||
|
||||
static float4 FragColor;
|
||||
static float2 vUV;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float2 vUV : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = uTex.Sample(uSampler, vUV);
|
||||
FragColor += uTex.Sample(uSampler, vUV, int2(1, 1));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vUV = stage_input.vUV;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
void frag_main()
|
||||
{
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
frag_main();
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (((1.0f.xxxx + 1.0f.xxxx) + (1.0f.xxx.xyzz + 1.0f.xxxx)) + (1.0f.xxxx + 2.0f.xxxx)) + (1.0f.xx.xyxy + 2.0f.xxxx);
|
||||
FragColor = 10.0f.xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
Texture2D<float4> uTexture : register(t0);
|
||||
SamplerState _uTexture_sampler : register(s0);
|
||||
|
||||
static int2 Size;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
int2 Size : SV_Target0;
|
||||
};
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
uint _19_dummy_parameter;
|
||||
uint _20_dummy_parameter;
|
||||
Size = int2(SPIRV_Cross_textureSize(uTexture, uint(0), _19_dummy_parameter)) + int2(SPIRV_Cross_textureSize(uTexture, uint(1), _20_dummy_parameter));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.Size = Size;
|
||||
return stage_output;
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
Texture2D<float4> uImage : register(t0);
|
||||
SamplerState _uImage_sampler : register(s0);
|
||||
|
||||
static float4 v0;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 v0 : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float phi;
|
||||
float4 _36;
|
||||
int _51;
|
||||
_51 = 0;
|
||||
phi = 1.0f;
|
||||
_36 = float4(1.0f, 2.0f, 1.0f, 2.0f);
|
||||
for (;;)
|
||||
{
|
||||
FragColor = _36;
|
||||
if (_51 < 4)
|
||||
{
|
||||
if (v0[_51] > 0.0f)
|
||||
{
|
||||
float2 _48 = phi.xx;
|
||||
_51++;
|
||||
phi += 2.0f;
|
||||
_36 = uImage.SampleLevel(_uImage_sampler, _48, 0.0f);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
v0 = stage_input.v0;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
static const float _46[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f };
|
||||
static const float4 _76[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx };
|
||||
static const float4 _90[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx };
|
||||
|
||||
static float FragColor;
|
||||
static int index;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation int index : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float4 foobar[4] = _76;
|
||||
float4 baz[4] = _76;
|
||||
FragColor = _46[index];
|
||||
if (index < 10)
|
||||
{
|
||||
FragColor += _46[index ^ 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
FragColor += _46[index & 1];
|
||||
}
|
||||
bool _99 = index > 30;
|
||||
if (_99)
|
||||
{
|
||||
FragColor += _76[index & 3].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
FragColor += _76[index & 1].x;
|
||||
}
|
||||
if (_99)
|
||||
{
|
||||
foobar[1].z = 20.0f;
|
||||
}
|
||||
int _37 = index & 3;
|
||||
FragColor += foobar[_37].z;
|
||||
baz = _90;
|
||||
FragColor += baz[_37].z;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
index = stage_input.index;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
static float4 FragColor;
|
||||
static int4 vA;
|
||||
static int4 vB;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
nointerpolation int4 vA : TEXCOORD0;
|
||||
nointerpolation int4 vB : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float4(vA - vB * (vA / vB));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vA = stage_input.vA;
|
||||
vB = stage_input.vB;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
Texture2D<float4> uTexture : register(t0);
|
||||
SamplerState _uTexture_sampler : register(s0);
|
||||
|
||||
static float4 gl_FragCoord;
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 gl_FragCoord : SV_Position;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = uTexture.Load(int3(int2(gl_FragCoord.xy), 0));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_FragCoord = stage_input.gl_FragCoord;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
Texture2D<float4> uShadow : register(t0);
|
||||
SamplerComparisonState _uShadow_sampler : register(s0);
|
||||
Texture2D<float4> uTexture : register(t1);
|
||||
SamplerComparisonState uSampler : register(s2);
|
||||
|
||||
static float3 vUV;
|
||||
static float FragColor;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float3 vUV : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = uShadow.SampleCmp(_uShadow_sampler, vUV.xy, vUV.z) + uTexture.SampleCmp(uSampler, vUV.xy, vUV.z);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vUV = stage_input.vUV;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -11,25 +11,23 @@ struct SPIRV_Cross_Output
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
float4 _21;
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float4 _33;
|
||||
do
|
||||
bool _29;
|
||||
for (;;)
|
||||
{
|
||||
if (counter == 10)
|
||||
_29 = counter == 10;
|
||||
if (_29)
|
||||
{
|
||||
_33 = 10.0f.xxxx;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_33 = 30.0f.xxxx;
|
||||
break;
|
||||
}
|
||||
} while (false);
|
||||
FragColor = _33;
|
||||
}
|
||||
bool4 _35 = _29.xxxx;
|
||||
FragColor = float4(_35.x ? 10.0f.xxxx.x : 30.0f.xxxx.x, _35.y ? 10.0f.xxxx.y : 30.0f.xxxx.y, _35.z ? 10.0f.xxxx.z : 30.0f.xxxx.z, _35.w ? 10.0f.xxxx.w : 30.0f.xxxx.w);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
void vert_main()
|
||||
{
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vert_main();
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
static const int _7 = -10;
|
||||
static const uint _8 = 100u;
|
||||
static const int _20 = (_7 + 2);
|
||||
static const uint _25 = (_8 % 5u);
|
||||
static const int4 _30 = int4(20, 30, _20, _20);
|
||||
static const int2 _32 = int2(_30.y, _30.x);
|
||||
static const int _33 = _30.y;
|
||||
|
||||
static float4 gl_Position;
|
||||
static int _4;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
nointerpolation int _4 : TEXCOORD0;
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
float4 _64 = 0.0f.xxxx;
|
||||
_64.y = float(_20);
|
||||
float4 _68 = _64;
|
||||
_68.z = float(_25);
|
||||
float4 _52 = _68 + float4(_30);
|
||||
float2 _56 = _52.xy + float2(_32);
|
||||
gl_Position = float4(_56.x, _56.y, _52.z, _52.w);
|
||||
_4 = _33;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
vert_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_Position = gl_Position;
|
||||
stage_output._4 = _4;
|
||||
return stage_output;
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
static float4 gl_Position;
|
||||
static int gl_VertexIndex;
|
||||
static int gl_InstanceIndex;
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
uint gl_VertexIndex : SV_VertexID;
|
||||
uint gl_InstanceIndex : SV_InstanceID;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = float(uint(gl_VertexIndex) + uint(gl_InstanceIndex)).xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
gl_VertexIndex = int(stage_input.gl_VertexIndex);
|
||||
gl_InstanceIndex = int(stage_input.gl_InstanceIndex);
|
||||
vert_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.gl_Position = gl_Position;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
static const uint3 gl_WorkGroupSize = uint3(8u, 4u, 2u);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
globallycoherent RWByteAddressBuffer _29 : register(u3);
|
||||
ByteAddressBuffer _33 : register(t2);
|
||||
RWTexture2D<float> uImageIn : register(u0);
|
||||
globallycoherent RWTexture2D<float> uImageOut : register(u1);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
uImageOut[int2(9, 7)] = uImageIn[int2(9, 7)].x;
|
||||
_29.Store(0, asuint(asfloat(_33.Load(0))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
+20
-18
@@ -34,24 +34,26 @@ struct SPIRV_Cross_Input
|
||||
|
||||
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;
|
||||
int2 _23 = int2(gl_GlobalInvocationID.xy);
|
||||
uImageOutF[_23] = uImageInF[_23].x;
|
||||
uImageOutI[_23] = uImageInI[_23].x;
|
||||
uImageOutU[_23] = uImageInU[_23].x;
|
||||
int _74 = int(gl_GlobalInvocationID.x);
|
||||
uImageOutBuffer[_74] = uImageInBuffer[_74].x;
|
||||
uImageOutF2[_23] = uImageInF2[_23].xy;
|
||||
uImageOutI2[_23] = uImageInI2[_23].xy;
|
||||
uImageOutU2[_23] = uImageInU2[_23].xy;
|
||||
float4 _135 = uImageInBuffer2[_74].xyyy;
|
||||
uImageOutBuffer2[_74] = _135.xy;
|
||||
uImageOutF4[_23] = uImageInF4[_23];
|
||||
int4 _165 = uImageInI4[_23];
|
||||
uImageOutI4[_23] = _165;
|
||||
uint4 _180 = uImageInU4[_23];
|
||||
uImageOutU4[_23] = _180;
|
||||
uImageOutBuffer4[_74] = uImageInBuffer4[_74];
|
||||
uImageNoFmtF[_23] = _135;
|
||||
uImageNoFmtU[_23] = _180;
|
||||
uImageNoFmtI[_23] = _165;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
RWByteAddressBuffer _11 : register(u0);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
_11.Store(0, asuint(asfloat(_11.Load(0)) * asfloat(_11.Load(96))));
|
||||
_11.Store4(16, asuint(asfloat(_11.Load4(16)) * asfloat(_11.Load4(112))));
|
||||
float4x4 _35 = asfloat(uint4x4(_11.Load4(128), _11.Load4(144), _11.Load4(160), _11.Load4(176)));
|
||||
float4x4 _37 = asfloat(uint4x4(_11.Load4(32), _11.Load4(48), _11.Load4(64), _11.Load4(80)));
|
||||
float4x4 _38 = mul(_35, _37);
|
||||
_11.Store4(32, asuint(_38[0]));
|
||||
_11.Store4(48, asuint(_38[1]));
|
||||
_11.Store4(64, asuint(_38[2]));
|
||||
_11.Store4(80, asuint(_38[3]));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
comp_main();
|
||||
}
|
||||
@@ -17,7 +17,7 @@ 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]));
|
||||
_44.Store(gl_GlobalInvocationID.x * 4 + 0, asuint(sShared[3u - gl_LocalInvocationIndex]));
|
||||
}
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
RWByteAddressBuffer _9 : register(u0, space0);
|
||||
|
||||
static uint4 gl_SubgroupEqMask;
|
||||
static uint4 gl_SubgroupGeMask;
|
||||
static uint4 gl_SubgroupGtMask;
|
||||
static uint4 gl_SubgroupLeMask;
|
||||
static uint4 gl_SubgroupLtMask;
|
||||
void comp_main()
|
||||
{
|
||||
_9.Store(0, asuint(float(WaveGetLaneCount())));
|
||||
_9.Store(0, asuint(float(WaveGetLaneIndex())));
|
||||
_9.Store(0, asuint(float4(gl_SubgroupEqMask).x));
|
||||
_9.Store(0, asuint(float4(gl_SubgroupGeMask).x));
|
||||
_9.Store(0, asuint(float4(gl_SubgroupGtMask).x));
|
||||
_9.Store(0, asuint(float4(gl_SubgroupLeMask).x));
|
||||
_9.Store(0, asuint(float4(gl_SubgroupLtMask).x));
|
||||
uint4 _75 = WaveActiveBallot(true);
|
||||
float4 _88 = WaveActiveSum(20.0f.xxxx);
|
||||
int4 _94 = WaveActiveSum(int4(20, 20, 20, 20));
|
||||
float4 _96 = WaveActiveProduct(20.0f.xxxx);
|
||||
int4 _98 = WaveActiveProduct(int4(20, 20, 20, 20));
|
||||
float4 _127 = WavePrefixProduct(_96) * _96;
|
||||
int4 _129 = WavePrefixProduct(_98) * _98;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main()
|
||||
{
|
||||
gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96));
|
||||
if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0;
|
||||
if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0;
|
||||
if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0;
|
||||
if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0;
|
||||
gl_SubgroupGeMask = ~((1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u);
|
||||
if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u;
|
||||
if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u;
|
||||
if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u;
|
||||
if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u;
|
||||
if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u;
|
||||
if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u;
|
||||
uint gt_lane_index = WaveGetLaneIndex() + 1;
|
||||
gl_SubgroupGtMask = ~((1u << (gt_lane_index - uint4(0, 32, 64, 96))) - 1u);
|
||||
if (gt_lane_index >= 32) gl_SubgroupGtMask.x = 0u;
|
||||
if (gt_lane_index >= 64) gl_SubgroupGtMask.y = 0u;
|
||||
if (gt_lane_index >= 96) gl_SubgroupGtMask.z = 0u;
|
||||
if (gt_lane_index >= 128) gl_SubgroupGtMask.w = 0u;
|
||||
if (gt_lane_index < 32) gl_SubgroupGtMask.y = ~0u;
|
||||
if (gt_lane_index < 64) gl_SubgroupGtMask.z = ~0u;
|
||||
if (gt_lane_index < 96) gl_SubgroupGtMask.w = ~0u;
|
||||
uint le_lane_index = WaveGetLaneIndex() + 1;
|
||||
gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u;
|
||||
if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u;
|
||||
if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u;
|
||||
if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u;
|
||||
if (le_lane_index >= 128) gl_SubgroupLeMask.w = ~0u;
|
||||
if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u;
|
||||
if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u;
|
||||
if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u;
|
||||
gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u;
|
||||
if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u;
|
||||
if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u;
|
||||
if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u;
|
||||
if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u;
|
||||
if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u;
|
||||
if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u;
|
||||
comp_main();
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
static const float _17[5] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f };
|
||||
|
||||
static float4 FragColor;
|
||||
static float4 v0;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 v0 : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
for (int _46 = 0; _46 < 4; )
|
||||
{
|
||||
int _33 = _46 + 1;
|
||||
FragColor += _17[_33].xxxx;
|
||||
_46 = _33;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
v0 = stage_input.v0;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ void frag_main()
|
||||
lut = _16;
|
||||
foos = _28;
|
||||
FragColor = lut[_line].xxxx;
|
||||
FragColor += (foos[_line].a * (foos[1 - _line].a)).xxxx;
|
||||
FragColor += (foos[_line].a * foos[1 - _line].a).xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
Texture2D<float4> uSampler : register(t0);
|
||||
SamplerState _uSampler_sampler : register(s0);
|
||||
|
||||
static float4 FragColor;
|
||||
static float4 vInput;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vInput : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = vInput;
|
||||
float4 _23 = uSampler.Sample(_uSampler_sampler, vInput.xy);
|
||||
float4 _26 = ddx(vInput);
|
||||
float4 _29 = ddy(vInput);
|
||||
float4 _32 = fwidth(vInput);
|
||||
float4 _35 = ddx_coarse(vInput);
|
||||
float4 _38 = ddy_coarse(vInput);
|
||||
float4 _41 = fwidth(vInput);
|
||||
float4 _44 = ddx_fine(vInput);
|
||||
float4 _47 = ddy_fine(vInput);
|
||||
float4 _50 = fwidth(vInput);
|
||||
float _56_tmp = uSampler.CalculateLevelOfDetail(_uSampler_sampler, vInput.zw);
|
||||
if (vInput.y > 10.0f)
|
||||
{
|
||||
FragColor += _23;
|
||||
FragColor += _26;
|
||||
FragColor += _29;
|
||||
FragColor += _32;
|
||||
FragColor += _35;
|
||||
FragColor += _38;
|
||||
FragColor += _41;
|
||||
FragColor += _44;
|
||||
FragColor += _47;
|
||||
FragColor += _50;
|
||||
FragColor += float2(_56_tmp, _56_tmp).xyxy;
|
||||
}
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vInput = stage_input.vInput;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
static min16float4 v4;
|
||||
static min16float3 v3;
|
||||
static min16float v1;
|
||||
static min16float2 v2;
|
||||
static float o1;
|
||||
static float2 o2;
|
||||
static float3 o3;
|
||||
static float4 o4;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
min16float v1 : TEXCOORD0;
|
||||
min16float2 v2 : TEXCOORD1;
|
||||
min16float3 v3 : TEXCOORD2;
|
||||
min16float4 v4 : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float o1 : SV_Target0;
|
||||
float2 o2 : SV_Target1;
|
||||
float3 o3 : SV_Target2;
|
||||
float4 o4 : SV_Target3;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
min16float4 _324;
|
||||
min16float4 _387 = modf(v4, _324);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
v4 = stage_input.v4;
|
||||
v3 = stage_input.v3;
|
||||
v1 = stage_input.v1;
|
||||
v2 = stage_input.v2;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.o1 = o1;
|
||||
stage_output.o2 = o2;
|
||||
stage_output.o3 = o3;
|
||||
stage_output.o4 = o4;
|
||||
return stage_output;
|
||||
}
|
||||
@@ -2,6 +2,30 @@ Texture1D<uint4> uSampler1DUint : register(t0);
|
||||
SamplerState _uSampler1DUint_sampler : register(s0);
|
||||
Texture1D<int4> uSampler1DInt : register(t0);
|
||||
SamplerState _uSampler1DInt_sampler : register(s0);
|
||||
Texture1D<float4> uSampler1DFloat : register(t0);
|
||||
SamplerState _uSampler1DFloat_sampler : register(s0);
|
||||
Texture2DArray<int4> uSampler2DArray : register(t2);
|
||||
SamplerState _uSampler2DArray_sampler : register(s2);
|
||||
Texture3D<float4> uSampler3D : register(t3);
|
||||
SamplerState _uSampler3D_sampler : register(s3);
|
||||
TextureCube<float4> uSamplerCube : register(t4);
|
||||
SamplerState _uSamplerCube_sampler : register(s4);
|
||||
TextureCubeArray<uint4> uSamplerCubeArray : register(t5);
|
||||
SamplerState _uSamplerCubeArray_sampler : register(s5);
|
||||
Buffer<float4> uSamplerBuffer : register(t6);
|
||||
Texture2DMS<int4> uSamplerMS : register(t7);
|
||||
SamplerState _uSamplerMS_sampler : register(s7);
|
||||
Texture2DMSArray<float4> uSamplerMSArray : register(t8);
|
||||
SamplerState _uSamplerMSArray_sampler : register(s8);
|
||||
Texture2D<float4> uSampler2D : register(t1);
|
||||
SamplerState _uSampler2D_sampler : register(s1);
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(Level, ret.x, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<int4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
@@ -17,10 +41,87 @@ uint SPIRV_Cross_textureSize(Texture1D<uint4> Tex, uint Level, out uint Param)
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture2DArray<int4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture3D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_textureSize(Buffer<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(ret.x);
|
||||
Param = 0u;
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(TextureCube<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(TextureCubeArray<uint4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(Texture2DMS<int4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture2DMSArray<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
uint _17_dummy_parameter;
|
||||
uint _24_dummy_parameter;
|
||||
uint _32_dummy_parameter;
|
||||
uint _42_dummy_parameter;
|
||||
uint _50_dummy_parameter;
|
||||
uint _60_dummy_parameter;
|
||||
uint _68_dummy_parameter;
|
||||
uint _76_dummy_parameter;
|
||||
uint _84_dummy_parameter;
|
||||
uint _92_dummy_parameter;
|
||||
int _100;
|
||||
SPIRV_Cross_textureSize(uSampler2D, 0u, _100);
|
||||
int _104;
|
||||
SPIRV_Cross_textureSize(uSampler2DArray, 0u, _104);
|
||||
int _108;
|
||||
SPIRV_Cross_textureSize(uSampler3D, 0u, _108);
|
||||
int _112;
|
||||
SPIRV_Cross_textureSize(uSamplerCube, 0u, _112);
|
||||
int _116;
|
||||
SPIRV_Cross_textureSize(uSamplerMS, 0u, _116);
|
||||
int _120;
|
||||
SPIRV_Cross_textureSize(uSamplerMSArray, 0u, _120);
|
||||
}
|
||||
|
||||
void main()
|
||||
|
||||
@@ -1,5 +1,112 @@
|
||||
Texture1D<float4> uSampler1D : register(t0);
|
||||
SamplerState _uSampler1D_sampler : register(s0);
|
||||
Texture2D<float4> uSampler2D : register(t1);
|
||||
SamplerState _uSampler2D_sampler : register(s1);
|
||||
Texture2DArray<float4> uSampler2DArray : register(t2);
|
||||
SamplerState _uSampler2DArray_sampler : register(s2);
|
||||
Texture3D<float4> uSampler3D : register(t3);
|
||||
SamplerState _uSampler3D_sampler : register(s3);
|
||||
TextureCube<float4> uSamplerCube : register(t4);
|
||||
SamplerState _uSamplerCube_sampler : register(s4);
|
||||
TextureCubeArray<float4> uSamplerCubeArray : register(t5);
|
||||
SamplerState _uSamplerCubeArray_sampler : register(s5);
|
||||
Buffer<float4> uSamplerBuffer : register(t6);
|
||||
Texture2DMS<float4> uSamplerMS : register(t7);
|
||||
SamplerState _uSamplerMS_sampler : register(s7);
|
||||
Texture2DMSArray<float4> uSamplerMSArray : register(t8);
|
||||
SamplerState _uSamplerMSArray_sampler : register(s8);
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(Level, ret.x, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture2DArray<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture3D<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_textureSize(Buffer<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint ret;
|
||||
Tex.GetDimensions(ret.x);
|
||||
Param = 0u;
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(TextureCube<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(TextureCubeArray<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_textureSize(Texture2DMS<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint2 ret;
|
||||
Tex.GetDimensions(ret.x, ret.y, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint3 SPIRV_Cross_textureSize(Texture2DMSArray<float4> Tex, uint Level, out uint Param)
|
||||
{
|
||||
uint3 ret;
|
||||
Tex.GetDimensions(ret.x, ret.y, ret.z, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
uint _17_dummy_parameter;
|
||||
uint _27_dummy_parameter;
|
||||
uint _37_dummy_parameter;
|
||||
uint _45_dummy_parameter;
|
||||
uint _53_dummy_parameter;
|
||||
uint _61_dummy_parameter;
|
||||
uint _69_dummy_parameter;
|
||||
uint _77_dummy_parameter;
|
||||
uint _85_dummy_parameter;
|
||||
int _89;
|
||||
SPIRV_Cross_textureSize(uSampler1D, 0u, _89);
|
||||
int _93;
|
||||
SPIRV_Cross_textureSize(uSampler2D, 0u, _93);
|
||||
int _97;
|
||||
SPIRV_Cross_textureSize(uSampler2DArray, 0u, _97);
|
||||
int _101;
|
||||
SPIRV_Cross_textureSize(uSampler3D, 0u, _101);
|
||||
int _105;
|
||||
SPIRV_Cross_textureSize(uSamplerCube, 0u, _105);
|
||||
int _109;
|
||||
SPIRV_Cross_textureSize(uSamplerCubeArray, 0u, _109);
|
||||
int _113;
|
||||
SPIRV_Cross_textureSize(uSamplerMS, 0u, _113);
|
||||
int _117;
|
||||
SPIRV_Cross_textureSize(uSamplerMSArray, 0u, _117);
|
||||
}
|
||||
|
||||
void main()
|
||||
|
||||
Loaded 100 of 3459 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user