mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 18:45:36 +00:00
Compare commits
1223 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
824d332d0f | ||
|
19c3d05ac1 | ||
|
8dc50ffc79 | ||
|
ea37ea11fc | ||
|
4d3578edbe | ||
|
800b332f60 | ||
|
b4ec1bd371 | ||
|
0ad7fcb341 | ||
|
16a6469b75 | ||
|
7502739425 | ||
|
de11de43f2 | ||
|
14ef56d148 | ||
|
9e2af5f619 | ||
|
637e503685 | ||
|
1fc9eedbab | ||
|
bad9cd097a | ||
|
a4c5fa4b5c | ||
|
95a386308a | ||
|
0706223aaf | ||
|
fd03fe2b5a | ||
|
f0cd981548 | ||
|
bd0102c8d0 | ||
|
0b72a795eb | ||
|
2ae7037c08 | ||
|
af67473de3 | ||
|
b56039b15a | ||
|
3019bfb978 | ||
|
76f003d388 | ||
|
fafd3fb564 | ||
|
e914099ae2 | ||
|
1689cdb1a2 | ||
|
fddded8d20 | ||
|
161aa49f37 | ||
|
68b147488e | ||
|
aeab525a7f | ||
|
499451bb80 | ||
|
cf8a6efd37 | ||
|
6e350a5085 | ||
|
a82698d601 | ||
|
83475ac828 | ||
|
6d6068e0e2 | ||
|
4407ebdd9b | ||
|
87f6cce7b1 | ||
|
bf623d4f85 | ||
|
97daee836a | ||
|
b68ca43166 | ||
|
00f4eeddaf | ||
|
399a725343 | ||
|
b403e1be33 | ||
|
8bc30270c8 | ||
|
88abb93669 | ||
|
ee97c5c110 | ||
|
27cbd6647f | ||
|
dc6ef99dc7 | ||
|
7d4b875ee3 | ||
|
f5336358ea | ||
|
df4314f831 | ||
|
e5f899aae3 | ||
|
2d1a2982df | ||
|
ddede4a52d | ||
|
80f7ec2681 | ||
|
7fedbd52e0 | ||
|
d6163a6edb | ||
|
4eaa992aff | ||
|
70eef0de90 | ||
|
146e81a56a | ||
|
5eef2fd28a | ||
|
d1f5a7e8fb | ||
|
78cb5334cf | ||
|
f56eecea44 | ||
|
41b05ce7ed | ||
|
a63db68114 | ||
|
4f99f304e6 | ||
|
a050c9d65b | ||
|
b22da77f9a | ||
|
df22c4225e | ||
|
48460d1cbe | ||
|
7431b30005 | ||
|
9eae6b57ce | ||
|
efa7093f34 | ||
|
0594dac405 | ||
|
5789fd881c | ||
|
1757dfaf5a | ||
|
77117abb31 | ||
|
64dfccdf26 | ||
|
6bf3c44b9c | ||
|
434dcde9f3 | ||
|
bdd2419de9 | ||
|
7f727340aa | ||
|
59dd73492b | ||
|
83056712e0 | ||
|
fa32537f40 | ||
|
09b584b23f | ||
|
4bfd8b967b | ||
|
52bd92b97d | ||
|
8e44a7099f | ||
|
0a58ead5f6 | ||
|
9f37ede336 | ||
|
a49b13fe66 | ||
|
6eaec7a004 | ||
|
075d6425e2 | ||
|
70e4f81655 | ||
|
12198f9255 | ||
|
4bfa8c9fc7 | ||
|
669b19c2f3 | ||
|
d9dac05db2 | ||
|
802124309d | ||
|
5b5096e9ea | ||
|
54163ffaa5 | ||
|
2d335f436c | ||
|
1fc95bf44b | ||
|
0bb1ee167f | ||
|
a62027d4c2 | ||
|
8dcd9cc0f9 | ||
|
7b0249d9ca | ||
|
551751df3c | ||
|
be12305f65 | ||
|
e214ca6884 | ||
|
43321fb45a | ||
|
423254692a | ||
|
612f340292 | ||
|
6d65ea7314 | ||
|
e389d03601 | ||
|
33f46202d2 | ||
|
8e06b1b2b0 | ||
|
1437c5a1de | ||
|
20670186ab | ||
|
5bc4cc761a | ||
|
efa8f6a154 | ||
|
9dd35c3a42 | ||
|
21d14abaee | ||
|
c27f45c8c0 | ||
|
d0e2a40cdc | ||
|
e2b8ceb6ba | ||
|
213ca72fa1 | ||
|
de69f2b40b | ||
|
3f40a8d46e | ||
|
226058d2e9 | ||
|
ae6f7b8d5a | ||
|
1a27af6951 | ||
|
c35141b33f | ||
|
a1d6cd15f4 | ||
|
34d0d85c15 | ||
|
c71dc740e2 | ||
|
69a50fa713 | ||
|
34a1ffbcda | ||
|
3e0ec9ebef | ||
|
2741829545 | ||
|
dedf6de2ac | ||
|
fc4fd0107d | ||
|
ca92e72efe | ||
|
b49340dff8 | ||
|
9981c8df03 | ||
|
e0c930f2d8 | ||
|
e2b726382e | ||
|
0444e590e0 | ||
|
64bbedeb82 | ||
|
217d32b502 | ||
|
a71bfb30a2 | ||
|
046cf50412 | ||
|
d7051f15f4 | ||
|
12f4a8f073 | ||
|
c20d02dd40 | ||
|
ae2053c487 | ||
|
14b082f5ea | ||
|
ce42eccc9d | ||
|
8ffcfc87bd | ||
|
5004e41100 | ||
|
a07a6bb9d3 | ||
|
f2bbb6847d | ||
|
ce84e80f65 | ||
|
952cef5a15 | ||
|
2bc199a41b | ||
|
5d064dd89f | ||
|
2857ef34f0 | ||
|
5edd9ff54b | ||
|
91d29459fb | ||
|
fff3bf9917 | ||
|
43bf4ed1bc | ||
|
3b3026ff1c | ||
|
0e9420a7b2 | ||
|
93222c6f9f | ||
|
285df1b5be | ||
|
d4fbeea085 | ||
|
4d1a1ce9c2 | ||
|
23710f397e | ||
|
88f6cb4d41 | ||
|
5b6fc788b3 | ||
|
8cdd8dd725 | ||
|
c09d1c3cff | ||
|
ca0f458505 | ||
|
bb3f8af81a | ||
|
eed99141b3 | ||
|
2c78272185 | ||
|
1930a2132c | ||
|
6bdd83684b | ||
|
b1af1334c9 | ||
|
bb199865cf | ||
|
c09e463b8e | ||
|
4019319d92 | ||
|
790b54bf29 | ||
|
2091bc5651 | ||
|
8fffdc3918 | ||
|
6cdc52cdde | ||
|
aca8e7e9eb | ||
|
eb9f66c349 | ||
|
7f0503bf8b | ||
|
95f04b746d | ||
|
e0309a4b01 | ||
|
139a253edc | ||
|
99ccf56938 | ||
|
149898193f | ||
|
10d09ac977 | ||
|
e5c6c88835 | ||
|
d124f40503 | ||
|
e518a7062c | ||
|
f9bbde9c79 | ||
|
37887e8fde | ||
|
9c2f71326a | ||
|
b55c3f4555 | ||
|
3f949d2b6c | ||
|
f4eb0b9b9e | ||
|
6935b24440 | ||
|
786ad6f71e | ||
|
eb21083078 | ||
|
1b952bf173 | ||
|
60224e1d22 | ||
|
034ae8cffa | ||
|
5eb58799fe | ||
|
6ee205d4e2 | ||
|
5f447a815e | ||
|
e2513d50be | ||
|
a09f7158b8 | ||
|
251d0f0d7c | ||
|
a0acb47185 | ||
|
ffd31589cf | ||
|
4d769d9c7e | ||
|
7de6aec337 | ||
|
18ff65efc8 | ||
|
aeb4536988 | ||
|
98faff425e | ||
|
6d38100a41 | ||
|
26c965cf4a | ||
|
99eaba7c96 | ||
|
1639640902 | ||
|
647b1d3ee4 | ||
|
6abda17532 | ||
|
3ab69e24db | ||
|
073f931729 | ||
|
0d127a82dd | ||
|
e5b675d607 | ||
|
1832ec2ac2 | ||
|
484fbcc320 | ||
|
7334fb620b | ||
|
f97c0deea9 | ||
|
4cd13ea9d8 | ||
|
e6a144ddb0 | ||
|
3a10fda008 | ||
|
2a3a701115 | ||
|
6bbb424c28 | ||
|
3a3a6d8e45 | ||
|
b23f6fdc1d | ||
|
9baa58dd92 | ||
|
5ab5fa7024 | ||
|
b3abb83fc5 | ||
|
f94c7e52b7 | ||
|
8909d9bb89 | ||
|
678f18ddb9 | ||
|
02d3ed4973 | ||
|
6206986914 | ||
|
c0562a6b1b | ||
|
3a090e988c | ||
|
ff1339b0b6 | ||
|
afcf3a12a3 | ||
|
6ece91c763 | ||
|
7eea1fc4d6 | ||
|
c6ea7d8f76 | ||
|
6477dc4f1e | ||
|
a1439b15cf | ||
|
8d7cbf9943 | ||
|
b130fe6ed5 | ||
|
8e7c5a4d99 | ||
|
46b88bd10f | ||
|
58df609ba0 | ||
|
3b7c36e1ba | ||
|
1aa7eb8a42 | ||
|
c7fb3ebd93 | ||
|
fed064931a | ||
|
9a22185ab7 | ||
|
17b6343f18 | ||
|
d542d952f4 | ||
|
0ba9ea6a3b | ||
|
eb09c4ccce | ||
|
6c39bf229c | ||
|
b0e4e87ff3 | ||
|
4202d9d621 | ||
|
5fd5b62539 | ||
|
10b24d04bc | ||
|
c47d9b2ad6 | ||
|
ede60e8f7f | ||
|
c08f92aca1 | ||
|
a3bbf2274f | ||
|
bb59cd81fa | ||
|
53b2ccffca | ||
|
fa9f58446f | ||
|
5e3157a82c | ||
|
beb9c86749 | ||
|
81fa9b7fff | ||
|
385c5a4507 | ||
|
59d060bc16 | ||
|
83fd0683fa | ||
|
81ad31ce31 | ||
|
ff984d3cde | ||
|
b505829e16 | ||
|
254375ef0c | ||
|
cef795b80b | ||
|
410313ca87 | ||
|
c09fff2da6 | ||
|
e816bc4b99 | ||
|
632ed99ee7 | ||
|
15d6a45dcd | ||
|
d370ea32f4 | ||
|
c01590175a | ||
|
a12d447bd6 | ||
|
ce3aded3e5 | ||
|
4ecdcf77d1 | ||
|
3f4249084c | ||
|
aeee7706ee | ||
|
5db162cbcd | ||
|
354a2e6946 | ||
|
53ca64f6ff | ||
|
ee7fe305c9 | ||
|
b1ebb2fec5 | ||
|
96bee58d0f | ||
|
0297aee3f4 | ||
|
5b0205bc59 | ||
|
cda421434b | ||
|
0c86c54d48 | ||
|
5be726ca3b | ||
|
69777e2ffa | ||
|
111ff2bedd | ||
|
d188510e59 | ||
|
d0dbb737d9 | ||
|
e11ffe242b | ||
|
6e963a7f71 | ||
|
81ada41baa | ||
|
0feb2e7211 | ||
|
23c616c647 | ||
|
20b11f2d63 | ||
|
df89241eb8 | ||
|
703620c7cd | ||
|
b1b7538afd | ||
|
ddc05e8a5f | ||
|
62a4182aca | ||
|
aa8dab5371 | ||
|
ddf3df7f56 | ||
|
243ee04b1c | ||
|
04e4ce0775 | ||
|
52ab1ed04b | ||
|
3bc876ca78 | ||
|
247e935353 | ||
|
4bea00135d | ||
|
683a223c1b | ||
|
2b633fd3c5 | ||
|
cd8e2c4e79 | ||
|
7d32efbd31 | ||
|
b8884d9591 | ||
|
bec1b9056f | ||
|
657073b9e2 | ||
|
fb146f2a20 | ||
|
ec515ad113 | ||
|
d188d14e19 | ||
|
14fad28a9b | ||
|
aec6e330dc | ||
|
6c2574364b | ||
|
8ed82712a0 | ||
|
b0fe1532f7 | ||
|
6ebed7ce69 | ||
|
37d4cd091c | ||
|
5abec2a291 | ||
|
e3b1c041d0 | ||
|
2965656325 | ||
|
03b1fef331 | ||
|
08731303d8 | ||
|
7fee289b66 | ||
|
040fd79ef7 | ||
|
473b66649f | ||
|
b8f6ef1c0b | ||
|
9d2175180e | ||
|
0c6f2b470f | ||
|
54b4d7fc78 | ||
|
1ee2016902 | ||
|
7bb49d85d3 | ||
|
806b2ddc89 | ||
|
afd0251dd2 | ||
|
eb300d0aa7 | ||
|
f6cc245e40 | ||
|
9ee5d066a2 | ||
|
01243fb8e5 | ||
|
a2a1ecde0a | ||
|
a5958bf7f0 | ||
|
7533206d89 | ||
|
b0a12c02e1 | ||
|
374b66ad8e | ||
|
f85d8df71e | ||
|
a707d31a4c | ||
|
f1e0a096d5 | ||
|
3f33d218b3 | ||
|
99b90cbd5c | ||
|
bad82e7204 | ||
|
faae1218fa | ||
|
064c3161c3 | ||
|
8122f8ecbf | ||
|
9dbc79dc96 | ||
|
df9151481c | ||
|
be7d646e83 | ||
|
78c8bca2bb | ||
|
751a23af0f | ||
|
501f46e515 | ||
|
31e1d4f839 | ||
|
be22674f8c | ||
|
d339b3f7d6 | ||
|
602de0c370 | ||
|
c96853816a | ||
|
437af93201 | ||
|
ae2c9a745e | ||
|
5caab76a45 | ||
|
9c37aa039b | ||
|
3abe5b0d57 | ||
|
90b949b8ce | ||
|
69cb4d5787 | ||
|
d8204641fa | ||
|
7d0631cf26 | ||
|
a1ec8b0a88 | ||
|
5c72030fb8 | ||
|
1908d26093 | ||
|
16a68d78eb | ||
|
4f8e5dfd7c | ||
|
10bf3d383c | ||
|
99332e4ec2 | ||
|
6f944ab117 | ||
|
1f9ac53c28 | ||
|
a80c4a7f48 | ||
|
0fa1220eca | ||
|
d7b947dd79 | ||
|
3b2c012723 | ||
|
2e54afb295 | ||
|
c19b692a66 | ||
|
b1885badda | ||
|
2a05af22e1 | ||
|
4eb6304076 | ||
|
9298b074fc | ||
|
b520994960 | ||
|
171f755c13 | ||
|
5691046dcc | ||
|
36927a7bbd | ||
|
4d0c03fd4a | ||
|
f663176a5d | ||
|
ba1eb298de | ||
|
8bcdd9c068 | ||
|
46b1bafa17 | ||
|
a711f4d86e | ||
|
20ea0ee190 | ||
|
74c2c6c74f | ||
|
aa22d80c3f | ||
|
0e315cbd8f | ||
|
6b3746f3a6 | ||
|
bfb8b46d7d | ||
|
b5029ab940 | ||
|
8b7eed3ffc | ||
|
eaa18d4e3c | ||
|
f4dc8dca8d | ||
|
0efe9a4d0f | ||
|
f1aea5176d | ||
|
96560ed3ca | ||
|
dc52cfb9bc | ||
|
f62884ffda | ||
|
f4bf53402f | ||
|
ba109a4c53 | ||
|
3a9633f553 | ||
|
7bef4a5c70 | ||
|
e82c8d2f70 | ||
|
367f08c1b5 | ||
|
a4b35f275c | ||
|
c2adaf41c0 | ||
|
517d7f04c6 | ||
|
c59d5eef45 | ||
|
951128389d | ||
|
a583a9abe0 | ||
|
7a4244ac8b | ||
|
d59536a71c | ||
|
f4110c43a7 | ||
|
76483f9c7b | ||
|
4c7c703ea2 | ||
|
9061028ce5 | ||
|
0bdd21b4e4 | ||
|
636a90386b | ||
|
db868ea400 | ||
|
99c7fc4049 | ||
|
75db253370 | ||
|
6331eb1d8a | ||
|
169cbe90a5 | ||
|
f5c75a5f55 | ||
|
3b5d9459f3 | ||
|
bf995d659b | ||
|
5e5ca2138e | ||
|
63b50ff92c | ||
|
927f398658 | ||
|
f0cc8c0d54 | ||
|
be6840f6a9 | ||
|
15d10e47ea | ||
|
eac1daa5f7 | ||
|
b8aac357cb | ||
|
fd3bfdae80 | ||
|
0a23072938 | ||
|
76b4da6212 | ||
|
0885d8fce7 | ||
|
f975c0603c | ||
|
ad68318515 | ||
|
c9ba8e989e | ||
|
47ac8b6c03 | ||
|
bc0b42ee53 | ||
|
07baf17c2a | ||
|
229740f557 | ||
|
42dd79a32d | ||
|
c38e1635ea | ||
|
84a614dddc | ||
|
f1c70ce53c | ||
|
02f9d03f57 | ||
|
bc85357235 | ||
|
e1e697a3ff | ||
|
10486db091 | ||
|
e1ae052185 | ||
|
22ca57b1f2 | ||
|
4f1baece33 | ||
|
0aaeea4837 | ||
|
8a793f64bf | ||
|
9424047214 | ||
|
6860bb7349 | ||
|
5b3e156197 | ||
|
745cdd89fd | ||
|
6f5dfc576f | ||
|
54a1694a2b | ||
|
14717b8ecb | ||
|
3ed1c31678 | ||
|
b6baf78812 | ||
|
2af20b0d83 | ||
|
cc583b6189 | ||
|
da0ab005c7 | ||
|
50aa0f5564 | ||
|
f686b1df98 | ||
|
48c621532c | ||
|
7d756e79ae | ||
|
8447412c77 | ||
|
e67263cc0e | ||
|
41496e035a | ||
|
e40451a3f7 | ||
|
154473d3b3 | ||
|
fd3d3c4158 | ||
|
b06790dfe5 | ||
|
195b94c1f1 | ||
|
90c01f8d92 | ||
|
679f8f1f36 | ||
|
e9b44af469 | ||
|
0425bd0fd6 | ||
|
e13fb2e366 | ||
|
26bb3d40d9 | ||
|
7af9de353b | ||
|
b0169de7c4 | ||
|
e042710eaa | ||
|
2b9a8e5605 | ||
|
bdf4a5249d | ||
|
82cacec8eb | ||
|
290e127a4f | ||
|
32763b7af6 | ||
|
1781fcb9ef | ||
|
16451b01e8 | ||
|
bb6cca3056 | ||
|
b48975f116 | ||
|
1cc9e0d37f | ||
|
ad43ba5ec7 | ||
|
57bdb6cac2 | ||
|
1dca54c165 | ||
|
67a74a9357 | ||
|
7db30d12cb | ||
|
0f8bd509b2 | ||
|
d1e88c40d8 | ||
|
46ef678f55 | ||
|
d76210d24f | ||
|
4dfe05db24 | ||
|
3634026436 | ||
|
455b23c6f1 | ||
|
b2fb004414 | ||
|
1e7f651b1b | ||
|
c94cd531f0 | ||
|
40cd5c57c5 | ||
|
753a3072ee | ||
|
43191ff426 | ||
|
7728db0dd3 | ||
|
6e12642151 | ||
|
ebe2aadb4c | ||
|
c9d425dc08 | ||
|
5f2467b453 | ||
|
3b1840b7a9 | ||
|
50b27bebd8 | ||
|
7624e9482c | ||
|
642c0bc367 | ||
|
98eb8cb741 | ||
|
2188895b40 | ||
|
40eef6a066 | ||
|
b51c767296 | ||
|
843cd01308 | ||
|
22357f70c2 | ||
|
04fe3a79b9 | ||
|
34a4f6e60e | ||
|
15b520f4a2 | ||
|
5d4812d1a6 | ||
|
f3afbfbcec | ||
|
0e238c87cb | ||
|
89d349ae1c | ||
|
95d5343eb4 | ||
|
214eab2c52 | ||
|
8f2883a388 | ||
|
fb0871dbc8 | ||
|
9dc3e39fc2 | ||
|
a7a8ebcd77 | ||
|
d98face501 | ||
|
cb14431ee5 | ||
|
3c5cb093de | ||
|
cfe249debe | ||
|
78b4f10cc6 | ||
|
46cbee1585 | ||
|
78ea536c95 | ||
|
1a00b1af24 | ||
|
1eb0affdea | ||
|
0d498f12b9 | ||
|
f111395044 | ||
|
0c3260b1b4 | ||
|
e1f0cd65af | ||
|
e972a8805d | ||
|
f5d64239cb | ||
|
00465d5e41 | ||
|
126cb824ea | ||
|
ecfc940381 | ||
|
e757063d31 | ||
|
131b6f90e0 | ||
|
b879dd59c6 | ||
|
b6ad512e34 | ||
|
363604c6f0 | ||
|
e4598e8821 | ||
|
fffd373652 | ||
|
f8f732e78c | ||
|
e0d85a7e58 | ||
|
97441b62d1 | ||
|
8ad650582a | ||
|
02ad2b78fa | ||
|
cef7edaea9 | ||
|
83abaafdfa | ||
|
a55acae5ee | ||
|
8d4261efba | ||
|
56b2f6c4cf | ||
|
0d65ef6f6e | ||
|
c5cd4bc5cf | ||
|
460c266e04 | ||
|
831903799b | ||
|
1d8c607c15 | ||
|
83671ebf76 | ||
|
84c27eea2a | ||
|
e1550c9091 | ||
|
259d5ef60b | ||
|
9aa6c5b951 | ||
|
c4bfaa6031 | ||
|
f3810cebea | ||
|
fda8f1afa3 | ||
|
eed4de1da9 | ||
|
8aea0fc7ee | ||
|
ec0cf25097 | ||
|
49fc210833 | ||
|
f3c33b29dd | ||
|
8057ed408c | ||
|
ec7a541263 | ||
|
a55cec1954 | ||
|
6e58c6c513 | ||
|
647694d1b9 | ||
|
7ae1d73781 | ||
|
be74f65864 | ||
|
b5d63a31cc | ||
|
c77f62a738 | ||
|
52df7f6fe5 | ||
|
ad5bd91a13 | ||
|
e805b97520 | ||
|
c89c7e8fed | ||
|
19bbbf994c | ||
|
3a163002d7 | ||
|
132a9d7d35 | ||
|
d8b4114296 | ||
|
0b50e2e270 | ||
|
0358271b93 | ||
|
929e15260d | ||
|
4bb578f9fb | ||
|
aa847de043 | ||
|
9bad66b24d | ||
|
78a0a755c5 | ||
|
0575853be1 | ||
|
a78f8afe58 | ||
|
2cdd873681 | ||
|
4b93b8b574 | ||
|
8379922f8a | ||
|
d2127b38de | ||
|
2837d848ed | ||
|
665261efc5 | ||
|
191e64bfa1 | ||
|
6f04ea18e4 | ||
|
7d1631f9f4 | ||
|
46b5437fdf | ||
|
461148c227 | ||
|
3960283a67 | ||
|
f1bc3b4f3d | ||
|
a5a1253185 | ||
|
564dbc7b94 | ||
|
e433f3116d | ||
|
73b7d34460 | ||
|
7072dfc99f | ||
|
361532418c | ||
|
a51c8c17e0 | ||
|
56f4b8a2b8 | ||
|
b3c573f798 | ||
|
a4eba8e827 | ||
|
4f426b723f | ||
|
4d12de8149 | ||
|
9dcf40e261 | ||
|
0f69697acb | ||
|
481f420a89 | ||
|
d1b9a5adcc | ||
|
74710116f6 | ||
|
91444a0545 | ||
|
a8a779c79b | ||
|
e652369f22 | ||
|
cc4ddd28c3 | ||
|
0ebe817a28 | ||
|
cdca420a2e | ||
|
2e6c9b8f98 | ||
|
fb738bc247 | ||
|
cef92fbcaa | ||
|
cc2e13873f | ||
|
81e7e4b216 | ||
|
1fcfb07421 | ||
|
d7c2cb17f3 | ||
|
c015ac1344 | ||
|
e584444aa3 | ||
|
b3bce086b3 | ||
|
2968cf5a99 | ||
|
adbff4056f | ||
|
78ae9613c5 | ||
|
2a4798cfa6 | ||
|
5c62a00134 | ||
|
41b3942833 | ||
|
84a341dce5 | ||
|
3563b88d8c | ||
|
95a30b2b3e | ||
|
a3967ccdb4 | ||
|
e1132db197 | ||
|
0f93edb377 | ||
|
4fa501c8d5 | ||
|
d14e57f6a8 | ||
|
80092b6367 | ||
|
201f2817ca | ||
|
17ac63d23a | ||
|
c8bbecda26 | ||
|
a7d45231b7 | ||
|
ec0dfb32b5 | ||
|
746f2e091d | ||
|
269ce12614 | ||
|
388548ba47 | ||
|
3b92cd1c1a | ||
|
1ea5f8f092 | ||
|
c80151adde | ||
|
d361579618 | ||
|
12364b197a | ||
|
81ad575b22 | ||
|
9a956f5ed0 | ||
|
40385e13e7 | ||
|
90b04e8cc0 | ||
|
7b8177f48e | ||
|
a5440e0e43 | ||
|
e134fc5f1e | ||
|
99a04357d1 | ||
|
4e8c178aec | ||
|
0cee59cbe6 | ||
|
9e5b50c866 | ||
|
1d3427780a | ||
|
1e5b316ac4 | ||
|
c13b29662e | ||
|
3b474a12f9 | ||
|
eb49193309 | ||
|
8695383d35 | ||
|
56a6c95730 | ||
|
440a693fae | ||
|
4695aaa830 | ||
|
34a5f2319c | ||
|
da2b58f66e | ||
|
b3739bea92 | ||
|
1c3048ccc2 | ||
|
5a7d45fdfa | ||
|
53d0a309cc | ||
|
c10f9b8269 | ||
|
5040be1640 | ||
|
d94abffd9a | ||
|
4719d32295 | ||
|
4f2f9494b0 | ||
|
c6ab149c56 | ||
|
394331f206 | ||
|
8a309c30a9 | ||
|
466e071c97 | ||
|
82cb298c5c | ||
|
5810c88c00 | ||
|
62bbad62fc | ||
|
5ac7e70e4b | ||
|
5c845d4ecc | ||
|
6ec68f66a9 | ||
|
cfaea1ea6d | ||
|
4a21d94871 | ||
|
e656093d85 | ||
|
562ed2a025 | ||
|
4563b6379d | ||
|
725814ce01 | ||
|
93402620de | ||
|
65f9bbbfed | ||
|
0eee36cbc7 | ||
|
fc50567fc2 | ||
|
e791ff4c5c | ||
|
8f5bcb0f1c | ||
|
af8c748e9c | ||
|
3e5d4bb69c | ||
|
c055c80c6f | ||
|
a4c18b1434 | ||
|
4df0d9c035 | ||
|
32fc983ef8 | ||
|
b0d7feb292 | ||
|
c3ecf599ad | ||
|
86038e6a71 | ||
|
7bf467c653 | ||
|
869bf85e9a | ||
|
c08fc85b72 | ||
|
39b511070a | ||
|
5559f35905 | ||
|
6f3c767b99 | ||
|
121328eced | ||
|
fb67d948b6 | ||
|
7cdeb51670 | ||
|
8879380427 | ||
|
e5f638b378 | ||
|
4dcd7f0271 | ||
|
c0f57df4e6 | ||
|
8f33dfe4f1 | ||
|
79663789bd | ||
|
9d3143231c | ||
|
7459d9c333 | ||
|
f2f24bb2cd | ||
|
f42b8acf47 | ||
|
78a32a3c0f | ||
|
ddc658f8c8 | ||
|
7153bc8d8f | ||
|
8e8671323a | ||
|
c2be12f009 | ||
|
9434cae458 | ||
|
2951788afc | ||
|
345d55669e | ||
|
4e1733222f | ||
|
dcc662ff1a | ||
|
67c531298a | ||
|
77d2172441 | ||
|
f7a8e2409c | ||
|
55ccec4a38 | ||
|
c977011d2f | ||
|
b87bca2e46 | ||
|
55b50171f8 | ||
|
596f4cdf0e | ||
|
c25447097e | ||
|
6862c9aad7 | ||
|
099e685bff | ||
|
1926900945 | ||
|
33afc00c3a | ||
|
3109bd245f | ||
|
8b66e9f78d | ||
|
4e0757ed55 | ||
|
46720e756b | ||
|
40211642ca | ||
|
444016df7e | ||
|
15c9bb0e83 | ||
|
5631a31640 | ||
|
a76e8f0211 | ||
|
283442b42f | ||
|
d69341fd31 | ||
|
65cd3be4ca | ||
|
174b5c0f95 | ||
|
48c51bd9ef | ||
|
927dc6d95c | ||
|
f41829707d | ||
|
052473e048 | ||
|
e1cf1f500d | ||
|
41d64a200d | ||
|
284f473a52 | ||
|
62780e4e43 | ||
|
9091223396 | ||
|
dd3f24614b | ||
|
ac2e8c2602 | ||
|
38f1cc2652 | ||
|
1bc27135e3 | ||
|
ee72d99947 | ||
|
f09a95453e | ||
|
e952013fe0 | ||
|
f8177902a5 | ||
|
4b2db61120 | ||
|
248220fef3 | ||
|
62c47cb1b7 | ||
|
da9e45b582 | ||
|
202c1046a1 | ||
|
468d7ea80e | ||
|
ab7e794f23 | ||
|
ee974414d2 | ||
|
851995d444 | ||
|
e8b0fdd6cc | ||
|
a8b4e14bf5 | ||
|
8447d6ea1c | ||
|
63d2d1ebe8 | ||
|
668d5f65dc | ||
|
99e1e028c0 | ||
|
f0352d2f7d | ||
|
c8b704e4a3 | ||
|
fc2fd9fd3c | ||
|
817a62468e | ||
|
55f78a0b94 | ||
|
9aabe98e4e | ||
|
04933ac863 | ||
|
122fe22a32 | ||
|
49ffb7b120 | ||
|
3218c36b22 | ||
|
abe85fd3e0 | ||
|
f4c1d827d5 | ||
|
115aa61d04 | ||
|
333f35ef25 | ||
|
f95803664b | ||
|
e40ede5db2 | ||
|
ff4d37cbc8 | ||
|
0351b864d0 | ||
|
a86ee7e7f5 | ||
|
b1f74660df | ||
|
1c5947d93b | ||
|
cf84c46a49 | ||
|
0677d7a214 | ||
|
9b8de8d320 | ||
|
4e8b8887df | ||
|
5dd1e7c32e | ||
|
edc027a8bc | ||
|
0bb1c05aff | ||
|
cbb13fa39b | ||
|
91d4044162 | ||
|
e885088632 | ||
|
ba9273d1cc | ||
|
5f9abd1db4 | ||
|
0939082aca | ||
|
3a1a3fc75e | ||
|
a1a98966ee | ||
|
195929953b | ||
|
3d0d1a26df | ||
|
3ab118837a | ||
|
3c111202e1 | ||
|
db43c601fc | ||
|
d55e41a19e | ||
|
a89c29c2ca | ||
|
95638d5ca5 | ||
|
6d728ec7ed | ||
|
7b24b42711 | ||
|
8f7eb2d0e9 | ||
|
c284cf72e1 | ||
|
2c0f986c52 | ||
|
0a4453b912 | ||
|
092d42e981 | ||
|
c2e9c877dd | ||
|
400da1aa8d | ||
|
94f861588d | ||
|
dfdd819e3e | ||
|
43fd8fa44a | ||
|
2dc5755799 | ||
|
8abc43a03d | ||
|
7fe4df85ab | ||
|
8a409d86d4 | ||
|
ab5240d8d2 | ||
|
14dc136832 | ||
|
aba2b29074 | ||
|
433d9459e0 | ||
|
5eebb04de9 | ||
|
fac21a5362 | ||
|
0931802151 | ||
|
fb2c035c05 | ||
|
7e890def48 | ||
|
08182f814f | ||
|
8d8bb05055 | ||
|
39fed1f469 | ||
|
953fb14638 | ||
|
f2a989b9da | ||
|
b0b74243af | ||
|
188eebb92a | ||
|
adf4b635f7 | ||
|
1e08099036 | ||
|
32435674f2 | ||
|
b1b4c8c487 | ||
|
be4c38bf1c | ||
|
ccfb1bbfa8 | ||
|
87773a417b | ||
|
aa5c1c10df | ||
|
3c8e25e8e4 | ||
|
5585e42677 | ||
|
8a4e03228a | ||
|
e7c4ffe032 | ||
|
3001b007f6 | ||
|
9aa1c13c7e | ||
|
d2ac92481b | ||
|
0fd1ab674b | ||
|
af26c945b1 | ||
|
876445faf1 | ||
|
f93677b953 | ||
|
8b88344679 | ||
|
e9ede8d627 | ||
|
27447537c3 | ||
|
e752f04cde | ||
|
cafd40f2c2 | ||
|
3c0c921ef5 | ||
|
3e22622508 | ||
|
8caca4df32 | ||
|
40e8a40ada | ||
|
a57ccf9112 | ||
|
32556ad0d8 | ||
|
8bb1e8fcdb | ||
|
715ac8a279 | ||
|
f1c23d514b | ||
|
722a0e36be | ||
|
028be3ba5d | ||
|
306279901f | ||
|
cfbd869126 | ||
|
8acefd25e7 | ||
|
bab00dbca8 | ||
|
f587931ed3 | ||
|
91d57e830b | ||
|
5be807fc8a | ||
|
3f1061de56 | ||
|
2a19d915e8 | ||
|
1e3d034f96 | ||
|
ec8e5d5ef1 | ||
|
7aa868562c | ||
|
3d1e332c6f | ||
|
5789d1a5fb | ||
|
7f4265834a | ||
|
714605c6a7 | ||
|
0a9c437ec8 | ||
|
b82993c568 | ||
|
0211b7e38e | ||
|
14f7dc3527 | ||
|
e612e881ac | ||
|
8db1beaec6 | ||
|
2a953391ef | ||
|
51bf98a7b5 | ||
|
14c2be8c67 | ||
|
e36c4d5f75 | ||
|
b8a443c728 | ||
|
ea8ad35947 | ||
|
00543fe640 | ||
|
e5e1aba241 | ||
|
41fd1c84cf | ||
|
bf41ab6c40 | ||
|
aa5293e3ad | ||
|
cd9fc5d0e9 | ||
|
f1b23c616e | ||
|
f623613d12 | ||
|
07f451650f | ||
|
0b59ebb22f | ||
|
f347d3df18 | ||
|
f938829f12 | ||
|
fea2593ab4 | ||
|
1793fd4df0 | ||
|
a88850fec6 | ||
|
0b672a08ac | ||
|
4fb2247196 | ||
|
71a82199ed | ||
|
7d546f32d8 | ||
|
1940ac0fec | ||
|
dad5953e8c | ||
|
8ee672fe32 | ||
|
cde84e4bac | ||
|
119e03cb58 | ||
|
c076ba69e8 | ||
|
57e762468f | ||
|
2266622dcf | ||
|
941a668f78 | ||
|
9524f94749 | ||
|
6f543b5bd9 | ||
|
8eacb88a86 | ||
|
e1ecfb8dd1 | ||
|
7ffa581d4b | ||
|
357b7829c3 | ||
|
6acfdd5e33 | ||
|
9e618c0e0c | ||
|
d05846a327 | ||
|
17abbcd74d | ||
|
77da8bac00 | ||
|
22a2741ea0 | ||
|
874508f8c2 | ||
|
642dedea8c | ||
|
7fbe15de28 | ||
|
37f4bad2b7 | ||
|
15ae7a094d | ||
|
98f0cb65d7 | ||
|
2380f2f9c9 | ||
|
c019b54fec | ||
|
920acb8d8b | ||
|
74b091fd08 | ||
|
6bf93071cf | ||
|
c66db95378 | ||
|
f0b75289c8 | ||
|
eb844b9b63 | ||
|
fda4f06518 | ||
|
3dc0f6d831 | ||
|
0835dc71b3 | ||
|
f658fc58d1 | ||
|
4a5850628e | ||
|
b00a321b5e | ||
|
394a14626b | ||
|
4ebb90c774 | ||
|
5f4d03172f | ||
|
b0860d6e8c | ||
|
5b6e0ab238 | ||
|
3d0aacd43d | ||
|
7153838c4e | ||
|
2002e37ce9 | ||
|
07f4a0305b | ||
|
c0d43a1a5f | ||
|
36044043bc | ||
|
99ac10a417 | ||
|
7bf168e47f | ||
|
7e525a59e4 | ||
|
b1a024efbd | ||
|
7b68004a40 | ||
|
6c215e672d | ||
|
086c5802f4 | ||
|
9f6261524b | ||
|
d6d1ec4f22 | ||
|
57a3c0132d | ||
|
bd3371bdfb | ||
|
286a288bfd | ||
|
471ebdb4f0 | ||
|
18a36c5daa | ||
|
3f1be5a4ce | ||
|
cd4f48cb8d | ||
|
cea6d87472 | ||
|
2226175d9b | ||
|
ff18b89e66 | ||
|
20b4cd2a32 | ||
|
001b94e802 | ||
|
23bb5f09fd | ||
|
82bd780a6b | ||
|
3d95ad0e3a | ||
|
16e1d679dc | ||
|
fde1726af5 | ||
|
add6eeeb8a | ||
|
d7d28aa8da | ||
|
5976300788 | ||
|
df8284c5f8 | ||
|
15d6b095f7 | ||
|
c71385ec90 | ||
|
9ed07f6f6e | ||
|
8c9d7d1a08 | ||
|
8f2d71d458 | ||
|
f9ae945a55 | ||
|
c4506da0ae | ||
|
6904764aab | ||
|
e968b1c23f | ||
|
2a0629477b | ||
|
5054827441 | ||
|
c55d7fbb6a | ||
|
c83ac654ce | ||
|
3d04765a3f | ||
|
e98fab4b58 | ||
|
e585330744 | ||
|
b41664ac61 | ||
|
96cd79f272 | ||
|
da00235eaf | ||
|
9f42a12baf | ||
|
17c47bcd96 | ||
|
c45af9a2ca | ||
|
8fbd9187f8 | ||
|
e1fecda74f | ||
|
ce158290fb | ||
|
7be35c3997 | ||
|
bf239ebc04 | ||
|
8e281575b5 | ||
|
6ae92c0aac | ||
|
0c52d02043 | ||
|
85f45d2788 | ||
|
8a15d68a8d | ||
|
f5618e0342 | ||
|
b64dcd2f56 | ||
|
7ab851592b | ||
|
4fd7f67459 | ||
|
f7b458c85a | ||
|
75d2181489 | ||
|
176d222519 | ||
|
ed0a9c0e4e | ||
|
a547b2774f | ||
|
f45cad6bc9 | ||
|
46ac48c311 | ||
|
f98b9f7726 | ||
|
204bba9be8 | ||
|
aa4c6c0178 | ||
|
fe389e560a | ||
|
f068f13e4a | ||
|
76f440889b | ||
|
29183354cc | ||
|
0b015daff7 | ||
|
9ec75c3feb | ||
|
7b16085c59 | ||
|
b7fe08519f | ||
|
72440a4996 |
@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
|
||||
fi
|
||||
|
||||
# Default clang-format points to default 3.5 version one
|
||||
CLANG_FORMAT=clang-format-17
|
||||
CLANG_FORMAT=clang-format-19
|
||||
$CLANG_FORMAT --version
|
||||
|
||||
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||
|
76
.github/ISSUE_TEMPLATE/app-bug-report.yaml
vendored
Normal file
76
.github/ISSUE_TEMPLATE/app-bug-report.yaml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: Application Bug Report
|
||||
description: Problem with the application itself (ie. bad file path handling, UX issue)
|
||||
title: "[APP BUG]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
**Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only.
|
||||
If you have a support request or are unsure about the nature of your issue please contact us on [discord](https://discord.gg/bFJxfftGW6).**
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I have searched for a similar issue in this repository and did not find one.
|
||||
required: true
|
||||
- label: I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
label: Describe the Bug
|
||||
description: "A clear and concise description of what the bug is"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: "Detailed steps to reproduce the behavior"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: "A clear and concise description of what you expected to happen"
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Specify OS Version
|
||||
placeholder: "Example: Windows 11, Arch Linux, MacOS 15"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: cpu
|
||||
attributes:
|
||||
label: CPU
|
||||
placeholder: "Example: Intel Core i7-8700"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: gpu
|
||||
attributes:
|
||||
label: GPU
|
||||
placeholder: "Example: nVidia GTX 1650"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: ram
|
||||
attributes:
|
||||
label: Amount of RAM in GB
|
||||
placeholder: "Example: 16 GB"
|
||||
validations:
|
||||
required: true
|
10
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
10
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord
|
||||
url: https://discord.gg/bFJxfftGW6
|
||||
about: Get direct support and hang out with us
|
||||
- name: Wiki
|
||||
url: https://github.com/shadps4-emu/shadPS4/wiki
|
||||
about: Information, guides, etc.
|
54
.github/ISSUE_TEMPLATE/feature-request.yaml
vendored
Normal file
54
.github/ISSUE_TEMPLATE/feature-request.yaml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: Feature Request
|
||||
description: Suggest a new feature or improve an existing one
|
||||
title: "[Feature Request]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
|
||||
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I have searched for a similar issue in this repository and did not find one.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
label: Description
|
||||
description: |
|
||||
A concise description of the feature you want
|
||||
|
||||
Include step by step examples of how the feature should work under various circumstances
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reason
|
||||
attributes:
|
||||
label: Reason
|
||||
description: |
|
||||
Give a reason why you want this feature
|
||||
- How will it make things easier for you?
|
||||
- How does this feature help your enjoyment of the emulator?
|
||||
- What does it provide that isn't being provided currently?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: examples
|
||||
attributes:
|
||||
label: Examples
|
||||
description: |
|
||||
Provide examples of the feature as implemented by other software
|
||||
|
||||
Include screenshots or video if you like to help demonstrate how you'd like this feature to work
|
||||
validations:
|
||||
required: false
|
95
.github/ISSUE_TEMPLATE/game-bug-report.yaml
vendored
Normal file
95
.github/ISSUE_TEMPLATE/game-bug-report.yaml
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: Game Emulation Bug Report
|
||||
description: Problem in a game (ie. graphical artifacts, crashes, etc.)
|
||||
title: "[GAME BUG]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
**Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only.
|
||||
If you have a support request or are unsure about the nature of your issue please contact us on [discord](https://discord.gg/bFJxfftGW6).**
|
||||
|
||||
This repository does not provide support for modded games. You should perform and test a clean game installation before submitting an issue.
|
||||
|
||||
This repository does not provide support for game patches. If you are having issues with patches please refer to [Cheats and Patches Repository](https://github.com/shadps4-emu/ps4_cheats).
|
||||
|
||||
Before submitting an issue please check [Game Compatibility Repository](https://github.com/shadps4-compatibility/shadps4-game-compatibility) for the information about the status of the game.
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy, our rules specifically prohibit this. Otherwise your issue will be closed and you will be banned in this repository.
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist (we expect you to perform these steps before opening the issue)
|
||||
options:
|
||||
- label: I have searched for a similar issue in this repository and did not find one.
|
||||
required: true
|
||||
- label: I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater.
|
||||
required: true
|
||||
- label: I have re-dumped the game and performed a clean install without mods and the issue is still present.
|
||||
required: true
|
||||
- label: I have disabled all patches and cheats and the issue is still present.
|
||||
required: true
|
||||
- label: I have all the required [system modules](https://github.com/shadps4-emu/shadPS4/wiki/I.-Quick-start-%5BUsers%5D#4-adding-modules) installed.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
label: Describe the Bug
|
||||
description: "A clear and concise description of what the bug is"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: "Detailed steps to reproduce the behavior"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Specify OS Version
|
||||
placeholder: "Example: Windows 11, Arch Linux, MacOS 15"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: cpu
|
||||
attributes:
|
||||
label: CPU
|
||||
placeholder: "Example: Intel Core i7-8700"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: gpu
|
||||
attributes:
|
||||
label: GPU
|
||||
placeholder: "Example: nVidia GTX 1650"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: ram
|
||||
attributes:
|
||||
label: Amount of RAM in GB
|
||||
placeholder: "Example: 16 GB"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: vram
|
||||
attributes:
|
||||
label: Amount of VRAM in GB
|
||||
placeholder: "Example: 8 GB"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: "Log File"
|
||||
description: Drag and drop the log file here. It can be found by right clicking on a game name -> Open Folder... -> Open Log Folder. Make sure that the log type is set to `sync`.
|
||||
validations:
|
||||
required: true
|
4
.github/linux-appimage-qt.sh
vendored
4
.github/linux-appimage-qt.sh
vendored
@ -27,7 +27,7 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
|
||||
cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin
|
||||
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --plugin qt
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --plugin qt
|
||||
rm AppDir/usr/plugins/multimedia/libgstreamermediaplugin.so
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
|
||||
mv Shadps4-x86_64.AppImage Shadps4-qt.AppImage
|
||||
mv shadPS4-x86_64.AppImage Shadps4-qt.AppImage
|
||||
|
4
.github/linux-appimage-sdl.sh
vendored
4
.github/linux-appimage-sdl.sh
vendored
@ -17,5 +17,5 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
# Build AppImage
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
||||
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --output appimage
|
||||
mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --output appimage
|
||||
mv shadPS4-x86_64.AppImage Shadps4-sdl.AppImage
|
||||
|
9
.github/shadps4.desktop
vendored
9
.github/shadps4.desktop
vendored
@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Shadps4
|
||||
Exec=shadps4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=shadps4
|
||||
Comment=shadps4 emulator
|
||||
Categories=Game;
|
||||
StartupWMClass=shadps4;
|
183
.github/workflows/build.yml
vendored
183
.github/workflows/build.yml
vendored
@ -14,14 +14,14 @@ env:
|
||||
|
||||
jobs:
|
||||
reuse:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: fsfe/reuse-action@v4
|
||||
- uses: fsfe/reuse-action@v5
|
||||
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -30,16 +30,16 @@ jobs:
|
||||
- name: Install
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
|
||||
sudo apt update
|
||||
sudo apt install clang-format-17
|
||||
sudo apt install clang-format-19
|
||||
- name: Build
|
||||
env:
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
run: ./.ci/clang-format.sh
|
||||
|
||||
get-info:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
date: ${{ steps.vars.outputs.date }}
|
||||
shorthash: ${{ steps.vars.outputs.shorthash }}
|
||||
@ -57,7 +57,7 @@ jobs:
|
||||
echo "fullhash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
windows-sdl:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2025
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -76,23 +76,18 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
|
||||
with:
|
||||
append-timestamp: false
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Setup VS Environment
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: amd64
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
||||
|
||||
- name: Upload Windows SDL artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@ -101,7 +96,7 @@ jobs:
|
||||
path: ${{github.workspace}}/build/shadPS4.exe
|
||||
|
||||
windows-qt:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2025
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -111,10 +106,10 @@ jobs:
|
||||
- name: Setup Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.7.3
|
||||
version: 6.9.1
|
||||
host: windows
|
||||
target: desktop
|
||||
arch: win64_msvc2019_64
|
||||
arch: win64_msvc2022_64
|
||||
archives: qtbase qttools
|
||||
modules: qtmultimedia
|
||||
|
||||
@ -130,23 +125,18 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-cache-cmake-build
|
||||
with:
|
||||
append-timestamp: false
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Setup VS Environment
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: amd64
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
||||
|
||||
- name: Deploy and Package
|
||||
run: |
|
||||
@ -162,7 +152,7 @@ jobs:
|
||||
path: upload/
|
||||
|
||||
macos-sdl:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -174,11 +164,6 @@ jobs:
|
||||
with:
|
||||
xcode-version: latest
|
||||
|
||||
- name: Install MoltenVK
|
||||
run: |
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
arch -x86_64 /usr/local/bin/brew install molten-vk
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
@ -191,7 +176,7 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{runner.os}}-sdl-cache-cmake-build
|
||||
with:
|
||||
@ -201,7 +186,7 @@ jobs:
|
||||
variant: sccache
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
||||
@ -210,15 +195,15 @@ jobs:
|
||||
run: |
|
||||
mkdir upload
|
||||
mv ${{github.workspace}}/build/shadps4 upload
|
||||
cp $(arch -x86_64 /usr/local/bin/brew --prefix)/opt/molten-vk/lib/libMoltenVK.dylib upload
|
||||
tar cf shadps4-macos-sdl.tar.gz -C upload .
|
||||
mv ${{github.workspace}}/build/MoltenVK_icd.json upload
|
||||
mv ${{github.workspace}}/build/libMoltenVK.dylib upload
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-macos-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||
path: shadps4-macos-sdl.tar.gz
|
||||
path: upload/
|
||||
|
||||
macos-qt:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -230,19 +215,19 @@ jobs:
|
||||
with:
|
||||
xcode-version: latest
|
||||
|
||||
- name: Install MoltenVK and Setup Qt
|
||||
run: |
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
arch -x86_64 /usr/local/bin/brew install molten-vk
|
||||
- uses: jurplel/install-qt-action@v4
|
||||
- name: Setup Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.7.3
|
||||
version: 6.9.1
|
||||
host: mac
|
||||
target: desktop
|
||||
arch: clang_64
|
||||
archives: qtbase qttools
|
||||
modules: qtmultimedia
|
||||
|
||||
|
||||
- name: Workaround Qt <=6.9.1 issue
|
||||
run: sed -i '' '/target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_agl_fw_path})/d' ${{env.QT_ROOT_DIR}}/lib/cmake/Qt6/FindWrapOpenGL.cmake
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
@ -255,7 +240,7 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{runner.os}}-qt-cache-cmake-build
|
||||
with:
|
||||
@ -265,7 +250,7 @@ jobs:
|
||||
variant: sccache
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
||||
@ -289,8 +274,13 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Add LLVM repository
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang-19 mold build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
@ -304,7 +294,7 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
|
||||
with:
|
||||
@ -312,10 +302,10 @@ jobs:
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
- name: Package and Upload Linux(ubuntu64) SDL artifact
|
||||
run: |
|
||||
@ -345,8 +335,13 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Add LLVM repository
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang-19 mold build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
@ -360,7 +355,7 @@ jobs:
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-cache-cmake-build
|
||||
with:
|
||||
@ -368,10 +363,10 @@ jobs:
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel3
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
- name: Run AppImage packaging script
|
||||
run: ./.github/linux-appimage-qt.sh
|
||||
@ -384,6 +379,78 @@ jobs:
|
||||
name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||
path: Shadps4-qt.AppImage
|
||||
|
||||
linux-sdl-gcc:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 mold build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-configuration
|
||||
with:
|
||||
path: |
|
||||
${{github.workspace}}/build
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
restore-keys: |
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-build
|
||||
with:
|
||||
append-timestamp: false
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
linux-qt-gcc:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 mold build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||
|
||||
- name: Cache CMake Configuration
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-configuration
|
||||
with:
|
||||
path: |
|
||||
${{github.workspace}}/build
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
restore-keys: |
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake Build
|
||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-build
|
||||
with:
|
||||
append-timestamp: false
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
pre-release:
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push'
|
||||
needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt]
|
||||
@ -420,7 +487,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||
name: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
|
||||
tag: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
|
||||
tag: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.fullhash }}"
|
||||
draft: false
|
||||
prerelease: true
|
||||
body: "Full Changelog: [${{ env.last_release_tag }}...${{ needs.get-info.outputs.shorthash }}](https://github.com/shadps4-emu/shadPS4/compare/${{ env.last_release_tag }}...${{ needs.get-info.outputs.fullhash }})"
|
||||
@ -456,14 +523,14 @@ jobs:
|
||||
|
||||
# Check if release already exists and get ID
|
||||
release_id=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||
"https://api.github.com/repos/$REPO/releases/tags/Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}" | jq -r '.id')
|
||||
"https://api.github.com/repos/$REPO/releases/tags/Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.fullhash }}" | jq -r '.id')
|
||||
|
||||
if [[ "$release_id" == "null" ]]; then
|
||||
echo "Creating release in $REPO for $filename"
|
||||
release_id=$(curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d '{
|
||||
"tag_name": "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}",
|
||||
"tag_name": "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.fullhash }}",
|
||||
"name": "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}",
|
||||
"draft": false,
|
||||
"prerelease": true,
|
||||
|
11
.github/workflows/scripts/update_translation.sh
vendored
Executable file
11
.github/workflows/scripts/update_translation.sh
vendored
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt-get -y install qt6-l10n-tools python3
|
||||
|
||||
SCRIPT_PATH="src/qt_gui/translations/update_translation.sh"
|
||||
|
||||
chmod +x "$SCRIPT_PATH"
|
||||
|
||||
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPT_PATH"
|
30
.github/workflows/update_translation.yml
vendored
Normal file
30
.github/workflows/update_translation.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Update Translation
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at 12am UTC.
|
||||
workflow_dispatch: # As well as manually.
|
||||
|
||||
jobs:
|
||||
update:
|
||||
if: github.repository == 'shadps4-emu/shadPS4'
|
||||
name: "Update Translation"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set execution permissions for the script
|
||||
run: chmod +x ./.github/workflows/scripts/update_translation.sh
|
||||
|
||||
- name: Update Base Translation
|
||||
run: ./.github/workflows/scripts/update_translation.sh
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||
title: "Qt GUI: Update Translation"
|
||||
commit-message: "[ci skip] Qt GUI: Update Translation."
|
||||
body: "Daily update of translation sources."
|
||||
branch: update-translation
|
||||
delete-branch: true
|
20
.gitignore
vendored
20
.gitignore
vendored
@ -382,13 +382,13 @@ FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.vscode/settings.json
|
||||
.vscode/tasks.json
|
||||
.vscode/launch.json
|
||||
.vscode/extensions.json
|
||||
*.code-workspace
|
||||
/CMakeUserPresets.json
|
||||
/compile_commands.json
|
||||
/CMakeUserPresets.json
|
||||
/compile_commands.json
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
@ -411,6 +411,10 @@ FodyWeavers.xsd
|
||||
/out/*
|
||||
/third-party/out/*
|
||||
/src/common/scm_rev.cpp
|
||||
|
||||
|
||||
# for macOS
|
||||
**/.DS_Store
|
||||
**/.DS_Store
|
||||
|
||||
# JetBrains
|
||||
.idea
|
||||
cmake-build-*
|
||||
|
41
.gitmodules
vendored
41
.gitmodules
vendored
@ -1,15 +1,3 @@
|
||||
[submodule "externals/cryptopp-cmake"]
|
||||
path = externals/cryptopp-cmake
|
||||
url = https://github.com/shadps4-emu/ext-cryptopp-cmake.git
|
||||
shallow = true
|
||||
[submodule "externals/cryptopp"]
|
||||
path = externals/cryptopp
|
||||
url = https://github.com/shadps4-emu/ext-cryptopp.git
|
||||
shallow = true
|
||||
[submodule "externals/cryptoppwin"]
|
||||
path = externals/cryptoppwin
|
||||
url = https://github.com/shadps4-emu/ext-cryptoppwin.git
|
||||
shallow = true
|
||||
[submodule "externals/zlib-ng"]
|
||||
path = externals/zlib-ng
|
||||
url = https://github.com/shadps4-emu/ext-zlib-ng.git
|
||||
@ -42,10 +30,6 @@
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
shallow = true
|
||||
[submodule "externals/winpthreads"]
|
||||
path = externals/winpthreads
|
||||
url = https://github.com/shadps4-emu/winpthreads.git
|
||||
shallow = true
|
||||
[submodule "externals/magic_enum"]
|
||||
path = externals/magic_enum
|
||||
url = https://github.com/Neargye/magic_enum.git
|
||||
@ -98,4 +82,27 @@
|
||||
[submodule "externals/discord-rpc"]
|
||||
path = externals/discord-rpc
|
||||
url = https://github.com/shadps4-emu/ext-discord-rpc.git
|
||||
shallow = true
|
||||
shallow = true
|
||||
[submodule "externals/LibAtrac9"]
|
||||
path = externals/LibAtrac9
|
||||
url = https://github.com/shadps4-emu/ext-LibAtrac9.git
|
||||
shallow = true
|
||||
[submodule "externals/libpng"]
|
||||
path = externals/libpng
|
||||
url = https://github.com/pnggroup/libpng
|
||||
shallow = true
|
||||
[submodule "externals/MoltenVK/SPIRV-Cross"]
|
||||
path = externals/MoltenVK/SPIRV-Cross
|
||||
url = https://github.com/KhronosGroup/SPIRV-Cross
|
||||
shallow = true
|
||||
[submodule "externals/MoltenVK/MoltenVK"]
|
||||
path = externals/MoltenVK/MoltenVK
|
||||
url = https://github.com/KhronosGroup/MoltenVK
|
||||
shallow = true
|
||||
[submodule "externals/MoltenVK/cereal"]
|
||||
path = externals/MoltenVK/cereal
|
||||
url = https://github.com/USCiLab/cereal
|
||||
shallow = true
|
||||
[submodule "externals/ext-libusb"]
|
||||
path = externals/ext-libusb
|
||||
url = https://github.com/shadps4-emu/ext-libusb.git
|
||||
|
21
CMakeLinuxPresets.json
Normal file
21
CMakeLinuxPresets.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": 9,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 30,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "x64-Clang-Base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/Build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/Build/${presetName}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
630
CMakeLists.txt
Executable file → Normal file
630
CMakeLists.txt
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
62
CMakePresets.json
Normal file
62
CMakePresets.json
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"version": 9,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 30,
|
||||
"patch": 0
|
||||
},
|
||||
"include": ["CMake${hostSystemName}Presets.json"],
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "x64-Clang-Debug",
|
||||
"displayName": "Clang x64 Debug",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Debug-Qt",
|
||||
"displayName": "Clang x64 Debug with Qt",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"ENABLE_QT_GUI": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Release",
|
||||
"displayName": "Clang x64 Release",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Release-Qt",
|
||||
"displayName": "Clang x64 Release with Qt",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"ENABLE_QT_GUI": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-RelWithDebInfo",
|
||||
"displayName": "Clang x64 RelWithDebInfo",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-RelWithDebInfo-Qt",
|
||||
"displayName": "Clang x64 RelWithDebInfo with Qt",
|
||||
"inherits": ["x64-Clang-Base"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"ENABLE_QT_GUI": "ON"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -12,6 +12,18 @@
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Release-Qt",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Release",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "-DENABLE_QT_GUI=ON",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Debug",
|
||||
"generator": "Ninja",
|
||||
@ -24,6 +36,18 @@
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Debug-Qt",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "-DENABLE_QT_GUI=ON",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-RelWithDebInfo",
|
||||
"generator": "Ninja",
|
||||
@ -35,6 +59,18 @@
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-RelWithDebInfo-Qt",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "-DENABLE_QT_GUI=ON",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
}
|
||||
]
|
||||
}
|
26
CMakeWindowsPresets.json
Normal file
26
CMakeWindowsPresets.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"version": 9,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 30,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "x64-Clang-Base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/Build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang-cl",
|
||||
"CMAKE_CXX_COMPILER": "clang-cl",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/Build/${presetName}"
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
"intelliSenseMode": "windows-clang-x64"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
75
README.md
75
README.md
@ -13,7 +13,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
<h1 align="center">
|
||||
<a href="https://discord.gg/bFJxfftGW6">
|
||||
<img src="https://img.shields.io/discord/1080089157554155590?color=5865F2&label=shadPS4 Discord&logo=Discord&logoColor=white" width="240">
|
||||
<img src="https://img.shields.io/discord/1080089157554155590?color=5865F2&label=shadPS4%20Discord&logo=Discord&logoColor=white" width="275">
|
||||
<a href="https://github.com/shadps4-emu/shadPS4/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/shadps4-emu/shadPS4/total.svg" width="140">
|
||||
<a href="https://shadps4.net/">
|
||||
@ -36,8 +36,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
**shadPS4** is an early **PlayStation 4** emulator for **Windows**, **Linux** and **macOS** written in C++.
|
||||
|
||||
If you encounter problems or have doubts, do not hesitate to look at the [**Quickstart**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/Quickstart.md).\
|
||||
To verify that a game works, you can look at [**shadPS4 Game Compatibility**](https://github.com/shadps4-emu/shadps4-game-compatibility).\
|
||||
If you encounter problems or have doubts, do not hesitate to look at the [**Quickstart**](https://github.com/shadps4-emu/shadPS4/wiki/I.-Quick-start-%5BUsers%5D).\
|
||||
To verify that a game works, you can look at [**shadPS4 Game Compatibility**](https://github.com/shadps4-compatibility/shadps4-game-compatibility).\
|
||||
To discuss shadPS4 development, suggest ideas or to ask for help, join our [**Discord server**](https://discord.gg/bFJxfftGW6).\
|
||||
To get the latest news, go to our [**X (Twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/).\
|
||||
For those who'd like to donate to the project, we now have a [**Kofi page**](https://ko-fi.com/shadps4)!
|
||||
@ -55,6 +55,9 @@ This project began as a fun project. Given our limited free time, it may take so
|
||||
|
||||
# Building
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to use shadPS4 to play your games, you don't have to follow the build instructions, you can simply download the emulator from either the [**release tab**](https://github.com/shadps4-emu/shadPS4/releases) or the [**action tab**](https://github.com/shadps4-emu/shadPS4/actions).
|
||||
|
||||
## Windows
|
||||
|
||||
Check the build instructions for [**Windows**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md).
|
||||
@ -68,18 +71,28 @@ Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shad
|
||||
Check the build instructions for [**macOS**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-macos.md).
|
||||
|
||||
> [!IMPORTANT]
|
||||
> macOS users need at least macOS 15 on Apple Silicon-based Mac devices and at least macOS 14 on Intel-based Mac devices.
|
||||
> macOS users need at least macOS 15.4 to run shadPS4. Due to GPU issues there are currently heavy bugs on Intel Macs.
|
||||
|
||||
# Debugging and reporting issues
|
||||
|
||||
For more information on how to test, debug and report issues with the emulator or games, read the [**Debugging documentation**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md).
|
||||
|
||||
# Keyboard mapping
|
||||
# Keyboard and Mouse Mappings
|
||||
|
||||
> [!NOTE]
|
||||
> Some keyboards may also require you to hold the Fn key to use the F\* keys. Mac users should use the Command key instead of Control, and need to use Command+F11 for full screen to avoid conflicting with system key bindings.
|
||||
|
||||
| Button | Function |
|
||||
|-------------|-------------|
|
||||
F10 | FPS Counter
|
||||
Ctrl+F10 | Video Debug Info
|
||||
F11 | Fullscreen
|
||||
F12 | Trigger RenderDoc Capture
|
||||
|
||||
> [!NOTE]
|
||||
> Xbox and DualShock controllers work out of the box.
|
||||
|
||||
| Controller button | Keyboard equivelant |
|
||||
| Controller button | Keyboard equivalent |
|
||||
|-------------|-------------|
|
||||
LEFT AXIS UP | W |
|
||||
LEFT AXIS DOWN | S |
|
||||
@ -89,10 +102,10 @@ RIGHT AXIS UP | I |
|
||||
RIGHT AXIS DOWN | K |
|
||||
RIGHT AXIS LEFT | J |
|
||||
RIGHT AXIS RIGHT | L |
|
||||
TRIANGLE | Numpad 8 |
|
||||
CIRCLE | Numpad 6 |
|
||||
CROSS | Numpad 2 |
|
||||
SQUARE | Numpad 4 |
|
||||
TRIANGLE | Numpad 8 or C |
|
||||
CIRCLE | Numpad 6 or B |
|
||||
CROSS | Numpad 2 or N |
|
||||
SQUARE | Numpad 4 or V |
|
||||
PAD UP | UP |
|
||||
PAD DOWN | DOWN |
|
||||
PAD LEFT | LEFT |
|
||||
@ -106,26 +119,54 @@ R2 | O |
|
||||
L3 | X |
|
||||
R3 | M |
|
||||
|
||||
Keyboard and mouse inputs can be customized in the settings menu by clicking the Controller button, and further details and help on controls are also found there. Custom bindings are saved per-game. Inputs support up to three keys per binding, mouse buttons, mouse movement mapped to joystick input, and more.
|
||||
|
||||
|
||||
# Firmware files
|
||||
|
||||
shadPS4 can load some PlayStation 4 firmware files, these must be dumped from your legally owned PlayStation 4 console.
|
||||
The following firmware modules are supported and must be placed in shadPS4's `sys_modules` folder.
|
||||
|
||||
<div align="center">
|
||||
|
||||
| Modules | Modules | Modules | Modules |
|
||||
|-------------------------|-------------------------|-------------------------|-------------------------|
|
||||
| libSceCesCs.sprx | libSceFont.sprx | libSceFontFt.sprx | libSceFreeTypeOt.sprx |
|
||||
| libSceJson.sprx | libSceJson2.sprx | libSceLibcInternal.sprx | libSceNgs2.sprx |
|
||||
| libSceRtc.sprx | libSceUlt.sprx | | |
|
||||
|
||||
</div>
|
||||
|
||||
> [!Caution]
|
||||
> The above modules are required to run the games properly and must be extracted from your PlayStation 4.
|
||||
|
||||
|
||||
|
||||
# Main team
|
||||
|
||||
- [**georgemoralis**](https://github.com/georgemoralis)
|
||||
- [**raphaelthegreat**](https://github.com/raphaelthegreat)
|
||||
- [**psucien**](https://github.com/psucien)
|
||||
- [**skmp**](https://github.com/skmp)
|
||||
- [**wheremyfoodat**](https://github.com/wheremyfoodat)
|
||||
- [**raziel1000**](https://github.com/raziel1000)
|
||||
- [**viniciuslrangel**](https://github.com/viniciuslrangel)
|
||||
- [**roamic**](https://github.com/roamic)
|
||||
- [**squidbus**](https://github.com/squidbus)
|
||||
- [**frodo**](https://github.com/baggins183)
|
||||
- [**Stephen Miller**](https://github.com/StevenMiller123)
|
||||
- [**kalaposfos13**](https://github.com/kalaposfos13)
|
||||
|
||||
Logo is done by [**Xphalnos**](https://github.com/Xphalnos)
|
||||
|
||||
# Contributing
|
||||
|
||||
If you want to contribute, please look the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.\
|
||||
If you want to contribute, please read the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.\
|
||||
Open a PR and we'll check it :)
|
||||
|
||||
# Translations
|
||||
|
||||
If you want to translate shadPS4 to your language we use [**Crowdin**](https://crowdin.com/project/shadps4-emulator).
|
||||
# Contributors
|
||||
|
||||
<a href="https://github.com/shadps4-emu/shadPS4/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=shadps4-emu/shadPS4&max=15">
|
||||
<img src="https://contrib.rocks/image?repo=shadps4-emu/shadPS4&max=24">
|
||||
</a>
|
||||
|
||||
|
||||
@ -139,7 +180,7 @@ A few noteworthy teams/projects who've helped us along the way are:
|
||||
|
||||
- **yuzu**: Our shader compiler has been designed with yuzu's Hades compiler as a blueprint. This allowed us to focus on the challenges of emulating a modern AMD GPU while having a high-quality optimizing shader compiler implementation as a base.
|
||||
|
||||
- [**hydra**](https://github.com/hydra-emu/hydra): A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris.
|
||||
- [**felix86**](https://github.com/OFFTKP/felix86): A new x86-64 → RISC-V Linux userspace emulator
|
||||
|
||||
# License
|
||||
|
||||
|
55
REUSE.toml
55
REUSE.toml
@ -3,20 +3,38 @@ version = 1
|
||||
[[annotations]]
|
||||
path = [
|
||||
"REUSE.toml",
|
||||
"crowdin.yml",
|
||||
"CMakeSettings.json",
|
||||
"CMakeLinuxPresets.json",
|
||||
"CMakeWindowsPresets.json",
|
||||
"CMakePresets.json",
|
||||
".github/FUNDING.yml",
|
||||
".github/shadps4.desktop",
|
||||
".github/shadps4.png",
|
||||
".github/workflows/scripts/update_translation.sh",
|
||||
".github/workflows/update_translation.yml",
|
||||
".gitmodules",
|
||||
"documents/changelog.txt",
|
||||
"dist/MacOSBundleInfo.plist.in",
|
||||
"dist/net.shadps4.shadPS4.desktop",
|
||||
"dist/net.shadps4.shadPS4_metadata.pot",
|
||||
"dist/net.shadps4.shadPS4.metainfo.xml",
|
||||
"documents/changelog.md",
|
||||
"documents/Quickstart/2.png",
|
||||
"documents/Screenshots/*",
|
||||
"documents/Screenshots/Linux/*",
|
||||
"externals/MoltenVK/MoltenVK_icd.json",
|
||||
"scripts/ps4_names.txt",
|
||||
"src/images/bronze.png",
|
||||
"src/images/gold.png",
|
||||
"src/images/platinum.png",
|
||||
"src/images/silver.png",
|
||||
"src/images/about_icon.png",
|
||||
"src/images/controller_icon.png",
|
||||
"src/images/discord.png",
|
||||
"src/images/dump_icon.png",
|
||||
"src/images/exit_icon.png",
|
||||
"src/images/favorite_icon.png",
|
||||
"src/images/file_icon.png",
|
||||
"src/images/trophy_icon.png",
|
||||
"src/images/flag_china.png",
|
||||
"src/images/flag_eu.png",
|
||||
"src/images/flag_jp.png",
|
||||
@ -24,21 +42,41 @@ path = [
|
||||
"src/images/flag_us.png",
|
||||
"src/images/flag_world.png",
|
||||
"src/images/folder_icon.png",
|
||||
"src/images/github.png",
|
||||
"src/images/grid_icon.png",
|
||||
"src/images/keyboard_icon.png",
|
||||
"src/images/iconsize_icon.png",
|
||||
"src/images/KBM.png",
|
||||
"src/images/ko-fi.png",
|
||||
"src/images/list_icon.png",
|
||||
"src/images/list_mode_icon.png",
|
||||
"src/images/pause_icon.png",
|
||||
"src/images/play_icon.png",
|
||||
"src/images/refresh_icon.png",
|
||||
"src/images/ps4_controller.png",
|
||||
"src/images/restart_game_icon.png",
|
||||
"src/images/refreshlist_icon.png",
|
||||
"src/images/settings_icon.png",
|
||||
"src/images/fullscreen_icon.png",
|
||||
"src/images/stop_icon.png",
|
||||
"src/images/utils_icon.png",
|
||||
"src/images/shadPS4.icns",
|
||||
"src/images/shadps4.ico",
|
||||
"src/images/shadps4.png",
|
||||
"src/images/net.shadps4.shadPS4.svg",
|
||||
"src/images/themes_icon.png",
|
||||
"src/images/update_icon.png",
|
||||
"src/images/youtube.png",
|
||||
"src/images/website.png",
|
||||
"src/images/discord.svg",
|
||||
"src/images/github.svg",
|
||||
"src/images/ko-fi.svg",
|
||||
"src/images/shadps4.svg",
|
||||
"src/images/website.svg",
|
||||
"src/images/youtube.svg",
|
||||
"src/images/trophy.wav",
|
||||
"src/shadps4.qrc",
|
||||
"src/shadps4.rc",
|
||||
"src/qt_gui/translations/update_translation.sh",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "shadPS4 Emulator Project"
|
||||
@ -57,7 +95,7 @@ SPDX-FileCopyrightText = "2019-2024 Baldur Karlsson"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
[[annotations]]
|
||||
path = "externals/stb_image.h"
|
||||
path = "externals/stb/**"
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "2017 Sean Barrett"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
@ -85,3 +123,12 @@ path = "externals/gcn/include/**"
|
||||
SPDX-FileCopyrightText = "NONE"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
|
||||
[[annotations]]
|
||||
path = "cmake/CMakeRC.cmake"
|
||||
SPDX-FileCopyrightText = "Copyright (c) 2017 vector-of-bool <vectorofbool@gmail.com>"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
[[annotations]]
|
||||
path = "src/video_core/host_shaders/fsr/*"
|
||||
SPDX-FileCopyrightText = "Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved."
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
666
cmake/CMakeRC.cmake
Normal file
666
cmake/CMakeRC.cmake
Normal file
@ -0,0 +1,666 @@
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2017 vector-of-bool <vectorofbool@gmail.com>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
# This block is executed when generating an intermediate resource file, not when
|
||||
# running in CMake configure mode
|
||||
if(_CMRC_GENERATE_MODE)
|
||||
# Read in the digits
|
||||
file(READ "${INPUT_FILE}" bytes HEX)
|
||||
# Format each pair into a character literal. Heuristics seem to favor doing
|
||||
# the conversion in groups of five for fastest conversion
|
||||
string(REGEX REPLACE "(..)(..)(..)(..)(..)" "'\\\\x\\1','\\\\x\\2','\\\\x\\3','\\\\x\\4','\\\\x\\5'," chars "${bytes}")
|
||||
# Since we did this in groups, we have some leftovers to clean up
|
||||
string(LENGTH "${bytes}" n_bytes2)
|
||||
math(EXPR n_bytes "${n_bytes2} / 2")
|
||||
math(EXPR remainder "${n_bytes} % 5") # <-- '5' is the grouping count from above
|
||||
set(cleanup_re "$")
|
||||
set(cleanup_sub )
|
||||
while(remainder)
|
||||
set(cleanup_re "(..)${cleanup_re}")
|
||||
set(cleanup_sub "'\\\\x\\${remainder}',${cleanup_sub}")
|
||||
math(EXPR remainder "${remainder} - 1")
|
||||
endwhile()
|
||||
if(NOT cleanup_re STREQUAL "$")
|
||||
string(REGEX REPLACE "${cleanup_re}" "${cleanup_sub}" chars "${chars}")
|
||||
endif()
|
||||
string(CONFIGURE [[
|
||||
namespace { const char file_array[] = { @chars@ 0 }; }
|
||||
namespace cmrc { namespace @NAMESPACE@ { namespace res_chars {
|
||||
extern const char* const @SYMBOL@_begin = file_array;
|
||||
extern const char* const @SYMBOL@_end = file_array + @n_bytes@;
|
||||
}}}
|
||||
]] code)
|
||||
file(WRITE "${OUTPUT_FILE}" "${code}")
|
||||
# Exit from the script. Nothing else needs to be processed
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_version 2.0.0)
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
if(COMMAND cmrc_add_resource_library)
|
||||
if(NOT DEFINED _CMRC_VERSION OR NOT (_version STREQUAL _CMRC_VERSION))
|
||||
message(WARNING "More than one CMakeRC version has been included in this project.")
|
||||
endif()
|
||||
# CMakeRC has already been included! Don't do anything
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_CMRC_VERSION "${_version}" CACHE INTERNAL "CMakeRC version. Used for checking for conflicts")
|
||||
|
||||
set(_CMRC_SCRIPT "${CMAKE_CURRENT_LIST_FILE}" CACHE INTERNAL "Path to CMakeRC script")
|
||||
|
||||
function(_cmrc_normalize_path var)
|
||||
set(path "${${var}}")
|
||||
file(TO_CMAKE_PATH "${path}" path)
|
||||
while(path MATCHES "//")
|
||||
string(REPLACE "//" "/" path "${path}")
|
||||
endwhile()
|
||||
string(REGEX REPLACE "/+$" "" path "${path}")
|
||||
set("${var}" "${path}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
get_filename_component(_inc_dir "${CMAKE_BINARY_DIR}/_cmrc/include" ABSOLUTE)
|
||||
set(CMRC_INCLUDE_DIR "${_inc_dir}" CACHE INTERNAL "Directory for CMakeRC include files")
|
||||
# Let's generate the primary include file
|
||||
file(MAKE_DIRECTORY "${CMRC_INCLUDE_DIR}/cmrc")
|
||||
set(hpp_content [==[
|
||||
#ifndef CMRC_CMRC_HPP_INCLUDED
|
||||
#define CMRC_CMRC_HPP_INCLUDED
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
#include <type_traits>
|
||||
|
||||
#if !(defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(CMRC_NO_EXCEPTIONS))
|
||||
#define CMRC_NO_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
namespace cmrc { namespace detail { struct dummy; } }
|
||||
|
||||
#define CMRC_DECLARE(libid) \
|
||||
namespace cmrc { namespace detail { \
|
||||
struct dummy; \
|
||||
static_assert(std::is_same<dummy, ::cmrc::detail::dummy>::value, "CMRC_DECLARE() must only appear at the global namespace"); \
|
||||
} } \
|
||||
namespace cmrc { namespace libid { \
|
||||
cmrc::embedded_filesystem get_filesystem(); \
|
||||
} } static_assert(true, "")
|
||||
|
||||
namespace cmrc {
|
||||
|
||||
class file {
|
||||
const char* _begin = nullptr;
|
||||
const char* _end = nullptr;
|
||||
|
||||
public:
|
||||
using iterator = const char*;
|
||||
using const_iterator = iterator;
|
||||
iterator begin() const noexcept { return _begin; }
|
||||
iterator cbegin() const noexcept { return _begin; }
|
||||
iterator end() const noexcept { return _end; }
|
||||
iterator cend() const noexcept { return _end; }
|
||||
std::size_t size() const { return static_cast<std::size_t>(std::distance(begin(), end())); }
|
||||
|
||||
file() = default;
|
||||
file(iterator beg, iterator end) noexcept : _begin(beg), _end(end) {}
|
||||
};
|
||||
|
||||
class directory_entry;
|
||||
|
||||
namespace detail {
|
||||
|
||||
class directory;
|
||||
class file_data;
|
||||
|
||||
class file_or_directory {
|
||||
union _data_t {
|
||||
class file_data* file_data;
|
||||
class directory* directory;
|
||||
} _data;
|
||||
bool _is_file = true;
|
||||
|
||||
public:
|
||||
explicit file_or_directory(file_data& f) {
|
||||
_data.file_data = &f;
|
||||
}
|
||||
explicit file_or_directory(directory& d) {
|
||||
_data.directory = &d;
|
||||
_is_file = false;
|
||||
}
|
||||
bool is_file() const noexcept {
|
||||
return _is_file;
|
||||
}
|
||||
bool is_directory() const noexcept {
|
||||
return !is_file();
|
||||
}
|
||||
const directory& as_directory() const noexcept {
|
||||
assert(!is_file());
|
||||
return *_data.directory;
|
||||
}
|
||||
const file_data& as_file() const noexcept {
|
||||
assert(is_file());
|
||||
return *_data.file_data;
|
||||
}
|
||||
};
|
||||
|
||||
class file_data {
|
||||
public:
|
||||
const char* begin_ptr;
|
||||
const char* end_ptr;
|
||||
file_data(const file_data&) = delete;
|
||||
file_data(const char* b, const char* e) : begin_ptr(b), end_ptr(e) {}
|
||||
};
|
||||
|
||||
inline std::pair<std::string, std::string> split_path(const std::string& path) {
|
||||
auto first_sep = path.find("/");
|
||||
if (first_sep == path.npos) {
|
||||
return std::make_pair(path, "");
|
||||
} else {
|
||||
return std::make_pair(path.substr(0, first_sep), path.substr(first_sep + 1));
|
||||
}
|
||||
}
|
||||
|
||||
struct created_subdirectory {
|
||||
class directory& directory;
|
||||
class file_or_directory& index_entry;
|
||||
};
|
||||
|
||||
class directory {
|
||||
std::list<file_data> _files;
|
||||
std::list<directory> _dirs;
|
||||
std::map<std::string, file_or_directory> _index;
|
||||
|
||||
using base_iterator = std::map<std::string, file_or_directory>::const_iterator;
|
||||
|
||||
public:
|
||||
|
||||
directory() = default;
|
||||
directory(const directory&) = delete;
|
||||
|
||||
created_subdirectory add_subdir(std::string name) & {
|
||||
_dirs.emplace_back();
|
||||
auto& back = _dirs.back();
|
||||
auto& fod = _index.emplace(name, file_or_directory{back}).first->second;
|
||||
return created_subdirectory{back, fod};
|
||||
}
|
||||
|
||||
file_or_directory* add_file(std::string name, const char* begin, const char* end) & {
|
||||
assert(_index.find(name) == _index.end());
|
||||
_files.emplace_back(begin, end);
|
||||
return &_index.emplace(name, file_or_directory{_files.back()}).first->second;
|
||||
}
|
||||
|
||||
const file_or_directory* get(const std::string& path) const {
|
||||
auto pair = split_path(path);
|
||||
auto child = _index.find(pair.first);
|
||||
if (child == _index.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
auto& entry = child->second;
|
||||
if (pair.second.empty()) {
|
||||
// We're at the end of the path
|
||||
return &entry;
|
||||
}
|
||||
|
||||
if (entry.is_file()) {
|
||||
// We can't traverse into a file. Stop.
|
||||
return nullptr;
|
||||
}
|
||||
// Keep going down
|
||||
return entry.as_directory().get(pair.second);
|
||||
}
|
||||
|
||||
class iterator {
|
||||
base_iterator _base_iter;
|
||||
base_iterator _end_iter;
|
||||
public:
|
||||
using value_type = directory_entry;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = const value_type*;
|
||||
using reference = const value_type&;
|
||||
using iterator_category = std::input_iterator_tag;
|
||||
|
||||
iterator() = default;
|
||||
explicit iterator(base_iterator iter, base_iterator end) : _base_iter(iter), _end_iter(end) {}
|
||||
|
||||
iterator begin() const noexcept {
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator end() const noexcept {
|
||||
return iterator(_end_iter, _end_iter);
|
||||
}
|
||||
|
||||
inline value_type operator*() const noexcept;
|
||||
|
||||
bool operator==(const iterator& rhs) const noexcept {
|
||||
return _base_iter == rhs._base_iter;
|
||||
}
|
||||
|
||||
bool operator!=(const iterator& rhs) const noexcept {
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
iterator& operator++() noexcept {
|
||||
++_base_iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator++(int) noexcept {
|
||||
auto cp = *this;
|
||||
++_base_iter;
|
||||
return cp;
|
||||
}
|
||||
};
|
||||
|
||||
using const_iterator = iterator;
|
||||
|
||||
iterator begin() const noexcept {
|
||||
return iterator(_index.begin(), _index.end());
|
||||
}
|
||||
|
||||
iterator end() const noexcept {
|
||||
return iterator();
|
||||
}
|
||||
};
|
||||
|
||||
inline std::string normalize_path(std::string path) {
|
||||
while (path.find("/") == 0) {
|
||||
path.erase(path.begin());
|
||||
}
|
||||
while (!path.empty() && (path.rfind("/") == path.size() - 1)) {
|
||||
path.pop_back();
|
||||
}
|
||||
auto off = path.npos;
|
||||
while ((off = path.find("//")) != path.npos) {
|
||||
path.erase(path.begin() + static_cast<std::string::difference_type>(off));
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
using index_type = std::map<std::string, const cmrc::detail::file_or_directory*>;
|
||||
|
||||
} // detail
|
||||
|
||||
class directory_entry {
|
||||
std::string _fname;
|
||||
const detail::file_or_directory* _item;
|
||||
|
||||
public:
|
||||
directory_entry() = delete;
|
||||
explicit directory_entry(std::string filename, const detail::file_or_directory& item)
|
||||
: _fname(filename)
|
||||
, _item(&item)
|
||||
{}
|
||||
|
||||
const std::string& filename() const & {
|
||||
return _fname;
|
||||
}
|
||||
std::string filename() const && {
|
||||
return std::move(_fname);
|
||||
}
|
||||
|
||||
bool is_file() const {
|
||||
return _item->is_file();
|
||||
}
|
||||
|
||||
bool is_directory() const {
|
||||
return _item->is_directory();
|
||||
}
|
||||
};
|
||||
|
||||
directory_entry detail::directory::iterator::operator*() const noexcept {
|
||||
assert(begin() != end());
|
||||
return directory_entry(_base_iter->first, _base_iter->second);
|
||||
}
|
||||
|
||||
using directory_iterator = detail::directory::iterator;
|
||||
|
||||
class embedded_filesystem {
|
||||
// Never-null:
|
||||
const cmrc::detail::index_type* _index;
|
||||
const detail::file_or_directory* _get(std::string path) const {
|
||||
path = detail::normalize_path(path);
|
||||
auto found = _index->find(path);
|
||||
if (found == _index->end()) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return found->second;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
explicit embedded_filesystem(const detail::index_type& index)
|
||||
: _index(&index)
|
||||
{}
|
||||
|
||||
file open(const std::string& path) const {
|
||||
auto entry_ptr = _get(path);
|
||||
if (!entry_ptr || !entry_ptr->is_file()) {
|
||||
#ifdef CMRC_NO_EXCEPTIONS
|
||||
fprintf(stderr, "Error no such file or directory: %s\n", path.c_str());
|
||||
abort();
|
||||
#else
|
||||
throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path);
|
||||
#endif
|
||||
}
|
||||
auto& dat = entry_ptr->as_file();
|
||||
return file{dat.begin_ptr, dat.end_ptr};
|
||||
}
|
||||
|
||||
bool is_file(const std::string& path) const noexcept {
|
||||
auto entry_ptr = _get(path);
|
||||
return entry_ptr && entry_ptr->is_file();
|
||||
}
|
||||
|
||||
bool is_directory(const std::string& path) const noexcept {
|
||||
auto entry_ptr = _get(path);
|
||||
return entry_ptr && entry_ptr->is_directory();
|
||||
}
|
||||
|
||||
bool exists(const std::string& path) const noexcept {
|
||||
return !!_get(path);
|
||||
}
|
||||
|
||||
directory_iterator iterate_directory(const std::string& path) const {
|
||||
auto entry_ptr = _get(path);
|
||||
if (!entry_ptr) {
|
||||
#ifdef CMRC_NO_EXCEPTIONS
|
||||
fprintf(stderr, "Error no such file or directory: %s\n", path.c_str());
|
||||
abort();
|
||||
#else
|
||||
throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path);
|
||||
#endif
|
||||
}
|
||||
if (!entry_ptr->is_directory()) {
|
||||
#ifdef CMRC_NO_EXCEPTIONS
|
||||
fprintf(stderr, "Error not a directory: %s\n", path.c_str());
|
||||
abort();
|
||||
#else
|
||||
throw std::system_error(make_error_code(std::errc::not_a_directory), path);
|
||||
#endif
|
||||
}
|
||||
return entry_ptr->as_directory().begin();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // CMRC_CMRC_HPP_INCLUDED
|
||||
]==])
|
||||
|
||||
set(cmrc_hpp "${CMRC_INCLUDE_DIR}/cmrc/cmrc.hpp" CACHE INTERNAL "")
|
||||
set(_generate 1)
|
||||
if(EXISTS "${cmrc_hpp}")
|
||||
file(READ "${cmrc_hpp}" _current)
|
||||
if(_current STREQUAL hpp_content)
|
||||
set(_generate 0)
|
||||
endif()
|
||||
endif()
|
||||
file(GENERATE OUTPUT "${cmrc_hpp}" CONTENT "${hpp_content}" CONDITION ${_generate})
|
||||
|
||||
add_library(cmrc-base INTERFACE)
|
||||
target_include_directories(cmrc-base INTERFACE $<BUILD_INTERFACE:${CMRC_INCLUDE_DIR}>)
|
||||
# Signal a basic C++11 feature to require C++11.
|
||||
target_compile_features(cmrc-base INTERFACE cxx_nullptr)
|
||||
set_property(TARGET cmrc-base PROPERTY INTERFACE_CXX_EXTENSIONS OFF)
|
||||
add_library(cmrc::base ALIAS cmrc-base)
|
||||
|
||||
function(cmrc_add_resource_library name)
|
||||
set(args ALIAS NAMESPACE TYPE)
|
||||
cmake_parse_arguments(ARG "" "${args}" "" "${ARGN}")
|
||||
# Generate the identifier for the resource library's namespace
|
||||
set(ns_re "[a-zA-Z_][a-zA-Z0-9_]*")
|
||||
if(NOT DEFINED ARG_NAMESPACE)
|
||||
# Check that the library name is also a valid namespace
|
||||
if(NOT name MATCHES "${ns_re}")
|
||||
message(SEND_ERROR "Library name is not a valid namespace. Specify the NAMESPACE argument")
|
||||
endif()
|
||||
set(ARG_NAMESPACE "${name}")
|
||||
else()
|
||||
if(NOT ARG_NAMESPACE MATCHES "${ns_re}")
|
||||
message(SEND_ERROR "NAMESPACE for ${name} is not a valid C++ namespace identifier (${ARG_NAMESPACE})")
|
||||
endif()
|
||||
endif()
|
||||
set(libname "${name}")
|
||||
# Check that type is either "STATIC" or "OBJECT", or default to "STATIC" if
|
||||
# not set
|
||||
if(NOT DEFINED ARG_TYPE)
|
||||
set(ARG_TYPE STATIC)
|
||||
elseif(NOT "${ARG_TYPE}" MATCHES "^(STATIC|OBJECT)$")
|
||||
message(SEND_ERROR "${ARG_TYPE} is not a valid TYPE (STATIC and OBJECT are acceptable)")
|
||||
set(ARG_TYPE STATIC)
|
||||
endif()
|
||||
# Generate a library with the compiled in character arrays.
|
||||
string(CONFIGURE [=[
|
||||
#include <cmrc/cmrc.hpp>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
namespace cmrc {
|
||||
namespace @ARG_NAMESPACE@ {
|
||||
|
||||
namespace res_chars {
|
||||
// These are the files which are available in this resource library
|
||||
$<JOIN:$<TARGET_PROPERTY:@libname@,CMRC_EXTERN_DECLS>,
|
||||
>
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
const cmrc::detail::index_type&
|
||||
get_root_index() {
|
||||
static cmrc::detail::directory root_directory_;
|
||||
static cmrc::detail::file_or_directory root_directory_fod{root_directory_};
|
||||
static cmrc::detail::index_type root_index;
|
||||
root_index.emplace("", &root_directory_fod);
|
||||
struct dir_inl {
|
||||
class cmrc::detail::directory& directory;
|
||||
};
|
||||
dir_inl root_directory_dir{root_directory_};
|
||||
(void)root_directory_dir;
|
||||
$<JOIN:$<TARGET_PROPERTY:@libname@,CMRC_MAKE_DIRS>,
|
||||
>
|
||||
$<JOIN:$<TARGET_PROPERTY:@libname@,CMRC_MAKE_FILES>,
|
||||
>
|
||||
return root_index;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cmrc::embedded_filesystem get_filesystem() {
|
||||
static auto& index = get_root_index();
|
||||
return cmrc::embedded_filesystem{index};
|
||||
}
|
||||
|
||||
} // @ARG_NAMESPACE@
|
||||
} // cmrc
|
||||
]=] cpp_content @ONLY)
|
||||
get_filename_component(libdir "${CMAKE_CURRENT_BINARY_DIR}/__cmrc_${name}" ABSOLUTE)
|
||||
get_filename_component(lib_tmp_cpp "${libdir}/lib_.cpp" ABSOLUTE)
|
||||
string(REPLACE "\n " "\n" cpp_content "${cpp_content}")
|
||||
file(GENERATE OUTPUT "${lib_tmp_cpp}" CONTENT "${cpp_content}")
|
||||
get_filename_component(libcpp "${libdir}/lib.cpp" ABSOLUTE)
|
||||
add_custom_command(OUTPUT "${libcpp}"
|
||||
DEPENDS "${lib_tmp_cpp}" "${cmrc_hpp}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${lib_tmp_cpp}" "${libcpp}"
|
||||
COMMENT "Generating ${name} resource loader"
|
||||
)
|
||||
# Generate the actual static library. Each source file is just a single file
|
||||
# with a character array compiled in containing the contents of the
|
||||
# corresponding resource file.
|
||||
add_library(${name} ${ARG_TYPE} ${libcpp})
|
||||
set_property(TARGET ${name} PROPERTY CMRC_LIBDIR "${libdir}")
|
||||
set_property(TARGET ${name} PROPERTY CMRC_NAMESPACE "${ARG_NAMESPACE}")
|
||||
target_link_libraries(${name} PUBLIC cmrc::base)
|
||||
set_property(TARGET ${name} PROPERTY CMRC_IS_RESOURCE_LIBRARY TRUE)
|
||||
if(ARG_ALIAS)
|
||||
add_library("${ARG_ALIAS}" ALIAS ${name})
|
||||
endif()
|
||||
cmrc_add_resources(${name} ${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
function(_cmrc_register_dirs name dirpath)
|
||||
if(dirpath STREQUAL "")
|
||||
return()
|
||||
endif()
|
||||
# Skip this dir if we have already registered it
|
||||
get_target_property(registered "${name}" _CMRC_REGISTERED_DIRS)
|
||||
if(dirpath IN_LIST registered)
|
||||
return()
|
||||
endif()
|
||||
# Register the parent directory first
|
||||
get_filename_component(parent "${dirpath}" DIRECTORY)
|
||||
if(NOT parent STREQUAL "")
|
||||
_cmrc_register_dirs("${name}" "${parent}")
|
||||
endif()
|
||||
# Now generate the registration
|
||||
set_property(TARGET "${name}" APPEND PROPERTY _CMRC_REGISTERED_DIRS "${dirpath}")
|
||||
_cm_encode_fpath(sym "${dirpath}")
|
||||
if(parent STREQUAL "")
|
||||
set(parent_sym root_directory)
|
||||
else()
|
||||
_cm_encode_fpath(parent_sym "${parent}")
|
||||
endif()
|
||||
get_filename_component(leaf "${dirpath}" NAME)
|
||||
set_property(
|
||||
TARGET "${name}"
|
||||
APPEND PROPERTY CMRC_MAKE_DIRS
|
||||
"static auto ${sym}_dir = ${parent_sym}_dir.directory.add_subdir(\"${leaf}\")\;"
|
||||
"root_index.emplace(\"${dirpath}\", &${sym}_dir.index_entry)\;"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(cmrc_add_resources name)
|
||||
get_target_property(is_reslib ${name} CMRC_IS_RESOURCE_LIBRARY)
|
||||
if(NOT TARGET ${name} OR NOT is_reslib)
|
||||
message(SEND_ERROR "cmrc_add_resources called on target '${name}' which is not an existing resource library")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(options)
|
||||
set(args WHENCE PREFIX)
|
||||
set(list_args)
|
||||
cmake_parse_arguments(ARG "${options}" "${args}" "${list_args}" "${ARGN}")
|
||||
|
||||
if(NOT ARG_WHENCE)
|
||||
set(ARG_WHENCE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
_cmrc_normalize_path(ARG_WHENCE)
|
||||
get_filename_component(ARG_WHENCE "${ARG_WHENCE}" ABSOLUTE)
|
||||
|
||||
# Generate the identifier for the resource library's namespace
|
||||
get_target_property(lib_ns "${name}" CMRC_NAMESPACE)
|
||||
|
||||
get_target_property(libdir ${name} CMRC_LIBDIR)
|
||||
get_target_property(target_dir ${name} SOURCE_DIR)
|
||||
file(RELATIVE_PATH reldir "${target_dir}" "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
if(reldir MATCHES "^\\.\\.")
|
||||
message(SEND_ERROR "Cannot call cmrc_add_resources in a parent directory from the resource library target")
|
||||
return()
|
||||
endif()
|
||||
|
||||
foreach(input IN LISTS ARG_UNPARSED_ARGUMENTS)
|
||||
_cmrc_normalize_path(input)
|
||||
get_filename_component(abs_in "${input}" ABSOLUTE)
|
||||
# Generate a filename based on the input filename that we can put in
|
||||
# the intermediate directory.
|
||||
file(RELATIVE_PATH relpath "${ARG_WHENCE}" "${abs_in}")
|
||||
if(relpath MATCHES "^\\.\\.")
|
||||
# For now we just error on files that exist outside of the soure dir.
|
||||
message(SEND_ERROR "Cannot add file '${input}': File must be in a subdirectory of ${ARG_WHENCE}")
|
||||
continue()
|
||||
endif()
|
||||
if(DEFINED ARG_PREFIX)
|
||||
_cmrc_normalize_path(ARG_PREFIX)
|
||||
endif()
|
||||
if(ARG_PREFIX AND NOT ARG_PREFIX MATCHES "/$")
|
||||
set(ARG_PREFIX "${ARG_PREFIX}/")
|
||||
endif()
|
||||
get_filename_component(dirpath "${ARG_PREFIX}${relpath}" DIRECTORY)
|
||||
_cmrc_register_dirs("${name}" "${dirpath}")
|
||||
get_filename_component(abs_out "${libdir}/intermediate/${ARG_PREFIX}${relpath}.cpp" ABSOLUTE)
|
||||
# Generate a symbol name relpath the file's character array
|
||||
_cm_encode_fpath(sym "${relpath}")
|
||||
# Get the symbol name for the parent directory
|
||||
if(dirpath STREQUAL "")
|
||||
set(parent_sym root_directory)
|
||||
else()
|
||||
_cm_encode_fpath(parent_sym "${dirpath}")
|
||||
endif()
|
||||
# Generate the rule for the intermediate source file
|
||||
_cmrc_generate_intermediate_cpp(${lib_ns} ${sym} "${abs_out}" "${abs_in}")
|
||||
target_sources(${name} PRIVATE "${abs_out}")
|
||||
set_property(TARGET ${name} APPEND PROPERTY CMRC_EXTERN_DECLS
|
||||
"// Pointers to ${input}"
|
||||
"extern const char* const ${sym}_begin\;"
|
||||
"extern const char* const ${sym}_end\;"
|
||||
)
|
||||
get_filename_component(leaf "${relpath}" NAME)
|
||||
set_property(
|
||||
TARGET ${name}
|
||||
APPEND PROPERTY CMRC_MAKE_FILES
|
||||
"root_index.emplace("
|
||||
" \"${ARG_PREFIX}${relpath}\","
|
||||
" ${parent_sym}_dir.directory.add_file("
|
||||
" \"${leaf}\","
|
||||
" res_chars::${sym}_begin,"
|
||||
" res_chars::${sym}_end"
|
||||
" )"
|
||||
")\;"
|
||||
)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(_cmrc_generate_intermediate_cpp lib_ns symbol outfile infile)
|
||||
add_custom_command(
|
||||
# This is the file we will generate
|
||||
OUTPUT "${outfile}"
|
||||
# These are the primary files that affect the output
|
||||
DEPENDS "${infile}" "${_CMRC_SCRIPT}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}"
|
||||
-D_CMRC_GENERATE_MODE=TRUE
|
||||
-DNAMESPACE=${lib_ns}
|
||||
-DSYMBOL=${symbol}
|
||||
"-DINPUT_FILE=${infile}"
|
||||
"-DOUTPUT_FILE=${outfile}"
|
||||
-P "${_CMRC_SCRIPT}"
|
||||
COMMENT "Generating intermediate file for ${infile}"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(_cm_encode_fpath var fpath)
|
||||
string(MAKE_C_IDENTIFIER "${fpath}" ident)
|
||||
string(MD5 hash "${fpath}")
|
||||
string(SUBSTRING "${hash}" 0 4 hash)
|
||||
set(${var} f_${hash}_${ident} PARENT_SCOPE)
|
||||
endfunction()
|
28
cmake/DetectQtInstallation.cmake
Normal file
28
cmake/DetectQtInstallation.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(highest_version "0")
|
||||
set(CANDIDATE_DRIVES A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
|
||||
|
||||
foreach(drive ${CANDIDATE_DRIVES})
|
||||
file(GLOB kits LIST_DIRECTORIES true CONFIGURE_DEPENDS "${drive}:/Qt/*/msvc*_64")
|
||||
foreach(kit IN LISTS kits)
|
||||
get_filename_component(version_dir "${kit}" DIRECTORY)
|
||||
get_filename_component(kit_version "${version_dir}" NAME)
|
||||
|
||||
message(STATUS "DetectQtInstallation.cmake: Detected Qt: ${kit}")
|
||||
|
||||
if (kit_version VERSION_GREATER highest_version)
|
||||
set(highest_version "${kit_version}")
|
||||
set(QT_PREFIX "${kit}")
|
||||
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if(QT_PREFIX)
|
||||
set(CMAKE_PREFIX_PATH "${QT_PREFIX}" CACHE PATH "Qt prefix auto‑detected" FORCE)
|
||||
message(STATUS "DetectQtInstallation.cmake: Choose newest Qt: ${QT_PREFIX}")
|
||||
else()
|
||||
message(STATUS "DetectQtInstallation.cmake: No Qt‑Directory found in <drive>:/Qt – please set CMAKE_PREFIX_PATH manually")
|
||||
endif()
|
@ -1,15 +0,0 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(CRYPTOPP QUIET IMPORTED_TARGET libcryptopp)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(cryptopp
|
||||
REQUIRED_VARS CRYPTOPP_LINK_LIBRARIES
|
||||
VERSION_VAR CRYPTOPP_VERSION
|
||||
)
|
||||
|
||||
if (cryptopp_FOUND AND NOT TARGET cryptopp::cryptopp)
|
||||
add_library(cryptopp::cryptopp ALIAS PkgConfig::CRYPTOPP)
|
||||
endif()
|
15
cmake/Findlibusb.cmake
Normal file
15
cmake/Findlibusb.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(LIBUSB QUIET IMPORTED_TARGET libusb-1.0)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(libusb
|
||||
REQUIRED_VARS LIBUSB_LINK_LIBRARIES
|
||||
VERSION_VAR LIBUSB_VERSION
|
||||
)
|
||||
|
||||
if (libusb_FOUND AND NOT TARGET libusb::usb)
|
||||
add_library(libusb::usb ALIAS PkgConfig::LIBUSB)
|
||||
endif()
|
19
cmake/Findstb.cmake
Normal file
19
cmake/Findstb.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_path(stb_image_INCLUDE_DIR stb_image.h PATH_SUFFIXES stb)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(stb
|
||||
REQUIRED_VARS stb_image_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if (stb_FOUND AND NOT TARGET stb::headers)
|
||||
add_library(stb::headers INTERFACE IMPORTED)
|
||||
set_property(TARGET stb::headers PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${stb_image_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(stb_image_INCLUDE_DIR)
|
@ -1,15 +0,0 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(ZLIB_NG QUIET IMPORTED_TARGET zlib-ng)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(zlib-ng
|
||||
REQUIRED_VARS ZLIB_NG_LINK_LIBRARIES
|
||||
VERSION_VAR ZLIB_NG_VERSION
|
||||
)
|
||||
|
||||
if (zlib-ng_FOUND AND NOT TARGET zlib-ng::zlib)
|
||||
add_library(zlib-ng::zlib ALIAS PkgConfig::ZLIB_NG)
|
||||
endif()
|
3
crowdin.yml
Normal file
3
crowdin.yml
Normal file
@ -0,0 +1,3 @@
|
||||
files:
|
||||
- source: /src/qt_gui/translations/en_US.ts
|
||||
translation: /%original_path%/%locale_with_underscore%.ts
|
46
dist/MacOSBundleInfo.plist.in
vendored
Normal file
46
dist/MacOSBundleInfo.plist.in
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>shadps4</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.shadps4-emu.shadps4</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>shadps4</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>GCSupportsGameMode</key>
|
||||
<true/>
|
||||
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleAllowMixedLocalizations</key>
|
||||
<true/>
|
||||
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
9
dist/net.shadps4.shadPS4.desktop
vendored
Normal file
9
dist/net.shadps4.shadPS4.desktop
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=shadPS4
|
||||
Exec=shadps4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=net.shadps4.shadPS4
|
||||
Comment=PlayStation 4 emulator
|
||||
Categories=Game;Emulator;
|
||||
StartupWMClass=shadps4;
|
99
dist/net.shadps4.shadPS4.metainfo.xml
vendored
Normal file
99
dist/net.shadps4.shadPS4.metainfo.xml
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id translate="no">net.shadps4.shadPS4</id>
|
||||
<name translate="no">shadPS4</name>
|
||||
<developer id="net.shadps4.shadPS4">
|
||||
<name>shadPS4 Contributors</name>
|
||||
<url translate="no">https://github.com/shadps4-emu/shadps4/graphs/contributors</url>
|
||||
</developer>
|
||||
<summary>PS4 Emulator</summary>
|
||||
<metadata_license translate="no">CC0-1.0</metadata_license>
|
||||
<project_license translate="no">GPL-2.0</project_license>
|
||||
<launchable type="desktop-id" translate="no">net.shadps4.shadPS4.desktop</launchable>
|
||||
<url type="homepage" translate="no">https://shadps4.net/</url>
|
||||
<description>
|
||||
<p>shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++.</p>
|
||||
<p>The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games.</p>
|
||||
</description>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image type="source" translate="no" >https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/1.png</image>
|
||||
<caption>Bloodborne</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/2.png</image>
|
||||
<caption>Hatsune Miku: Project DIVA Future Tone</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png</image>
|
||||
<caption>Yakuza 0</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png</image>
|
||||
<caption>Persona 4 Golden</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<categories>
|
||||
<category translate="no">Game</category>
|
||||
</categories>
|
||||
<releases>
|
||||
<release version="0.10.0" date="2025-07-06">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.10.0</url>
|
||||
</release>
|
||||
<release version="0.9.0" date="2025-05-22">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.9.0</url>
|
||||
</release>
|
||||
<release version="0.8.0" date="2025-04-23">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.8.0</url>
|
||||
</release>
|
||||
<release version="0.7.0" date="2025-03-23">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.7.0</url>
|
||||
</release>
|
||||
<release version="0.6.0" date="2025-01-31">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.6.0</url>
|
||||
</release>
|
||||
<release version="0.5.0" date="2024-12-25">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.5.0</url>
|
||||
</release>
|
||||
<release version="0.4.0" date="2024-10-31">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.4.0</url>
|
||||
</release>
|
||||
<release version="0.3.0" date="2024-09-23">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.3.0</url>
|
||||
</release>
|
||||
<release version="0.2.0" date="2024-08-15">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.2.0</url>
|
||||
</release>
|
||||
<release version="0.1.0" date="2024-07-01">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/0.1.0</url>
|
||||
</release>
|
||||
<release version="0.0.3" date="2024-03-23">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.3</url>
|
||||
</release>
|
||||
<release version="0.0.2" date="2023-10-21">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.2</url>
|
||||
</release>
|
||||
<release version="0.0.1" date="2024-09-29">
|
||||
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.1</url>
|
||||
</release>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<supports>
|
||||
<control translate="no">keyboard</control>
|
||||
</supports>
|
||||
<recommends>
|
||||
<control translate="no">gamepad</control>
|
||||
</recommends>
|
||||
<requires>
|
||||
<internet translate="no">offline-only</internet>
|
||||
</requires>
|
||||
<provides>
|
||||
<binary translate="no">shadps4</binary>
|
||||
</provides>
|
||||
<keywords>
|
||||
<keyword>emulator</keyword>
|
||||
<keyword>emulation</keyword>
|
||||
<keyword translate="no">playstation</keyword>
|
||||
<keyword translate="no">ps4</keyword>
|
||||
</keywords>
|
||||
</component>
|
65
dist/net.shadps4.shadPS4_metadata.pot
vendored
Normal file
65
dist/net.shadps4.shadPS4_metadata.pot
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2024-11-08 09:07+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. (itstool) path: component/name
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:4
|
||||
msgid "shadPS4"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: developer/name
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:6
|
||||
msgid "shadPS4 Contributors"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: component/summary
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:9
|
||||
msgid "PS4 Emulator"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: description/p
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:16
|
||||
msgid "shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++."
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: description/p
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:17
|
||||
msgid "The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games."
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: screenshot/caption
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:22
|
||||
msgid "Bloodborne"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: screenshot/caption
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:26
|
||||
msgid "Hatsune Miku: Project DIVA Future Tone"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: screenshot/caption
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:30
|
||||
msgid "Yakuza Kiwami"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: screenshot/caption
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:34
|
||||
msgid "Persona 4 Golden"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: keywords/keyword
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:59
|
||||
msgid "emulator"
|
||||
msgstr ""
|
||||
|
||||
#. (itstool) path: keywords/keyword
|
||||
#: ./net.shadps4.shadPS4.metainfo.xml:60
|
||||
msgid "emulation"
|
||||
msgstr ""
|
@ -147,7 +147,7 @@ Accurately identifying games will help other developers that own that game recog
|
||||
- If your issue is small or you aren't sure whether you have properly identified something, [join the Discord server](https://discord.gg/MyZRaBngxA) and use the #development channel
|
||||
to concisely explain the issue, as well as any findings you currently have.
|
||||
|
||||
- It is recommended that you check the [game compatibility issue tracker](https://github.com/shadps4-emu/shadps4-game-compatibility/issues) and post very short summaries of progress changes there,
|
||||
- It is recommended that you check the [game compatibility issue tracker](https://github.com/shadps4-compatibility/shadps4-game-compatibility/issues) and post very short summaries of progress changes there,
|
||||
(such as the game now booting into the menu or getting in-game) for organizational and status update purposes.
|
||||
|
||||
- ⚠ **Do not post theoretical, unproven game-specific issues in the emulator issue tracker that you cannot verify and locate in the emulator source code as being a bug.**\
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 658 KiB |
@ -13,7 +13,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
- [**RAM**](#ram)
|
||||
- [**OS**](#os)
|
||||
- [**Have the latest WIP version**](#how-to-run-the-latest-work-in-progress-builds-of-shadps4)
|
||||
- [**Install PKG files (Games and Updates)**](#install-pkg-files)
|
||||
- [**Configure the emulator**](#configure-the-emulator)
|
||||
|
||||
## Minimum PC requirements
|
||||
@ -22,13 +21,16 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
- A processor with at least 4 cores and 6 threads
|
||||
- Above 2.5 GHz frequency
|
||||
- required support AVX2 extension or Rosetta 2 on ARM
|
||||
- A CPU supporting the x86-64-v3 baseline.
|
||||
- **Intel**: Haswell generation or newer
|
||||
- **AMD**: Excavator generation or newer
|
||||
- **Apple**: Rosetta 2 on macOS 15.4 or newer
|
||||
|
||||
### GPU
|
||||
|
||||
- A graphics card with at least 1GB of VRAM
|
||||
- Keep your graphics drivers up to date
|
||||
- Vulkan 1.3 support (required)
|
||||
- Up-to-date graphics drivers
|
||||
- Vulkan 1.3 with the `VK_KHR_swapchain` and `VK_KHR_push_descriptor` extensions
|
||||
|
||||
### RAM
|
||||
|
||||
@ -45,13 +47,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
2. Once downloaded, extract to its own folder, and run shadPS4's executable from the extracted folder.
|
||||
|
||||
3. Upon first launch, shadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that shadPS4 can use to install your PKG files to.
|
||||
|
||||
## Install PKG files
|
||||
|
||||
To install PKG files (game and updates), you will need the Qt application (with UI). You will have to go to "File" then to "Install Packages (PKG)", a window will open then you will have to select the files. You can install multiple PKG files at once. Once finished, the game should appear in the application.
|
||||
|
||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/2.png" width="800">
|
||||
3. Upon first launch, shadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that contains your dumped games.
|
||||
|
||||
## Configure the emulator
|
||||
|
||||
@ -59,4 +55,4 @@ To configure the emulator, you can go through the interface and go to "settings"
|
||||
|
||||
You can also configure the emulator by editing the `config.toml` file located in the `user` folder created after the application is started (Mostly useful if you are using the SDL version).
|
||||
Some settings may be related to more technical development and debugging.\
|
||||
For more information on this, see [**Debugging**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md#configuration).
|
||||
For more information on this, see [**Debugging**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md#configuration).
|
||||
|
BIN
documents/Screenshots/Linux/1.png
Normal file
BIN
documents/Screenshots/Linux/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
documents/Screenshots/Linux/2.png
Normal file
BIN
documents/Screenshots/Linux/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
documents/Screenshots/Linux/3.png
Normal file
BIN
documents/Screenshots/Linux/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
documents/Screenshots/Linux/4.png
Normal file
BIN
documents/Screenshots/Linux/4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
documents/Screenshots/Linux/5.png
Normal file
BIN
documents/Screenshots/Linux/5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@ -3,59 +3,157 @@ SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
## Build shadPS4 for Linux
|
||||
## Build shadPS4 for Linux
|
||||
|
||||
### Install the necessary tools to build shadPS4:
|
||||
First and foremost, Clang 18 is the **recommended compiler** as it is used for official builds and CI. If you build with GCC, you might encounter issues — please report any you find. Additionally, if you choose to use GCC, please build shadPS4 with Clang at least once before creating an `[APP BUG]` issue or submitting a pull request.
|
||||
|
||||
## Preparatory steps
|
||||
|
||||
### Installing dependencies
|
||||
|
||||
#### Debian & Ubuntu
|
||||
```
|
||||
sudo apt install build-essential clang git cmake libasound2-dev libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev vulkan-validationlayers
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential clang git cmake libasound2-dev \
|
||||
libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev \
|
||||
libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev \
|
||||
qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev \
|
||||
vulkan-validationlayers libpng-dev
|
||||
```
|
||||
|
||||
#### Fedora
|
||||
```
|
||||
sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-connection-kit-devel openal-devel openssl-devel libevdev-devel libudev-devel libXext-devel qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel vulkan-devel vulkan-validation-layers
|
||||
|
||||
```bash
|
||||
sudo dnf install clang git cmake libatomic alsa-lib-devel \
|
||||
pipewire-jack-audio-connection-kit-devel openal-soft-devel \
|
||||
openssl-devel libevdev-devel libudev-devel libXext-devel \
|
||||
qt6-qtbase-devel qt6-qtbase-private-devel \
|
||||
qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel \
|
||||
vulkan-devel vulkan-validation-layers libpng-devel libuuid-devel
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```bash
|
||||
sudo pacman -S base-devel clang git cmake sndio jack2 openal \
|
||||
qt6-base qt6-declarative qt6-multimedia qt6-tools sdl2 \
|
||||
vulkan-validation-layers libpng
|
||||
```
|
||||
sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers
|
||||
```
|
||||
|
||||
**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.
|
||||
|
||||
#### OpenSUSE
|
||||
```
|
||||
sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers
|
||||
```
|
||||
### Cloning and compiling:
|
||||
|
||||
Clone the repository recursively:
|
||||
```bash
|
||||
sudo zypper install clang git cmake libasound2 libpulse-devel \
|
||||
libsndio7 libjack-devel openal-soft-devel libopenssl-devel \
|
||||
zlib-devel libedit-devel systemd-devel libevdev-devel \
|
||||
qt6-base-devel qt6-multimedia-devel qt6-svg-devel \
|
||||
qt6-linguist-devel qt6-gui-private-devel vulkan-devel \
|
||||
vulkan-validationlayers libpng-devel
|
||||
```
|
||||
|
||||
#### NixOS
|
||||
|
||||
```bash
|
||||
nix-shell shell.nix
|
||||
```
|
||||
|
||||
#### Other Linux distributions
|
||||
|
||||
You can try one of two methods:
|
||||
|
||||
- Search the packages by name and install them with your package manager, or
|
||||
- Install [distrobox](https://distrobox.it/), create a container using any of the distributions cited above as a base, for Arch Linux you'd do:
|
||||
|
||||
```bash
|
||||
distrobox create --name archlinux --init --image archlinux:latest
|
||||
```
|
||||
|
||||
and install the dependencies on that container as cited above.
|
||||
This option is **highly recommended** for distributions with immutable/atomic filesystems (example: Fedora Kinoite, SteamOS).
|
||||
|
||||
### Cloning
|
||||
The project uses submodules to manage dependencies, and they need to be initialized before you can build the project. To achieve this, make sure you've cloned the repository with the --recursive flag
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/shadps4-emu/shadPS4.git
|
||||
cd shadPS4
|
||||
```
|
||||
|
||||
Generate the build directory in the shadPS4 directory. To disable the QT GUI, remove the ```-DENABLE_QT_GUI=ON``` flag:
|
||||
## Building
|
||||
|
||||
**Note**: Clang is the compiler used for official builds and CI. If you build with GCC, you might encounter issues—please report any you find. If you choose to use GCC, we recommend building with Clang at least once before submitting a pull request.
|
||||
```
|
||||
There are 3 options you can choose from. Option 1 is **highly recommended**.
|
||||
|
||||
#### Option 1: Terminal-only
|
||||
|
||||
1. Generate the build directory in the shadPS4 directory.
|
||||
|
||||
```bash
|
||||
cmake -S . -B build/ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
```
|
||||
|
||||
Enter the directory:
|
||||
```
|
||||
cd build/
|
||||
To disable the Qt GUI, remove the `-DENABLE_QT_GUI=ON` flag. To change the build type (for debugging), add `-DCMAKE_BUILD_TYPE=Debug`.
|
||||
|
||||
2. Use CMake to build the project:
|
||||
|
||||
```bash
|
||||
cmake --build ./build --parallel$(nproc)
|
||||
```
|
||||
|
||||
Use make to build the project:
|
||||
```
|
||||
cmake --build . --parallel$(nproc)
|
||||
If your computer freezes during this step, this could be caused by excessive system resource usage. In that case, remove `--parallel$(nproc)`.
|
||||
|
||||
Now run the emulator. If Qt was enabled at configure time:
|
||||
|
||||
```bash
|
||||
./build/shadps4
|
||||
```
|
||||
|
||||
Now run the emulator. If QT is enabled:
|
||||
```
|
||||
./shadps4
|
||||
```
|
||||
Otherwise, specify the path to your PKG's boot file:
|
||||
```
|
||||
./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||
Otherwise, specify the path to your game's boot file:
|
||||
|
||||
```bash
|
||||
./build/shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||
```
|
||||
|
||||
You can also specify the Game ID as an argument for which game to boot, as long as the folder containing the games is specified in config.toml (example: Bloodborne (US) is CUSA00900).
|
||||
#### Option 2: Configuring with cmake-gui
|
||||
|
||||
`cmake-gui` should be installed by default alongside `cmake`, if not search for the package in your package manager and install it.
|
||||
|
||||
Open `cmake-gui` and specify the source code and build directories. If you cloned the source code to your Home directory, it would be `/home/user/shadPS4` and `/home/user/shadPS4/build`.
|
||||
|
||||
Click on Configure, select "Unix Makefiles", select "Specify native compilers", click Next and choose `clang` and `clang++` as the C and CXX compilers. Usually they are located in `/bin/clang` and `/bin/clang++`. Click on Finish and let it configure the project.
|
||||
|
||||
Now every option should be displayed in red. Change anything you want, then click on Generate to make the changes permanent, then open a terminal window and do step 2 of Option 1.
|
||||
|
||||
#### Option 3: Visual Studio Code
|
||||
|
||||
This option is pretty convoluted and should only be used if you have VSCode as your default IDE, or just prefer building and debugging projects through it. This also assumes that you're using an Arch Linux environment, as the naming for some options might differ from other distros.
|
||||
|
||||
[Download Visual Studio Code for your platform](https://code.visualstudio.com/download), or use [Code - OSS](https://github.com/microsoft/vscode) if you'd like. Code - OSS is available on most Linux distributions' package repositories (on Arch Linux it is simply named `code`).
|
||||
|
||||
Once set up, go to Extensions and install "CMake Tools":
|
||||
|
||||

|
||||
|
||||
You can also install other CMake and Clang related extensions if you'd like, but this one is what enables you to configure and build CMake projects directly within VSCode.
|
||||
|
||||
Go to Settings, filter by `@ext:ms-vscode.cmake-tools configure` and disable this option:
|
||||
|
||||

|
||||
|
||||
If you wish to build with the Qt GUI, add `-DENABLE_QT_GUI=ON` to the configure arguments:
|
||||
|
||||

|
||||
|
||||
On the CMake tab, change the options as you wish, but make sure that it looks similar to or exactly like this:
|
||||
|
||||

|
||||
|
||||
When hovering over Project Status > Configure, there should be an icon titled "Configure". Click on it and let it configure the project, then do the same for Project Status > Build.
|
||||
|
||||
If you want to debug it, change the build type under Project Status > Configure to Debug (it should be the default) and compile it, then click on the icon in Project Status > Debug. If you simply want to launch the shadPS4 executable from within VSCode, click on the icon in Project Status > Launch.
|
||||
|
||||
Don't forget to change the launch target for both options to the shadPS4 executable inside shadPS4/build:
|
||||
|
||||

|
||||
|
@ -24,23 +24,21 @@ eval $(/opt/homebrew/bin/brew shellenv)
|
||||
brew install clang-format cmake
|
||||
```
|
||||
|
||||
Next, install x86_64 Homebrew and libraries.
|
||||
Next, install x86_64 Qt. You can skip these steps and move on to **Cloning and compiling** if you do not intend to build the Qt GUI.
|
||||
|
||||
**If you are on an ARM Mac:**
|
||||
```
|
||||
# Installs x86_64 Homebrew to /usr/local
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
# Installs libraries.
|
||||
arch -x86_64 /usr/local/bin/brew install molten-vk qt@6
|
||||
arch -x86_64 /usr/local/bin/brew install qt@6
|
||||
```
|
||||
|
||||
**If you are on an x86_64 Mac:**
|
||||
```
|
||||
brew install molten-vk qt@6
|
||||
brew install qt@6
|
||||
```
|
||||
|
||||
If you don't need the Qt GUI you can remove `qt@6` from the last command.
|
||||
|
||||
### Cloning and compiling:
|
||||
|
||||
Clone the repository recursively:
|
||||
|
@ -25,8 +25,8 @@ Once you are within the installer:
|
||||
|
||||
Beware, this requires you to create a Qt account. If you do not want to do this, please follow the MSYS2/MinGW compilation method instead.
|
||||
|
||||
1. Under the current, non beta version of Qt (at the time of writing 6.7.2), select the option `MSVC 2019 64-bit` or similar.
|
||||
If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2019 ARM64` instead.
|
||||
1. Under the current, non beta version of Qt (at the time of writing 6.8.2), select the option `MSVC 2022 64-bit` or similar, as well as `QT Multimedia`.
|
||||
If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2022 ARM64` instead.
|
||||
|
||||
Go through the installation normally. If you know what you are doing, you may unselect individual components that eat up too much disk space.
|
||||
|
||||
@ -35,7 +35,7 @@ Beware, this requires you to create a Qt account. If you do not want to do this,
|
||||
Once you are finished, you will have to configure Qt within Visual Studio:
|
||||
|
||||
1. Tools -> Options -> Qt -> Versions
|
||||
2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.7.2\msvc2019_64`
|
||||
2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.8.2\msvc2022_64`
|
||||
3. Enable the default checkmark on the new version you just created.
|
||||
|
||||
### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win)
|
||||
@ -55,20 +55,23 @@ Go through the Git for Windows installation as normal
|
||||
3. If you want to build shadPS4 with the Qt Gui:
|
||||
1. Click x64-Clang-Release and select "Manage Configurations"
|
||||
2. Look for "CMake command arguments" and add to the text field
|
||||
`-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.7.2\msvc2019_64`
|
||||
`-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.8.2\msvc2022_64`
|
||||
(Change Qt path if you've installed it to non-default path)
|
||||
3. Press CTRL+S to save and wait a moment for CMake generation
|
||||
4. Change the project to build to shadps4.exe
|
||||
5. Build -> Build All
|
||||
|
||||
Your shadps4.exe will be in `c:\path\to\source\Build\x64-Clang-Release\`
|
||||
Your shadps4.exe will be in `C:\path\to\source\Build\x64-Clang-Release\`
|
||||
|
||||
To automatically populate the necessary files to run shadPS4.exe, run in a command prompt or terminal:
|
||||
`C:\Qt\6.7.2\msvc2019_64\bin\windeployqt.exe "c:\path\to\shadps4.exe"`
|
||||
`C:\Qt\6.8.2\msvc2022_64\bin\windeployqt6.exe "C:\path\to\shadps4.exe"`
|
||||
(Change Qt path if you've installed it to non-default path)
|
||||
|
||||
## Option 2: MSYS2/MinGW
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Building with MSYS2 is broken as of right now, the only way to build on Windows is to use [Option 1: Visual Studio 2022](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md#option-1-visual-studio-2022).
|
||||
|
||||
### (Prerequisite) Download [**MSYS2**](https://www.msys2.org/)
|
||||
|
||||
Go through the MSYS2 installation as normal
|
||||
@ -79,7 +82,7 @@ Normal x86-based computers, follow:
|
||||
|
||||
1. Open "MSYS2 MINGW64" from your new applications
|
||||
2. Run `pacman -Syu`, let it complete;
|
||||
3. Run `pacman -S --needed git mingw-w64-x86_64-binutils mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-ffmpeg`
|
||||
3. Run `pacman -S --needed git mingw-w64-x86_64-binutils mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-rapidjson mingw-w64-x86_64-ninja mingw-w64-x86_64-ffmpeg`
|
||||
1. Optional (Qt only): run `pacman -S --needed mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-qt6-multimedia`
|
||||
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||
5. Run `cd shadPS4`
|
||||
@ -93,7 +96,7 @@ ARM64-based computers, follow:
|
||||
|
||||
1. Open "MSYS2 CLANGARM64" from your new applications
|
||||
2. Run `pacman -Syu`, let it complete;
|
||||
3. Run `pacman -S --needed git mingw-w64-clang-aarch64-binutils mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja mingw-w64-clang-aarch64-ffmpeg`
|
||||
3. Run `pacman -S --needed git mingw-w64-clang-aarch64-binutils mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-rapidjson mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja mingw-w64-clang-aarch64-ffmpeg`
|
||||
1. Optional (Qt only): run `pacman -S --needed mingw-w64-clang-aarch64-qt6-base mingw-w64-clang-aarch64-qt6-tools mingw-w64-clang-aarch64-qt6-multimedia`
|
||||
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||
5. Run `cd shadPS4`
|
||||
|
@ -1,3 +1,47 @@
|
||||
v0.4.0 31/10/2024 - codename divicius
|
||||
=================
|
||||
|
||||
- Shader recompiler fixes
|
||||
- Emulated support for cpus that doesn't have SSE4.2a (intel cpus)
|
||||
- Frame graph + Precise 60 fps timing
|
||||
- Save data: fix nullptr & concurrent file write
|
||||
- Auto Update
|
||||
- Error dialog implementation
|
||||
- Swapchain recreation and window resizing
|
||||
- Add playback of background/title music in game list
|
||||
- Kernel: Quiet sceKernelWaitEventFlag error log on timeout
|
||||
- Improve keyboard navigation in game list
|
||||
- core/memory: Pooled memory implementation
|
||||
- Fix PKG loading
|
||||
- replace trophy xml assert with error
|
||||
- Refactor audio handling with range checks, buffer threshold, and lock
|
||||
- audio_core: Fix return value types and shift some error handling to library
|
||||
- Devtools: PM4 Explorer
|
||||
- Initial support of Geometry shaders
|
||||
- Working touchpad support
|
||||
- net: Stub sceNetErrnoLoc
|
||||
- Add support to click touchpad using back button on non PS4/5 controllers
|
||||
- Multiple Install Folders
|
||||
- Using a more standard data directory for linux
|
||||
- video_core: Implement sceGnmInsertPushColorMarker
|
||||
- ime_dialog: Initial implementation
|
||||
- Network libs fixes
|
||||
- Use GetSystemTimePreciseAsFileTime to fix fps timing issues
|
||||
- Added adaptive mutex initializer
|
||||
- Small Np + trophy fixes
|
||||
- Separate Updates from Game Folder
|
||||
- Minor Fixes for Separate Update Folder
|
||||
- AvPlayer: Do not align w/h to 16 with vdec2
|
||||
- Improve sceSystemServiceReceiveEvent stub
|
||||
- renderer_vulkan: Commize and adjust buffer bindings
|
||||
- Add poll interval to libScePad
|
||||
- Add more surface format mappings.
|
||||
- vulkan: Report only missing format feature flags.
|
||||
- IME implementation
|
||||
- Videodec2 implementation
|
||||
- path_util: Make sure macOS has current directory set and clean up path code.
|
||||
- Load LLE modules from sys_modules/GAMEID folder
|
||||
|
||||
v0.3.0 23/09/2024 - codename broamic
|
||||
=================
|
||||
|
19
documents/patching-shader.md
Normal file
19
documents/patching-shader.md
Normal file
@ -0,0 +1,19 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
### Install Vulkan SDK and \*ensure `spirv-cross` and `glslc` are in PATH\*.
|
||||
|
||||
1. Enable `dumpShaders` in config.toml
|
||||
|
||||
2. Run `spirv-cross -V fs_0x000000.spv --output fs_0x000000.glsl` to decompile the SPIR-V IR to GLSL.
|
||||
|
||||
3. Edit the GLSL file as you wish
|
||||
|
||||
4. To compile back to SPIR-V, run (change the _**-fshader-stage**_ to correct stage):
|
||||
`glslc --target-env=vulkan1.3 --target-spv=spv1.6 -fshader-stage=frag fs_0x000000.glsl -o fs_0x000000.spv`
|
||||
|
||||
5. Put the updated .spv file to `shader/patch` folder with the same name as the original shader
|
||||
|
||||
6. Enable `patchShaders` in config.toml
|
118
externals/CMakeLists.txt
vendored
118
externals/CMakeLists.txt
vendored
@ -8,6 +8,9 @@ set_directory_properties(PROPERTIES
|
||||
SYSTEM ON
|
||||
)
|
||||
|
||||
# Set CMP0069 policy to "NEW" in order to ensure consistent behavior when building external targets with LTO enabled
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||
|
||||
if (MSVC)
|
||||
# Silence "deprecation" warnings
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
@ -15,8 +18,6 @@ endif()
|
||||
|
||||
# Boost
|
||||
if (NOT TARGET Boost::headers)
|
||||
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
||||
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
||||
add_subdirectory(ext-boost)
|
||||
endif()
|
||||
|
||||
@ -25,40 +26,39 @@ if (NOT TARGET fmt::fmt)
|
||||
add_subdirectory(fmt)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
||||
# If it is clang and MSVC we will add a static lib
|
||||
# CryptoPP
|
||||
add_subdirectory(cryptoppwin)
|
||||
target_include_directories(cryptoppwin INTERFACE cryptoppwin/include)
|
||||
else()
|
||||
# CryptoPP
|
||||
if (NOT TARGET cryptopp::cryptopp)
|
||||
set(CRYPTOPP_INSTALL OFF)
|
||||
set(CRYPTOPP_BUILD_TESTING OFF)
|
||||
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/)
|
||||
add_subdirectory(cryptopp-cmake)
|
||||
file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h")
|
||||
target_include_directories(cryptopp INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/cryptopp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# FFmpeg
|
||||
if (NOT TARGET FFmpeg::ffmpeg)
|
||||
add_subdirectory(ffmpeg-core)
|
||||
add_library(FFmpeg::ffmpeg ALIAS ffmpeg)
|
||||
endif()
|
||||
|
||||
# Zlib-Ng
|
||||
if (NOT TARGET zlib-ng::zlib)
|
||||
# LibAtrac9
|
||||
file(GLOB LIBATRAC9_SOURCES LibAtrac9/C/src/*.c)
|
||||
add_library(LibAtrac9 STATIC ${LIBATRAC9_SOURCES})
|
||||
target_include_directories(LibAtrac9 INTERFACE LibAtrac9/C/src)
|
||||
|
||||
# zlib
|
||||
if (NOT TARGET ZLIB::ZLIB)
|
||||
set(ZLIB_ENABLE_TESTS OFF)
|
||||
set(WITH_GTEST OFF)
|
||||
set(WITH_NEW_STRATEGIES ON)
|
||||
set(WITH_NATIVE_INSTRUCTIONS ON)
|
||||
add_subdirectory(zlib-ng)
|
||||
add_library(zlib-ng::zlib ALIAS zlib)
|
||||
set(ZLIB_COMPAT ON CACHE BOOL "" FORCE)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
ZLIB
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng"
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
)
|
||||
FetchContent_MakeAvailable(ZLIB)
|
||||
add_library(ZLIB::ZLIB ALIAS zlib)
|
||||
# libpng expects this variable to exist after its find_package(ZLIB)
|
||||
set(ZLIB_INCLUDE_DIRS "${FETCHCONTENT_BASE_DIR}/zlib-build")
|
||||
endif()
|
||||
|
||||
# SDL3
|
||||
if (NOT TARGET SDL3::SDL3)
|
||||
set(SDL_TEST_LIBRARY OFF)
|
||||
set(SDL_PIPEWIRE OFF)
|
||||
add_subdirectory(sdl3)
|
||||
endif()
|
||||
@ -92,7 +92,7 @@ if (NOT TARGET glslang::glslang)
|
||||
set(ENABLE_OPT OFF CACHE BOOL "")
|
||||
add_subdirectory(glslang)
|
||||
file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
|
||||
target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
||||
target_include_directories(glslang INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
||||
endif()
|
||||
|
||||
# Robin-map
|
||||
@ -113,6 +113,14 @@ endif()
|
||||
# Toml11
|
||||
if (NOT TARGET toml11::toml11)
|
||||
add_subdirectory(toml11)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
get_target_property(_toml11_compile_options toml11 INTERFACE_COMPILE_OPTIONS)
|
||||
list(REMOVE_ITEM _toml11_compile_options "/Zc:preprocessor")
|
||||
set_target_properties(toml11 PROPERTIES INTERFACE_COMPILE_OPTIONS ${_toml11_compile_options})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# xxHash
|
||||
@ -129,12 +137,6 @@ if (NOT TARGET Zydis::Zydis)
|
||||
add_subdirectory(zydis)
|
||||
endif()
|
||||
|
||||
# Winpthreads
|
||||
if (WIN32)
|
||||
add_subdirectory(winpthreads)
|
||||
target_include_directories(winpthreads INTERFACE winpthreads/include)
|
||||
endif()
|
||||
|
||||
# sirit
|
||||
add_subdirectory(sirit)
|
||||
if (WIN32)
|
||||
@ -148,13 +150,15 @@ if (NOT TARGET half::half)
|
||||
add_library(half::half ALIAS half)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# date
|
||||
if (NOT TARGET date::date-tz)
|
||||
option(BUILD_TZ_LIB "" ON)
|
||||
option(USE_SYSTEM_TZ_DB "" ON)
|
||||
add_subdirectory(date)
|
||||
endif()
|
||||
# libpng
|
||||
if (NOT TARGET PNG::PNG)
|
||||
set(PNG_SHARED OFF CACHE BOOL "" FORCE)
|
||||
set(PNG_STATIC ON CACHE BOOL "" FORCE)
|
||||
set(PNG_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(PNG_TOOLS OFF CACHE BOOL "" FORCE)
|
||||
set(SKIP_INSTALL_ALL OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(libpng)
|
||||
add_library(PNG::PNG ALIAS png_static)
|
||||
endif()
|
||||
|
||||
# Dear ImGui
|
||||
@ -169,11 +173,15 @@ add_library(Dear_ImGui
|
||||
target_include_directories(Dear_ImGui INTERFACE dear_imgui/)
|
||||
|
||||
# Tracy
|
||||
option(TRACY_ENABLE "" ON)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
option(TRACY_ENABLE "" OFF)
|
||||
else()
|
||||
option(TRACY_ENABLE "" ON)
|
||||
endif()
|
||||
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
||||
option(TRACY_ON_DEMAND "" ON)
|
||||
option(TRACY_NO_FRAME_IMAGE "" ON)
|
||||
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
|
||||
option(TRACY_FIBERS "" OFF) # For AmdGpu frontend profiling, disabled due to instability
|
||||
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
||||
option(TRACY_NO_CALLSTACK "" ON)
|
||||
option(TRACY_NO_CODE_TRANSFER "" ON)
|
||||
@ -187,12 +195,38 @@ if (NOT TARGET pugixml::pugixml)
|
||||
add_subdirectory(pugixml)
|
||||
endif()
|
||||
|
||||
# libusb
|
||||
if (NOT TARGET libusb::usb)
|
||||
add_subdirectory(ext-libusb)
|
||||
add_library(libusb::usb ALIAS usb-1.0)
|
||||
endif()
|
||||
|
||||
# Discord RPC
|
||||
if (ENABLE_DISCORD_RPC)
|
||||
set(BUILD_EXAMPLES OFF)
|
||||
add_subdirectory(discord-rpc/)
|
||||
target_include_directories(discord-rpc INTERFACE discord-rpc/include)
|
||||
add_subdirectory(discord-rpc)
|
||||
endif()
|
||||
|
||||
# GCN Headers
|
||||
add_subdirectory(gcn)
|
||||
|
||||
# stb
|
||||
if (NOT TARGET stb::headers)
|
||||
add_library(stb INTERFACE)
|
||||
target_include_directories(stb INTERFACE stb)
|
||||
add_library(stb::headers ALIAS stb)
|
||||
endif()
|
||||
|
||||
# Apple-only dependencies
|
||||
if (APPLE)
|
||||
# date
|
||||
if (NOT TARGET date::date-tz)
|
||||
option(BUILD_TZ_LIB "" ON)
|
||||
option(USE_SYSTEM_TZ_DB "" ON)
|
||||
add_subdirectory(date)
|
||||
endif()
|
||||
|
||||
# MoltenVK
|
||||
if (NOT TARGET MoltenVK)
|
||||
add_subdirectory(MoltenVK)
|
||||
endif()
|
||||
endif()
|
||||
|
1
externals/LibAtrac9
vendored
Submodule
1
externals/LibAtrac9
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit ec8899dadf393f655f2871a94e0fe4b3d6220c9a
|
93
externals/MoltenVK/CMakeLists.txt
vendored
Normal file
93
externals/MoltenVK/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Prepare MoltenVK Git revision
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
OUTPUT_VARIABLE MVK_GIT_REV
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
set(MVK_GENERATED_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Generated)
|
||||
file(WRITE ${MVK_GENERATED_INCLUDES}/mvkGitRevDerived.h "static const char* mvkRevString = \"${MVK_GIT_REV}\";")
|
||||
message(STATUS "MoltenVK revision: ${MVK_GIT_REV}")
|
||||
|
||||
# Prepare MoltenVK version
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVK/MoltenVK/API/mvk_private_api.h MVK_PRIVATE_API)
|
||||
string(REGEX MATCH "#define MVK_VERSION_MAJOR [0-9]+" MVK_VERSION_MAJOR_LINE "${MVK_PRIVATE_API}")
|
||||
string(REGEX MATCH "[0-9]+" MVK_VERSION_MAJOR "${MVK_VERSION_MAJOR_LINE}")
|
||||
string(REGEX MATCH "#define MVK_VERSION_MINOR [0-9]+" MVK_VERSION_MINOR_LINE "${MVK_PRIVATE_API}")
|
||||
string(REGEX MATCH "[0-9]+" MVK_VERSION_MINOR "${MVK_VERSION_MINOR_LINE}")
|
||||
string(REGEX MATCH "#define MVK_VERSION_PATCH [0-9]+" MVK_VERSION_PATCH_LINE "${MVK_PRIVATE_API}")
|
||||
string(REGEX MATCH "[0-9]+" MVK_VERSION_PATCH "${MVK_VERSION_PATCH_LINE}")
|
||||
set(MVK_VERSION "${MVK_VERSION_MAJOR}.${MVK_VERSION_MINOR}.${MVK_VERSION_PATCH}")
|
||||
message(STATUS "MoltenVK version: ${MVK_VERSION}")
|
||||
|
||||
# Find required system libraries
|
||||
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||
find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
|
||||
find_library(IOKIT_LIBRARY IOKit REQUIRED)
|
||||
find_library(IOSURFACE_LIBRARY IOSurface REQUIRED)
|
||||
find_library(METAL_LIBRARY Metal REQUIRED)
|
||||
find_library(QUARTZCORE_LIBRARY QuartzCore REQUIRED)
|
||||
|
||||
# cereal
|
||||
option(SKIP_PORTABILITY_TEST "" ON)
|
||||
option(BUILD_DOC "" OFF)
|
||||
option(BUILD_SANDBOX "" OFF)
|
||||
option(SKIP_PERFORMANCE_COMPARISON "" ON)
|
||||
option(SPIRV_CROSS_SKIP_INSTALL "" ON)
|
||||
add_subdirectory(cereal)
|
||||
|
||||
# SPIRV-Cross
|
||||
option(SPIRV_CROSS_CLI "" OFF)
|
||||
option(SPIRV_CROSS_ENABLE_TESTS "" OFF)
|
||||
option(SPIRV_CROSS_ENABLE_HLSL "" OFF)
|
||||
option(SPIRV_CROSS_ENABLE_CPP "" OFF)
|
||||
option(SPIRV_CROSS_SKIP_INSTALL "" ON)
|
||||
add_subdirectory(SPIRV-Cross)
|
||||
|
||||
# Common
|
||||
set(MVK_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/Common)
|
||||
file(GLOB_RECURSE MVK_COMMON_SOURCES CONFIGURE_DEPENDS
|
||||
${MVK_COMMON_DIR}/*.cpp
|
||||
${MVK_COMMON_DIR}/*.m
|
||||
${MVK_COMMON_DIR}/*.mm)
|
||||
set(MVK_COMMON_INCLUDES ${MVK_COMMON_DIR})
|
||||
|
||||
add_library(MoltenVKCommon STATIC ${MVK_COMMON_SOURCES})
|
||||
target_include_directories(MoltenVKCommon PUBLIC ${MVK_COMMON_INCLUDES})
|
||||
target_compile_options(MoltenVKCommon PRIVATE -w)
|
||||
|
||||
# MoltenVKShaderConverter
|
||||
set(MVK_SHADER_CONVERTER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVKShaderConverter)
|
||||
file(GLOB_RECURSE MVK_SHADER_CONVERTER_SOURCES CONFIGURE_DEPENDS
|
||||
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.cpp
|
||||
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.m
|
||||
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.mm)
|
||||
set(MVK_SHADER_CONVERTER_INCLUDES ${MVK_SHADER_CONVERTER_DIR} ${MVK_SHADER_CONVERTER_DIR}/include)
|
||||
|
||||
add_library(MoltenVKShaderConverter STATIC ${MVK_SHADER_CONVERTER_SOURCES})
|
||||
target_include_directories(MoltenVKShaderConverter PUBLIC ${MVK_SHADER_CONVERTER_INCLUDES})
|
||||
target_compile_options(MoltenVKShaderConverter PRIVATE -w)
|
||||
target_link_libraries(MoltenVKShaderConverter PRIVATE spirv-cross-msl spirv-cross-reflect MoltenVKCommon)
|
||||
target_compile_definitions(MoltenVKShaderConverter PRIVATE MVK_EXCLUDE_SPIRV_TOOLS=1)
|
||||
|
||||
# MoltenVK
|
||||
set(MVK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVK)
|
||||
file(GLOB_RECURSE MVK_SOURCES CONFIGURE_DEPENDS
|
||||
${MVK_DIR}/MoltenVK/*.cpp
|
||||
${MVK_DIR}/MoltenVK/*.m
|
||||
${MVK_DIR}/MoltenVK/*.mm)
|
||||
file(GLOB MVK_SRC_INCLUDES LIST_DIRECTORIES ON ${MVK_DIR}/MoltenVK/*)
|
||||
set(MVK_INCLUDES ${MVK_SRC_INCLUDES} ${MVK_GENERATED_INCLUDES} ${MVK_DIR}/include)
|
||||
|
||||
add_library(MoltenVK SHARED ${MVK_SOURCES})
|
||||
target_include_directories(MoltenVK PRIVATE ${MVK_INCLUDES})
|
||||
target_compile_options(MoltenVK PRIVATE -w)
|
||||
target_link_libraries(MoltenVK PRIVATE
|
||||
${APPKIT_LIBRARY} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY} ${IOSURFACE_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY}
|
||||
Vulkan::Headers cereal::cereal spirv-cross-msl MoltenVKCommon MoltenVKShaderConverter)
|
||||
target_compile_definitions(MoltenVK PRIVATE MVK_FRAMEWORK_VERSION=${MVK_VERSION} MVK_USE_METAL_PRIVATE_API=1)
|
1
externals/MoltenVK/MoltenVK
vendored
Submodule
1
externals/MoltenVK/MoltenVK
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 00abd384ce01cbd439045905d2fa6cf799dfa2f6
|
1
externals/MoltenVK/SPIRV-Cross
vendored
Submodule
1
externals/MoltenVK/SPIRV-Cross
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1a69a919fa302e92b337594bd0a8aaea61037d91
|
1
externals/MoltenVK/cereal
vendored
Submodule
1
externals/MoltenVK/cereal
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a56bad8bbb770ee266e930c95d37fff2a5be7fea
|
1
externals/cryptopp
vendored
1
externals/cryptopp
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 60f81a77e0c9a0e7ffc1ca1bc438ddfa2e43b78e
|
1
externals/cryptopp-cmake
vendored
1
externals/cryptopp-cmake
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 2c384c28265a93358a2455e610e76393358794df
|
1
externals/cryptoppwin
vendored
1
externals/cryptoppwin
vendored
@ -1 +0,0 @@
|
||||
Subproject commit bc3441dd2d6a9728e747dc0180bc8b9065a2923c
|
2
externals/date
vendored
2
externals/date
vendored
@ -1 +1 @@
|
||||
Subproject commit dd8affc6de5755e07638bf0a14382d29549d6ee9
|
||||
Subproject commit a45ea7c17b4a7f320e199b71436074bd624c9e15
|
2
externals/dear_imgui
vendored
2
externals/dear_imgui
vendored
@ -1 +1 @@
|
||||
Subproject commit 636cd4a7d623a2bc9bf59bb3acbb4ca075befba3
|
||||
Subproject commit f4d9359095eff3eb03f685921edc1cf0e37b1687
|
2
externals/discord-rpc
vendored
2
externals/discord-rpc
vendored
@ -1 +1 @@
|
||||
Subproject commit 4ec218155d73bcb8022f8f7ca72305d801f84beb
|
||||
Subproject commit 19f66e6dcabb2268965f453db9e5774ede43238f
|
2
externals/ext-boost
vendored
2
externals/ext-boost
vendored
@ -1 +1 @@
|
||||
Subproject commit f2474e1b584fb7a3ed6f85ba875e6eacd742ec8a
|
||||
Subproject commit ca6f230e67be7cc45fc919057f07b2aee64dadc1
|
1
externals/ext-libusb
vendored
Submodule
1
externals/ext-libusb
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e1f4ac1472bdf6aab27f8b836a2f47df85465bac
|
2
externals/ffmpeg-core
vendored
2
externals/ffmpeg-core
vendored
@ -1 +1 @@
|
||||
Subproject commit e30b7d7fe228bfb3f6e41ce1040b44a15eb7d5e0
|
||||
Subproject commit b0de1dcca26c0ebfb8011b8e59dd17fc399db0ff
|
2
externals/fmt
vendored
2
externals/fmt
vendored
@ -1 +1 @@
|
||||
Subproject commit 8ee89546ffcf046309d1f0d38c0393f02fde56c8
|
||||
Subproject commit 64db979e38ec644b1798e41610b28c8d2c8a2739
|
6
externals/gcn/CMakeLists.txt
vendored
6
externals/gcn/CMakeLists.txt
vendored
@ -3,6 +3,10 @@
|
||||
|
||||
project(gcn LANGUAGES CXX)
|
||||
|
||||
add_library(gcn dummy.cpp)
|
||||
add_library(gcn INTERFACE)
|
||||
target_sources(gcn PRIVATE
|
||||
"include/gcn/si_ci_vi_merged_offset.h"
|
||||
"include/gcn/si_ci_vi_merged_pm4_it_opcodes.h"
|
||||
)
|
||||
|
||||
target_include_directories(gcn INTERFACE include)
|
||||
|
2
externals/gcn/dummy.cpp
vendored
2
externals/gcn/dummy.cpp
vendored
@ -1,2 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
2
externals/glslang
vendored
2
externals/glslang
vendored
@ -1 +1 @@
|
||||
Subproject commit e61d7bb3006f451968714e2f653412081871e1ee
|
||||
Subproject commit ba1640446f3826a518721d1f083f3a8cca1120c3
|
1
externals/libpng
vendored
Submodule
1
externals/libpng
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c1cc0f3f4c3d4abd11ca68c59446a29ff6f95003
|
2
externals/magic_enum
vendored
2
externals/magic_enum
vendored
@ -1 +1 @@
|
||||
Subproject commit 126539e13cccdc2e75ce770e94f3c26403099fa5
|
||||
Subproject commit a413fcc9c46a020a746907136a384c227f3cd095
|
2
externals/pugixml
vendored
2
externals/pugixml
vendored
@ -1 +1 @@
|
||||
Subproject commit 3b17184379fcaaeb7f1fbe08018b7fedf2640b3b
|
||||
Subproject commit caade5a28aad86b92a4b5337a9dc70c4ba73c5eb
|
2
externals/robin-map
vendored
2
externals/robin-map
vendored
@ -1 +1 @@
|
||||
Subproject commit fe845fd7852ef541c5479ae23b3d36b57f8608ee
|
||||
Subproject commit 4ec1bf19c6a96125ea22062f38c2cf5b958e448e
|
2
externals/sdl3
vendored
2
externals/sdl3
vendored
@ -1 +1 @@
|
||||
Subproject commit 54e622c2e6af456bfef382fae44c17682d5ac88a
|
||||
Subproject commit 86b206dadf8ad40e6657fa37db371a0aeff74e9c
|
2
externals/sirit
vendored
2
externals/sirit
vendored
@ -1 +1 @@
|
||||
Subproject commit 6cecb95d679c82c413d1f989e0b7ad9af130600d
|
||||
Subproject commit 282083a595dcca86814dedab2f2b0363ef38f1ec
|
2
externals/toml11
vendored
2
externals/toml11
vendored
@ -1 +1 @@
|
||||
Subproject commit f925e7f287c0008813c2294798cf9ca167fd9ffd
|
||||
Subproject commit a01fe3b4c14c6d7b99ee3f07c9e80058c6403097
|
2
externals/tracy
vendored
2
externals/tracy
vendored
@ -1 +1 @@
|
||||
Subproject commit b8061982cad0210b649541016c88ff5faa90733c
|
||||
Subproject commit 143a53d1985b8e52a7590a0daca30a0a7c653b42
|
2
externals/vma
vendored
2
externals/vma
vendored
@ -1 +1 @@
|
||||
Subproject commit 1c35ba99ce775f8342d87a83a3f0f696f99c2a39
|
||||
Subproject commit f378e7b3f18f6e2b06b957f6ba7b1c7207d2a536
|
2
externals/vulkan-headers
vendored
2
externals/vulkan-headers
vendored
@ -1 +1 @@
|
||||
Subproject commit d91597a82f881d473887b560a03a7edf2720b72c
|
||||
Subproject commit 9c77de5c3dd216f28e407eec65ed9c0a296c1f74
|
1
externals/winpthreads
vendored
1
externals/winpthreads
vendored
@ -1 +0,0 @@
|
||||
Subproject commit f00c973a6ab2a23573708568b8ef4acc20a9d36b
|
2
externals/xbyak
vendored
2
externals/xbyak
vendored
@ -1 +1 @@
|
||||
Subproject commit d067f0d3f55696ae8bc9a25ad7012ee80f221d54
|
||||
Subproject commit 44a72f369268f7d552650891b296693e91db86bb
|
2
externals/xxhash
vendored
2
externals/xxhash
vendored
@ -1 +1 @@
|
||||
Subproject commit d4ad85e4afaad5c780f54db1dc967fff5a869ffd
|
||||
Subproject commit 953a09abc39096da9e216b6eb0002c681cdc1199
|
2
externals/zlib-ng
vendored
2
externals/zlib-ng
vendored
@ -1 +1 @@
|
||||
Subproject commit d54e3769be0c522015b784eca2af258b1c026107
|
||||
Subproject commit fd0d263cedab1a136f40d65199987e3eaeecfcbd
|
2
externals/zydis
vendored
2
externals/zydis
vendored
@ -1 +1 @@
|
||||
Subproject commit 9d298eb8067ff62a237203d1e1470785033e185c
|
||||
Subproject commit 120e0e705f8e3b507dc49377ac2879979f0d545c
|
71
shell.nix
Normal file
71
shell.nix
Normal file
@ -0,0 +1,71 @@
|
||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
with import (fetchTarball "https://github.com/nixos/nixpkgs/archive/cfd19cdc54680956dc1816ac577abba6b58b901c.tar.gz") { };
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "shadps4-build-env";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.llvmPackages_18.clang
|
||||
pkgs.cmake
|
||||
pkgs.pkg-config
|
||||
pkgs.git
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.alsa-lib
|
||||
pkgs.libpulseaudio
|
||||
pkgs.openal
|
||||
pkgs.openssl
|
||||
pkgs.zlib
|
||||
pkgs.libedit
|
||||
pkgs.udev
|
||||
pkgs.libevdev
|
||||
pkgs.SDL2
|
||||
pkgs.jack2
|
||||
pkgs.sndio
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qttools
|
||||
pkgs.qt6.qtmultimedia
|
||||
|
||||
pkgs.vulkan-headers
|
||||
pkgs.vulkan-utility-libraries
|
||||
pkgs.vulkan-tools
|
||||
|
||||
pkgs.ffmpeg
|
||||
pkgs.fmt
|
||||
pkgs.glslang
|
||||
pkgs.libxkbcommon
|
||||
pkgs.wayland
|
||||
pkgs.xorg.libxcb
|
||||
pkgs.xorg.xcbutil
|
||||
pkgs.xorg.xcbutilkeysyms
|
||||
pkgs.xorg.xcbutilwm
|
||||
pkgs.sdl3
|
||||
pkgs.stb
|
||||
pkgs.qt6.qtwayland
|
||||
pkgs.wayland-protocols
|
||||
pkgs.libpng
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Entering shadPS4 dev shell"
|
||||
export QT_QPA_PLATFORM="wayland"
|
||||
export QT_PLUGIN_PATH="${pkgs.qt6.qtwayland}/lib/qt-6/plugins:${pkgs.qt6.qtbase}/lib/qt-6/plugins"
|
||||
export QML2_IMPORT_PATH="${pkgs.qt6.qtbase}/lib/qt-6/qml"
|
||||
export CMAKE_PREFIX_PATH="${pkgs.vulkan-headers}:$CMAKE_PREFIX_PATH"
|
||||
|
||||
# OpenGL
|
||||
export LD_LIBRARY_PATH="${
|
||||
pkgs.lib.makeLibraryPath [
|
||||
pkgs.libglvnd
|
||||
pkgs.vulkan-tools
|
||||
]
|
||||
}:$LD_LIBRARY_PATH"
|
||||
|
||||
export LDFLAGS="-L${pkgs.llvmPackages_18.libcxx}/lib -lc++"
|
||||
export LC_ALL="C.UTF-8"
|
||||
export XAUTHORITY=${builtins.getEnv "XAUTHORITY"}
|
||||
'';
|
||||
}
|
@ -1,166 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "sdl_audio.h"
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
|
||||
#include <SDL3/SDL_audio.h>
|
||||
#include <SDL3/SDL_init.h>
|
||||
#include <SDL3/SDL_timer.h>
|
||||
|
||||
#include <mutex> // std::unique_lock
|
||||
|
||||
namespace Audio {
|
||||
|
||||
constexpr int AUDIO_STREAM_BUFFER_THRESHOLD = 65536; // Define constant for buffer threshold
|
||||
|
||||
s32 SDLAudio::AudioOutOpen(int type, u32 samples_num, u32 freq,
|
||||
Libraries::AudioOut::OrbisAudioOutParamFormat format) {
|
||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
||||
std::unique_lock lock{m_mutex};
|
||||
for (int id = 0; id < portsOut.size(); id++) {
|
||||
auto& port = portsOut[id];
|
||||
if (!port.isOpen) {
|
||||
port.isOpen = true;
|
||||
port.type = type;
|
||||
port.samples_num = samples_num;
|
||||
port.freq = freq;
|
||||
port.format = format;
|
||||
SDL_AudioFormat sampleFormat;
|
||||
switch (format) {
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_MONO:
|
||||
sampleFormat = SDL_AUDIO_S16;
|
||||
port.channels_num = 1;
|
||||
port.sample_size = 2;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_MONO:
|
||||
sampleFormat = SDL_AUDIO_F32;
|
||||
port.channels_num = 1;
|
||||
port.sample_size = 4;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_STEREO:
|
||||
sampleFormat = SDL_AUDIO_S16;
|
||||
port.channels_num = 2;
|
||||
port.sample_size = 2;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_STEREO:
|
||||
sampleFormat = SDL_AUDIO_F32;
|
||||
port.channels_num = 2;
|
||||
port.sample_size = 4;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH:
|
||||
sampleFormat = SDL_AUDIO_S16;
|
||||
port.channels_num = 8;
|
||||
port.sample_size = 2;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH:
|
||||
sampleFormat = SDL_AUDIO_F32;
|
||||
port.channels_num = 8;
|
||||
port.sample_size = 4;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH_STD:
|
||||
sampleFormat = SDL_AUDIO_S16;
|
||||
port.channels_num = 8;
|
||||
port.sample_size = 2;
|
||||
break;
|
||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH_STD:
|
||||
sampleFormat = SDL_AUDIO_F32;
|
||||
port.channels_num = 8;
|
||||
port.sample_size = 4;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE_MSG("Unknown format");
|
||||
}
|
||||
|
||||
for (int i = 0; i < port.channels_num; i++) {
|
||||
port.volume[i] = Libraries::AudioOut::SCE_AUDIO_OUT_VOLUME_0DB;
|
||||
}
|
||||
|
||||
SDL_AudioSpec fmt;
|
||||
SDL_zero(fmt);
|
||||
fmt.format = sampleFormat;
|
||||
fmt.channels = port.channels_num;
|
||||
fmt.freq = freq; // Set frequency from the argument
|
||||
port.stream =
|
||||
SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &fmt, NULL, NULL);
|
||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(port.stream));
|
||||
return id + 1;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_ERROR(Lib_AudioOut, "Audio ports are full");
|
||||
return ORBIS_AUDIO_OUT_ERROR_PORT_FULL; // all ports are used
|
||||
}
|
||||
|
||||
s32 SDLAudio::AudioOutOutput(s32 handle, const void* ptr) {
|
||||
std::shared_lock lock{m_mutex};
|
||||
auto& port = portsOut[handle - 1];
|
||||
if (!port.isOpen) {
|
||||
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
|
||||
}
|
||||
|
||||
const size_t data_size = port.samples_num * port.sample_size * port.channels_num;
|
||||
|
||||
bool result = SDL_PutAudioStreamData(port.stream, ptr, data_size);
|
||||
|
||||
lock.unlock(); // Unlock only after necessary operations
|
||||
|
||||
while (SDL_GetAudioStreamAvailable(port.stream) > AUDIO_STREAM_BUFFER_THRESHOLD) {
|
||||
SDL_Delay(0);
|
||||
}
|
||||
|
||||
return result ? ORBIS_OK : -1;
|
||||
}
|
||||
|
||||
s32 SDLAudio::AudioOutSetVolume(s32 handle, s32 bitflag, s32* volume) {
|
||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
||||
std::shared_lock lock{m_mutex};
|
||||
auto& port = portsOut[handle - 1];
|
||||
if (!port.isOpen) {
|
||||
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
|
||||
}
|
||||
|
||||
for (int i = 0; i < port.channels_num; i++, bitflag >>= 1u) {
|
||||
auto bit = bitflag & 0x1u;
|
||||
|
||||
if (bit == 1) {
|
||||
int src_index = i;
|
||||
if (port.format ==
|
||||
OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH_STD ||
|
||||
port.format == OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH_STD) {
|
||||
switch (i) {
|
||||
case 4:
|
||||
src_index = 6;
|
||||
break;
|
||||
case 5:
|
||||
src_index = 7;
|
||||
break;
|
||||
case 6:
|
||||
src_index = 4;
|
||||
break;
|
||||
case 7:
|
||||
src_index = 5;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
port.volume[i] = volume[src_index];
|
||||
}
|
||||
}
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 SDLAudio::AudioOutGetStatus(s32 handle, int* type, int* channels_num) {
|
||||
std::shared_lock lock{m_mutex};
|
||||
auto& port = portsOut[handle - 1];
|
||||
*type = port.type;
|
||||
*channels_num = port.channels_num;
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
} // namespace Audio
|
@ -1,39 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <shared_mutex>
|
||||
#include <SDL3/SDL_audio.h>
|
||||
#include "core/libraries/audio/audioout.h"
|
||||
|
||||
namespace Audio {
|
||||
|
||||
class SDLAudio {
|
||||
public:
|
||||
SDLAudio() = default;
|
||||
virtual ~SDLAudio() = default;
|
||||
|
||||
s32 AudioOutOpen(int type, u32 samples_num, u32 freq,
|
||||
Libraries::AudioOut::OrbisAudioOutParamFormat format);
|
||||
s32 AudioOutOutput(s32 handle, const void* ptr);
|
||||
s32 AudioOutSetVolume(s32 handle, s32 bitflag, s32* volume);
|
||||
s32 AudioOutGetStatus(s32 handle, int* type, int* channels_num);
|
||||
|
||||
private:
|
||||
struct PortOut {
|
||||
SDL_AudioStream* stream = nullptr;
|
||||
u32 samples_num = 0;
|
||||
u32 freq = 0;
|
||||
u32 format = -1;
|
||||
int type = 0;
|
||||
int channels_num = 0;
|
||||
int volume[8] = {};
|
||||
u8 sample_size = 0;
|
||||
bool isOpen = false;
|
||||
};
|
||||
std::shared_mutex m_mutex;
|
||||
std::array<PortOut, Libraries::AudioOut::SCE_AUDIO_OUT_NUM_PORTS> portsOut;
|
||||
};
|
||||
|
||||
} // namespace Audio
|
30
src/common/adaptive_mutex.h
Normal file
30
src/common/adaptive_mutex.h
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __linux__
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
||||
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||
class AdaptiveMutex {
|
||||
public:
|
||||
void lock() {
|
||||
pthread_mutex_lock(&mutex);
|
||||
}
|
||||
void unlock() {
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
[[nodiscard]] bool try_lock() {
|
||||
return pthread_mutex_trylock(&mutex) == 0;
|
||||
}
|
||||
|
||||
private:
|
||||
pthread_mutex_t mutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
|
||||
};
|
||||
#endif // PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||
|
||||
} // namespace Common
|
1195
src/common/aes.h
Normal file
1195
src/common/aes.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,12 @@ template <typename T>
|
||||
return static_cast<T>(value - value % size);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires std::is_integral_v<T>
|
||||
[[nodiscard]] constexpr bool IsAligned(T value, std::size_t alignment) {
|
||||
return (value & (alignment - 1)) == 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires std::is_integral_v<T>
|
||||
[[nodiscard]] constexpr bool Is16KBAligned(T value) {
|
||||
|
406
src/common/bit_array.h
Normal file
406
src/common/bit_array.h
Normal file
@ -0,0 +1,406 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include "common/types.h"
|
||||
|
||||
#ifdef __AVX2__
|
||||
#define BIT_ARRAY_USE_AVX
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
||||
template <size_t N>
|
||||
class BitArray {
|
||||
static_assert(N % 64 == 0, "BitArray size must be a multiple of 64 bits.");
|
||||
|
||||
static constexpr size_t BITS_PER_WORD = 64;
|
||||
static constexpr size_t WORD_COUNT = N / BITS_PER_WORD;
|
||||
static constexpr size_t WORDS_PER_AVX = 4;
|
||||
static constexpr size_t AVX_WORD_COUNT = WORD_COUNT / WORDS_PER_AVX;
|
||||
|
||||
public:
|
||||
using Range = std::pair<size_t, size_t>;
|
||||
|
||||
class Iterator {
|
||||
public:
|
||||
explicit Iterator(const BitArray& bit_array_, u64 start) : bit_array(bit_array_) {
|
||||
range = bit_array.FirstRangeFrom(start);
|
||||
}
|
||||
|
||||
Iterator& operator++() {
|
||||
range = bit_array.FirstRangeFrom(range.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const Iterator& other) const {
|
||||
return range == other.range;
|
||||
}
|
||||
|
||||
bool operator!=(const Iterator& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
const Range& operator*() const {
|
||||
return range;
|
||||
}
|
||||
|
||||
const Range* operator->() const {
|
||||
return ⦥
|
||||
}
|
||||
|
||||
private:
|
||||
const BitArray& bit_array;
|
||||
Range range;
|
||||
};
|
||||
|
||||
using const_iterator = Iterator;
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
using value_type = Range;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = const Range*;
|
||||
using reference = const Range&;
|
||||
|
||||
BitArray() = default;
|
||||
BitArray(const BitArray& other) = default;
|
||||
BitArray& operator=(const BitArray& other) = default;
|
||||
BitArray(BitArray&& other) noexcept = default;
|
||||
BitArray& operator=(BitArray&& other) noexcept = default;
|
||||
~BitArray() = default;
|
||||
|
||||
BitArray(const BitArray& other, size_t start, size_t end) {
|
||||
if (start >= end || end > N) {
|
||||
return;
|
||||
}
|
||||
const size_t first_word = start / BITS_PER_WORD;
|
||||
const size_t last_word = (end - 1) / BITS_PER_WORD;
|
||||
const size_t start_bit = start % BITS_PER_WORD;
|
||||
const size_t end_bit = (end - 1) % BITS_PER_WORD;
|
||||
const u64 start_mask = ~((1ULL << start_bit) - 1);
|
||||
const u64 end_mask = end_bit == BITS_PER_WORD - 1 ? ~0ULL : (1ULL << (end_bit + 1)) - 1;
|
||||
if (first_word == last_word) {
|
||||
data[first_word] = other.data[first_word] & (start_mask & end_mask);
|
||||
} else {
|
||||
data[first_word] = other.data[first_word] & start_mask;
|
||||
size_t i = first_word + 1;
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
for (; i + WORDS_PER_AVX <= last_word; i += WORDS_PER_AVX) {
|
||||
const __m256i current =
|
||||
_mm256_loadu_si256(reinterpret_cast<const __m256i*>(&other.data[i]));
|
||||
_mm256_storeu_si256(reinterpret_cast<__m256i*>(&data[i]), current);
|
||||
}
|
||||
#endif
|
||||
for (; i < last_word; ++i) {
|
||||
data[i] = other.data[i];
|
||||
}
|
||||
data[last_word] = other.data[last_word] & end_mask;
|
||||
}
|
||||
}
|
||||
|
||||
BitArray(const BitArray& other, const Range& range)
|
||||
: BitArray(other, range.first, range.second) {}
|
||||
|
||||
const_iterator begin() const {
|
||||
return Iterator(*this, 0);
|
||||
}
|
||||
const_iterator end() const {
|
||||
return Iterator(*this, N);
|
||||
}
|
||||
|
||||
inline constexpr void Set(size_t idx) {
|
||||
data[idx / BITS_PER_WORD] |= (1ULL << (idx % BITS_PER_WORD));
|
||||
}
|
||||
|
||||
inline constexpr void Unset(size_t idx) {
|
||||
data[idx / BITS_PER_WORD] &= ~(1ULL << (idx % BITS_PER_WORD));
|
||||
}
|
||||
|
||||
inline constexpr bool Get(size_t idx) const {
|
||||
return (data[idx / BITS_PER_WORD] & (1ULL << (idx % BITS_PER_WORD))) != 0;
|
||||
}
|
||||
|
||||
inline void SetRange(size_t start, size_t end) {
|
||||
if (start >= end || end > N) {
|
||||
return;
|
||||
}
|
||||
const size_t first_word = start / BITS_PER_WORD;
|
||||
const size_t last_word = (end - 1) / BITS_PER_WORD;
|
||||
const size_t start_bit = start % BITS_PER_WORD;
|
||||
const size_t end_bit = (end - 1) % BITS_PER_WORD;
|
||||
const u64 start_mask = ~((1ULL << start_bit) - 1);
|
||||
const u64 end_mask = end_bit == BITS_PER_WORD - 1 ? ~0ULL : (1ULL << (end_bit + 1)) - 1;
|
||||
if (first_word == last_word) {
|
||||
data[first_word] |= start_mask & end_mask;
|
||||
} else {
|
||||
data[first_word] |= start_mask;
|
||||
size_t i = first_word + 1;
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
const __m256i value = _mm256_set1_epi64x(-1);
|
||||
for (; i + WORDS_PER_AVX <= last_word; i += WORDS_PER_AVX) {
|
||||
_mm256_storeu_si256(reinterpret_cast<__m256i*>(&data[i]), value);
|
||||
}
|
||||
#endif
|
||||
for (; i < last_word; ++i) {
|
||||
data[i] = ~0ULL;
|
||||
}
|
||||
data[last_word] |= end_mask;
|
||||
}
|
||||
}
|
||||
|
||||
inline void UnsetRange(size_t start, size_t end) {
|
||||
if (start >= end || end > N) {
|
||||
return;
|
||||
}
|
||||
size_t first_word = start / BITS_PER_WORD;
|
||||
const size_t last_word = (end - 1) / BITS_PER_WORD;
|
||||
const size_t start_bit = start % BITS_PER_WORD;
|
||||
const size_t end_bit = (end - 1) % BITS_PER_WORD;
|
||||
const u64 start_mask = (1ULL << start_bit) - 1;
|
||||
const u64 end_mask = end_bit == BITS_PER_WORD - 1 ? 0ULL : ~((1ULL << (end_bit + 1)) - 1);
|
||||
if (first_word == last_word) {
|
||||
data[first_word] &= start_mask | end_mask;
|
||||
} else {
|
||||
data[first_word] &= start_mask;
|
||||
size_t i = first_word + 1;
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
const __m256i value = _mm256_setzero_si256();
|
||||
for (; i + WORDS_PER_AVX <= last_word; i += WORDS_PER_AVX) {
|
||||
_mm256_storeu_si256(reinterpret_cast<__m256i*>(&data[i]), value);
|
||||
}
|
||||
#endif
|
||||
for (; i < last_word; ++i) {
|
||||
data[i] = 0ULL;
|
||||
}
|
||||
data[last_word] &= end_mask;
|
||||
}
|
||||
}
|
||||
|
||||
inline constexpr void SetRange(const Range& range) {
|
||||
SetRange(range.first, range.second);
|
||||
}
|
||||
|
||||
inline constexpr void UnsetRange(const Range& range) {
|
||||
UnsetRange(range.first, range.second);
|
||||
}
|
||||
|
||||
inline constexpr void Clear() {
|
||||
data.fill(0);
|
||||
}
|
||||
|
||||
inline constexpr void Fill() {
|
||||
data.fill(~0ULL);
|
||||
}
|
||||
|
||||
inline constexpr bool None() const {
|
||||
u64 result = 0;
|
||||
for (const auto& word : data) {
|
||||
result |= word;
|
||||
}
|
||||
return result == 0;
|
||||
}
|
||||
|
||||
inline constexpr bool Any() const {
|
||||
return !None();
|
||||
}
|
||||
|
||||
Range FirstRangeFrom(size_t start) const {
|
||||
if (start >= N) {
|
||||
return {N, N};
|
||||
}
|
||||
const auto find_end_bit = [&](size_t word) {
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
const __m256i all_one = _mm256_set1_epi64x(-1);
|
||||
for (; word + WORDS_PER_AVX <= WORD_COUNT; word += WORDS_PER_AVX) {
|
||||
const __m256i current =
|
||||
_mm256_loadu_si256(reinterpret_cast<const __m256i*>(&data[word]));
|
||||
const __m256i cmp = _mm256_cmpeq_epi64(current, all_one);
|
||||
if (_mm256_movemask_epi8(cmp) != 0xFFFFFFFF) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (; word < WORD_COUNT; ++word) {
|
||||
if (data[word] != ~0ULL) {
|
||||
return (word * BITS_PER_WORD) + std::countr_one(data[word]);
|
||||
}
|
||||
}
|
||||
return N;
|
||||
};
|
||||
|
||||
const auto word_bits = [&](size_t index, u64 word) {
|
||||
const int empty_bits = std::countr_zero(word);
|
||||
const int ones_count = std::countr_one(word >> empty_bits);
|
||||
const size_t start_bit = index * BITS_PER_WORD + empty_bits;
|
||||
if (ones_count + empty_bits < BITS_PER_WORD) {
|
||||
return Range{start_bit, start_bit + ones_count};
|
||||
}
|
||||
return Range{start_bit, find_end_bit(index + 1)};
|
||||
};
|
||||
|
||||
const size_t start_word = start / BITS_PER_WORD;
|
||||
const size_t start_bit = start % BITS_PER_WORD;
|
||||
const u64 masked_first = data[start_word] & (~((1ULL << start_bit) - 1));
|
||||
if (masked_first) {
|
||||
return word_bits(start_word, masked_first);
|
||||
}
|
||||
|
||||
size_t word = start_word + 1;
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
for (; word + WORDS_PER_AVX <= WORD_COUNT; word += WORDS_PER_AVX) {
|
||||
const __m256i current =
|
||||
_mm256_loadu_si256(reinterpret_cast<const __m256i*>(&data[word]));
|
||||
if (!_mm256_testz_si256(current, current)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (; word < WORD_COUNT; ++word) {
|
||||
if (data[word] != 0) {
|
||||
return word_bits(word, data[word]);
|
||||
}
|
||||
}
|
||||
return {N, N};
|
||||
}
|
||||
|
||||
inline constexpr Range FirstRange() const {
|
||||
return FirstRangeFrom(0);
|
||||
}
|
||||
|
||||
Range LastRangeFrom(size_t end) const {
|
||||
if (end == 0) {
|
||||
return {0, 0};
|
||||
}
|
||||
if (end > N) {
|
||||
end = N;
|
||||
}
|
||||
const auto find_start_bit = [&](size_t word) {
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
const __m256i all_zero = _mm256_setzero_si256();
|
||||
for (; word >= WORDS_PER_AVX; word -= WORDS_PER_AVX) {
|
||||
const __m256i current = _mm256_loadu_si256(
|
||||
reinterpret_cast<const __m256i*>(&data[word - WORDS_PER_AVX]));
|
||||
const __m256i cmp = _mm256_cmpeq_epi64(current, all_zero);
|
||||
if (_mm256_movemask_epi8(cmp) != 0xFFFFFFFF) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (; word > 0; --word) {
|
||||
if (data[word - 1] != ~0ULL) {
|
||||
return word * BITS_PER_WORD - std::countl_one(data[word - 1]);
|
||||
}
|
||||
}
|
||||
return size_t(0);
|
||||
};
|
||||
const auto word_bits = [&](size_t index, u64 word) {
|
||||
const int empty_bits = std::countl_zero(word);
|
||||
const int ones_count = std::countl_one(word << empty_bits);
|
||||
const size_t end_bit = index * BITS_PER_WORD - empty_bits;
|
||||
if (empty_bits + ones_count < BITS_PER_WORD) {
|
||||
return Range{end_bit - ones_count, end_bit};
|
||||
}
|
||||
return Range{find_start_bit(index - 1), end_bit};
|
||||
};
|
||||
const size_t end_word = ((end - 1) / BITS_PER_WORD) + 1;
|
||||
const size_t end_bit = (end - 1) % BITS_PER_WORD;
|
||||
u64 masked_last = data[end_word - 1];
|
||||
if (end_bit < BITS_PER_WORD - 1) {
|
||||
masked_last &= (1ULL << (end_bit + 1)) - 1;
|
||||
}
|
||||
if (masked_last) {
|
||||
return word_bits(end_word, masked_last);
|
||||
}
|
||||
size_t word = end_word - 1;
|
||||
#ifdef BIT_ARRAY_USE_AVX
|
||||
for (; word >= WORDS_PER_AVX; word -= WORDS_PER_AVX) {
|
||||
const __m256i current =
|
||||
_mm256_loadu_si256(reinterpret_cast<const __m256i*>(&data[word - WORDS_PER_AVX]));
|
||||
if (!_mm256_testz_si256(current, current)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (; word > 0; --word) {
|
||||
if (data[word - 1] != 0) {
|
||||
return word_bits(word, data[word - 1]);
|
||||
}
|
||||
}
|
||||
return {0, 0};
|
||||
}
|
||||
|
||||
inline constexpr Range LastRange() const {
|
||||
return LastRangeFrom(N);
|
||||
}
|
||||
|
||||
inline constexpr size_t Size() const {
|
||||
return N;
|
||||
}
|
||||
|
||||
inline constexpr BitArray& operator|=(const BitArray& other) {
|
||||
for (size_t i = 0; i < WORD_COUNT; ++i) {
|
||||
data[i] |= other.data[i];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline constexpr BitArray& operator&=(const BitArray& other) {
|
||||
for (size_t i = 0; i < WORD_COUNT; ++i) {
|
||||
data[i] &= other.data[i];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline constexpr BitArray& operator^=(const BitArray& other) {
|
||||
for (size_t i = 0; i < WORD_COUNT; ++i) {
|
||||
data[i] ^= other.data[i];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline constexpr BitArray operator|(const BitArray& other) const {
|
||||
BitArray result = *this;
|
||||
result |= other;
|
||||
return result;
|
||||
}
|
||||
|
||||
inline constexpr BitArray operator&(const BitArray& other) const {
|
||||
BitArray result = *this;
|
||||
result &= other;
|
||||
return result;
|
||||
}
|
||||
|
||||
inline constexpr BitArray operator^(const BitArray& other) const {
|
||||
BitArray result = *this;
|
||||
result ^= other;
|
||||
return result;
|
||||
}
|
||||
|
||||
inline constexpr BitArray operator~() const {
|
||||
BitArray result = *this;
|
||||
for (size_t i = 0; i < WORD_COUNT; ++i) {
|
||||
result.data[i] = ~result.data[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
inline constexpr bool operator==(const BitArray& other) const {
|
||||
u64 result = 0;
|
||||
for (size_t i = 0; i < WORD_COUNT; ++i) {
|
||||
result |= data[i] ^ other.data[i];
|
||||
}
|
||||
return result == 0;
|
||||
}
|
||||
|
||||
inline constexpr bool operator!=(const BitArray& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<u64, WORD_COUNT> data{};
|
||||
};
|
||||
|
||||
} // namespace Common
|
File diff suppressed because it is too large
Load Diff
@ -9,120 +9,139 @@
|
||||
|
||||
namespace Config {
|
||||
|
||||
enum HideCursorState : s16 { Never, Idle, Always };
|
||||
struct GameInstallDir {
|
||||
std::filesystem::path path;
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
enum HideCursorState : int { Never, Idle, Always };
|
||||
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
|
||||
bool isNeoMode();
|
||||
bool isFullscreenMode();
|
||||
bool getPlayBGM();
|
||||
int getBGMvolume();
|
||||
bool getEnableDiscordRPC();
|
||||
bool getSeparateUpdateEnabled();
|
||||
|
||||
std::string getLogFilter();
|
||||
std::string getLogType();
|
||||
std::string getUserName();
|
||||
std::string getUpdateChannel();
|
||||
|
||||
s16 getCursorState();
|
||||
int getCursorHideTimeout();
|
||||
std::string getBackButtonBehavior();
|
||||
bool getUseSpecialPad();
|
||||
int getSpecialPadClass();
|
||||
|
||||
u32 getScreenWidth();
|
||||
u32 getScreenHeight();
|
||||
s32 getGpuId();
|
||||
|
||||
int getVolumeSlider();
|
||||
void setVolumeSlider(int volumeValue);
|
||||
std::string getTrophyKey();
|
||||
void setTrophyKey(std::string key);
|
||||
bool getIsFullscreen();
|
||||
void setIsFullscreen(bool enable);
|
||||
std::string getFullscreenMode();
|
||||
void setFullscreenMode(std::string mode);
|
||||
u32 getWindowWidth();
|
||||
u32 getWindowHeight();
|
||||
void setWindowWidth(u32 width);
|
||||
void setWindowHeight(u32 height);
|
||||
u32 getInternalScreenWidth();
|
||||
u32 getInternalScreenHeight();
|
||||
void setInternalScreenWidth(u32 width);
|
||||
void setInternalScreenHeight(u32 height);
|
||||
bool debugDump();
|
||||
bool showSplash();
|
||||
bool autoUpdate();
|
||||
bool nullGpu();
|
||||
bool copyGPUCmdBuffers();
|
||||
bool dumpShaders();
|
||||
bool isRdocEnabled();
|
||||
u32 vblankDiv();
|
||||
|
||||
void setDebugDump(bool enable);
|
||||
void setShowSplash(bool enable);
|
||||
void setAutoUpdate(bool enable);
|
||||
void setNullGpu(bool enable);
|
||||
void setCopyGPUCmdBuffers(bool enable);
|
||||
void setDumpShaders(bool enable);
|
||||
void setVblankDiv(u32 value);
|
||||
s32 getGpuId();
|
||||
void setGpuId(s32 selectedGpuId);
|
||||
void setScreenWidth(u32 width);
|
||||
void setScreenHeight(u32 height);
|
||||
void setFullscreenMode(bool enable);
|
||||
void setPlayBGM(bool enable);
|
||||
void setBGMvolume(int volume);
|
||||
void setEnableDiscordRPC(bool enable);
|
||||
void setLanguage(u32 language);
|
||||
void setNeoMode(bool enable);
|
||||
void setUserName(const std::string& type);
|
||||
void setUpdateChannel(const std::string& type);
|
||||
void setSeparateUpdateEnabled(bool use);
|
||||
|
||||
bool allowHDR();
|
||||
void setAllowHDR(bool enable);
|
||||
bool collectShadersForDebug();
|
||||
void setCollectShaderForDebug(bool enable);
|
||||
bool showSplash();
|
||||
void setShowSplash(bool enable);
|
||||
std::string sideTrophy();
|
||||
void setSideTrophy(std::string side);
|
||||
bool nullGpu();
|
||||
void setNullGpu(bool enable);
|
||||
bool copyGPUCmdBuffers();
|
||||
void setCopyGPUCmdBuffers(bool enable);
|
||||
bool readbacks();
|
||||
void setReadbacks(bool enable);
|
||||
bool readbackLinearImages();
|
||||
bool directMemoryAccess();
|
||||
void setDirectMemoryAccess(bool enable);
|
||||
bool dumpShaders();
|
||||
void setDumpShaders(bool enable);
|
||||
u32 vblankDiv();
|
||||
void setVblankDiv(u32 value);
|
||||
bool getisTrophyPopupDisabled();
|
||||
void setisTrophyPopupDisabled(bool disable);
|
||||
s16 getCursorState();
|
||||
void setCursorState(s16 cursorState);
|
||||
void setCursorHideTimeout(int newcursorHideTimeout);
|
||||
void setBackButtonBehavior(const std::string& type);
|
||||
void setUseSpecialPad(bool use);
|
||||
void setSpecialPadClass(int type);
|
||||
|
||||
void setLogType(const std::string& type);
|
||||
void setLogFilter(const std::string& type);
|
||||
|
||||
void setVkValidation(bool enable);
|
||||
void setVkSyncValidation(bool enable);
|
||||
void setRdocEnabled(bool enable);
|
||||
|
||||
bool vkValidationEnabled();
|
||||
void setVkValidation(bool enable);
|
||||
bool vkValidationSyncEnabled();
|
||||
bool vkValidationGpuEnabled();
|
||||
bool vkMarkersEnabled();
|
||||
bool vkCrashDiagnosticEnabled();
|
||||
void setVkSyncValidation(bool enable);
|
||||
bool getVkCrashDiagnosticEnabled();
|
||||
void setVkCrashDiagnosticEnabled(bool enable);
|
||||
bool getVkHostMarkersEnabled();
|
||||
void setVkHostMarkersEnabled(bool enable);
|
||||
bool getVkGuestMarkersEnabled();
|
||||
void setVkGuestMarkersEnabled(bool enable);
|
||||
bool getEnableDiscordRPC();
|
||||
void setEnableDiscordRPC(bool enable);
|
||||
bool isRdocEnabled();
|
||||
void setRdocEnabled(bool enable);
|
||||
std::string getLogType();
|
||||
void setLogType(const std::string& type);
|
||||
std::string getLogFilter();
|
||||
void setLogFilter(const std::string& type);
|
||||
double getTrophyNotificationDuration();
|
||||
void setTrophyNotificationDuration(double newTrophyNotificationDuration);
|
||||
int getCursorHideTimeout();
|
||||
std::string getMicDevice();
|
||||
void setCursorHideTimeout(int newcursorHideTimeout);
|
||||
void setMicDevice(std::string device);
|
||||
void setSeparateLogFilesEnabled(bool enabled);
|
||||
bool getSeparateLogFilesEnabled();
|
||||
u32 GetLanguage();
|
||||
void setLanguage(u32 language);
|
||||
void setUseSpecialPad(bool use);
|
||||
bool getUseSpecialPad();
|
||||
void setSpecialPadClass(int type);
|
||||
int getSpecialPadClass();
|
||||
bool getPSNSignedIn();
|
||||
void setPSNSignedIn(bool sign); // no ui setting
|
||||
bool patchShaders(); // no set
|
||||
bool fpsColor(); // no set
|
||||
bool isNeoModeConsole();
|
||||
void setNeoMode(bool enable); // no ui setting
|
||||
bool isDevKitConsole(); // no set
|
||||
bool vkValidationGpuEnabled(); // no set
|
||||
bool getIsMotionControlsEnabled();
|
||||
void setIsMotionControlsEnabled(bool use);
|
||||
|
||||
// TODO
|
||||
bool GetLoadGameSizeEnabled();
|
||||
std::filesystem::path GetSaveDataPath();
|
||||
void setLoadGameSizeEnabled(bool enable);
|
||||
bool getCompatibilityEnabled();
|
||||
bool getCheckCompatibilityOnStartup();
|
||||
bool getIsConnectedToNetwork();
|
||||
std::string getUserName();
|
||||
std::string getChooseHomeTab();
|
||||
bool GetUseUnifiedInputConfig();
|
||||
void SetUseUnifiedInputConfig(bool use);
|
||||
bool GetOverrideControllerColor();
|
||||
void SetOverrideControllerColor(bool enable);
|
||||
int* GetControllerCustomColor();
|
||||
void SetControllerCustomColor(int r, int b, int g);
|
||||
void setUserName(const std::string& type);
|
||||
void setChooseHomeTab(const std::string& type);
|
||||
void setGameInstallDirs(const std::vector<std::filesystem::path>& dirs_config);
|
||||
void setAllGameInstallDirs(const std::vector<GameInstallDir>& dirs_config);
|
||||
void setSaveDataPath(const std::filesystem::path& path);
|
||||
void setCompatibilityEnabled(bool use);
|
||||
void setCheckCompatibilityOnStartup(bool use);
|
||||
// Gui
|
||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
||||
bool addGameInstallDir(const std::filesystem::path& dir);
|
||||
bool addGameInstallDir(const std::filesystem::path& dir, bool enabled = true);
|
||||
void removeGameInstallDir(const std::filesystem::path& dir);
|
||||
void setGameInstallDirEnabled(const std::filesystem::path& dir, bool enabled);
|
||||
void setAddonInstallDir(const std::filesystem::path& dir);
|
||||
void setMainWindowTheme(u32 theme);
|
||||
void setIconSize(u32 size);
|
||||
void setIconSizeGrid(u32 size);
|
||||
void setSliderPosition(u32 pos);
|
||||
void setSliderPositionGrid(u32 pos);
|
||||
void setTableMode(u32 mode);
|
||||
void setMainWindowWidth(u32 width);
|
||||
void setMainWindowHeight(u32 height);
|
||||
void setPkgViewer(const std::vector<std::string>& pkgList);
|
||||
void setElfViewer(const std::vector<std::string>& elfList);
|
||||
void setRecentFiles(const std::vector<std::string>& recentFiles);
|
||||
void setEmulatorLanguage(std::string language);
|
||||
|
||||
u32 getMainWindowGeometryX();
|
||||
u32 getMainWindowGeometryY();
|
||||
u32 getMainWindowGeometryW();
|
||||
u32 getMainWindowGeometryH();
|
||||
const std::vector<std::filesystem::path>& getGameInstallDirs();
|
||||
const std::vector<std::filesystem::path> getGameInstallDirs();
|
||||
const std::vector<bool> getGameInstallDirsEnabled();
|
||||
std::filesystem::path getAddonInstallDir();
|
||||
u32 getMainWindowTheme();
|
||||
u32 getIconSize();
|
||||
u32 getIconSizeGrid();
|
||||
u32 getSliderPosition();
|
||||
u32 getSliderPositionGrid();
|
||||
u32 getTableMode();
|
||||
u32 getMainWindowWidth();
|
||||
u32 getMainWindowHeight();
|
||||
std::vector<std::string> getPkgViewer();
|
||||
std::vector<std::string> getElfViewer();
|
||||
std::vector<std::string> getRecentFiles();
|
||||
std::string getEmulatorLanguage();
|
||||
|
||||
void setDefaultValues();
|
||||
|
||||
// settings
|
||||
u32 GetLanguage();
|
||||
// todo: name and function location pending
|
||||
std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id = "");
|
||||
|
||||
}; // namespace Config
|
||||
|
@ -14,9 +14,15 @@
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
static inline bool IsProfilerConnected() {
|
||||
#if TRACY_ENABLE
|
||||
return tracy::GetProfiler().IsConnected();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define TRACY_GPU_ENABLED 0
|
||||
|
||||
#define CUSTOM_LOCK(type, varname) \
|
||||
tracy::LockableCtx varname { \
|
||||
[]() -> const tracy::SourceLocationData* { \
|
||||
@ -41,7 +47,7 @@ enum MarkersPalette : int {
|
||||
#define RENDERER_TRACE ZoneScopedC(RendererMarkerColor)
|
||||
#define HLE_TRACE ZoneScopedC(HleMarkerColor)
|
||||
|
||||
#define TRACE_HINT(str) ZoneText(str.c_str(), str.size())
|
||||
#define TRACE_HINT(str) ZoneText(str.data(), str.size())
|
||||
|
||||
#define TRACE_WARN(msg) \
|
||||
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::DarkOrange); }(msg);
|
||||
@ -57,3 +63,11 @@ enum MarkersPalette : int {
|
||||
tracy::SourceLocationData{nullptr, name, TracyFile, (uint32_t)TracyLine, 0};
|
||||
|
||||
#define FRAME_END FrameMark
|
||||
|
||||
#ifdef TRACY_FIBERS
|
||||
#define FIBER_ENTER(name) TracyFiberEnter(name)
|
||||
#define FIBER_EXIT TracyFiberLeave
|
||||
#else
|
||||
#define FIBER_ENTER(name)
|
||||
#define FIBER_EXIT
|
||||
#endif
|
||||
|
@ -13,6 +13,15 @@ DecoderImpl::DecoderImpl() {
|
||||
|
||||
DecoderImpl::~DecoderImpl() = default;
|
||||
|
||||
std::string DecoderImpl::disassembleInst(ZydisDecodedInstruction& inst,
|
||||
ZydisDecodedOperand* operands, u64 address) {
|
||||
const int bufLen = 256;
|
||||
char szBuffer[bufLen];
|
||||
ZydisFormatterFormatInstruction(&m_formatter, &inst, operands, inst.operand_count_visible,
|
||||
szBuffer, sizeof(szBuffer), address, ZYAN_NULL);
|
||||
return szBuffer;
|
||||
}
|
||||
|
||||
void DecoderImpl::printInstruction(void* code, u64 address) {
|
||||
ZydisDecodedInstruction instruction;
|
||||
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
|
||||
@ -27,11 +36,8 @@ void DecoderImpl::printInstruction(void* code, u64 address) {
|
||||
|
||||
void DecoderImpl::printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||
u64 address) {
|
||||
const int bufLen = 256;
|
||||
char szBuffer[bufLen];
|
||||
ZydisFormatterFormatInstruction(&m_formatter, &inst, operands, inst.operand_count_visible,
|
||||
szBuffer, sizeof(szBuffer), address, ZYAN_NULL);
|
||||
fmt::print("instruction: {}\n", szBuffer);
|
||||
std::string s = disassembleInst(inst, operands, address);
|
||||
fmt::print("instruction: {}\n", s);
|
||||
}
|
||||
|
||||
ZyanStatus DecoderImpl::decodeInstruction(ZydisDecodedInstruction& inst,
|
||||
|
@ -14,6 +14,8 @@ public:
|
||||
DecoderImpl();
|
||||
~DecoderImpl();
|
||||
|
||||
std::string disassembleInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||
u64 address);
|
||||
void printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands, u64 address);
|
||||
void printInstruction(void* code, u64 address);
|
||||
ZyanStatus decodeInstruction(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include "src/common/discord_rpc_handler.h"
|
||||
#include "discord_rpc_handler.h"
|
||||
|
||||
namespace DiscordRPCHandler {
|
||||
|
||||
@ -17,7 +17,7 @@ void RPC::init() {
|
||||
|
||||
void RPC::setStatusIdling() {
|
||||
DiscordRichPresence rpc{};
|
||||
rpc.largeImageKey = "https://github.com/shadps4-emu/shadPS4/raw/main/.github/shadps4.png";
|
||||
rpc.largeImageKey = "https://cdn.jsdelivr.net/gh/shadps4-emu/shadPS4@main/.github/shadps4.png";
|
||||
rpc.largeImageText = "shadPS4 is a PS4 emulator";
|
||||
rpc.startTimestamp = startTimestamp;
|
||||
rpc.details = "Idle";
|
||||
|
@ -1,25 +1,25 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Common {
|
||||
|
||||
/// Ceiled integer division.
|
||||
template <typename N, typename D>
|
||||
requires std::is_integral_v<N> && std::is_unsigned_v<D>
|
||||
[[nodiscard]] constexpr N DivCeil(N number, D divisor) {
|
||||
return static_cast<N>((static_cast<D>(number) + divisor - 1) / divisor);
|
||||
}
|
||||
|
||||
/// Ceiled integer division with logarithmic divisor in base 2
|
||||
template <typename N, typename D>
|
||||
requires std::is_integral_v<N> && std::is_unsigned_v<D>
|
||||
[[nodiscard]] constexpr N DivCeilLog2(N value, D alignment_log2) {
|
||||
return static_cast<N>((static_cast<D>(value) + (D(1) << alignment_log2) - 1) >> alignment_log2);
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Common {
|
||||
|
||||
/// Ceiled integer division.
|
||||
template <typename N, typename D>
|
||||
requires std::is_integral_v<N> && std::is_unsigned_v<D>
|
||||
[[nodiscard]] constexpr N DivCeil(N number, D divisor) {
|
||||
return static_cast<N>((static_cast<D>(number) + divisor - 1) / divisor);
|
||||
}
|
||||
|
||||
/// Ceiled integer division with logarithmic divisor in base 2
|
||||
template <typename N, typename D>
|
||||
requires std::is_integral_v<N> && std::is_unsigned_v<D>
|
||||
[[nodiscard]] constexpr N DivCeilLog2(N value, D alignment_log2) {
|
||||
return static_cast<N>((static_cast<D>(value) + (D(1) << alignment_log2) - 1) >> alignment_log2);
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
@ -3,10 +3,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "assert.h"
|
||||
#include "bit_field.h"
|
||||
#include "singleton.h"
|
||||
#include "types.h"
|
||||
|
||||
@ -16,6 +18,46 @@ class Emulator;
|
||||
|
||||
namespace Common {
|
||||
|
||||
union PSFAttributes {
|
||||
/// Supports initial user's logout
|
||||
BitField<0, 1, u32> support_initial_user_logout;
|
||||
/// Enter button for the common dialog is cross.
|
||||
BitField<1, 1, u32> enter_button_cross;
|
||||
/// Warning dialog for PS Move is displayed in the options menu.
|
||||
BitField<2, 1, u32> ps_move_warning;
|
||||
/// Supports stereoscopic 3D.
|
||||
BitField<3, 1, u32> support_stereoscopic_3d;
|
||||
/// Suspends when PS button is pressed.
|
||||
BitField<4, 1, u32> ps_button_suspend;
|
||||
/// Enter button for the common dialog is assigned by the system software.
|
||||
BitField<5, 1, u32> enter_button_system;
|
||||
/// Overrides share menu behavior.
|
||||
BitField<6, 1, u32> override_share_menu;
|
||||
/// Suspends when PS button is pressed and special output resolution is set.
|
||||
BitField<8, 1, u32> special_res_ps_button_suspend;
|
||||
/// Enable HDCP.
|
||||
BitField<9, 1, u32> enable_hdcp;
|
||||
/// Disable HDCP for non-game.
|
||||
BitField<10, 1, u32> disable_hdcp_non_game;
|
||||
/// Supports PS VR.
|
||||
BitField<14, 1, u32> support_ps_vr;
|
||||
/// CPU mode (6 CPU)
|
||||
BitField<15, 1, u32> six_cpu_mode;
|
||||
/// CPU mode (7 CPU)
|
||||
BitField<16, 1, u32> seven_cpu_mode;
|
||||
/// Supports PS4 Pro (Neo) mode.
|
||||
BitField<23, 1, u32> support_neo_mode;
|
||||
/// Requires PS VR.
|
||||
BitField<26, 1, u32> require_ps_vr;
|
||||
/// Supports HDR.
|
||||
BitField<29, 1, u32> support_hdr;
|
||||
/// Display location.
|
||||
BitField<31, 1, u32> display_location;
|
||||
|
||||
u32 raw{};
|
||||
};
|
||||
static_assert(sizeof(PSFAttributes) == 4);
|
||||
|
||||
class ElfInfo {
|
||||
friend class Core::Emulator;
|
||||
|
||||
@ -26,6 +68,10 @@ class ElfInfo {
|
||||
std::string app_ver{};
|
||||
u32 firmware_ver = 0;
|
||||
u32 raw_firmware_ver = 0;
|
||||
PSFAttributes psf_attributes{};
|
||||
|
||||
std::filesystem::path splash_path{};
|
||||
std::filesystem::path game_folder{};
|
||||
|
||||
public:
|
||||
static constexpr u32 FW_15 = 0x1500000;
|
||||
@ -34,9 +80,11 @@ public:
|
||||
static constexpr u32 FW_20 = 0x2000000;
|
||||
static constexpr u32 FW_25 = 0x2500000;
|
||||
static constexpr u32 FW_30 = 0x3000000;
|
||||
static constexpr u32 FW_35 = 0x3500000;
|
||||
static constexpr u32 FW_40 = 0x4000000;
|
||||
static constexpr u32 FW_45 = 0x4500000;
|
||||
static constexpr u32 FW_50 = 0x5000000;
|
||||
static constexpr u32 FW_55 = 0x5500000;
|
||||
static constexpr u32 FW_80 = 0x8000000;
|
||||
|
||||
static ElfInfo& Instance() {
|
||||
@ -67,6 +115,19 @@ public:
|
||||
ASSERT(initialized);
|
||||
return raw_firmware_ver;
|
||||
}
|
||||
|
||||
[[nodiscard]] const PSFAttributes& GetPSFAttributes() const {
|
||||
ASSERT(initialized);
|
||||
return psf_attributes;
|
||||
}
|
||||
|
||||
[[nodiscard]] const std::filesystem::path& GetSplashPath() const {
|
||||
return splash_path;
|
||||
}
|
||||
|
||||
[[nodiscard]] const std::filesystem::path& GetGameFolder() const {
|
||||
return game_folder;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
|
14
src/common/hash.h
Normal file
14
src/common/hash.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
[[nodiscard]] inline u64 HashCombine(const u64 seed, const u64 hash) {
|
||||
return seed ^ (hash + 0x9e3779b9 + (seed << 12) + (seed >> 4));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline u32 HashCombine(const u32 seed, const u32 hash) {
|
||||
return seed ^ (hash + 0x9e3779b9 + (seed << 6) + (seed >> 2));
|
||||
}
|
@ -125,12 +125,13 @@ namespace {
|
||||
[[nodiscard]] constexpr int ToSeekOrigin(SeekOrigin origin) {
|
||||
switch (origin) {
|
||||
case SeekOrigin::SetOrigin:
|
||||
default:
|
||||
return SEEK_SET;
|
||||
case SeekOrigin::CurrentPosition:
|
||||
return SEEK_CUR;
|
||||
case SeekOrigin::End:
|
||||
return SEEK_END;
|
||||
default:
|
||||
UNREACHABLE_MSG("Impossible SeekOrigin {}", static_cast<u32>(origin));
|
||||
}
|
||||
}
|
||||
|
||||
@ -377,18 +378,6 @@ bool IOFile::Seek(s64 offset, SeekOrigin origin) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
u64 size = GetSize();
|
||||
if (origin == SeekOrigin::CurrentPosition && Tell() + offset > size) {
|
||||
LOG_ERROR(Common_Filesystem, "Seeking past the end of the file");
|
||||
return false;
|
||||
} else if (origin == SeekOrigin::SetOrigin && (u64)offset > size) {
|
||||
LOG_ERROR(Common_Filesystem, "Seeking past the end of the file");
|
||||
return false;
|
||||
} else if (origin == SeekOrigin::End && offset > 0) {
|
||||
LOG_ERROR(Common_Filesystem, "Seeking past the end of the file");
|
||||
return false;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
|
||||
const auto seek_result = fseeko(file, offset, ToSeekOrigin(origin)) == 0;
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "common/concepts.h"
|
||||
#include "common/types.h"
|
||||
#include "enum.h"
|
||||
|
||||
namespace Common::FS {
|
||||
|
||||
@ -42,6 +43,7 @@ enum class FileAccessMode {
|
||||
*/
|
||||
ReadAppend = Read | Append,
|
||||
};
|
||||
DECLARE_ENUM_FLAG_OPERATORS(FileAccessMode);
|
||||
|
||||
enum class FileType {
|
||||
BinaryFile,
|
||||
@ -184,7 +186,9 @@ public:
|
||||
|
||||
template <typename T>
|
||||
size_t WriteRaw(const void* data, size_t size) const {
|
||||
return std::fwrite(data, sizeof(T), size, file);
|
||||
auto bytes = std::fwrite(data, sizeof(T), size, file);
|
||||
std::fflush(file);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -205,7 +209,7 @@ public:
|
||||
return WriteSpan(string);
|
||||
}
|
||||
|
||||
static size_t WriteBytes(const std::filesystem::path path, std::span<const u8> data) {
|
||||
static size_t WriteBytes(const std::filesystem::path path, const auto& data) {
|
||||
IOFile out(path, FileAccessMode::Write);
|
||||
return out.Write(data);
|
||||
}
|
||||
|
@ -139,8 +139,9 @@ public:
|
||||
std::filesystem::create_directory(log_dir);
|
||||
Filter filter;
|
||||
filter.ParseFilterString(Config::getLogFilter());
|
||||
instance = std::unique_ptr<Impl, decltype(&Deleter)>(new Impl(log_dir / LOG_FILE, filter),
|
||||
Deleter);
|
||||
const auto& log_file_path = log_file.empty() ? LOG_FILE : log_file;
|
||||
instance = std::unique_ptr<Impl, decltype(&Deleter)>(
|
||||
new Impl(log_dir / log_file_path, filter), Deleter);
|
||||
initialization_in_progress_suppress_logging = false;
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||
SUB(Common, Memory) \
|
||||
CLS(Core) \
|
||||
SUB(Core, Linker) \
|
||||
SUB(Core, Devices) \
|
||||
CLS(Config) \
|
||||
CLS(Debug) \
|
||||
CLS(Kernel) \
|
||||
@ -79,6 +80,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||
SUB(Kernel, Sce) \
|
||||
CLS(Lib) \
|
||||
SUB(Lib, LibC) \
|
||||
SUB(Lib, LibcInternal) \
|
||||
SUB(Lib, Kernel) \
|
||||
SUB(Lib, Pad) \
|
||||
SUB(Lib, GnmDriver) \
|
||||
@ -94,18 +96,26 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||
SUB(Lib, SaveData) \
|
||||
SUB(Lib, SaveDataDialog) \
|
||||
SUB(Lib, Http) \
|
||||
SUB(Lib, Http2) \
|
||||
SUB(Lib, Ssl) \
|
||||
SUB(Lib, Ssl2) \
|
||||
SUB(Lib, SysModule) \
|
||||
SUB(Lib, Move) \
|
||||
SUB(Lib, NpAuth) \
|
||||
SUB(Lib, NpCommon) \
|
||||
SUB(Lib, NpManager) \
|
||||
SUB(Lib, NpScore) \
|
||||
SUB(Lib, NpTrophy) \
|
||||
SUB(Lib, NpWebApi) \
|
||||
SUB(Lib, Screenshot) \
|
||||
SUB(Lib, LibCInternal) \
|
||||
SUB(Lib, AppContent) \
|
||||
SUB(Lib, Rtc) \
|
||||
SUB(Lib, DiscMap) \
|
||||
SUB(Lib, Png) \
|
||||
SUB(Lib, Jpeg) \
|
||||
SUB(Lib, PlayGo) \
|
||||
SUB(Lib, PlayGoDialog) \
|
||||
SUB(Lib, Random) \
|
||||
SUB(Lib, Usbd) \
|
||||
SUB(Lib, Ajm) \
|
||||
@ -120,6 +130,18 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||
SUB(Lib, SharePlay) \
|
||||
SUB(Lib, Fiber) \
|
||||
SUB(Lib, Vdec2) \
|
||||
SUB(Lib, Videodec) \
|
||||
SUB(Lib, RazorCpu) \
|
||||
SUB(Lib, Mouse) \
|
||||
SUB(Lib, WebBrowserDialog) \
|
||||
SUB(Lib, NpParty) \
|
||||
SUB(Lib, Zlib) \
|
||||
SUB(Lib, Hmd) \
|
||||
SUB(Lib, SigninDialog) \
|
||||
SUB(Lib, Camera) \
|
||||
SUB(Lib, CompanionHttpd) \
|
||||
SUB(Lib, CompanionUtil) \
|
||||
SUB(Lib, Voice) \
|
||||
CLS(Frontend) \
|
||||
CLS(Render) \
|
||||
SUB(Render, Vulkan) \
|
||||
|
@ -23,8 +23,8 @@ std::string FormatLogMessage(const Entry& entry) {
|
||||
const char* class_name = GetLogClassName(entry.log_class);
|
||||
const char* level_name = GetLevelName(entry.log_level);
|
||||
|
||||
return fmt::format("[{}] <{}> {}:{}:{}: {}", class_name, level_name, entry.filename,
|
||||
entry.function, entry.line_num, entry.message);
|
||||
return fmt::format("[{}] <{}> {}:{} {}: {}", class_name, level_name, entry.filename,
|
||||
entry.line_num, entry.function, entry.message);
|
||||
}
|
||||
|
||||
void PrintMessage(const Entry& entry) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user