mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
435 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56b54e0e17 | ||
|
|
8ffd920700 | ||
|
|
b6f67a7a6e | ||
|
|
9308410e12 | ||
|
|
65882ae14d | ||
|
|
0f533ec16c | ||
|
|
0c708e8c1e | ||
|
|
2693544faa | ||
|
|
2e95e59f40 | ||
|
|
72bc826907 | ||
|
|
21440c31f4 | ||
|
|
3e225d78fa | ||
|
|
5464463ab0 | ||
|
|
9c9bae7443 | ||
|
|
9d69a0ad54 | ||
|
|
4b88256df2 | ||
|
|
bc7b0e53f0 | ||
|
|
3695862368 | ||
|
|
18ae23b99d | ||
|
|
bb60058fa0 | ||
|
|
1ad25605d1 | ||
|
|
9809265be4 | ||
|
|
63872e6b28 | ||
|
|
fb3a9eae9b | ||
|
|
f53c3050df | ||
|
|
67bd0dfcdb | ||
|
|
12196359f7 | ||
|
|
609165e412 | ||
|
|
41f14a8cf8 | ||
|
|
a8bdd3fbfc | ||
|
|
993ec82a9e | ||
|
|
c5a2844367 | ||
|
|
e5bb405b47 | ||
|
|
8c9a65d094 | ||
|
|
047b8593ac | ||
|
|
4fc4eb8a66 | ||
|
|
1f95a86f0a | ||
|
|
2b90451c4a | ||
|
|
77a6525556 | ||
|
|
5eacab387d | ||
|
|
ddaf57d5b0 | ||
|
|
1144c46109 | ||
|
|
850b839fc3 | ||
|
|
22037e75ba | ||
|
|
303ab163ab | ||
|
|
2833537167 | ||
|
|
1aa7b591b6 | ||
|
|
2f0463d936 | ||
|
|
82a1ec0c3a | ||
|
|
d65133451d | ||
|
|
36e81949e0 | ||
|
|
6b62945632 | ||
|
|
fa2f578900 | ||
|
|
e1c9987059 | ||
|
|
325e219bb1 | ||
|
|
be208df11b | ||
|
|
49df804d1b | ||
|
|
122fde79bd | ||
|
|
2099e68c41 | ||
|
|
52ccc609cd | ||
|
|
b402f6a404 | ||
|
|
3576a1824d | ||
|
|
c3afaae169 | ||
|
|
c5a9ce6b56 | ||
|
|
4f0d944bb9 | ||
|
|
5684bcb6f4 | ||
|
|
5087fcea88 | ||
|
|
28f984e87f | ||
|
|
e0233daeb0 | ||
|
|
49922ebe32 | ||
|
|
8fe0c3441c | ||
|
|
ba55caa404 | ||
|
|
e50e651078 | ||
|
|
39b4fd47c7 | ||
|
|
56b83e5cfa | ||
|
|
ed57355948 | ||
|
|
b4b2f3a0b6 | ||
|
|
1946882952 | ||
|
|
dbe4930c17 | ||
|
|
3b25fa3065 | ||
|
|
01849565aa | ||
|
|
e3ca5833d0 | ||
|
|
dfac1f034b | ||
|
|
a8d07df81d | ||
|
|
609cb44b01 | ||
|
|
feb4d605d0 | ||
|
|
276d887917 | ||
|
|
61aef9c96f | ||
|
|
b4005682f2 | ||
|
|
7d98461fc6 | ||
|
|
862d03b78e | ||
|
|
0ecf46240f | ||
|
|
a2755e212b | ||
|
|
2ec5559dd6 | ||
|
|
6f904759ee | ||
|
|
507fafd601 | ||
|
|
9c463f1338 | ||
|
|
8818cd0285 | ||
|
|
23b72d08d2 | ||
|
|
227049b6f2 | ||
|
|
97abd3e1f9 | ||
|
|
6f34b7ba99 | ||
|
|
c0d86c3852 | ||
|
|
bf743ff467 | ||
|
|
306f994464 | ||
|
|
f56676942b | ||
|
|
bfd0a05289 | ||
|
|
3999c08f00 | ||
|
|
febb8ec1a6 | ||
|
|
cdd38ef7aa | ||
|
|
54c620a5df | ||
|
|
089b7fa73e | ||
|
|
d9d0e84ca1 | ||
|
|
badede2e2d | ||
|
|
e2ae28741d | ||
|
|
ff34150b15 | ||
|
|
4a93ceac58 | ||
|
|
5a724bf49e | ||
|
|
c23bcf6322 | ||
|
|
c863149ad9 | ||
|
|
5fb6e22bed | ||
|
|
d634088282 | ||
|
|
c99a935831 | ||
|
|
165da677ed | ||
|
|
0bbde2ca52 | ||
|
|
3d13c5d13c | ||
|
|
9d978c67ec | ||
|
|
8766e1fa57 | ||
|
|
c0e4883987 | ||
|
|
57f2cd5f9e | ||
|
|
50d8d06a94 | ||
|
|
2e07328878 | ||
|
|
ad8294e521 | ||
|
|
14426a7b45 | ||
|
|
6697e76be1 | ||
|
|
73cd876f6d | ||
|
|
e626754000 | ||
|
|
1fedd31229 | ||
|
|
bfe1746ddb | ||
|
|
4800c32db4 | ||
|
|
140fc28b3e | ||
|
|
f9833bb8af | ||
|
|
4b6ddaf09e | ||
|
|
d427db4a15 | ||
|
|
deb39cc20f | ||
|
|
3a4c25e916 | ||
|
|
f416eb3d4f | ||
|
|
87cbb1f90c | ||
|
|
68f43121fb | ||
|
|
51ceab1f3c | ||
|
|
2257992a3f | ||
|
|
40ead584d7 | ||
|
|
6f2be7bd17 | ||
|
|
af9ca4cf7d | ||
|
|
ea98203ac5 | ||
|
|
e908bbfae6 | ||
|
|
fa00069068 | ||
|
|
efae58de52 | ||
|
|
39c7f703cb | ||
|
|
96220e509c | ||
|
|
4de495ad59 | ||
|
|
56a950a074 | ||
|
|
2b47254bdd | ||
|
|
da28e2cc37 | ||
|
|
3d64f4a548 | ||
|
|
abf03b0c79 | ||
|
|
8381742422 | ||
|
|
724bb09aec | ||
|
|
ad5de248b4 | ||
|
|
1a1fdf6a5a | ||
|
|
c469b17350 | ||
|
|
01842a3c6b | ||
|
|
4cd385dbff | ||
|
|
72787d103f | ||
|
|
59072272a9 | ||
|
|
ef76666e5a | ||
|
|
0a0994b19c | ||
|
|
ab68c570a9 | ||
|
|
dcdf3b39a3 | ||
|
|
476cb2db34 | ||
|
|
34a7e00413 | ||
|
|
413ba09ee0 | ||
|
|
33eefefffb | ||
|
|
b3c822e31b | ||
|
|
14a458a275 | ||
|
|
6c49f9cf52 | ||
|
|
803ea4dda5 | ||
|
|
c9b23e6e4e | ||
|
|
509c9318af | ||
|
|
46e1e3d904 | ||
|
|
7a045d837b | ||
|
|
574ea820f7 | ||
|
|
7061d48dde | ||
|
|
53633b7279 | ||
|
|
05bb126af9 | ||
|
|
436fba77ac | ||
|
|
91c0e64159 | ||
|
|
7207681485 | ||
|
|
eef53f1b54 | ||
|
|
150d8d3214 | ||
|
|
a14376abb6 | ||
|
|
dfb45a8ebc | ||
|
|
00137c3031 | ||
|
|
b9c7dacbd1 | ||
|
|
3a03b579d2 | ||
|
|
e2bbe5cd8b | ||
|
|
c7347a3a16 | ||
|
|
8749b3c782 | ||
|
|
10389dc3f1 | ||
|
|
5e191a6cd8 | ||
|
|
a247625095 | ||
|
|
0fb234f3e4 | ||
|
|
e3e35d3bc6 | ||
|
|
6b12ca5b39 | ||
|
|
44e2837efb | ||
|
|
27dcd1bba2 | ||
|
|
ebf8cba6a4 | ||
|
|
e06cf23a03 | ||
|
|
dd55887f4b | ||
|
|
39b7b29af8 | ||
|
|
6f0aef3344 | ||
|
|
85c3a413fa | ||
|
|
b6c365b89d | ||
|
|
9eedf3901a | ||
|
|
2a6ecaeb09 | ||
|
|
027db2480a | ||
|
|
f4cabca62d | ||
|
|
0b3edc5fd4 | ||
|
|
b05152da0f | ||
|
|
2e0988ff03 | ||
|
|
ec12d9b657 | ||
|
|
f388de26ab | ||
|
|
68df8bf8ea | ||
|
|
4a960bba5e | ||
|
|
3a72b3fe3f | ||
|
|
47f372f215 | ||
|
|
7dc93bee7e | ||
|
|
69ff64149a | ||
|
|
4795f0a7dd | ||
|
|
e9411a3db5 | ||
|
|
6a064a4fa5 | ||
|
|
f036cdaaad | ||
|
|
46a68e2118 | ||
|
|
d020ea8f63 | ||
|
|
a4b40ab9e1 | ||
|
|
7c62b86ed9 | ||
|
|
96fb49e35c | ||
|
|
8e5fc236ca | ||
|
|
0784b5930b | ||
|
|
6de792c465 | ||
|
|
e9a2c89930 | ||
|
|
9d9f3acbe6 | ||
|
|
b67126e917 | ||
|
|
bcbf390334 | ||
|
|
714e355c87 | ||
|
|
f258ea2906 | ||
|
|
9445018586 | ||
|
|
97310b8912 | ||
|
|
47073040d4 | ||
|
|
a93663af0b | ||
|
|
ecd3b87cc0 | ||
|
|
5c34f208bd | ||
|
|
47f8d8c71c | ||
|
|
b2a0dba3bb | ||
|
|
fc1304dff5 | ||
|
|
0e15de7103 | ||
|
|
182375314e | ||
|
|
69ac4ddedc | ||
|
|
68b31347f4 | ||
|
|
6be2d1cbc0 | ||
|
|
5fac15c449 | ||
|
|
ecb86b01c8 | ||
|
|
1744a6ffeb | ||
|
|
fb393c22b6 | ||
|
|
fe2ed74020 | ||
|
|
5f51050b2f | ||
|
|
913253d861 | ||
|
|
8172b2e5ed | ||
|
|
0a7fc06510 | ||
|
|
a81b20d9d5 | ||
|
|
90a09eb520 | ||
|
|
4ffbe0bbf9 | ||
|
|
8f991c311f | ||
|
|
367f839934 | ||
|
|
6c15359137 | ||
|
|
fa05d656ad | ||
|
|
76e32f55de | ||
|
|
30ca79a23a | ||
|
|
0ce6961972 | ||
|
|
b0ae2caef8 | ||
|
|
3eb4a64517 | ||
|
|
61a80b59d1 | ||
|
|
71eaef35e3 | ||
|
|
b7ae453d84 | ||
|
|
33958fed96 | ||
|
|
59d29b3648 | ||
|
|
911d7f6533 | ||
|
|
9d49015c0c | ||
|
|
d585712b40 | ||
|
|
fb15893521 | ||
|
|
308f8c5112 | ||
|
|
86edc0dbe2 | ||
|
|
f461bc9176 | ||
|
|
b121e5af25 | ||
|
|
d292835941 | ||
|
|
88aee00a02 | ||
|
|
2fa806bbee | ||
|
|
ae3faa1540 | ||
|
|
e1e9c428f1 | ||
|
|
443ca9da56 | ||
|
|
ef05da1860 | ||
|
|
e5a87c7463 | ||
|
|
da2f419b86 | ||
|
|
4586a12859 | ||
|
|
9c416bdbc1 | ||
|
|
f43255a1fb | ||
|
|
59949c50d3 | ||
|
|
4608579c31 | ||
|
|
8b7c69c4b0 | ||
|
|
0d519a5f28 | ||
|
|
47ae3ff8d3 | ||
|
|
97b7d7c7b9 | ||
|
|
c552d717ff | ||
|
|
3230287a5f | ||
|
|
0bc9c7ffa1 | ||
|
|
d9abe10308 | ||
|
|
3f62e7d36f | ||
|
|
47a65ce01e | ||
|
|
cd6590e15c | ||
|
|
87d392adb5 | ||
|
|
1dac754ca3 | ||
|
|
b844bb1268 | ||
|
|
dc859ca0a6 | ||
|
|
20e75b4057 | ||
|
|
a69977c62b | ||
|
|
3b0513a57c | ||
|
|
a5c2ea679d | ||
|
|
0dd5e7c081 | ||
|
|
31e9206fc0 | ||
|
|
4bf7d2b2fe | ||
|
|
c8b051628f | ||
|
|
76f36b780c | ||
|
|
d73d698fd5 | ||
|
|
9967d5ca9e | ||
|
|
fdc0370cdf | ||
|
|
a51a46f61a | ||
|
|
3edd508fc8 | ||
|
|
18fea6440e | ||
|
|
3a242b513c | ||
|
|
ade6a6c3ab | ||
|
|
9740ebe2a4 | ||
|
|
0a2e137613 | ||
|
|
56056c4846 | ||
|
|
b32d96636d | ||
|
|
9a4094e997 | ||
|
|
6a0bbea9c5 | ||
|
|
fea213ee2c | ||
|
|
669cadf1ee | ||
|
|
c3bafa2a40 | ||
|
|
2611a93af2 | ||
|
|
651e7e5963 | ||
|
|
7bf18a4464 | ||
|
|
14fd42ad91 | ||
|
|
33a61558e1 | ||
|
|
05ed785af1 | ||
|
|
158193a6c4 | ||
|
|
2671da5c2f | ||
|
|
a99a819e75 | ||
|
|
94664c24d8 | ||
|
|
466e96e79a | ||
|
|
fd2cd0b904 | ||
|
|
4afe14dff7 | ||
|
|
9436a823ba | ||
|
|
1346c98a58 | ||
|
|
93992ee1c1 | ||
|
|
e29bc933fe | ||
|
|
6df5cd8222 | ||
|
|
2dfc75c341 | ||
|
|
e75a1edea8 | ||
|
|
8c94efd61a | ||
|
|
20c3178dfe | ||
|
|
a7271697a2 | ||
|
|
c2bd21922f | ||
|
|
96831b0970 | ||
|
|
0fd5db9f78 | ||
|
|
918328e5b0 | ||
|
|
6bb6322bde | ||
|
|
00e255ee3c | ||
|
|
c662dd8b04 | ||
|
|
a85a246ab8 | ||
|
|
9132a7c8d4 | ||
|
|
44367f24f9 | ||
|
|
5d6a9a68fe | ||
|
|
476d15f0fc | ||
|
|
cce7f465f2 | ||
|
|
0e289d2d3b | ||
|
|
efc9321cec | ||
|
|
4154784f09 | ||
|
|
feb9d7b2a9 | ||
|
|
da22df5f5d | ||
|
|
78f751959d | ||
|
|
b0c3a1e23f | ||
|
|
cb703a6ce5 | ||
|
|
c1b26b87a8 | ||
|
|
15f752f002 | ||
|
|
af1a4ab07a | ||
|
|
5413765a23 | ||
|
|
da63afa758 | ||
|
|
1d86d674e5 | ||
|
|
5718c3d14d | ||
|
|
2bfefaf296 | ||
|
|
2c00ccca83 | ||
|
|
ade2cc8182 | ||
|
|
f546ea1f8a | ||
|
|
ff499d42a0 | ||
|
|
10e5af2ddf | ||
|
|
724f92562c | ||
|
|
2b68c5e383 | ||
|
|
47545e511d | ||
|
|
b7aea5b726 | ||
|
|
5338a4f17c | ||
|
|
e2dcabcbea | ||
|
|
971929777d | ||
|
|
0f4a95e31b | ||
|
|
b453787670 | ||
|
|
c555dbc3e8 | ||
|
|
1561e07ddf | ||
|
|
ec9bc59962 | ||
|
|
7fd82fffab | ||
|
|
0652b218db | ||
|
|
59217b9af3 | ||
|
|
46c9bcbc4f | ||
|
|
f6154032c7 | ||
|
|
6c2d2e8455 | ||
|
|
4d61f26dfa |
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -6,3 +6,7 @@ updates:
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every week
|
||||
interval: "weekly"
|
||||
groups:
|
||||
ci-deps:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
234
.github/labeler.yml
vendored
234
.github/labeler.yml
vendored
@@ -2,127 +2,187 @@
|
||||
|
||||
# General Labels
|
||||
'Build | Project System':
|
||||
- '.github/*'
|
||||
- '.github/**/*'
|
||||
- '*.sln'
|
||||
- '**/*.sln'
|
||||
- '*.vcxproj*'
|
||||
- '**/*.vcxproj*'
|
||||
- 'cmake/*'
|
||||
- 'cmake/**/*'
|
||||
- 'CMakeLists.txt'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'build.sh'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '.github/*'
|
||||
- '.github/**/*'
|
||||
- '*.sln'
|
||||
- '**/*.sln'
|
||||
- '*.vcxproj*'
|
||||
- '**/*.vcxproj*'
|
||||
- 'cmake/*'
|
||||
- 'cmake/**/*'
|
||||
- 'CMakeLists.txt'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'build.sh'
|
||||
'Dependencies':
|
||||
- '3rdparty/*'
|
||||
- '3rdparty/**/*'
|
||||
- '**/3rdpartyDeps.props'
|
||||
- '.gitmodules'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '3rdparty/*'
|
||||
- '3rdparty/**/*'
|
||||
- '**/3rdpartyDeps.props'
|
||||
- '.gitmodules'
|
||||
'Documentation':
|
||||
- '*.md'
|
||||
- '**/*.md'
|
||||
- '*.pdf'
|
||||
- '**/*.pdf'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '*.md'
|
||||
- '**/*.md'
|
||||
- '*.pdf'
|
||||
- '**/*.pdf'
|
||||
'GUI/Qt':
|
||||
- 'pcsx2-qt/*'
|
||||
- 'pcsx2-qt/**/*'
|
||||
- '3rdparty/Qt/*'
|
||||
- '3rdparty/Qt/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2-qt/*'
|
||||
- 'pcsx2-qt/**/*'
|
||||
- '3rdparty/Qt/*'
|
||||
- '3rdparty/Qt/**/*'
|
||||
'GameDB':
|
||||
- '**/GameIndex.*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/GameIndex.*'
|
||||
'Installer | Package':
|
||||
- 'build.sh'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'build.sh'
|
||||
'Translations':
|
||||
- 'pcsx2-qt/Translations/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2-qt/Translations/*'
|
||||
|
||||
# Tools / Features
|
||||
'Debugger':
|
||||
- 'pcsx2/DebugTools/*'
|
||||
- 'pcsx2/DebugTools/**/*'
|
||||
- 'pcsx2-qt/Debugger/*'
|
||||
- 'pcsx2-qt/Debugger/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/DebugTools/*'
|
||||
- 'pcsx2/DebugTools/**/*'
|
||||
- 'pcsx2-qt/Debugger/*'
|
||||
- 'pcsx2-qt/Debugger/**/*'
|
||||
'IPC':
|
||||
- 'pcsx2/IPC*'
|
||||
- 'pcsx2/**/IPC*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/IPC*'
|
||||
- 'pcsx2/**/IPC*'
|
||||
'TAS Functionality':
|
||||
- 'pcsx2/Recording/*'
|
||||
- 'pcsx2/Recording/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/Recording/*'
|
||||
- 'pcsx2/Recording/**/*'
|
||||
'RetroAchievements':
|
||||
- 'pcsx2/Frontend/Achievements.*'
|
||||
- 'pcsx2/Achievements.*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/Frontend/Achievements.*'
|
||||
- 'pcsx2/Achievements.*'
|
||||
|
||||
# Emulation Components
|
||||
'Counters':
|
||||
- 'pcsx2/Counters.*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/Counters.*'
|
||||
'Vector Units':
|
||||
- 'pcsx2/VU*'
|
||||
- 'pcsx2/**/VU*'
|
||||
- 'pcsx2/*VU*'
|
||||
- 'pcsx2/**/*VU*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/VU*'
|
||||
- 'pcsx2/**/VU*'
|
||||
- 'pcsx2/*VU*'
|
||||
- 'pcsx2/**/*VU*'
|
||||
'VIF':
|
||||
- 'pcsx2/Vif*'
|
||||
- 'pcsx2/**/Vif*'
|
||||
- 'pcsx2/VIF*'
|
||||
- 'pcsx2/**/VIF*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/Vif*'
|
||||
- 'pcsx2/**/Vif*'
|
||||
- 'pcsx2/VIF*'
|
||||
- 'pcsx2/**/VIF*'
|
||||
|
||||
# GS Related Labels
|
||||
'GS':
|
||||
- 'pcsx2/GS/*'
|
||||
- 'pcsx2/GS/**/*'
|
||||
- 'bin/resources/shaders/*'
|
||||
- 'bin/resources/shaders/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/*'
|
||||
- 'pcsx2/GS/**/*'
|
||||
- 'bin/resources/shaders/*'
|
||||
- 'bin/resources/shaders/**/*'
|
||||
'GS: Direct3D 11':
|
||||
- 'pcsx2/GS/Renderers/DX11/*'
|
||||
- 'pcsx2/GS/Renderers/DX11/**/*'
|
||||
- 'bin/resources/shaders/dx11/*'
|
||||
- 'bin/resources/shaders/dx11/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/DX11/*'
|
||||
- 'pcsx2/GS/Renderers/DX11/**/*'
|
||||
- 'bin/resources/shaders/dx11/*'
|
||||
- 'bin/resources/shaders/dx11/**/*'
|
||||
'GS: Direct3D 12':
|
||||
- 'pcsx2/GS/Renderers/DX12/*'
|
||||
- 'pcsx2/GS/Renderers/DX12/**/*'
|
||||
- 'bin/resources/shaders/dx11/*'
|
||||
- 'bin/resources/shaders/dx11/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/DX12/*'
|
||||
- 'pcsx2/GS/Renderers/DX12/**/*'
|
||||
- 'bin/resources/shaders/dx11/*'
|
||||
- 'bin/resources/shaders/dx11/**/*'
|
||||
'GS: Hardware':
|
||||
- 'pcsx2/GS/Renderers/HW/*'
|
||||
- 'pcsx2/GS/Renderers/HW/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/HW/*'
|
||||
- 'pcsx2/GS/Renderers/HW/**/*'
|
||||
'GS: OpenGL':
|
||||
- 'pcsx2/GS/Renderers/OpenGL/*'
|
||||
- 'pcsx2/GS/Renderers/OpenGL/**/*'
|
||||
- 'bin/resources/shaders/opengl/*'
|
||||
- 'bin/resources/shaders/opengl/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/OpenGL/*'
|
||||
- 'pcsx2/GS/Renderers/OpenGL/**/*'
|
||||
- 'bin/resources/shaders/opengl/*'
|
||||
- 'bin/resources/shaders/opengl/**/*'
|
||||
'GS: Vulkan':
|
||||
- 'pcsx2/GS/Renderers/Vulkan/*'
|
||||
- 'pcsx2/GS/Renderers/Vulkan/**/*'
|
||||
- 'bin/resources/shaders/vulkan/*'
|
||||
- 'bin/resources/shaders/vulkan/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/Vulkan/*'
|
||||
- 'pcsx2/GS/Renderers/Vulkan/**/*'
|
||||
- 'bin/resources/shaders/vulkan/*'
|
||||
- 'bin/resources/shaders/vulkan/**/*'
|
||||
'GS: Metal':
|
||||
- 'pcsx2/GS/Renderers/Metal/*'
|
||||
- 'pcsx2/GS/Renderers/Metal/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/Metal/*'
|
||||
- 'pcsx2/GS/Renderers/Metal/**/*'
|
||||
'GS: Texture Cache':
|
||||
- 'pcsx2/GS/Renderers/*TextureCache*.*'
|
||||
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/*TextureCache*.*'
|
||||
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
|
||||
'GS: Software':
|
||||
- 'pcsx2/GS/Renderers/SW/*'
|
||||
- 'pcsx2/GS/Renderers/SW/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/GS/Renderers/SW/*'
|
||||
- 'pcsx2/GS/Renderers/SW/**/*'
|
||||
|
||||
# Other Core Components
|
||||
'CDVD':
|
||||
- 'pcsx2/CDVD/*'
|
||||
- 'pcsx2/CDVD/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/CDVD/*'
|
||||
- 'pcsx2/CDVD/**/*'
|
||||
'DEV9':
|
||||
- 'pcsx2/DEV9/*'
|
||||
- 'pcsx2/DEV9/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/DEV9/*'
|
||||
- 'pcsx2/DEV9/**/*'
|
||||
'IPU':
|
||||
- 'pcsx2/IPU/*'
|
||||
- 'pcsx2/IPU/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/IPU/*'
|
||||
- 'pcsx2/IPU/**/*'
|
||||
'Memory Card':
|
||||
- 'pcsx2/SIO/Memcard/*'
|
||||
- 'pcsx2/SIO/Memcard/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/SIO/Memcard/*'
|
||||
- 'pcsx2/SIO/Memcard/**/*'
|
||||
'PAD':
|
||||
- 'pcsx2/SIO/Pad/*'
|
||||
- 'pcsx2/SIO/Pad/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/SIO/Pad/*'
|
||||
- 'pcsx2/SIO/Pad/**/*'
|
||||
'SPU2':
|
||||
- 'pcsx2/SPU2/*'
|
||||
- 'pcsx2/SPU2/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/SPU2/*'
|
||||
- 'pcsx2/SPU2/**/*'
|
||||
'USB':
|
||||
- 'pcsx2/USB/*'
|
||||
- 'pcsx2/USB/**/*'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'pcsx2/USB/*'
|
||||
- 'pcsx2/USB/**/*'
|
||||
|
||||
1
.github/workflows/cron_publish_flatpak.yml
vendored
1
.github/workflows/cron_publish_flatpak.yml
vendored
@@ -33,6 +33,7 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
publish: true
|
||||
|
||||
35
.github/workflows/linux_build_flatpak.yml
vendored
35
.github/workflows/linux_build_flatpak.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
jobName:
|
||||
required: true
|
||||
type: string
|
||||
artifactPrefixName:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
@@ -36,6 +39,10 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
stableBuild:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
@@ -56,13 +63,18 @@ jobs:
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Add stable release identifier file
|
||||
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
cat ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: linux
|
||||
BUILD_SYSTEM: flatpak
|
||||
ARCH: ${{ inputs.platform }}
|
||||
PREFIX: ${{ inputs.artifactPrefixName }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
@@ -90,9 +102,11 @@ jobs:
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
|
||||
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
|
||||
# TODO - based on v6.3, switch back to the main action once change is accepted (or they release a breaking change that uses upload-artifact@v4)
|
||||
uses: xTVaser/flatpak-github-actions/flatpak-builder@64267d4cf01f7955a40128039d0abab17bb48aac
|
||||
with:
|
||||
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
|
||||
upload-artifact: false
|
||||
manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
|
||||
arch: x86_64
|
||||
build-bundle: true
|
||||
@@ -131,3 +145,16 @@ jobs:
|
||||
repository: stable
|
||||
token: ${{ secrets.FLATHUB_TOKEN }}
|
||||
|
||||
# NOTE - this is done after on purpose so the flatpak file is wherever it needs to be for the previous pushes
|
||||
- name: Prepare artifacts folder
|
||||
# NOTE - 'flatpak-builder' dumps the artifact out into the current directory
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
mv "./${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak" "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
path: ci-artifacts
|
||||
|
||||
|
||||
2
.github/workflows/linux_build_matrix.yml
vendored
2
.github/workflows/linux_build_matrix.yml
vendored
@@ -15,6 +15,7 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "AppImage Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage-sse4"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
@@ -25,6 +26,7 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Flatpak Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak-sse4"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
publish: false
|
||||
|
||||
23
.github/workflows/linux_build_qt.yml
vendored
23
.github/workflows/linux_build_qt.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
jobName:
|
||||
required: true
|
||||
type: string
|
||||
artifactPrefixName:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
@@ -36,6 +39,10 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
stableBuild:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
@@ -57,7 +64,7 @@ jobs:
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.4 libc6-dev=2.35-0ubuntu3.4 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
|
||||
sudo apt-get install -y --allow-downgrades 'libc6=2.35-0ubuntu*' 'libc6-dev=2.35-0ubuntu*' libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -69,12 +76,18 @@ jobs:
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Add stable release identifier file
|
||||
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
cat ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: linux
|
||||
ARCH: ${{ inputs.platform }}
|
||||
PREFIX: ${{ inputs.artifactPrefixName }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
@@ -107,7 +120,7 @@ jobs:
|
||||
|
||||
- name: Build Dependencies
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
run: .github/workflows/scripts/linux/build-dependencies-qt.sh
|
||||
run: .github/workflows/scripts/linux/build-dependencies-qt.sh "$HOME/deps"
|
||||
|
||||
- name: Download patches
|
||||
run: |
|
||||
@@ -142,7 +155,7 @@ jobs:
|
||||
|
||||
- name: Upload artifact
|
||||
if: inputs.buildAppImage == true
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
path: ci-artifacts
|
||||
|
||||
21
.github/workflows/macos_build.yml
vendored
21
.github/workflows/macos_build.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
jobName:
|
||||
required: true
|
||||
type: string
|
||||
artifactPrefixName:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
@@ -18,6 +21,10 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
stableBuild:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_macos:
|
||||
@@ -44,6 +51,13 @@ jobs:
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Add stable release identifier file
|
||||
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
cat ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
|
||||
- name: Use Xcode 14.3.1
|
||||
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
|
||||
|
||||
@@ -51,7 +65,7 @@ jobs:
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: macos
|
||||
PREFIX: ${{ inputs.artifactPrefixName }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
@@ -79,7 +93,8 @@ jobs:
|
||||
|
||||
- name: Build Dependencies
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
run: .github/workflows/scripts/macos/build-dependencies.sh
|
||||
run: |
|
||||
.github/workflows/scripts/macos/build-dependencies.sh "$HOME/deps"
|
||||
|
||||
- name: Download patches
|
||||
run: |
|
||||
@@ -148,7 +163,7 @@ jobs:
|
||||
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS.tar.xz
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
path: "*.tar.xz"
|
||||
|
||||
1
.github/workflows/macos_build_matrix.yml
vendored
1
.github/workflows/macos_build_matrix.yml
vendored
@@ -15,4 +15,5 @@ jobs:
|
||||
uses: ./.github/workflows/macos_build.yml
|
||||
with:
|
||||
jobName: "MacOS Build"
|
||||
artifactPrefixName: "PCSX2-macos-Qt"
|
||||
secrets: inherit
|
||||
|
||||
51
.github/workflows/release_cut_new.yml
vendored
51
.github/workflows/release_cut_new.yml
vendored
@@ -10,16 +10,19 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# TODO - future work
|
||||
# workflow_dispatch:
|
||||
# inputs:
|
||||
# isStable:
|
||||
# description: 'Should it be a stable release?'
|
||||
# required: true
|
||||
# default: 'false'
|
||||
# versionTag:
|
||||
# description: 'The version to tag with'
|
||||
# required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
is_prelease:
|
||||
description: 'Should be a pre-release?'
|
||||
required: true
|
||||
default: 'true'
|
||||
type: choice
|
||||
options:
|
||||
- 'true'
|
||||
- 'false'
|
||||
tag_value:
|
||||
description: 'Create a new release from latest master with the given tag, if this is left blank it will bump the patch version. You dont need to include the "v" prefix'
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -42,6 +45,8 @@ jobs:
|
||||
github_token: ${{ github.token }}
|
||||
tag_prefix: v
|
||||
default_bump: patch
|
||||
# if set, it will overwrite the bump settings
|
||||
custom_tag: ${{ github.event.inputs.tag_value == '' && null || github.event.inputs.tag_value }}
|
||||
|
||||
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
|
||||
# with PRs -- not commits (determine how much we care).
|
||||
@@ -62,9 +67,18 @@ jobs:
|
||||
node index.js
|
||||
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
|
||||
|
||||
- name: Create a GitHub Release
|
||||
- name: Create a GitHub Release (Manual)
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: steps.tag_version.outputs.new_tag
|
||||
if: steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch'
|
||||
with:
|
||||
body_path: ./release-notes.md
|
||||
draft: true
|
||||
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prelease == 'true' }}
|
||||
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
|
||||
- name: Create a GitHub Release (Push)
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: steps.tag_version.outputs.new_tag && github.event_name != 'workflow_dispatch'
|
||||
with:
|
||||
body_path: ./release-notes.md
|
||||
draft: true
|
||||
@@ -81,10 +95,12 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "AppImage Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
fetchTags: true
|
||||
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
|
||||
secrets: inherit
|
||||
|
||||
build_linux_flatpak:
|
||||
@@ -95,11 +111,13 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Flatpak Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
branch: "stable"
|
||||
publish: false
|
||||
fetchTags: true
|
||||
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
|
||||
secrets: inherit
|
||||
|
||||
# Windows
|
||||
@@ -111,10 +129,12 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "Windows Build"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
|
||||
fetchTags: true
|
||||
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
|
||||
secrets: inherit
|
||||
|
||||
# MacOS
|
||||
@@ -126,7 +146,9 @@ jobs:
|
||||
uses: ./.github/workflows/macos_build.yml
|
||||
with:
|
||||
jobName: "MacOS Build"
|
||||
artifactPrefixName: "PCSX2-macos-Qt"
|
||||
fetchTags: true
|
||||
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
|
||||
secrets: inherit
|
||||
|
||||
# Upload the Artifacts
|
||||
@@ -146,7 +168,7 @@ jobs:
|
||||
- name: Prepare Artifact Folder
|
||||
run: mkdir ./ci-artifacts/
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download all Artifacts
|
||||
with:
|
||||
path: ./ci-artifacts/
|
||||
@@ -159,9 +181,6 @@ jobs:
|
||||
working-directory: ./ci-artifacts/
|
||||
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
|
||||
|
||||
# Artifact Naming:
|
||||
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
|
||||
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
|
||||
- name: Name and Upload the Release Assets
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
@@ -1,39 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Artifact Naming Scheme:
|
||||
# PCSX2-<OS>-Qt-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
|
||||
# PCSX2-<OS>-Qt-[BUILD_SYSTEM]-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
|
||||
# -- limited to 200 chars
|
||||
# Outputs:
|
||||
# - artifact-name
|
||||
|
||||
# Example - PCSX2-linux-Qt-x64-flatpak-sse4-sha[e880a2749]
|
||||
|
||||
# Inputs as env-vars
|
||||
# OS
|
||||
# BUILD_SYSTEM
|
||||
# ARCH
|
||||
# SIMD
|
||||
# PREFIX
|
||||
# EVENT_NAME
|
||||
# PR_TITLE
|
||||
# PR_NUM
|
||||
# PR_SHA
|
||||
|
||||
NAME=""
|
||||
|
||||
if [ "${OS}" == "macos" ]; then
|
||||
# MacOS has combined binaries for x64 and ARM64.
|
||||
NAME="PCSX2-${OS}-Qt"
|
||||
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
|
||||
NAME="PCSX2-${OS}-Qt-${ARCH}-${SIMD}"
|
||||
else
|
||||
NAME="PCSX2-${OS}-Qt-${ARCH}"
|
||||
if [[ -z "${PREFIX}" ]]; then
|
||||
echo "PREFIX is not set, can't name artifact without it!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add cmake if used to differentate it from msbuild builds
|
||||
# Else the two artifacts will have the same name and the files will be merged
|
||||
if [[ ! -z "${BUILD_SYSTEM}" ]]; then
|
||||
if [[ "${BUILD_SYSTEM}" == "cmake" ]] || [[ "${BUILD_SYSTEM}" == "flatpak" ]]; then
|
||||
NAME="${NAME}-${BUILD_SYSTEM}"
|
||||
fi
|
||||
fi
|
||||
NAME="${PREFIX}"
|
||||
|
||||
# Add PR / Commit Metadata
|
||||
if [ "$EVENT_NAME" == "pull_request" ]; then
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
INSTALLDIR="$HOME/deps"
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Syntax: $0 <output directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INSTALLDIR="$1"
|
||||
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
||||
SDL=SDL2-2.28.5
|
||||
SDL=SDL2-2.30.0
|
||||
QT=6.6.1
|
||||
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
|
||||
|
||||
@@ -12,7 +17,7 @@ mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $SDL.tar.gz
|
||||
36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0 $SDL.tar.gz
|
||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||
450c5b4677b2fe40ed07954d7f0f40690068e80a94c9df86c2c905ccd59d02f7 qtbase-everywhere-src-$QT.tar.xz
|
||||
ac4ed08950072e375be662cfa64fdb447dd6e935cf29c56a4128d1500492188f qtimageformats-everywhere-src-$QT.tar.xz
|
||||
@@ -45,7 +50,7 @@ cd ..
|
||||
echo "Building libbacktrace..."
|
||||
unzip "$LIBBACKTRACE.zip"
|
||||
cd "libbacktrace-$LIBBACKTRACE"
|
||||
./configure --prefix="$HOME/deps"
|
||||
./configure --prefix="$INSTALLDIR"
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL2-2.28.5.tar.gz",
|
||||
"sha256": "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4"
|
||||
"url": "https://libsdl.org/release/SDL2-2.30.0.tar.gz",
|
||||
"sha256": "36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -38,13 +38,9 @@ cmake \
|
||||
$ADDITIONAL_CMAKE_ARGS \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DQT_BUILD=ON \
|
||||
-DCUBEB_API=ON \
|
||||
-DX11_API=ON \
|
||||
-DWAYLAND_API=ON \
|
||||
-DENABLE_SETCAP=OFF \
|
||||
-DCMAKE_PREFIX_PATH="${DEPS_PREFIX}" \
|
||||
-DUSE_SYSTEM_SDL2=ON \
|
||||
-DUSE_SYSTEM_ZSTD=OFF \
|
||||
-DDISABLE_ADVANCE_SIMD=TRUE
|
||||
|
||||
|
||||
@@ -19,9 +19,11 @@ declare -a BUILD_PACKAGES=(
|
||||
"libfontconfig1-dev"
|
||||
"libharfbuzz-dev"
|
||||
"libjpeg-dev"
|
||||
"liblz4-dev"
|
||||
"libpng-dev"
|
||||
"libfreetype-dev"
|
||||
"libinput-dev"
|
||||
"libwebp-dev"
|
||||
"libxcb-*-dev"
|
||||
"libxkbcommon-dev"
|
||||
"libxkbcommon-x11-dev"
|
||||
|
||||
@@ -2,27 +2,39 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Syntax: $0 <output directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
|
||||
INSTALLDIR="$HOME/deps"
|
||||
INSTALLDIR="$1"
|
||||
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
||||
SDL=SDL2-2.28.5
|
||||
SDL=SDL2-2.30.0
|
||||
XZ=5.4.5
|
||||
ZSTD=1.5.5
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
PNG=1.6.37
|
||||
JPG=9e
|
||||
WEBP=1.3.2
|
||||
FFMPEG=6.0
|
||||
QT=6.6.0
|
||||
|
||||
mkdir deps-build
|
||||
mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
||||
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS"
|
||||
export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
|
||||
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
|
||||
export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
|
||||
export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
|
||||
export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $SDL.tar.gz
|
||||
36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0 $SDL.tar.gz
|
||||
135c90b934aee8fbc0d467de87a05cb70d627da36abe518c357a873709e5b7d6 xz-$XZ.tar.gz
|
||||
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
|
||||
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$WEBP.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
039d53312acb5897a9054bd38c9ccbdab72500b71fdccdb3f4f0844b0dd39e0e qtbase-everywhere-src-$QT.tar.xz
|
||||
e1542cb50176e237809895c6549598c08587c63703d100be54ac2d806834e384 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
@@ -33,7 +45,11 @@ EOF
|
||||
|
||||
curl -L \
|
||||
-O "https://libsdl.org/release/$SDL.tar.gz" \
|
||||
-O "https://github.com/tukaani-project/xz/releases/download/v$XZ/xz-$XZ.tar.gz" \
|
||||
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
|
||||
-O "https://github.com/lz4/lz4/archive/$LZ4.tar.gz" \
|
||||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
|
||||
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP.tar.gz" \
|
||||
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
@@ -46,41 +62,18 @@ shasum -a 256 --check SHASUMS
|
||||
echo "Installing SDL..."
|
||||
tar xf "$SDL.tar.gz"
|
||||
cd "$SDL"
|
||||
|
||||
# MFI causes multiple joystick connection events, I'm guessing because both the HIDAPI and MFI interfaces
|
||||
# race each other, and sometimes both end up getting through. So, just force MFI off.
|
||||
patch -u CMakeLists.txt <<EOF
|
||||
--- CMakeLists.txt 2023-08-03 01:33:11
|
||||
+++ CMakeLists.txt 2023-08-26 12:58:53
|
||||
@@ -2105,7 +2105,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreHaptics/CoreHaptics.h>
|
||||
int main() { return 0; }" HAVE_FRAMEWORK_COREHAPTICS)
|
||||
- if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS)
|
||||
+ if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS AND FALSE)
|
||||
# Only enable MFI if we also have CoreHaptics to ensure rumble works
|
||||
set(SDL_JOYSTICK_MFI 1)
|
||||
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
|
||||
|
||||
EOF
|
||||
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSDL_X11=OFF
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Installing libpng..."
|
||||
tar xf "libpng-$PNG.tar.xz"
|
||||
cd "libpng-$PNG"
|
||||
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Installing FFmpeg..."
|
||||
tar xf "ffmpeg-$FFMPEG.tar.xz"
|
||||
cd "ffmpeg-$FFMPEG"
|
||||
./configure --prefix="$INSTALLDIR" --disable-all --disable-autodetect --disable-static --enable-shared \
|
||||
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
|
||||
./configure --prefix="$INSTALLDIR" \
|
||||
--enable-cross-compile --arch=x86_64 --cc='clang -arch x86_64' --cxx='clang++ -arch x86_64' --disable-x86asm \
|
||||
--disable-all --disable-autodetect --disable-static --enable-shared \
|
||||
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
|
||||
--enable-audiotoolbox --enable-videotoolbox \
|
||||
--enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \
|
||||
@@ -90,27 +83,101 @@ make "-j$NPROCS"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Installing XZ..."
|
||||
tar xf "xz-$XZ.tar.gz"
|
||||
cd "xz-$XZ"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -B build
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Installing Zstd..."
|
||||
tar xf "zstd-$ZSTD.tar.gz"
|
||||
cd "zstd-$ZSTD"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
|
||||
make -C build-dir "-j$NPROCS"
|
||||
make -C build-dir install
|
||||
cd ..
|
||||
|
||||
echo "Installing LZ4..."
|
||||
tar xf "$LZ4.tar.gz"
|
||||
cd "lz4-$LZ4"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir build/cmake
|
||||
make -C build-dir "-j$NPROCS"
|
||||
make -C build-dir install
|
||||
cd ..
|
||||
|
||||
echo "Installing libpng..."
|
||||
tar xf "libpng-$PNG.tar.xz"
|
||||
cd "libpng-$PNG"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -B build
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Installing WebP..."
|
||||
tar xf "libwebp-$WEBP.tar.gz"
|
||||
cd "libwebp-$WEBP"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -B build \
|
||||
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
|
||||
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Installing Qt Base..."
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
|
||||
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
|
||||
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
|
||||
# We could run macdeployqt twice, but that's even more janky than patching it.
|
||||
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
|
||||
--- shared.cpp
|
||||
+++ shared.cpp
|
||||
@@ -1119,14 +1119,8 @@
|
||||
addPlugins(QStringLiteral("networkinformation"));
|
||||
}
|
||||
|
||||
- // All image formats (svg if QtSvg is used)
|
||||
- const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
|
||||
- addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
|
||||
- if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
|
||||
- return false;
|
||||
- return true;
|
||||
- });
|
||||
-
|
||||
+ // All image formats
|
||||
+ addPlugins(QStringLiteral("imageformats"));
|
||||
addPlugins(QStringLiteral("iconengines"));
|
||||
|
||||
// Platforminputcontext plugins if QtGui is in use
|
||||
EOF
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Installing Qt SVG..."
|
||||
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
|
||||
cd "qtsvg-everywhere-src-$QT"
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
"$INSTALLDIR/bin/qt-configure-module" ..
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ../..
|
||||
|
||||
echo "Installing Qt Image Formats..."
|
||||
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
||||
cd "qtimageformats-everywhere-src-$QT"
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
"$INSTALLDIR/bin/qt-configure-module" ..
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ../..
|
||||
|
||||
echo "Installing Qt Tools..."
|
||||
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
||||
cd "qttools-everywhere-src-$QT"
|
||||
@@ -128,18 +195,23 @@ patch -u src/linguist/CMakeLists.txt <<EOF
|
||||
add_subdirectory(linguist)
|
||||
endif()
|
||||
EOF
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ../..
|
||||
|
||||
echo "Installing Qt Translations..."
|
||||
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
|
||||
cd "qttranslations-everywhere-src-$QT"
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
"$INSTALLDIR/bin/qt-configure-module" ..
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ../..
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -r deps-build
|
||||
rm -rf deps-build
|
||||
|
||||
@@ -39,9 +39,9 @@ cd "%BUILDDIR%"
|
||||
|
||||
set QT=6.6.1
|
||||
set QTMINOR=6.6
|
||||
set SDL=SDL2-2.28.5
|
||||
set SDL=SDL2-2.30.0
|
||||
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 97bd14ee0ec67494d2b93f1a4f7da2bf891103c57090d96fdcc2b019d885c76a || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 80b0c02b6018630cd40639ac9fc8e5c1d8eec14d8fe3e6dfa76343e3ba8b78d9 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 818f92518d1a89ee98ae818891a7d2f0e41aa45b933d55215da2df6d5459428e || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 03f01042f86b4dbf7329a179f20835817c660a183178c11570cc0535b3c3ba58 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" d44d5ead8d4682f54c91687b5e32f2735f086419e3889e05609feae1a7f02da9 || goto error
|
||||
|
||||
2
.github/workflows/triage_pr.yml
vendored
2
.github/workflows/triage_pr.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@main
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
6
.github/workflows/windows_build_matrix.yml
vendored
6
.github/workflows/windows_build_matrix.yml
vendored
@@ -27,6 +27,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "MSVC SSE4"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-msvc"
|
||||
configuration: Release
|
||||
simd: "SSE4"
|
||||
secrets: inherit
|
||||
@@ -38,6 +39,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "MSVC AVX2"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-msvc"
|
||||
configuration: Release AVX2
|
||||
secrets: inherit
|
||||
|
||||
@@ -47,6 +49,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "CMake MSVC"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-msvc"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
secrets: inherit
|
||||
@@ -58,6 +61,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "Clang SSE4"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-clang"
|
||||
configuration: Release Clang
|
||||
simd: "SSE4"
|
||||
secrets: inherit
|
||||
@@ -69,6 +73,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "Clang AVX2"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-clang"
|
||||
configuration: Release Clang AVX2
|
||||
secrets: inherit
|
||||
|
||||
@@ -78,6 +83,7 @@ jobs:
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "CMake Clang"
|
||||
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-clang"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang
|
||||
|
||||
23
.github/workflows/windows_build_qt.yml
vendored
23
.github/workflows/windows_build_qt.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
jobName:
|
||||
required: true
|
||||
type: string
|
||||
artifactPrefixName:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
@@ -37,6 +40,10 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
stableBuild:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_windows_qt:
|
||||
@@ -58,14 +65,18 @@ jobs:
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Add stable release identifier file
|
||||
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
cat ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: windows
|
||||
BUILD_SYSTEM: ${{ inputs.buildSystem }}
|
||||
ARCH: ${{ inputs.platform }}
|
||||
SIMD: ${{ inputs.simd }}
|
||||
PREFIX: ${{ inputs.artifactPrefixName }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
@@ -122,7 +133,7 @@ jobs:
|
||||
cmake --build build --config Release --target unittests
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
path: |
|
||||
@@ -136,7 +147,7 @@ jobs:
|
||||
!./bin/**/*.lib
|
||||
|
||||
- name: Upload artifact - with symbols
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
|
||||
path: ./bin/**/*.pdb
|
||||
|
||||
21
.gitignore
vendored
21
.gitignore
vendored
@@ -56,6 +56,13 @@ oprofile_data/
|
||||
/UpgradeLog*.htm
|
||||
/.vscode*
|
||||
|
||||
# Jetbrains Rider
|
||||
/.idea*
|
||||
|
||||
# KDevelop 4 Workspace Configuration Files
|
||||
*.kdev4
|
||||
/.kdev4*
|
||||
|
||||
/bin/**/*.dll
|
||||
/bin/**/*.dmp
|
||||
/bin/**/*.exp
|
||||
@@ -67,11 +74,13 @@ oprofile_data/
|
||||
/bin/bios
|
||||
/bin/cache
|
||||
/bin/cheats
|
||||
/bin/patches
|
||||
/bin/covers
|
||||
/bin/dumps
|
||||
/bin/gamesettings
|
||||
/bin/help
|
||||
/bin/inis
|
||||
/bin/inis/debuggersettings
|
||||
/bin/logs
|
||||
/bin/memcards
|
||||
/bin/plugins
|
||||
@@ -80,6 +89,18 @@ oprofile_data/
|
||||
/bin/textures
|
||||
/bin/translations
|
||||
/bin/inputprofiles
|
||||
/bin/videos
|
||||
/bin/portable.ini
|
||||
|
||||
# Manually added by user.
|
||||
/bin/resources/patches.zip
|
||||
|
||||
# Resources that are runtime downloaded.
|
||||
/bin/resources/fonts/NotoSansJP-Regular.ttf
|
||||
/bin/resources/fonts/NotoSansKR-Regular.ttf
|
||||
/bin/resources/fonts/NotoSansSC-Regular.ttf
|
||||
/bin/resources/fonts/NotoSansTC-Regular.ttf
|
||||
|
||||
/deps
|
||||
/ipch
|
||||
|
||||
|
||||
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
||||
[submodule "3rdparty/xz/xz"]
|
||||
path = 3rdparty/xz/xz
|
||||
url = https://github.com/PCSX2/xz.git
|
||||
[submodule "3rdparty/gtest"]
|
||||
path = 3rdparty/gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
@@ -30,3 +27,9 @@
|
||||
[submodule "3rdparty/libwebp/libwebp"]
|
||||
path = 3rdparty/libwebp/libwebp
|
||||
url = https://github.com/webmproject/libwebp
|
||||
[submodule "3rdparty/xz/xz"]
|
||||
path = 3rdparty/xz/xz
|
||||
url = https://github.com/tukaani-project/xz.git
|
||||
[submodule "3rdparty/lz4/lz4"]
|
||||
path = 3rdparty/lz4/lz4
|
||||
url = https://github.com/lz4/lz4
|
||||
|
||||
22
3rdparty/d3d12memalloc/CHANGELOG.md
vendored
22
3rdparty/d3d12memalloc/CHANGELOG.md
vendored
@@ -1,3 +1,23 @@
|
||||
# 1.0.0</b> (2019-09-02)
|
||||
# 2.0.1 (2022-04-05)
|
||||
|
||||
A maintenance release with some bug fixes and improvements. There are no changes in the library API.
|
||||
|
||||
- Fixed an assert failing when detailed JSON dump was made while a custom pool was present with specified string name (#36, thanks @rbertin-aso).
|
||||
- Fixed image height calculation in JSON dump visualization tool "GpuMemDumpVis.py" (#37, thanks @rbertin-aso).
|
||||
- Added JSON Schema for JSON dump format - see file "tools\GpuMemDumpVis\GpuMemDump.schema.json".
|
||||
- Added documentation section "Resource reference counting".
|
||||
|
||||
# 2.0.0 (2022-03-25)
|
||||
|
||||
So much has changed since the first release that it doesn’t make much sense to compare the differences. Here are the most important features that the library now provides:
|
||||
|
||||
- Powerful custom pools, which give an opportunity to not only keep certain resources together, reserve some minimum or limit the maximum amount of memory they can take, but also to pass additional allocation parameters unavailable to simple allocations. Among them, probably the most interesting is `POOL_DESC::HeapProperties`, which allows you to specify parameters of a custom memory type, which may be useful on UMA platforms. Committed allocations can now also be created in custom pools.
|
||||
- The API for statistics and budget has been redesigned - see structures `Statistics`, `Budget`, `DetailedStatistics`, `TotalStatistics`.
|
||||
- The library exposes its core allocation algorithm via the “virtual allocator” interface. This can be used to allocate pieces of custom memory or whatever you like, even something completely unrelated to graphics.
|
||||
- The allocation algorithm has been replaced with the new, more efficient TLSF.
|
||||
- Added support for defragmentation.
|
||||
- Objects of the library can be used with smart pointers designed for COM objects.
|
||||
|
||||
# 1.0.0 (2019-09-02)
|
||||
|
||||
First published version.
|
||||
|
||||
4
3rdparty/d3d12memalloc/README.md
vendored
4
3rdparty/d3d12memalloc/README.md
vendored
@@ -41,7 +41,7 @@ Additional features:
|
||||
- Statistics: Obtain brief or detailed statistics about the amount of memory used, unused, number of allocated heaps, number of allocations etc. - globally and per memory heap type. Current memory usage and budget as reported by the system can also be queried.
|
||||
- Debug annotations: Associate custom `void* pPrivateData` and debug `LPCWSTR pName` with each allocation.
|
||||
- JSON dump: Obtain a string in JSON format with detailed map of internal state, including list of allocations, their string names, and gaps between them.
|
||||
- Convert this JSON dump into a picture to visualize your memory using attached Python script.
|
||||
- Convert this JSON dump into a picture to visualize your memory. See [tools/GpuMemDumpVis](tools/GpuMemDumpVis/README.md).
|
||||
- Virtual allocator - an API that exposes the core allocation algorithm to be used without allocating real GPU memory, to allocate your own stuff, e.g. sub-allocate pieces of one large buffer.
|
||||
|
||||
# Prerequisites
|
||||
@@ -104,10 +104,12 @@ For more information see [NOTICES.txt](NOTICES.txt).
|
||||
# Software using this library
|
||||
|
||||
- **[The Forge](https://github.com/ConfettiFX/The-Forge)** - cross-platform rendering framework. Apache License 2.0.
|
||||
- **[Wicked Engine<img src="https://github.com/turanszkij/WickedEngine/blob/master/Content/logo_small.png" width="28px" align="center"/>](https://github.com/turanszkij/WickedEngine)** - 3D engine with modern graphics
|
||||
|
||||
[Some other projects on GitHub](https://github.com/search?q=D3D12MemAlloc.h&type=Code) and some game development studios that use DX12 in their games.
|
||||
|
||||
# See also
|
||||
|
||||
- **[Vcpkg](https://github.com/Microsoft/vcpkg)** dependency manager from Microsoft offers a port of this library that is easy to install.
|
||||
- **[Vulkan Memory Allocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/)** - equivalent library for Vulkan. License: MIT.
|
||||
- **[TerraFX.Interop.D3D12MemoryAllocator](https://github.com/terrafx/terrafx.interop.d3d12memoryallocator)** - interop bindings for this library for C#, as used by [TerraFX](https://github.com/terrafx/terrafx). License: MIT.
|
||||
|
||||
231
3rdparty/d3d12memalloc/include/D3D12MemAlloc.h
vendored
231
3rdparty/d3d12memalloc/include/D3D12MemAlloc.h
vendored
@@ -24,9 +24,9 @@
|
||||
|
||||
/** \mainpage D3D12 Memory Allocator
|
||||
|
||||
<b>Version 2.0.0-development</b> (2021-07-26)
|
||||
<b>Version 2.1.0-development</b> (2023-07-05)
|
||||
|
||||
Copyright (c) 2019-2022 Advanced Micro Devices, Inc. All rights reserved. \n
|
||||
Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved. \n
|
||||
License: MIT
|
||||
|
||||
Documentation of all members: D3D12MemAlloc.h
|
||||
@@ -36,6 +36,7 @@ Documentation of all members: D3D12MemAlloc.h
|
||||
- \subpage quick_start
|
||||
- [Project setup](@ref quick_start_project_setup)
|
||||
- [Creating resources](@ref quick_start_creating_resources)
|
||||
- [Resource reference counting](@ref quick_start_resource_reference_counting)
|
||||
- [Mapping memory](@ref quick_start_mapping_memory)
|
||||
- \subpage custom_pools
|
||||
- \subpage defragmentation
|
||||
@@ -50,7 +51,7 @@ Documentation of all members: D3D12MemAlloc.h
|
||||
- [Thread safety](@ref general_considerations_thread_safety)
|
||||
- [Versioning and compatibility](@ref general_considerations_versioning_and_compatibility)
|
||||
- [Features not supported](@ref general_considerations_features_not_supported)
|
||||
|
||||
|
||||
\section main_see_also See also
|
||||
|
||||
- [Product page on GPUOpen](https://gpuopen.com/gaming-product/d3d12-memory-allocator/)
|
||||
@@ -58,9 +59,18 @@ Documentation of all members: D3D12MemAlloc.h
|
||||
*/
|
||||
|
||||
// If using this library on a platform different than Windows PC or want to use different version of DXGI,
|
||||
// you should include D3D12-compatible headers before this library on your own and define this macro.
|
||||
// you should include D3D12-compatible headers before this library on your own and define
|
||||
// D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED.
|
||||
// Alternatively, if you are targeting the open sourced DirectX headers, defining D3D12MA_USING_DIRECTX_HEADERS
|
||||
// will include them rather the ones provided by the Windows SDK.
|
||||
#ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED
|
||||
#include <d3d12.h>
|
||||
#if defined(D3D12MA_USING_DIRECTX_HEADERS)
|
||||
#include <directx/d3d12.h>
|
||||
#include <dxguids/dxguids.h>
|
||||
#else
|
||||
#include <d3d12.h>
|
||||
#endif
|
||||
|
||||
#include <dxgi1_4.h>
|
||||
#endif
|
||||
|
||||
@@ -132,6 +142,18 @@ If providing your own implementation, you need to implement a subset of std::ato
|
||||
// Forward declaration if ID3D12ProtectedResourceSession is not defined inside the headers (older SDK, pre ID3D12Device4)
|
||||
struct ID3D12ProtectedResourceSession;
|
||||
|
||||
// Define this enum even if SDK doesn't provide it, to simplify the API.
|
||||
#ifndef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
typedef enum D3D12_RESIDENCY_PRIORITY
|
||||
{
|
||||
D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
|
||||
D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
|
||||
D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
|
||||
D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
|
||||
D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000
|
||||
} D3D12_RESIDENCY_PRIORITY;
|
||||
#endif
|
||||
|
||||
namespace D3D12MA
|
||||
{
|
||||
class D3D12MA_API IUnknownImpl : public IUnknown
|
||||
@@ -144,7 +166,7 @@ public:
|
||||
protected:
|
||||
virtual void ReleaseThis() { delete this; }
|
||||
private:
|
||||
D3D12MA_ATOMIC_UINT32 m_RefCount{1};
|
||||
D3D12MA_ATOMIC_UINT32 m_RefCount = {1};
|
||||
};
|
||||
} // namespace D3D12MA
|
||||
|
||||
@@ -226,8 +248,6 @@ enum ALLOCATION_FLAGS
|
||||
|
||||
/** Create allocation only if additional memory required for it, if any, won't exceed
|
||||
memory budget. Otherwise return `E_OUTOFMEMORY`.
|
||||
|
||||
\warning Currently this feature is not fully implemented yet.
|
||||
*/
|
||||
ALLOCATION_FLAG_WITHIN_BUDGET = 0x4,
|
||||
|
||||
@@ -237,7 +257,6 @@ enum ALLOCATION_FLAGS
|
||||
*/
|
||||
ALLOCATION_FLAG_UPPER_ADDRESS = 0x8,
|
||||
|
||||
|
||||
/** Set this flag if the allocated memory will have aliasing resources.
|
||||
|
||||
Use this when calling D3D12MA::Allocator::CreateResource() and similar to
|
||||
@@ -306,7 +325,6 @@ struct ALLOCATION_DESC
|
||||
/** \brief Custom pool to place the new resource in. Optional.
|
||||
|
||||
When not NULL, the resource will be created inside specified custom pool.
|
||||
It will then never be created as committed.
|
||||
*/
|
||||
Pool* CustomPool;
|
||||
/// Custom general-purpose pointer that will be stored in D3D12MA::Allocation.
|
||||
@@ -570,7 +588,6 @@ private:
|
||||
UINT64 m_Size;
|
||||
UINT64 m_Alignment;
|
||||
ID3D12Resource* m_Resource;
|
||||
UINT m_CreationFrameIndex;
|
||||
void* m_pPrivateData;
|
||||
wchar_t* m_Name;
|
||||
|
||||
@@ -637,7 +654,7 @@ private:
|
||||
AllocHandle GetAllocHandle() const;
|
||||
NormalBlock* GetBlock();
|
||||
template<typename D3D12_RESOURCE_DESC_T>
|
||||
void SetResource(ID3D12Resource* resource, const D3D12_RESOURCE_DESC_T* pResourceDesc);
|
||||
void SetResourcePointer(ID3D12Resource* resource, const D3D12_RESOURCE_DESC_T* pResourceDesc);
|
||||
void FreeName();
|
||||
|
||||
D3D12MA_CLASS_NO_COPY(Allocation)
|
||||
@@ -838,6 +855,14 @@ enum POOL_FLAGS
|
||||
*/
|
||||
POOL_FLAG_ALGORITHM_LINEAR = 0x1,
|
||||
|
||||
/** \brief Optimization, allocate MSAA textures as committed resources always.
|
||||
|
||||
Specify this flag to create MSAA textures with implicit heaps, as if they were created
|
||||
with flag D3D12MA::ALLOCATION_FLAG_COMMITTED. Usage of this flags enables pool to create its heaps
|
||||
on smaller alignment not suitable for MSAA textures.
|
||||
*/
|
||||
POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x2,
|
||||
|
||||
// Bit mask to extract only `ALGORITHM` bits from entire set of flags.
|
||||
POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
|
||||
};
|
||||
@@ -895,6 +920,29 @@ struct POOL_DESC
|
||||
Valid only if ID3D12Device4 interface is present in current Windows SDK!
|
||||
*/
|
||||
ID3D12ProtectedResourceSession* pProtectedSession;
|
||||
/** \brief Residency priority to be set for all allocations made in this pool. Optional.
|
||||
|
||||
Set this parameter to one of the possible enum values e.g. `D3D12_RESIDENCY_PRIORITY_HIGH`
|
||||
to apply specific residency priority to all allocations made in this pool:
|
||||
`ID3D12Heap` memory blocks used to sub-allocate for placed resources, as well as
|
||||
committed resources or heaps created when D3D12MA::ALLOCATION_FLAG_COMMITTED is used.
|
||||
This can increase/decrease chance that the memory will be pushed out from VRAM
|
||||
to system RAM when the system runs out of memory, which is invisible to the developer
|
||||
using D3D12 API while it can degrade performance.
|
||||
|
||||
Priority is set using function `ID3D12Device1::SetResidencyPriority`.
|
||||
It is performed only when `ID3D12Device1` interface is defined and successfully obtained.
|
||||
Otherwise, this parameter is ignored.
|
||||
|
||||
This parameter is optional. If you set it to `D3D12_RESIDENCY_PRIORITY(0)`,
|
||||
residency priority will not be set for allocations made in this pool.
|
||||
|
||||
There is no equivalent parameter for allocations made in default pools.
|
||||
If you want to set residency priority for such allocation, you need to do it manually:
|
||||
allocate with D3D12MA::ALLOCATION_FLAG_COMMITTED and call
|
||||
`ID3D12Device1::SetResidencyPriority`, passing `allocation->GetResource()`.
|
||||
*/
|
||||
D3D12_RESIDENCY_PRIORITY ResidencyPriority;
|
||||
};
|
||||
|
||||
/** \brief Custom memory pool
|
||||
@@ -1009,6 +1057,14 @@ enum ALLOCATOR_FLAGS
|
||||
Only avaiable if `ID3D12Device8` is present. Otherwise, the flag is ignored.
|
||||
*/
|
||||
ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED = 0x4,
|
||||
|
||||
/** \brief Optimization, allocate MSAA textures as committed resources always.
|
||||
|
||||
Specify this flag to create MSAA textures with implicit heaps, as if they were created
|
||||
with flag D3D12MA::ALLOCATION_FLAG_COMMITTED. Usage of this flags enables all default pools
|
||||
to create its heaps on smaller alignment not suitable for MSAA textures.
|
||||
*/
|
||||
ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x8,
|
||||
};
|
||||
|
||||
/// \brief Parameters of created Allocator object. To be used with CreateAllocator().
|
||||
@@ -1144,7 +1200,26 @@ public:
|
||||
Allocation** ppAllocation,
|
||||
REFIID riidResource,
|
||||
void** ppvResource);
|
||||
#endif // #ifdef __ID3D12Device4_INTERFACE_DEFINED__
|
||||
#endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
|
||||
#ifdef __ID3D12Device10_INTERFACE_DEFINED__
|
||||
/** \brief Similar to Allocator::CreateResource2, but there are initial layout instead of state and
|
||||
castable formats list
|
||||
|
||||
It internally uses `ID3D12Device10::CreateCommittedResource3` or `ID3D12Device10::CreatePlacedResource2`.
|
||||
|
||||
To work correctly, `ID3D12Device10` interface must be available in the current system. Otherwise, `E_NOINTERFACE` is returned.
|
||||
*/
|
||||
HRESULT CreateResource3(const ALLOCATION_DESC* pAllocDesc,
|
||||
const D3D12_RESOURCE_DESC1* pResourceDesc,
|
||||
D3D12_BARRIER_LAYOUT InitialLayout,
|
||||
const D3D12_CLEAR_VALUE* pOptimizedClearValue,
|
||||
UINT32 NumCastableFormats,
|
||||
DXGI_FORMAT* pCastableFormats,
|
||||
Allocation** ppAllocation,
|
||||
REFIID riidResource,
|
||||
void** ppvResource);
|
||||
#endif // #ifdef __ID3D12Device10_INTERFACE_DEFINED__
|
||||
|
||||
/** \brief Allocates memory without creating any resource placed in it.
|
||||
|
||||
@@ -1201,6 +1276,41 @@ public:
|
||||
REFIID riidResource,
|
||||
void** ppvResource);
|
||||
|
||||
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
/** \brief Similar to Allocator::CreateAliasingResource, but supports new structure `D3D12_RESOURCE_DESC1`.
|
||||
|
||||
It internally uses `ID3D12Device8::CreatePlacedResource1`.
|
||||
|
||||
To work correctly, `ID3D12Device8` interface must be available in the current system. Otherwise, `E_NOINTERFACE` is returned.
|
||||
*/
|
||||
HRESULT CreateAliasingResource1(Allocation* pAllocation,
|
||||
UINT64 AllocationLocalOffset,
|
||||
const D3D12_RESOURCE_DESC1* pResourceDesc,
|
||||
D3D12_RESOURCE_STATES InitialResourceState,
|
||||
const D3D12_CLEAR_VALUE* pOptimizedClearValue,
|
||||
REFIID riidResource,
|
||||
void** ppvResource);
|
||||
#endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
|
||||
#ifdef __ID3D12Device10_INTERFACE_DEFINED__
|
||||
/** \brief Similar to Allocator::CreateAliasingResource1, but there are initial layout instead of state and
|
||||
castable formats list
|
||||
|
||||
It internally uses `ID3D12Device10::CreatePlacedResource2`.
|
||||
|
||||
To work correctly, `ID3D12Device10` interface must be available in the current system. Otherwise, `E_NOINTERFACE` is returned.
|
||||
*/
|
||||
HRESULT CreateAliasingResource2(Allocation* pAllocation,
|
||||
UINT64 AllocationLocalOffset,
|
||||
const D3D12_RESOURCE_DESC1* pResourceDesc,
|
||||
D3D12_BARRIER_LAYOUT InitialLayout,
|
||||
const D3D12_CLEAR_VALUE* pOptimizedClearValue,
|
||||
UINT32 NumCastableFormats,
|
||||
DXGI_FORMAT* pCastableFormats,
|
||||
REFIID riidResource,
|
||||
void** ppvResource);
|
||||
#endif // #ifdef __ID3D12Device10_INTERFACE_DEFINED__
|
||||
|
||||
/** \brief Creates custom pool.
|
||||
*/
|
||||
HRESULT CreatePool(
|
||||
@@ -1223,7 +1333,7 @@ public:
|
||||
- `pNonLocalBudget` returns the budget of the system memory available for D3D12 resources.
|
||||
- When IsUMA() `== TRUE` (integrated graphics chip):
|
||||
- `pLocalBudget` returns the budget of the shared memory available for all D3D12 resources.
|
||||
All memory is considered "local".
|
||||
All memory is considered "local".
|
||||
- `pNonLocalBudget` is not applicable and returns zeros.
|
||||
|
||||
This function is called "get" not "calculate" because it is very fast, suitable to be called
|
||||
@@ -1246,8 +1356,9 @@ public:
|
||||
*/
|
||||
void CalculateStatistics(TotalStatistics* pStats);
|
||||
|
||||
/// Builds and returns statistics as a string in JSON format.
|
||||
/** @param[out] ppStatsString Must be freed using Allocator::FreeStatsString.
|
||||
/** \brief Builds and returns statistics as a string in JSON format.
|
||||
*
|
||||
@param[out] ppStatsString Must be freed using Allocator::FreeStatsString.
|
||||
@param DetailedMap `TRUE` to include full list of allocations (can make the string quite long), `FALSE` to only return statistics.
|
||||
*/
|
||||
void BuildStatsString(WCHAR** ppStatsString, BOOL DetailedMap) const;
|
||||
@@ -1559,9 +1670,9 @@ to be passed along with `D3D12_RESOURCE_DESC` and other parameters for created
|
||||
resource. This structure describes parameters of the desired memory allocation,
|
||||
including choice of `D3D12_HEAP_TYPE`.
|
||||
|
||||
The function also returns a new object of type D3D12MA::Allocation, created along
|
||||
with usual `ID3D12Resource`. It represents allocated memory and can be queried
|
||||
for size, offset, `ID3D12Resource`, and `ID3D12Heap` if needed.
|
||||
The function returns a new object of type D3D12MA::Allocation.
|
||||
It represents allocated memory and can be queried for size, offset, `ID3D12Heap`.
|
||||
It also holds a reference to the `ID3D12Resource`, which can be accessed by calling D3D12MA::Allocation::GetResource().
|
||||
|
||||
\code
|
||||
D3D12_RESOURCE_DESC resourceDesc = {};
|
||||
@@ -1580,7 +1691,6 @@ resourceDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
|
||||
D3D12MA::ALLOCATION_DESC allocationDesc = {};
|
||||
allocationDesc.HeapType = D3D12_HEAP_TYPE_DEFAULT;
|
||||
|
||||
D3D12Resource* resource;
|
||||
D3D12MA::Allocation* allocation;
|
||||
HRESULT hr = allocator->CreateResource(
|
||||
&allocationDesc,
|
||||
@@ -1588,15 +1698,16 @@ HRESULT hr = allocator->CreateResource(
|
||||
D3D12_RESOURCE_STATE_COPY_DEST,
|
||||
NULL,
|
||||
&allocation,
|
||||
IID_PPV_ARGS(&resource));
|
||||
IID_NULL, NULL);
|
||||
|
||||
// Use allocation->GetResource()...
|
||||
\endcode
|
||||
|
||||
You need to remember both resource and allocation objects and destroy them
|
||||
separately when no longer needed.
|
||||
You need to release the allocation object when no longer needed.
|
||||
This will also release the D3D12 resource.
|
||||
|
||||
\code
|
||||
allocation->Release();
|
||||
resource->Release();
|
||||
\endcode
|
||||
|
||||
The advantage of using the allocator instead of creating committed resource, and
|
||||
@@ -1619,6 +1730,65 @@ they can be kept together. By using this library, you don't need to handle this
|
||||
manually.
|
||||
|
||||
|
||||
\section quick_start_resource_reference_counting Resource reference counting
|
||||
|
||||
`ID3D12Resource` and other interfaces of Direct3D 12 use COM, so they are reference-counted.
|
||||
Objects of this library are reference-counted as well.
|
||||
An object of type D3D12MA::Allocation remembers the resource (buffer or texture)
|
||||
that was created together with this memory allocation
|
||||
and holds a reference to the `ID3D12Resource` object.
|
||||
(Note this is a difference to Vulkan Memory Allocator, where a `VmaAllocation` object has no connection
|
||||
with the buffer or image that was created with it.)
|
||||
Thus, it is important to manage the resource reference counter properly.
|
||||
|
||||
<b>The simplest use case</b> is shown in the code snippet above.
|
||||
When only D3D12MA::Allocation object is obtained from a function call like D3D12MA::Allocator::CreateResource,
|
||||
it remembers the `ID3D12Resource` that was created with it and holds a reference to it.
|
||||
The resource can be obtained by calling `allocation->GetResource()`, which doesn't increment the resource
|
||||
reference counter.
|
||||
Calling `allocation->Release()` will decrease the resource reference counter, which is = 1 in this case,
|
||||
so the resource will be released.
|
||||
|
||||
<b>Second option</b> is to retrieve a pointer to the resource along with D3D12MA::Allocation.
|
||||
Last parameters of the resource creation function can be used for this purpose.
|
||||
|
||||
\code
|
||||
D3D12MA::Allocation* allocation;
|
||||
ID3D12Resource* resource;
|
||||
HRESULT hr = allocator->CreateResource(
|
||||
&allocationDesc,
|
||||
&resourceDesc,
|
||||
D3D12_RESOURCE_STATE_COPY_DEST,
|
||||
NULL,
|
||||
&allocation,
|
||||
IID_PPV_ARGS(&resource));
|
||||
|
||||
// Use resource...
|
||||
\endcode
|
||||
|
||||
In this case, returned pointer `resource` is equal to `allocation->GetResource()`,
|
||||
but the creation function additionally increases resource reference counter for the purpose of returning it from this call
|
||||
(it actually calls `QueryInterface` internally), so the resource will have the counter = 2.
|
||||
The resource then need to be released along with the allocation, in this particular order,
|
||||
to make sure the resource is destroyed before its memory heap can potentially be freed.
|
||||
|
||||
\code
|
||||
resource->Release();
|
||||
allocation->Release();
|
||||
\endcode
|
||||
|
||||
<b>More advanced use cases</b> are possible when we consider that an D3D12MA::Allocation object can just hold
|
||||
a reference to any resource.
|
||||
It can be changed by calling D3D12MA::Allocation::SetResource. This function
|
||||
releases the old resource and calls `AddRef` on the new one.
|
||||
|
||||
Special care must be taken when performing <b>defragmentation</b>.
|
||||
The new resource created at the destination place should be set as `pass.pMoves[i].pDstTmpAllocation->SetResource(newRes)`,
|
||||
but it is moved to the source allocation at end of the defragmentation pass,
|
||||
while the old resource accessible through `pass.pMoves[i].pSrcAllocation->GetResource()` is then released.
|
||||
For more information, see documentation chapter \ref defragmentation.
|
||||
|
||||
|
||||
\section quick_start_mapping_memory Mapping memory
|
||||
|
||||
The process of getting regular CPU-side pointer to the memory of a resource in
|
||||
@@ -1892,9 +2062,20 @@ You can perform the defragmentation incrementally to limit the number of allocat
|
||||
in each pass, e.g. to call it in sync with render frames and not to experience too big hitches.
|
||||
See members: D3D12MA::DEFRAGMENTATION_DESC::MaxBytesPerPass, D3D12MA::DEFRAGMENTATION_DESC::MaxAllocationsPerPass.
|
||||
|
||||
It is also safe to perform the defragmentation asynchronously to render frames and other Direct3D 12 and %D3D12MA
|
||||
<b>Thread safety:</b>
|
||||
It is safe to perform the defragmentation asynchronously to render frames and other Direct3D 12 and %D3D12MA
|
||||
usage, possibly from multiple threads, with the exception that allocations
|
||||
returned in D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::pMoves shouldn't be released until the defragmentation pass is ended.
|
||||
During the call to D3D12MA::DefragmentationContext::BeginPass(), any operations on the memory pool
|
||||
affected by the defragmentation are blocked by a mutex.
|
||||
|
||||
What it means in practice is that you shouldn't free any allocations from the defragmented pool
|
||||
since the moment a call to `BeginPass` begins. Otherwise, a thread performing the `allocation->Release()`
|
||||
would block for the time `BeginPass` executes and then free the allocation when it finishes, while the allocation
|
||||
could have ended up on the list of allocations to move.
|
||||
A solution to freeing allocations during defragmentation is to find such allocation on the list
|
||||
`pass.pMoves[i]` and set its operation to D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_DESTROY instead of
|
||||
calling `allocation->Release()`, or simply deferring the release to the time after defragmentation finished.
|
||||
|
||||
<b>Mapping</b> is out of scope of this library and so it is not preserved after an allocation is moved during defragmentation.
|
||||
You need to map the new resource yourself if needed.
|
||||
|
||||
1696
3rdparty/d3d12memalloc/src/D3D12MemAlloc.cpp
vendored
1696
3rdparty/d3d12memalloc/src/D3D12MemAlloc.cpp
vendored
File diff suppressed because it is too large
Load Diff
1
3rdparty/include/IconsFontAwesome5.h
vendored
1
3rdparty/include/IconsFontAwesome5.h
vendored
@@ -706,6 +706,7 @@
|
||||
#define ICON_FA_RANDOM "\xef\x81\xb4" // U+f074
|
||||
#define ICON_FA_RECEIPT "\xef\x95\x83" // U+f543
|
||||
#define ICON_FA_RECORD_VINYL "\xef\xa3\x99" // U+f8d9
|
||||
#define ICON_FA_RECORDING "\xef\xa3\x9a" // U+f8da
|
||||
#define ICON_FA_RECYCLE "\xef\x86\xb8" // U+f1b8
|
||||
#define ICON_FA_REDO "\xef\x80\x9e" // U+f01e
|
||||
#define ICON_FA_REDO_ALT "\xef\x8b\xb9" // U+f2f9
|
||||
|
||||
342
3rdparty/include/IconsPromptFont.h
vendored
Normal file
342
3rdparty/include/IconsPromptFont.h
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
#pragma once
|
||||
#define ICON_PF_EXCHANGE "\xE2\x86\x94"
|
||||
#define ICON_PF_REVERSE "\xE2\x86\x95"
|
||||
#define ICON_PF_LEFT_TRIGGER_LT "\xE2\x86\x96"
|
||||
#define ICON_PF_RIGHT_TRIGGER_RT "\xE2\x86\x97"
|
||||
#define ICON_PF_LEFT_SHOULDER_LB "\xE2\x86\x98"
|
||||
#define ICON_PF_RIGHT_SHOULDER_RB "\xE2\x86\x99"
|
||||
#define ICON_PF_LEFT_TRIGGER_ZL "\xE2\x86\x9A"
|
||||
#define ICON_PF_RIGHT_TRIGGER_ZR "\xE2\x86\x9B"
|
||||
#define ICON_PF_LEFT_SHOULDER_L "\xE2\x86\x9C"
|
||||
#define ICON_PF_RIGHT_SHOULDER_R "\xE2\x86\x9D"
|
||||
#define ICON_PF_DPAD_LEFT "\xE2\x86\x9E"
|
||||
#define ICON_PF_DPAD_UP "\xE2\x86\x9F"
|
||||
#define ICON_PF_DPAD_RIGHT "\xE2\x86\xA0"
|
||||
#define ICON_PF_DPAD_DOWN "\xE2\x86\xA1"
|
||||
#define ICON_PF_DPAD_LEFT_RIGHT "\xE2\x86\xA2"
|
||||
#define ICON_PF_DPAD_UP_DOWN "\xE2\x86\xA3"
|
||||
#define ICON_PF_BUTTON_LEFT_X "\xE2\x86\xA4"
|
||||
#define ICON_PF_BUTTON_UP_Y "\xE2\x86\xA5"
|
||||
#define ICON_PF_BUTTON_RIGHT_B "\xE2\x86\xA6"
|
||||
#define ICON_PF_BUTTON_DOWN_A "\xE2\x86\xA7"
|
||||
#define ICON_PF_LEFT_ANALOG_CLOCKWISE "\xE2\x86\xA9"
|
||||
#define ICON_PF_LEFT_ANALOG_COUNTER "\xE2\x86\xAA"
|
||||
#define ICON_PF_RIGHT_ANALOG_CLOCKWISE "\xE2\x86\xAB"
|
||||
#define ICON_PF_RIGHT_ANALOG_COUNTER "\xE2\x86\xAC"
|
||||
#define ICON_PF_BOTH_ANALOG_CLOCKWISE "\xE2\x86\xAD"
|
||||
#define ICON_PF_BOTH_ANALOG_COUNTER "\xE2\x86\xAE"
|
||||
#define ICON_PF_LEFT_SHOULDER_L1 "\xE2\x86\xB0"
|
||||
#define ICON_PF_RIGHT_SHOULDER_R1 "\xE2\x86\xB1"
|
||||
#define ICON_PF_LEFT_TRIGGER_L2 "\xE2\x86\xB2"
|
||||
#define ICON_PF_RIGHT_TRIGGER_R2 "\xE2\x86\xB3"
|
||||
#define ICON_PF_DPAD_LEFT_DOWN "\xE2\x86\xB4"
|
||||
#define ICON_PF_DPAD_UP_RIGHT "\xE2\x86\xB5"
|
||||
#define ICON_PF_ANALOG_CLOCKWISE "\xE2\x86\xB6"
|
||||
#define ICON_PF_ANALOG_COUNTER "\xE2\x86\xB7"
|
||||
#define ICON_PF_BOTH_ANALOG_CLICK "\xE2\x86\xB9"
|
||||
#define ICON_PF_LEFT_ANALOG_CLICK "\xE2\x86\xBA"
|
||||
#define ICON_PF_RIGHT_ANALOG_CLICK "\xE2\x86\xBB"
|
||||
#define ICON_PF_LEFT_ANALOG_LEFT "\xE2\x86\xBC"
|
||||
#define ICON_PF_RIGHT_ANALOG_LEFT "\xE2\x86\xBD"
|
||||
#define ICON_PF_LEFT_ANALOG_UP "\xE2\x86\xBE"
|
||||
#define ICON_PF_RIGHT_ANALOG_UP "\xE2\x86\xBF"
|
||||
#define ICON_PF_LEFT_ANALOG_RIGHT "\xE2\x87\x80"
|
||||
#define ICON_PF_RIGHT_ANALOG_RIGHT "\xE2\x87\x81"
|
||||
#define ICON_PF_LEFT_ANALOG_DOWN "\xE2\x87\x82"
|
||||
#define ICON_PF_RIGHT_ANALOG_DOWN "\xE2\x87\x83"
|
||||
#define ICON_PF_LEFT_ANALOG_LEFT_RIGHT "\xE2\x87\x84"
|
||||
#define ICON_PF_LEFT_ANALOG_UP_DOWN "\xE2\x87\x85"
|
||||
#define ICON_PF_RIGHT_ANALOG_LEFT_RIGHT "\xE2\x87\x86"
|
||||
#define ICON_PF_ANALOG_LEFT "\xE2\x87\x87"
|
||||
#define ICON_PF_ANALOG_UP "\xE2\x87\x88"
|
||||
#define ICON_PF_ANALOG_RIGHT "\xE2\x87\x89"
|
||||
#define ICON_PF_ANALOG_DOWN "\xE2\x87\x8A"
|
||||
#define ICON_PF_LEFT_ANALOG "\xE2\x87\x8B"
|
||||
#define ICON_PF_RIGHT_ANALOG "\xE2\x87\x8C"
|
||||
#define ICON_PF_DPAD "\xE2\x87\x8E"
|
||||
#define ICON_PF_BUTTON_X "\xE2\x87\x90"
|
||||
#define ICON_PF_BUTTON_Y "\xE2\x87\x91"
|
||||
#define ICON_PF_BUTTON_B "\xE2\x87\x92"
|
||||
#define ICON_PF_BUTTON_A "\xE2\x87\x93"
|
||||
#define ICON_PF_ANALOG_LEFT_RIGHT "\xE2\x87\x94"
|
||||
#define ICON_PF_ANALOG_UP_DOWN "\xE2\x87\x95"
|
||||
#define ICON_PF_ANALOG_UP_LEFT "\xE2\x87\x96"
|
||||
#define ICON_PF_ANALOG_UP_RIGHT "\xE2\x87\x97"
|
||||
#define ICON_PF_ANALOG_DOWN_RIGHT "\xE2\x87\x98"
|
||||
#define ICON_PF_ANALOG_DOWN_LEFT "\xE2\x87\x99"
|
||||
#define ICON_PF_LEFT_ANALOG_TOUCH "\xE2\x87\x9A"
|
||||
#define ICON_PF_RIGHT_ANALOG_TOUCH "\xE2\x87\x9B"
|
||||
#define ICON_PF_LEFT_TRIGGER_PULL "\xE2\x87\x9C"
|
||||
#define ICON_PF_RIGHT_TRIGGER_PULL "\xE2\x87\x9D"
|
||||
#define ICON_PF_DPAD_RIGHT_DOWN "\xE2\x87\x9E"
|
||||
#define ICON_PF_DPAD_LEFT_UP "\xE2\x87\x9F"
|
||||
#define ICON_PF_BUTTON_SQUARE "\xE2\x87\xA0"
|
||||
#define ICON_PF_BUTTON_TRIANGLE "\xE2\x87\xA1"
|
||||
#define ICON_PF_BUTTON_CIRCLE "\xE2\x87\xA2"
|
||||
#define ICON_PF_BUTTON_CROSS "\xE2\x87\xA3"
|
||||
#define ICON_PF_STEAM_MENU "\xE2\x87\xA4"
|
||||
#define ICON_PF_OPTIONS_MENU "\xE2\x87\xA5"
|
||||
#define ICON_PF_DUALSHOCK_SHARE "\xE2\x87\xA6"
|
||||
#define ICON_PF_DUALSHOCK_TOUCHPAD "\xE2\x87\xA7"
|
||||
#define ICON_PF_DUALSHOCK_OPTIONS "\xE2\x87\xA8"
|
||||
#define ICON_PF_GAMECUBE_Z "\xE2\x87\xA9"
|
||||
#define ICON_PF_BACK_TRIGGER_Z "\xE2\x87\xAA"
|
||||
#define ICON_PF_BUTTON_C "\xE2\x87\xAB"
|
||||
#define ICON_PF_BUTTON_Z "\xE2\x87\xAC"
|
||||
#define ICON_PF_BUTTON_ALT_1 "\xE2\x87\xAD"
|
||||
#define ICON_PF_BUTTON_ALT_2 "\xE2\x87\xAE"
|
||||
#define ICON_PF_LEFT_ANALOG_ANY "\xE2\x87\xB1"
|
||||
#define ICON_PF_RIGHT_ANALOG_ANY "\xE2\x87\xB2"
|
||||
#define ICON_PF_ANALOG_ANY "\xE2\x87\xB3"
|
||||
#define ICON_PF_RIGHT_ANALOG_UP_DOWN "\xE2\x87\xB5"
|
||||
#define ICON_PF_SELECT_SHARE "\xE2\x87\xB7"
|
||||
#define ICON_PF_START "\xE2\x87\xB8"
|
||||
#define ICON_PF_HOME_MENU "\xE2\x87\xB9"
|
||||
#define ICON_PF_SHARE_CAPTURE "\xE2\x87\xBA"
|
||||
#define ICON_PF_BURGER_MENU "\xE2\x87\xBB"
|
||||
#define ICON_PF_MINUS "\xE2\x87\xBD"
|
||||
#define ICON_PF_PLUS "\xE2\x87\xBE"
|
||||
#define ICON_PF_JOYCON_DPAD_LEFT "\xE2\x87\xBF"
|
||||
#define ICON_PF_JOYCON_DPAD_UP "\xE2\x88\x80"
|
||||
#define ICON_PF_JOYCON_DPAD_RIGHT "\xE2\x88\x81"
|
||||
#define ICON_PF_JOYCON_DPAD_DOWN "\xE2\x88\x82"
|
||||
#define ICON_PF_JOYCON_SL "\xE2\x88\x83"
|
||||
#define ICON_PF_JOYCON_SR "\xE2\x88\x84"
|
||||
#define ICON_PF_LENOVO_LEGION_QUICK_SETTINGS "\xE2\x88\x85"
|
||||
#define ICON_PF_DUALSENSE_SHARE "\xE2\x88\x86"
|
||||
#define ICON_PF_DUALSENSE_TOUCHPAD "\xE2\x88\x87"
|
||||
#define ICON_PF_DUALSENSE_OPTIONS "\xE2\x88\x88"
|
||||
#define ICON_PF_AYANEO_LC "\xE2\x88\x89"
|
||||
#define ICON_PF_AYANEO_RC "\xE2\x88\x8A"
|
||||
#define ICON_PF_AYANEO_WAVE "\xE2\x88\x8B"
|
||||
#define ICON_PF_AYN_HOME "\xE2\x88\x8C"
|
||||
#define ICON_PF_AYN_LCC "\xE2\x88\x8D"
|
||||
#define ICON_PF_GPD_C1 "\xE2\x88\x8E"
|
||||
#define ICON_PF_GPD_C2 "\xE2\x88\x8F"
|
||||
#define ICON_PF_ONEXPLAYER_KEYBOARD "\xE2\x88\x90"
|
||||
#define ICON_PF_ONEXPLAYER_TURBO "\xE2\x88\x91"
|
||||
#define ICON_PF_ROG_ALLY_M1 "\xE2\x88\x92"
|
||||
#define ICON_PF_ROG_ALLY_M2 "\xE2\x88\x93"
|
||||
#define ICON_PF_LEFT_TRACKPAD_ANY "\xE2\x89\xA4"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_ANY "\xE2\x89\xA5"
|
||||
#define ICON_PF_LEFT_TRACKPAD_CLICK "\xE2\x89\xA6"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_CLICK "\xE2\x89\xA7"
|
||||
#define ICON_PF_LEFT_TRACKPAD_TOUCH "\xE2\x89\xA8"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_TOUCH "\xE2\x89\xA9"
|
||||
#define ICON_PF_LEFT_TRACKPAD_LEFT "\xE2\x89\xAE"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_LEFT "\xE2\x89\xAF"
|
||||
#define ICON_PF_LEFT_TRACKPAD_UP "\xE2\x89\xB0"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_UP "\xE2\x89\xB1"
|
||||
#define ICON_PF_LEFT_TRACKPAD_RIGHT "\xE2\x89\xB2"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_RIGHT "\xE2\x89\xB3"
|
||||
#define ICON_PF_LEFT_TRACKPAD_DOWN "\xE2\x89\xB4"
|
||||
#define ICON_PF_RIGHT_TRACKPAD_DOWN "\xE2\x89\xB5"
|
||||
#define ICON_PF_STEAMDECK_L4 "\xE2\x89\xB6"
|
||||
#define ICON_PF_STEAMDECK_R4 "\xE2\x89\xB7"
|
||||
#define ICON_PF_STEAMDECK_L5 "\xE2\x89\xB8"
|
||||
#define ICON_PF_STEAMDECK_R5 "\xE2\x89\xB9"
|
||||
#define ICON_PF_XBOX_DPAD_LEFT "\xE2\x89\xBA"
|
||||
#define ICON_PF_XBOX_DPAD_UP "\xE2\x89\xBB"
|
||||
#define ICON_PF_XBOX_DPAD_RIGHT "\xE2\x89\xBC"
|
||||
#define ICON_PF_XBOX_DPAD_DOWN "\xE2\x89\xBD"
|
||||
#define ICON_PF_XBOX_DPAD_LEFT_RIGHT "\xE2\x89\xBE"
|
||||
#define ICON_PF_XBOX_DPAD_UP_DOWN "\xE2\x89\xBF"
|
||||
#define ICON_PF_XBOX_DPAD_LEFT_UP "\xE2\x8A\x80"
|
||||
#define ICON_PF_XBOX_DPAD_RIGHT_UP "\xE2\x8A\x81"
|
||||
#define ICON_PF_XBOX_DPAD_LEFT_DOWN "\xE2\x8A\x82"
|
||||
#define ICON_PF_XBOX_DPAD_RIGHT_DOWN "\xE2\x8A\x83"
|
||||
#define ICON_PF_XBOX_DPAD "\xE2\x8A\x84"
|
||||
#define ICON_PF_PIN "\xE2\x8C\x96"
|
||||
#define ICON_PF_TABS "\xE2\x8F\x8D"
|
||||
#define ICON_PF_BACK "\xE2\x8F\x8E"
|
||||
#define ICON_PF_HOME_SCREEN "\xE2\x8F\x8F"
|
||||
#define ICON_PF_HORIZONTAL_DOTS "\xE2\x8F\x90"
|
||||
#define ICON_PF_VERTICAL_DOTS "\xE2\x8F\x91"
|
||||
#define ICON_PF_HAMBURGER_MENU "\xE2\x8F\x92"
|
||||
#define ICON_PF_ARROW_LEFT "\xE2\x8F\xB4"
|
||||
#define ICON_PF_ARROW_UP "\xE2\x8F\xB5"
|
||||
#define ICON_PF_ARROW_RIGHT "\xE2\x8F\xB6"
|
||||
#define ICON_PF_ARROW_DOWN "\xE2\x8F\xB7"
|
||||
#define ICON_PF_WASD "\xE2\x90\xA3"
|
||||
#define ICON_PF_ARROW_KEYS "\xE2\x90\xA4"
|
||||
#define ICON_PF_IJKL "\xE2\x90\xA5"
|
||||
#define ICON_PF_FN "\xE2\x90\xA6"
|
||||
#define ICON_PF_CTRL "\xE2\x90\xA7"
|
||||
#define ICON_PF_ALT "\xE2\x90\xA8"
|
||||
#define ICON_PF_SHIFT "\xE2\x90\xA9"
|
||||
#define ICON_PF_SUPER "\xE2\x90\xAA"
|
||||
#define ICON_PF_TAB "\xE2\x90\xAB"
|
||||
#define ICON_PF_CAPS "\xE2\x90\xAC"
|
||||
#define ICON_PF_BACKSPACE "\xE2\x90\xAD"
|
||||
#define ICON_PF_ENTER "\xE2\x90\xAE"
|
||||
#define ICON_PF_ESC "\xE2\x90\xAF"
|
||||
#define ICON_PF_PRTSC "\xE2\x90\xB0"
|
||||
#define ICON_PF_SCRLK "\xE2\x90\xB1"
|
||||
#define ICON_PF_PAUSE "\xE2\x90\xB2"
|
||||
#define ICON_PF_NUMLOCK "\xE2\x90\xB3"
|
||||
#define ICON_PF_INSERT "\xE2\x90\xB4"
|
||||
#define ICON_PF_HOME "\xE2\x90\xB5"
|
||||
#define ICON_PF_PAGE_UP "\xE2\x90\xB6"
|
||||
#define ICON_PF_DELETE "\xE2\x90\xB7"
|
||||
#define ICON_PF_END "\xE2\x90\xB8"
|
||||
#define ICON_PF_PAGE_DOWN "\xE2\x90\xB9"
|
||||
#define ICON_PF_SPACE "\xE2\x90\xBA"
|
||||
#define ICON_PF_GAMEPAD "\xE2\x90\xBC"
|
||||
#define ICON_PF_KEYBOARD "\xE2\x90\xBD"
|
||||
#define ICON_PF_MOUSE "\xE2\x90\xBE"
|
||||
#define ICON_PF_MOUSE_AND_KEYBOARD "\xE2\x90\xBF"
|
||||
#define ICON_PF_GUITAR "\xE2\x91\x83"
|
||||
#define ICON_PF_F1 "\xE2\x91\xA0"
|
||||
#define ICON_PF_F2 "\xE2\x91\xA1"
|
||||
#define ICON_PF_F3 "\xE2\x91\xA2"
|
||||
#define ICON_PF_F4 "\xE2\x91\xA3"
|
||||
#define ICON_PF_F5 "\xE2\x91\xA4"
|
||||
#define ICON_PF_F6 "\xE2\x91\xA5"
|
||||
#define ICON_PF_F7 "\xE2\x91\xA6"
|
||||
#define ICON_PF_F8 "\xE2\x91\xA7"
|
||||
#define ICON_PF_F9 "\xE2\x91\xA8"
|
||||
#define ICON_PF_F10 "\xE2\x91\xA9"
|
||||
#define ICON_PF_F11 "\xE2\x91\xAA"
|
||||
#define ICON_PF_F12 "\xE2\x91\xAB"
|
||||
#define ICON_PF_EMPTY_KEYCAP "\xE2\x92\x8F"
|
||||
#define ICON_PF_1 "\xE2\x93\xB5"
|
||||
#define ICON_PF_2 "\xE2\x93\xB6"
|
||||
#define ICON_PF_3 "\xE2\x93\xB7"
|
||||
#define ICON_PF_4 "\xE2\x93\xB8"
|
||||
#define ICON_PF_5 "\xE2\x93\xB9"
|
||||
#define ICON_PF_6 "\xE2\x93\xBA"
|
||||
#define ICON_PF_7 "\xE2\x93\xBB"
|
||||
#define ICON_PF_8 "\xE2\x93\xBC"
|
||||
#define ICON_PF_9 "\xE2\x93\xBD"
|
||||
#define ICON_PF_0 "\xE2\x93\xBF"
|
||||
#define ICON_PF_STAR "\xE2\x98\x85"
|
||||
#define ICON_PF_SKULL "\xE2\x98\xA0"
|
||||
#define ICON_PF_FROWN "\xE2\x98\xB9"
|
||||
#define ICON_PF_SMILE "\xE2\x98\xBA"
|
||||
#define ICON_PF_EMPTY_HEART "\xE2\x99\xA1"
|
||||
#define ICON_PF_HEART "\xE2\x99\xA5"
|
||||
#define ICON_PF_D4 "\xE2\x99\xB3"
|
||||
#define ICON_PF_D6 "\xE2\x99\xB4"
|
||||
#define ICON_PF_D8 "\xE2\x99\xB5"
|
||||
#define ICON_PF_D10 "\xE2\x99\xB6"
|
||||
#define ICON_PF_D12 "\xE2\x99\xB7"
|
||||
#define ICON_PF_D20 "\xE2\x99\xB8"
|
||||
#define ICON_PF_D6_1 "\xE2\x9A\x80"
|
||||
#define ICON_PF_D6_2 "\xE2\x9A\x81"
|
||||
#define ICON_PF_D6_3 "\xE2\x9A\x82"
|
||||
#define ICON_PF_D6_4 "\xE2\x9A\x83"
|
||||
#define ICON_PF_D6_5 "\xE2\x9A\x84"
|
||||
#define ICON_PF_D6_6 "\xE2\x9A\x85"
|
||||
#define ICON_PF_FLAG "\xE2\x9A\x91"
|
||||
#define ICON_PF_GEARS_OPTIONS_SETTINGS "\xE2\x9A\x99"
|
||||
#define ICON_PF_CROSS "\xE2\x9C\x97"
|
||||
#define ICON_PF_QUESTION "\xE2\x9D\x93"
|
||||
#define ICON_PF_EXCLAMATION "\xE2\x9D\x97"
|
||||
#define ICON_PF_MOUSE_BUTTON_1 "\xE2\x9E\x8A"
|
||||
#define ICON_PF_MOUSE_BUTTON_2 "\xE2\x9E\x8B"
|
||||
#define ICON_PF_MOUSE_BUTTON_3 "\xE2\x9E\x8C"
|
||||
#define ICON_PF_MOUSE_BUTTON_4 "\xE2\x9E\x8D"
|
||||
#define ICON_PF_MOUSE_BUTTON_5 "\xE2\x9E\x8E"
|
||||
#define ICON_PF_MOUSE_BUTTON_6 "\xE2\x9E\x8F"
|
||||
#define ICON_PF_MOUSE_BUTTON_7 "\xE2\x9E\x90"
|
||||
#define ICON_PF_MOUSE_BUTTON_8 "\xE2\x9E\x91"
|
||||
#define ICON_PF_SCROLL_UP "\xE2\x9F\xB0"
|
||||
#define ICON_PF_SCROLL_DOWN "\xE2\x9F\xB1"
|
||||
#define ICON_PF_LEFT_CLICK "\xE2\x9F\xB5"
|
||||
#define ICON_PF_RIGHT_CLICK "\xE2\x9F\xB6"
|
||||
#define ICON_PF_MIDDLE_CLICK "\xE2\x9F\xB7"
|
||||
#define ICON_PF_MOUSE_LEFT_RIGHT "\xE2\x9F\xBA"
|
||||
#define ICON_PF_MOUSE_UP_DOWN "\xE2\x9F\xBB"
|
||||
#define ICON_PF_MOUSE_ANY "\xE2\x9F\xBC"
|
||||
#define ICON_PF_BOX_CRATE "\xE2\xAC\x9B"
|
||||
#define ICON_PF_PLAYSTATION "\xEE\x80\x80"
|
||||
#define ICON_PF_XBOX "\xEE\x80\x81"
|
||||
#define ICON_PF_NINTENDO_SWITCH "\xEE\x80\x82"
|
||||
#define ICON_PF_AYANEO "\xEE\x80\x83"
|
||||
#define ICON_PF_LENOVO_LEGION "\xEE\x80\x84"
|
||||
#define ICON_PF_ROG_ALLY_ARMOURY "\xEE\x80\x85"
|
||||
#define ICON_PF_ROG_ALLOY_COMMAND "\xEE\x80\x86"
|
||||
#define ICON_PF_APPLE_MAC "\xEE\x80\x87"
|
||||
#define ICON_PF_WINDOWS "\xEE\x80\x88"
|
||||
#define ICON_PF_LINUX "\xEE\x80\x89"
|
||||
#define ICON_PF_BSD "\xEE\x80\x8A"
|
||||
#define ICON_PF_KEY_0 "\xEF\xBC\x90"
|
||||
#define ICON_PF_KEY_1 "\xEF\xBC\x91"
|
||||
#define ICON_PF_KEY_2 "\xEF\xBC\x92"
|
||||
#define ICON_PF_KEY_3 "\xEF\xBC\x93"
|
||||
#define ICON_PF_KEY_4 "\xEF\xBC\x94"
|
||||
#define ICON_PF_KEY_5 "\xEF\xBC\x95"
|
||||
#define ICON_PF_KEY_6 "\xEF\xBC\x96"
|
||||
#define ICON_PF_KEY_7 "\xEF\xBC\x97"
|
||||
#define ICON_PF_KEY_8 "\xEF\xBC\x98"
|
||||
#define ICON_PF_KEY_9 "\xEF\xBC\x99"
|
||||
#define ICON_PF_KEY_A "\xEF\xBC\xA1"
|
||||
#define ICON_PF_KEY_B "\xEF\xBC\xA2"
|
||||
#define ICON_PF_KEY_C "\xEF\xBC\xA3"
|
||||
#define ICON_PF_KEY_D "\xEF\xBC\xA4"
|
||||
#define ICON_PF_KEY_E "\xEF\xBC\xA5"
|
||||
#define ICON_PF_KEY_F "\xEF\xBC\xA6"
|
||||
#define ICON_PF_KEY_G "\xEF\xBC\xA7"
|
||||
#define ICON_PF_KEY_H "\xEF\xBC\xA8"
|
||||
#define ICON_PF_KEY_I "\xEF\xBC\xA9"
|
||||
#define ICON_PF_KEY_J "\xEF\xBC\xAA"
|
||||
#define ICON_PF_KEY_K "\xEF\xBC\xAB"
|
||||
#define ICON_PF_KEY_L "\xEF\xBC\xAC"
|
||||
#define ICON_PF_KEY_M "\xEF\xBC\xAD"
|
||||
#define ICON_PF_KEY_N "\xEF\xBC\xAE"
|
||||
#define ICON_PF_KEY_O "\xEF\xBC\xAF"
|
||||
#define ICON_PF_KEY_P "\xEF\xBC\xB0"
|
||||
#define ICON_PF_KEY_Q "\xEF\xBC\xB1"
|
||||
#define ICON_PF_KEY_R "\xEF\xBC\xB2"
|
||||
#define ICON_PF_KEY_S "\xEF\xBC\xB3"
|
||||
#define ICON_PF_KEY_T "\xEF\xBC\xB4"
|
||||
#define ICON_PF_KEY_U "\xEF\xBC\xB5"
|
||||
#define ICON_PF_KEY_V "\xEF\xBC\xB6"
|
||||
#define ICON_PF_KEY_W "\xEF\xBC\xB7"
|
||||
#define ICON_PF_KEY_X "\xEF\xBC\xB8"
|
||||
#define ICON_PF_KEY_Y "\xEF\xBC\xB9"
|
||||
#define ICON_PF_KEY_Z "\xEF\xBC\xBA"
|
||||
#define ICON_PF_HEADPHONES "\xF0\x9F\x8E\xA7"
|
||||
#define ICON_PF_MUSIC "\xF0\x9F\x8E\xB6"
|
||||
#define ICON_PF_FISH "\xF0\x9F\x90\x9F"
|
||||
#define ICON_PF_DANCE_PAD "\xF0\x9F\x92\x83"
|
||||
#define ICON_PF_LAPTOP "\xF0\x9F\x92\xBB"
|
||||
#define ICON_PF_DISKETTE "\xF0\x9F\x92\xBE"
|
||||
#define ICON_PF_WRITE "\xF0\x9F\x93\x9D"
|
||||
#define ICON_PF_PHONE "\xF0\x9F\x93\xB1"
|
||||
#define ICON_PF_CAMERA "\xF0\x9F\x93\xB7"
|
||||
#define ICON_PF_SPEAKER "\xF0\x9F\x94\x88"
|
||||
#define ICON_PF_LIGHT_GUN "\xF0\x9F\x94\xAB"
|
||||
#define ICON_PF_SFX_SOUND_EFFECT_NOISE "\xF0\x9F\x95\xAC"
|
||||
#define ICON_PF_STEERING_WHEEL "\xF0\x9F\x95\xB8"
|
||||
#define ICON_PF_FIGHT_STICK_JOYSTICK "\xF0\x9F\x95\xB9"
|
||||
#define ICON_PF_VR_HEADSET "\xF0\x9F\x95\xBB"
|
||||
#define ICON_PF_VR_CONTROLLER "\xF0\x9F\x95\xBC"
|
||||
#define ICON_PF_FLIGHT_STICK "\xF0\x9F\x95\xBD"
|
||||
#define ICON_PF_CPU_PROCESSOR "\xF0\x9F\x96\xA5"
|
||||
#define ICON_PF_WEB_INTERNET_LINK "\xF0\x9F\x96\xA7"
|
||||
#define ICON_PF_GPU_GRAPHICS_CARD "\xF0\x9F\x96\xA8"
|
||||
#define ICON_PF_RAM_MEMORY "\xF0\x9F\x96\xAA"
|
||||
#define ICON_PF_USB_STICK "\xF0\x9F\x96\xAB"
|
||||
#define ICON_PF_DATABASE "\xF0\x9F\x96\xAC"
|
||||
#define ICON_PF_HARD_DISK_DRIVE "\xF0\x9F\x96\xB4"
|
||||
#define ICON_PF_SCREEN_VIDEO "\xF0\x9F\x96\xB5"
|
||||
#define ICON_PF_TEXT_ENTRY_EDIT "\xF0\x9F\x96\xB9"
|
||||
#define ICON_PF_SPEAKING_VOICE "\xF0\x9F\x97\xA3"
|
||||
#define ICON_PF_LANGUAGE "\xF0\x9F\x97\xA9"
|
||||
#define ICON_PF_EXIT_QUIT_LEAVE "\xF0\x9F\x9A\xAA"
|
||||
#define ICON_PF_INFORMATION "\xF0\x9F\x9B\x88"
|
||||
#define ICON_PF_SHOPPING_CART "\xF0\x9F\x9B\x92"
|
||||
#define ICON_PF_ACHIEVEMENTS_PROGRESSION "\xE2\x8E\xB2"
|
||||
#define ICON_PF_ACHIEVEMENTS_MISSABLE "\xE2\x8E\xB3"
|
||||
#define ICON_PF_ACHIEVEMENTS_WIN "\xE2\x8E\xB4"
|
||||
#define ICON_PF_POPN_CONTROLLER "\xE2\x8A\xBF"
|
||||
#define ICON_PF_POPN_BLUE_LEFT "\xE2\x8B\x80"
|
||||
#define ICON_PF_POPN_BLUE_RIGHT "\xE2\x8B\x81"
|
||||
#define ICON_PF_POPN_GREEN_LEFT "\xE2\x8B\x82"
|
||||
#define ICON_PF_POPN_GREEN_RIGHT "\xE2\x8B\x83"
|
||||
#define ICON_PF_POPN_YELLOW_LEFT "\xE2\x8B\x84"
|
||||
#define ICON_PF_POPN_YELLOW_RIGHT "\xE2\x8B\x85"
|
||||
#define ICON_PF_POPN_WHITE_LEFT "\xE2\x8B\x86"
|
||||
#define ICON_PF_POPN_WHITE_RIGHT "\xE2\x8B\x87"
|
||||
#define ICON_PF_POPN_RED "\xE2\x8B\x88"
|
||||
24369
3rdparty/include/vk_mem_alloc.h
vendored
24369
3rdparty/include/vk_mem_alloc.h
vendored
File diff suppressed because it is too large
Load Diff
223
3rdparty/libzip/CMakeLists.txt
vendored
223
3rdparty/libzip/CMakeLists.txt
vendored
@@ -28,103 +28,83 @@ include(TestBigEndian)
|
||||
# Request ISO C secure library functions (memcpy_s &c)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D__STDC_WANT_LIB_EXT1__=1)
|
||||
|
||||
check_function_exists(_close HAVE__CLOSE)
|
||||
check_function_exists(_dup HAVE__DUP)
|
||||
check_function_exists(_fdopen HAVE__FDOPEN)
|
||||
check_function_exists(_fileno HAVE__FILENO)
|
||||
check_function_exists(_setmode HAVE__SETMODE)
|
||||
check_symbol_exists(_snprintf stdio.h HAVE__SNPRINTF)
|
||||
check_symbol_exists(_snprintf_s stdio.h HAVE__SNPRINTF_S)
|
||||
check_symbol_exists(_snwprintf_s stdio.h HAVE__SNWPRINTF_S)
|
||||
check_function_exists(_strdup HAVE__STRDUP)
|
||||
check_symbol_exists(_stricmp string.h HAVE__STRICMP)
|
||||
check_function_exists(_strtoi64 HAVE__STRTOI64)
|
||||
check_function_exists(_strtoui64 HAVE__STRTOUI64)
|
||||
check_function_exists(_unlink HAVE__UNLINK)
|
||||
check_function_exists(arc4random HAVE_ARC4RANDOM)
|
||||
check_function_exists(clonefile HAVE_CLONEFILE)
|
||||
check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO)
|
||||
check_function_exists(explicit_memset HAVE_EXPLICIT_MEMSET)
|
||||
check_function_exists(fchmod HAVE_FCHMOD)
|
||||
check_function_exists(fileno HAVE_FILENO)
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
check_function_exists(ftello HAVE_FTELLO)
|
||||
check_function_exists(getprogname HAVE_GETPROGNAME)
|
||||
check_symbol_exists(localtime_r time.h HAVE_LOCALTIME_R)
|
||||
check_symbol_exists(localtime_s time.h HAVE_LOCALTIME_S)
|
||||
check_function_exists(memcpy_s HAVE_MEMCPY_S)
|
||||
check_function_exists(random HAVE_RANDOM)
|
||||
check_function_exists(setmode HAVE_SETMODE)
|
||||
check_symbol_exists(snprintf stdio.h HAVE_SNPRINTF)
|
||||
check_symbol_exists(snprintf_s stdio.h HAVE_SNPRINTF_S)
|
||||
check_symbol_exists(strcasecmp strings.h HAVE_STRCASECMP)
|
||||
check_function_exists(strdup HAVE_STRDUP)
|
||||
check_function_exists(strerror_s HAVE_STRERROR_S)
|
||||
check_function_exists(strerrorlen_s HAVE_STRERRORLEN_S)
|
||||
check_function_exists(stricmp HAVE_STRICMP)
|
||||
check_function_exists(strncpy_s HAVE_STRNCPY_S)
|
||||
check_function_exists(strtoll HAVE_STRTOLL)
|
||||
check_function_exists(strtoull HAVE_STRTOULL)
|
||||
# Replaced these dynamic checks with static, otherwise XCode is slow to configure.
|
||||
set(HAVE__CLOSE ${MSVC})
|
||||
set(HAVE__DUP ${MSVC})
|
||||
set(HAVE__FDOPEN ${MSVC})
|
||||
set(HAVE__FILENO ${MSVC})
|
||||
set(HAVE__SETMODE ${MSVC})
|
||||
set(HAVE__SNPRINTF ${MSVC})
|
||||
set(HAVE__SNPRINTF_S ${MSVC})
|
||||
set(HAVE__SNWPRINTF_S ${MSVC})
|
||||
set(HAVE__STRDUP ${MSVC})
|
||||
set(HAVE__STRICMP ${MSVC})
|
||||
set(HAVE__STRTOI64 ${MSVC})
|
||||
set(HAVE__STRTOUI64 ${MSVC})
|
||||
set(HAVE__UNLINK ${MSVC})
|
||||
set(HAVE_ARC4RANDOM ${APPLE})
|
||||
set(HAVE_CLONEFILE ${APPLE})
|
||||
set(HAVE_EXPLICIT_BZERO ${LINUX})
|
||||
set(HAVE_EXPLICIT_MEMSET ${LINUX})
|
||||
set(HAVE_FCHMOD ${UNIX})
|
||||
set(HAVE_FILENO TRUE)
|
||||
set(HAVE_FSEEKO ${UNIX})
|
||||
set(HAVE_FTELLO ${UNIX})
|
||||
set(HAVE_GETPROGNAME ${APPLE})
|
||||
set(HAVE_LOCALTIME_R ${UNIX})
|
||||
set(HAVE_LOCALTIME_S ${MSVC})
|
||||
set(HAVE_MEMCPY_S ${MSVC})
|
||||
set(HAVE_RANDOM ${UNIX})
|
||||
set(HAVE_SETMODE ${APPLE})
|
||||
set(HAVE_SNPRINTF TRUE)
|
||||
set(HAVE_SNPRINTF_S FALSE)
|
||||
set(HAVE_STRCASECMP ${UNIX})
|
||||
set(HAVE_STRDUP TRUE)
|
||||
set(HAVE_STRERROR_S ${MSVC})
|
||||
set(HAVE_STRERRORLEN_S FALSE)
|
||||
set(HAVE_STRICMP ${MSVC})
|
||||
set(HAVE_STRNCPY_S ${MSVC})
|
||||
set(HAVE_STRTOLL TRUE)
|
||||
set(HAVE_STRTOULL TRUE)
|
||||
|
||||
check_include_files("sys/types.h;sys/stat.h;fts.h" HAVE_FTS_H)
|
||||
# fts functions may be in external library
|
||||
if(HAVE_FTS_H)
|
||||
if(UNIX)
|
||||
set(HAVE_FTS_H TRUE)
|
||||
check_function_exists(fts_open HAVE_FTS_OPEN)
|
||||
if(NOT HAVE_FTS_OPEN)
|
||||
check_library_exists(fts fts_open "" HAVE_LIB_FTS)
|
||||
else(NOT HAVE_FTS_OPEN)
|
||||
set(HAVE_LIB_FTS "" CACHE INTERNAL "")
|
||||
set(HAVE_LIB_FTS "")
|
||||
endif(NOT HAVE_FTS_OPEN)
|
||||
else(HAVE_FTS_H)
|
||||
set(HAVE_LIB_FTS "" CACHE INTERNAL "")
|
||||
endif(HAVE_FTS_H)
|
||||
|
||||
if(HAVE_LIB_FTS)
|
||||
set(FTS_LIB fts CACHE INTERNAL "")
|
||||
else()
|
||||
set(FTS_LIB "" CACHE INTERNAL "")
|
||||
set(HAVE_LIB_FTS "")
|
||||
endif()
|
||||
|
||||
check_include_files(stdbool.h HAVE_STDBOOL_H)
|
||||
check_include_files(strings.h HAVE_STRINGS_H)
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
if(HAVE_LIB_FTS)
|
||||
set(FTS_LIB fts)
|
||||
else()
|
||||
set(FTS_LIB "")
|
||||
endif()
|
||||
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H_LIBZIP)
|
||||
check_include_files(stdint.h HAVE_STDINT_H_LIBZIP)
|
||||
check_include_files(sys/types.h HAVE_SYS_TYPES_H_LIBZIP)
|
||||
set(HAVE_STDBOOL_H TRUE)
|
||||
set(HAVE_STRINGS_H ${UNIX})
|
||||
set(HAVE_UNISTD_H ${UNIX})
|
||||
|
||||
# TODO: fix test
|
||||
# this test does not find __progname even when it exists
|
||||
#check_symbol_exists(__progname stdlib.h HAVE___PROGNAME)
|
||||
|
||||
check_type_size(__int8 __INT8_LIBZIP)
|
||||
check_type_size(int8_t INT8_T_LIBZIP)
|
||||
check_type_size(uint8_t UINT8_T_LIBZIP)
|
||||
check_type_size(__int16 __INT16_LIBZIP)
|
||||
check_type_size(int16_t INT16_T_LIBZIP)
|
||||
check_type_size(uint16_t UINT16_T_LIBZIP)
|
||||
check_type_size(__int32 __INT32_LIBZIP)
|
||||
check_type_size(int32_t INT32_T_LIBZIP)
|
||||
check_type_size(uint32_t UINT32_T_LIBZIP)
|
||||
check_type_size(__int64 __INT64_LIBZIP)
|
||||
check_type_size(int64_t INT64_T_LIBZIP)
|
||||
check_type_size(uint64_t UINT64_T_LIBZIP)
|
||||
check_type_size("short" SHORT_LIBZIP)
|
||||
check_type_size("int" INT_LIBZIP)
|
||||
check_type_size("long" LONG_LIBZIP)
|
||||
check_type_size("long long" LONG_LONG_LIBZIP)
|
||||
check_type_size("off_t" SIZEOF_OFF_T)
|
||||
check_type_size("size_t" SIZEOF_SIZE_T)
|
||||
|
||||
check_c_source_compiles("#include <sys/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
int main(int argc, char *argv[]) { unsigned long x = FICLONERANGE; }" HAVE_FICLONERANGE)
|
||||
if(LINUX)
|
||||
check_c_source_compiles("#include <sys/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
int main(int argc, char *argv[]) { unsigned long x = FICLONERANGE; }" HAVE_FICLONERANGE)
|
||||
else()
|
||||
set(HAVE_FICLONERANGE FALSE)
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("
|
||||
int foo(char * _Nullable bar);
|
||||
int main(int argc, char *argv[]) { }" HAVE_NULLABLE)
|
||||
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
set(WORDS_BIGENDIAN FALSE)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
@@ -133,88 +113,19 @@ endif(MSVC)
|
||||
|
||||
# fixed size integral types
|
||||
|
||||
if(HAVE_INTTYPES_H_LIBZIP)
|
||||
set(LIBZIP_TYPES_INCLUDE "#if !defined(__STDC_FORMAT_MACROS)
|
||||
set(LIBZIP_TYPES_INCLUDE "#if !defined(__STDC_FORMAT_MACROS)
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#endif
|
||||
#include <inttypes.h>")
|
||||
elseif(HAVE_STDINT_H_LIBZIP)
|
||||
set(LIBZIP_TYPES_INCLUDE "#include <stdint.h>")
|
||||
elseif(HAVE_SYS_TYPES_H_LIBZIP)
|
||||
set(LIBZIP_TYPES_INCLUDE "#include <sys/types.h>")
|
||||
endif()
|
||||
|
||||
if(HAVE_INT8_T_LIBZIP)
|
||||
set(ZIP_INT8_T int8_t)
|
||||
elseif(HAVE___INT8_LIBZIP)
|
||||
set(ZIP_INT8_T __int8)
|
||||
else()
|
||||
set(ZIP_INT8_T "signed char")
|
||||
endif()
|
||||
|
||||
if(HAVE_UINT8_T_LIBZIP)
|
||||
set(ZIP_UINT8_T uint8_t)
|
||||
elseif(HAVE___INT8_LIBZIP)
|
||||
set(ZIP_UINT8_T "unsigned __int8")
|
||||
else()
|
||||
set(ZIP_UINT8_T "unsigned char")
|
||||
endif()
|
||||
|
||||
if(HAVE_INT16_T_LIBZIP)
|
||||
set(ZIP_INT16_T int16_t)
|
||||
elseif(HAVE___INT16_LIBZIP)
|
||||
set(INT16_T_LIBZIP __int16)
|
||||
elseif(SHORT_LIBZIP EQUAL 2)
|
||||
set(INT16_T_LIBZIP short)
|
||||
endif()
|
||||
|
||||
if(HAVE_UINT16_T_LIBZIP)
|
||||
set(ZIP_UINT16_T uint16_t)
|
||||
elseif(HAVE___INT16_LIBZIP)
|
||||
set(UINT16_T_LIBZIP "unsigned __int16")
|
||||
elseif(SHORT_LIBZIP EQUAL 2)
|
||||
set(UINT16_T_LIBZIP "unsigned short")
|
||||
endif()
|
||||
|
||||
if(HAVE_INT32_T_LIBZIP)
|
||||
set(ZIP_INT32_T int32_t)
|
||||
elseif(HAVE___INT32_LIBZIP)
|
||||
set(ZIP_INT32_T __int32)
|
||||
elseif(INT_LIBZIP EQUAL 4)
|
||||
set(ZIP_INT32_T int)
|
||||
elseif(LONG_LIBZIP EQUAL 4)
|
||||
set(ZIP_INT32_T long)
|
||||
endif()
|
||||
|
||||
if(HAVE_UINT32_T_LIBZIP)
|
||||
set(ZIP_UINT32_T uint32_t)
|
||||
elseif(HAVE___INT32_LIBZIP)
|
||||
set(ZIP_UINT32_T "unsigned __int32")
|
||||
elseif(INT_LIBZIP EQUAL 4)
|
||||
set(ZIP_UINT32_T "unsigned int")
|
||||
elseif(LONG_LIBZIP EQUAL 4)
|
||||
set(ZIP_UINT32_T "unsigned long")
|
||||
endif()
|
||||
|
||||
if(HAVE_INT64_T_LIBZIP)
|
||||
set(ZIP_INT64_T int64_t)
|
||||
elseif(HAVE___INT64_LIBZIP)
|
||||
set(ZIP_INT64_T __int64)
|
||||
elseif(LONG_LIBZIP EQUAL 8)
|
||||
set(ZIP_INT64_T long)
|
||||
elseif(LONG_LONG_LIBZIP EQUAL 8)
|
||||
set(ZIP_INT64_T "long long")
|
||||
endif()
|
||||
|
||||
if(HAVE_UINT64_T_LIBZIP)
|
||||
set(ZIP_UINT64_T uint64_t)
|
||||
elseif(HAVE___INT64_LIBZIP)
|
||||
set(ZIP_UINT64_T "unsigned __int64")
|
||||
elseif(LONG_LIBZIP EQUAL 8)
|
||||
set(ZIP_UINT64_T "unsigned long")
|
||||
elseif(LONG_LONG_LIBZIP EQUAL 8)
|
||||
set(ZIP_UINT64_T "unsigned long long")
|
||||
endif()
|
||||
set(ZIP_INT8_T int8_t)
|
||||
set(ZIP_UINT8_T uint8_t)
|
||||
set(ZIP_INT16_T int16_t)
|
||||
set(ZIP_UINT16_T uint16_t)
|
||||
set(ZIP_INT32_T int32_t)
|
||||
set(ZIP_UINT32_T uint32_t)
|
||||
set(ZIP_INT64_T int64_t)
|
||||
set(ZIP_UINT64_T uint64_t)
|
||||
|
||||
if(HAVE_NULLABLE)
|
||||
set(ZIP_NULLABLE_DEFINES)
|
||||
|
||||
13
3rdparty/lz4/CMakeLists.txt
vendored
Normal file
13
3rdparty/lz4/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
add_library(pcsx2-lz4
|
||||
lz4/lib/lz4.c
|
||||
lz4/lib/lz4.h
|
||||
)
|
||||
|
||||
target_include_directories(pcsx2-lz4 PUBLIC lz4/lib)
|
||||
target_compile_definitions(pcsx2-lz4 PUBLIC
|
||||
LZ4LIB_VISIBILITY=
|
||||
)
|
||||
|
||||
add_library(LZ4::LZ4 ALIAS pcsx2-lz4)
|
||||
|
||||
disable_compiler_warnings_for_target(pcsx2-lz4)
|
||||
1
3rdparty/lz4/lz4
vendored
Submodule
1
3rdparty/lz4/lz4
vendored
Submodule
Submodule 3rdparty/lz4/lz4 added at b8fd2d1530
46
3rdparty/lz4/lz4.vcxproj
vendored
Normal file
46
3rdparty/lz4/lz4.vcxproj
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
|
||||
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{39098635-446A-4FC3-9B1C-8609D94598A8}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
|
||||
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
|
||||
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
|
||||
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="..\DefaultProjectRootDir.props" />
|
||||
<Import Project="..\3rdparty.props" />
|
||||
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
|
||||
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\common\vsprops\CodeGen_Devel.props" />
|
||||
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\common\vsprops\CodeGen_Release.props" />
|
||||
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\common\vsprops\IncrementalLinking.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>LZ4LIB_VISIBILITY=;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(ProjectDir)\lz4\lib</AdditionalIncludeDirectories>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="lz4\lib\lz4.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="lz4\lib\lz4.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
91
3rdparty/promptfont/LICENSE.txt
vendored
Normal file
91
3rdparty/promptfont/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1. This license is copied below, and is also available
|
||||
with a FAQ at <http://scripts.sil.org/OFL>
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
33619
3rdparty/promptfont/promptfont.sfd
vendored
Normal file
33619
3rdparty/promptfont/promptfont.sfd
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
3rdparty/rcheevos/rcheevos
vendored
2
3rdparty/rcheevos/rcheevos
vendored
Submodule 3rdparty/rcheevos/rcheevos updated: 8afec6c55e...3cadf84c30
2
3rdparty/vulkan-headers
vendored
2
3rdparty/vulkan-headers
vendored
Submodule 3rdparty/vulkan-headers updated: 9f4c61a314...19a863ccce
2
3rdparty/xz/xz
vendored
2
3rdparty/xz/xz
vendored
Submodule 3rdparty/xz/xz updated: 3d566cd519...49053c0a64
2
3rdparty/zstd/CMakeLists.txt
vendored
2
3rdparty/zstd/CMakeLists.txt
vendored
@@ -28,7 +28,7 @@ add_library(pcsx2-zstd
|
||||
zstd/lib/decompress/zstd_decompress.c
|
||||
)
|
||||
|
||||
if(NOT MSVC AND ${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64")
|
||||
if(_M_X86 AND (NOT MSVC OR USE_CLANG_CL))
|
||||
target_sources(pcsx2-zstd PRIVATE zstd/lib/decompress/huf_decompress_amd64.S)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Setting it to a range tells it that it supports the features on the newer
|
||||
# versions as well, avoiding setting policies.
|
||||
cmake_minimum_required(VERSION 3.16...3.24)
|
||||
cmake_minimum_required(VERSION 3.16...3.25)
|
||||
|
||||
#Enabling this cmake policy gets rid of warnings regarding LTO.
|
||||
# Enabling this cmake policy gets rid of warnings regarding LTO.
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||
|
||||
@@ -11,7 +11,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
# Project Name
|
||||
project(Pcsx2)
|
||||
project(Pcsx2 C CXX)
|
||||
|
||||
# Variable to check that people use the good file
|
||||
set(TOP_CMAKE_WAS_SOURCED TRUE)
|
||||
@@ -30,14 +30,11 @@ endif()
|
||||
include(Pcsx2Utils)
|
||||
|
||||
check_no_parenthesis_in_path()
|
||||
detectOperatingSystem()
|
||||
check_compiler_version("7.0" "7.0")
|
||||
detect_operating_system()
|
||||
detect_compiler()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Include specific module
|
||||
# GNUInstallDirs must be done before BuildParameters
|
||||
include(GNUInstallDirs)
|
||||
# BuildParameters Must be done before SearchForStuff
|
||||
include(BuildParameters)
|
||||
include(SearchForStuff)
|
||||
|
||||
@@ -62,3 +59,13 @@ if(ACTUALLY_ENABLE_TESTS)
|
||||
add_subdirectory(tests/ctest)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
if(NOT IS_SUPPORTED_COMPILER)
|
||||
message(WARNING "
|
||||
*************** UNSUPPORTED CONFIGURATION ***************
|
||||
You are not compiling PCSX2 with a supported compiler.
|
||||
It may not even build successfully.
|
||||
PCSX2 only supports the Clang and MSVC compilers.
|
||||
No support will be provided, continue at your own risk.
|
||||
*********************************************************")
|
||||
endif()
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "gcc-base",
|
||||
"displayName": "GCC Base",
|
||||
"description": "Base preset for GCC. Only for inheriting from.",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/build"
|
||||
},
|
||||
{
|
||||
"name": "clang-base",
|
||||
"displayName": "Base",
|
||||
@@ -32,69 +25,9 @@
|
||||
"name": "ninja-multi",
|
||||
"displayName": "Ninja Multi Config",
|
||||
"description": "Generate multiple ninja build files.",
|
||||
"inherits": "gcc-base",
|
||||
"inherits": "clang-base",
|
||||
"generator": "Ninja Multi-Config"
|
||||
},
|
||||
{
|
||||
"name": "gcc-debug",
|
||||
"displayName": "GCC Debug",
|
||||
"description": "GCC Debug build with make.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Unix Makefiles",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc-devel",
|
||||
"displayName": "GCC Devel",
|
||||
"description": "GCC Developer build using make.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Unix Makefiles",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Devel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc-release",
|
||||
"displayName": "GCC Release",
|
||||
"description": "GCC Release build using make.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Unix Makefiles",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc-debug-ninja",
|
||||
"displayName": "GCC Debug Ninja",
|
||||
"description": "Debug build using ninja.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc-devel-ninja",
|
||||
"displayName": "GCC Devel Ninja",
|
||||
"description": "GCC Developer build using ninja.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Devel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc-release-ninja",
|
||||
"displayName": "GCC Release Ninja",
|
||||
"description": "GCC Release build using ninja.",
|
||||
"inherits": "gcc-base",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clang-debug",
|
||||
"displayName": "Clang Debug",
|
||||
|
||||
27
PCSX2_qt.sln
27
PCSX2_qt.sln
@@ -63,6 +63,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demangler", "3rdparty\deman
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwebp", "3rdparty\libwebp\libwebp.vcxproj", "{522DAF2A-1F24-4742-B2C4-A956411F6AB2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lz4", "3rdparty\lz4\lz4.vcxproj", "{39098635-446A-4FC3-9B1C-8609D94598A8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug AVX2|x64 = Debug AVX2|x64
|
||||
@@ -763,6 +765,30 @@ Global
|
||||
{522DAF2A-1F24-4742-B2C4-A956411F6AB2}.Release Clang|x64.Build.0 = Release Clang|x64
|
||||
{522DAF2A-1F24-4742-B2C4-A956411F6AB2}.Release|x64.ActiveCfg = Release|x64
|
||||
{522DAF2A-1F24-4742-B2C4-A956411F6AB2}.Release|x64.Build.0 = Release|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug AVX2|x64.ActiveCfg = Debug|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug AVX2|x64.Build.0 = Debug|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug Clang AVX2|x64.ActiveCfg = Debug Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug Clang AVX2|x64.Build.0 = Debug Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug Clang|x64.ActiveCfg = Debug Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug Clang|x64.Build.0 = Debug Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Debug|x64.Build.0 = Debug|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel AVX2|x64.ActiveCfg = Devel|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel AVX2|x64.Build.0 = Devel|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel Clang AVX2|x64.ActiveCfg = Devel Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel Clang AVX2|x64.Build.0 = Devel Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel Clang|x64.ActiveCfg = Devel Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel Clang|x64.Build.0 = Devel Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel|x64.ActiveCfg = Devel|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Devel|x64.Build.0 = Devel|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release AVX2|x64.ActiveCfg = Release|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release AVX2|x64.Build.0 = Release|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release Clang AVX2|x64.ActiveCfg = Release Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release Clang AVX2|x64.Build.0 = Release Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release Clang|x64.ActiveCfg = Release Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release Clang|x64.Build.0 = Release Clang|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release|x64.ActiveCfg = Release|x64
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -792,6 +818,7 @@ Global
|
||||
{67D0160C-0FE4-44B9-AC2E-82BBCF4104DF} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{1E3D706C-1D95-4E1B-BDF2-CA3D0007DF7F} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{522DAF2A-1F24-4742-B2C4-A956411F6AB2} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
{39098635-446A-4FC3-9B1C-8609D94598A8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0BC474EA-3628-45D3-9DBC-E22D0B7E0F77}
|
||||
|
||||
46
README.md
46
README.md
@@ -10,51 +10,17 @@ PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to
|
||||
|
||||
## Project Details
|
||||
|
||||
The PCSX2 project has been running for more than twenty years. Past versions could only run a few public domain game demos, but newer versions can run most games at full speed, including popular titles such as Final Fantasy X and Devil May Cry 3. Visit the [PCSX2 compatibility list](https://pcsx2.net/compat/) to check the latest compatibility status of games (with more than 2500 titles tested), or ask for help in the [official forums](https://forums.pcsx2.net/).
|
||||
PCSX2 has been in development for more than 20 years. Past versions could only run a few public domain game demos, but newer versions can run most games at full speed, including popular titles such as Final Fantasy X and Devil May Cry 3. Visit the [PCSX2 compatibility list](https://pcsx2.net/compat/) to check the latest compatibility status of games (with more than 2500 titles tested).
|
||||
|
||||
The latest officially released stable version is version 1.6.0.
|
||||
|
||||
Installers and binaries for both stable and development builds are available from [our website](https://pcsx2.net/downloads/).
|
||||
Installers and binaries for both stable and nightly builds are available from [our website](https://pcsx2.net/downloads/).
|
||||
|
||||
## System Requirements
|
||||
|
||||
### Minimum
|
||||
PCSX2 supports Windows, Linux, and Mac platforms. Our [setup documentation page](https://pcsx2.net/docs/usage/setup/requirements) contains additional details on software and hardware requirements.
|
||||
|
||||
| Operating System | CPU | GPU | RAM |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
|
||||
| - Windows 10 Version 1809 or later (64-bit) <br/> - Ubuntu 22.04/Debian or newer, Arch Linux, or other distro (64-bit) <br/> - macOS 11.0 | - Supports SSE4.1 <br/> - [PassMark Thread Performance](https://www.cpubenchmark.net/CPU_mega_page.html) rating near or greater than 1500<br/> - Two physical cores, with hyperthreading | - Direct3D 11 (Feature Level 11.0) support <br/> - OpenGL 3.3 support <br/> - Vulkan 1.1 support <br/> - Metal support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 3000 (Geforce GTX 750, Radeon RX 560, Intel Arc A380) <br/> - 2 GB Video Memory | 4 GB |
|
||||
|
||||
### Recommended
|
||||
|
||||
| Operating System | CPU | GPU | RAM |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
|
||||
| - Windows 10 22H2 (64-bit) <br/> - Ubuntu 23.04/Debian or newer, Arch Linux, or other distro (64-bit) <br/> - macOS 11.0 | - Supports AVX2 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/CPU_mega_page.html) rating near or greater than 2000<br/> - Four physical cores, with or without hyperthreading | - Direct3D12 support <br/> - OpenGL 4.6 support <br/> - Vulkan 1.3 support <br/> - Metal support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 6000 (GeForce GTX 1650, Radeon RX 570) <br/> - 4 GB Video Memory | 8 GB |
|
||||
|
||||
### Heavy
|
||||
|
||||
| Operating System | CPU | GPU | RAM |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
|
||||
| - Windows 10 22H2 (64-bit) <br/> - Ubuntu 23.04/Debian or newer, Arch Linux, or other distro (64-bit) <br/> - macOS 11.0 | - Supports AVX2 <br/> - [PassMark Single Thread Performance](https://www.cpubenchmark.net/CPU_mega_page.html) rating near or greater than 2600<br/> - Four physical cores, with or without hyperthreading | - Direct3D12 support <br/> - OpenGL 4.6 support <br/> - Vulkan 1.3 support <br/> - Metal support <br/> - [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 6000 (GeForce GTX 1650, Radeon RX 570) <br/> - 4 GB Video Memory | 8 GB |
|
||||
|
||||
_Note1: Recommended Single Thread Performance is based on moderately complex games. Games that pushed the PS2 hardware to its limits will struggle on CPUs at this level. Some release titles and 2D games which underutilized the PS2 hardware may run on CPUs rated as low as 1200. A quick reference for CPU **intensive games**: [Wiki](https://wiki.pcsx2.net/Category:CPU_intensive_games), [Forum](https://forums.pcsx2.net/Thread-LIST-The-Most-CPU-Intensive-Games) and CPU **light** games: [Forum](https://forums.pcsx2.net/Thread-LIST-Games-that-don-t-need-a-strong-CPU-to-emulate)_
|
||||
|
||||
_Note2: Recommended GPU is based on 3x Internal, ~1080p resolution requirements. Higher resolutions will require stronger cards; 6x Internal, ~4K resolution will require a [PassMark G3D Mark](https://www.videocardbenchmark.net/high_end_gpus.html) rating around 12000 (GeForce RTX 2060 Radeon RX 6600 Intel Arc A750). Just like CPU requirements, this is also highly game dependent. A quick reference for GPU **intensive games**: [Wiki](https://wiki.pcsx2.net/Category:GPU_intensive_games)_
|
||||
|
||||
## Technical Notes
|
||||
|
||||
- You need the [Visual C++ 2019 x64 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2 on Windows.
|
||||
- Windows XP and Direct3D9 support was dropped after stable release 1.4.0.
|
||||
- Windows 7, Windows 8.0, and Windows 8.1 support was dropped after stable release 1.6.0.
|
||||
- 32-bit and wxWidgets support was dropped after stable release 1.6.0, with the wxWidgets code being removed completely on 25th December 2022.
|
||||
- Make sure to update your operating system and drivers to ensure you have the best experience possible. Having a newer GPU is also recommended so you have the latest supported drivers.
|
||||
- Because of copyright issues, and the complexity of trying to work around it, you need a BIOS dump extracted from a legitimately-owned PS2 console to use the emulator. For more information about the BIOS and how to get it from your console, visit [this page](pcsx2/Docs/PCSX2_FAQ.md#question-13-where-do-i-get-a-ps2-bios).
|
||||
- PCSX2 uses two CPU cores for emulation by default. A third core can be used via the MTVU speed hack, which is compatible with most games. This can be a significant speedup on CPUs with 3+ cores, but it may be a slowdown on GS-limited games (or on CPUs with fewer than 2 cores). Software renderers will then additionally use however many rendering threads it is set to and will need higher core counts to run efficiently.
|
||||
- Requirements benchmarks are based on a statistic from the Passmark CPU bench marking software. When we say "STR", we are referring to Passmark's "Single Thread Rating" statistic. You can look up your CPU on [Passmark's website for CPUs](https://cpubenchmark.net) to see how it compares to PCSX2's requirements.
|
||||
- Vulkan requires an up-to-date GPU driver; old drivers may cause graphical problems.
|
||||
Please note that a BIOS dump from a legitimately-owned PS2 console is required to use the emulator. For more information, visit [this page](https://pcsx2.net/docs/usage/setup/gather/#how-to-dump-your-ps2-bios).
|
||||
|
||||
## Contributing / Building
|
||||
Want to contribute to the development of PCSX2?
|
||||
PCSX2 supports translation into other languages using [Crowdin](https://crowdin.com/project/pcsx2-emulator).
|
||||
|
||||
See the [Contributing Guidelines](https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md) or visit the [GitHub Wiki](https://github.com/PCSX2/pcsx2/wiki)
|
||||
|
||||
Want more? [Check out the PCSX2 website](https://pcsx2.net/).
|
||||
See the [Contributing Guidelines](https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md) or visit the [GitHub Wiki](https://github.com/PCSX2/pcsx2/wiki) for more info on how to contribute.
|
||||
|
||||
2572
bin/docs/ThirdPartyLicenses.html
Normal file
2572
bin/docs/ThirdPartyLicenses.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
RunWizard=0
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
91
bin/resources/fonts/promptfont-license
Normal file
91
bin/resources/fonts/promptfont-license
Normal file
@@ -0,0 +1,91 @@
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1. This license is copied below, and is also available
|
||||
with a FAQ at <http: //scripts.sil.org/OFL>
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
bin/resources/fonts/promptfont.otf
Normal file
BIN
bin/resources/fonts/promptfont.otf
Normal file
Binary file not shown.
BIN
bin/resources/fullscreenui/no-save.png
Normal file
BIN
bin/resources/fullscreenui/no-save.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -314,6 +314,7 @@
|
||||
03000000242e00000b20000000000000,Hyperkin Admiral N64 Controller,+rightx:b11,+righty:b13,-rightx:b8,-righty:b12,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,platform:Windows,
|
||||
03000000242e0000ff0b000000000000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Windows,
|
||||
03000000790000004e95000000000000,Hyperkin N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a5,righty:a2,start:b9,platform:Windows,
|
||||
03000000242e00006a48000000000000,Hyperkin RetroN Sq,a:b3,b:b7,back:b5,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b0,rightshoulder:b1,start:b4,x:b2,y:b6,platform:Windows,
|
||||
03000000242e00006a38000000000000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Windows,
|
||||
03000000d81d00000e00000000000000,iBuffalo AC02 Arcade Joystick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows,
|
||||
03000000d81d00000f00000000000000,iBuffalo BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
@@ -352,7 +353,7 @@
|
||||
030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows,
|
||||
030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d0400001dc2000000000000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d0400001dc2000000000000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d04000018c2000000000000,Logitech F510,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d0400001ec2000000000000,Logitech F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d04000019c2000000000000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
@@ -452,7 +453,7 @@
|
||||
03000000550900001072000000000000,NVIDIA Shield,a:b9,b:b8,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b3,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b2,righttrigger:a4,rightx:a2,righty:a5,start:b0,x:b7,y:b6,platform:Windows,
|
||||
030000005509000000b4000000000000,NVIDIA Virtual,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000120c00000288000000000000,Nyko Air Flo Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
030000004b120000014d000000000000,Nyko Airflo,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000004b120000014d000000000000,NYKO Airflo EX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000d62000001d57000000000000,Nyko Airflo PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000791d00000900000000000000,Nyko Playpad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000782300000a10000000000000,Onlive Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows,
|
||||
@@ -461,7 +462,7 @@
|
||||
030000008916000000fd000000000000,Onza TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006b14000001a1000000000000,Orange Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000362800000100000000000000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,
|
||||
03000000362800000100000000000000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,
|
||||
03000000120c0000f60e000000000000,P4 Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000002201000000000000,PC Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
030000006f0e00008501000000000000,PDP Fightpad Pro GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
@@ -534,6 +535,7 @@
|
||||
030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004c0500005f0e000000000000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000e60c000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000f20d000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
03000000830500005020000000000000,PSX,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Windows,
|
||||
@@ -558,6 +560,7 @@
|
||||
030000009b2800003200000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
|
||||
030000009b2800006000000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
|
||||
030000009b2800001800000000000000,Raphnet Jaguar Adapter,a:b2,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b10,start:b3,x:b11,y:b12,platform:Windows,
|
||||
030000009b2800006100000000000000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Windows,
|
||||
030000009b2800006300000000000000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Windows,
|
||||
030000009b2800000200000000000000,Raphnet NES Adapter,a:b7,b:b6,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b4,platform:Windows,
|
||||
030000009b2800004400000000000000,Raphnet PS1 and PS2 Adapter,a:b1,b:b2,back:b5,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b9,rightx:a3,righty:a4,start:b4,x:b0,y:b3,platform:Windows,
|
||||
@@ -610,6 +613,7 @@
|
||||
03000000050b00001a1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows,
|
||||
03000000050b00001c1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows,
|
||||
030000004f04000001d0000000000000,Rumble Force,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
|
||||
030000000d0f0000ad00000000000000,RX Gamepad,a:b0,b:b4,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b6,start:b9,x:b2,y:b1,platform:Windows,
|
||||
030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
|
||||
@@ -676,6 +680,7 @@
|
||||
03000000457500002211000000000000,Szmy Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004f0400000ab1000000000000,T16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows,
|
||||
030000000d0f00007b00000000000000,TAC GEAR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000e40a00000307000000000000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Windows,
|
||||
03000000e40a00000207000000000000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b9,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Windows,
|
||||
03000000d814000001a0000000000000,TE Kitty,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
@@ -963,6 +968,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
0300004b4c0500005f0e000000010000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000f20d000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
@@ -1015,6 +1021,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,
|
||||
030000000d0f0000f600000000010000,Switch Hori Pad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000457500002211000000010000,SZMY Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
03000000e40a00000307000001000000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Mac OS X,
|
||||
03000000e40a00000207000001000000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Mac OS X,
|
||||
03000000790000001c18000003100000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000591c00002400000021000000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000591c00002600000021000000,THEGamepad,a:b2,b:b1,back:b6,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Mac OS X,
|
||||
@@ -1166,14 +1174,15 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000c21100000791000011010000,Be1 GC101 Controller 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000c31100000791000011010000,Be1 GC101 Controller 1.03,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
030000005e0400008e02000003030000,Be1 GC101 Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000bc2000004d50000011010000,BEITONG A1T2 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000bc2000000055000001000000,BETOP AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000bc2000004d50000011010000,Beitong A1T2 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000bc2000000055000001000000,Betop AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000bc2000006412000011010000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b30,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000006b1400000209000011010000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000200e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000210e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000f70e000011010000,Brook Universal Fighting Board,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000af1e00002400000010010000,Clockwork Pi DevTerm,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux,
|
||||
03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000a306000022f6000011010000,Cyborg V3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1257,6 +1266,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000f00300008d03000011010000,HyperX Clutch,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000830500006020000010010000,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
|
||||
030000008f0e00001330000001010000,iCode Retro Adapter,b:b3,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b1,start:b7,x:b2,y:b0,platform:Linux,
|
||||
050000006964726f69643a636f6e0000,idroidcon Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000b50700001503000010010000,Impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
|
||||
03000000d80400008200000003000000,IMS PCU0,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,platform:Linux,
|
||||
@@ -1390,6 +1400,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
|
||||
05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
|
||||
030000004b120000014d000000010000,NYKO Airflo EX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
19000000010000000100000001010000,ODROID Go 2,a:b1,b:b0,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,guide:b10,leftshoulder:b4,leftstick:b12,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b14,start:b15,x:b2,y:b3,platform:Linux,
|
||||
19000000010000000200000011000000,ODROID Go 2,a:b1,b:b0,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b12,leftshoulder:b4,leftstick:b14,lefttrigger:b13,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b16,start:b17,x:b2,y:b3,platform:Linux,
|
||||
@@ -1408,6 +1419,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e00002801000011010000,PDP PS3 Rock Candy Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000901000011010000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00002f01000011010000,PDP Wired PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000ad1b000004f9000000010000,PDP Xbox 360 Versus Fighting,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000a802000023020000,PDP Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000a702000023020000,PDP Xbox One Raven Black,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1464,6 +1476,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
0300004b4c0500005f0e000011010000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000e60c000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000e60c000011810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
030000004c050000f20d000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
@@ -1566,6 +1579,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000457500000401000011010000,SZMY Power DS4 Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000457500002211000010010000,SZMY Power Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000008f0e00001431000010010000,SZMY Power PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000e40a00000307000011010000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Linux,
|
||||
03000000e40a00000207000011010000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Linux,
|
||||
03000000ba2200000701000001010000,Technology Innovation PS2 Adapter,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Linux,
|
||||
03000000790000001c18000011010000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000591c00002400000010010000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 98 KiB |
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifndef FXAA_HLSL_5
|
||||
#define FXAA_HLSL_5 0
|
||||
|
||||
@@ -56,7 +56,7 @@ void main(uint3 LocalThreadId : SV_GroupThreadID, uint3 WorkGroupId : SV_GroupID
|
||||
#endif
|
||||
|
||||
// Filter.
|
||||
AF3 c = (float4)0.0f;
|
||||
AF3 c = (float3)0.0f;
|
||||
|
||||
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly);
|
||||
OutputTexture[ASU2(gxy)] = AF4(c, 1);
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
struct VS_INPUT
|
||||
{
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
cbuffer vertexBuffer : register(b0)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
Texture2D Texture;
|
||||
SamplerState Sampler;
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
Texture2D Texture;
|
||||
SamplerState Sampler;
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
struct VS_INPUT
|
||||
{
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
Texture2D Texture;
|
||||
SamplerState Sampler;
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#define FMT_32 0
|
||||
#define FMT_24 1
|
||||
@@ -503,6 +491,10 @@ float4 sample_depth(float2 st, float2 pos)
|
||||
{
|
||||
t.a = t.a >= 128.0f ? 255.0f * TA.y : ((PS_AEM == 0) || any(bool3(t.rgb))) ? 255.0f * TA.x : 0.0f;
|
||||
}
|
||||
else if (PS_PAL_FMT != 0 && !PS_TALES_OF_ABYSS_HLE && !PS_URBAN_CHAOS_HLE)
|
||||
{
|
||||
t = trunc(sample_4p(uint4(t.aaaa))[0] * 255.0f + 0.05f);
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
@@ -643,7 +635,7 @@ float4 sample_color(float2 st, float uv_w)
|
||||
}
|
||||
else if(PS_AEM_FMT == FMT_16)
|
||||
{
|
||||
c[i].a = c[i].a >= 0.5 ? TA.y : !PS_AEM || any(c[i].rgb) ? TA.x : 0;
|
||||
c[i].a = c[i].a >= 0.5 ? TA.y : !PS_AEM || any(int3(c[i].rgb * 255.0f) & 0xF8) ? TA.x : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,6 +746,25 @@ float4 ps_color(PS_INPUT input)
|
||||
float4 T = sample_color(st, input.t.w);
|
||||
#endif
|
||||
|
||||
if (PS_SHUFFLE && !PS_SHUFFLE_SAME && !PS_READ16_SRC)
|
||||
{
|
||||
uint4 denorm_c_before = uint4(T);
|
||||
if (PS_READ_BA)
|
||||
{
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
}
|
||||
}
|
||||
|
||||
float4 C = tfx(T, input.c);
|
||||
|
||||
atst(C);
|
||||
@@ -937,48 +948,6 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
||||
discard;
|
||||
}
|
||||
|
||||
if (PS_SHUFFLE)
|
||||
{
|
||||
uint4 denorm_c = uint4(C);
|
||||
uint2 denorm_TA = uint2(float2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
// Special case for 32bit input and 16bit output, shuffle used by The Godfather
|
||||
if (PS_SHUFFLE_SAME)
|
||||
{
|
||||
if (PS_READ_BA)
|
||||
C = (float4)(float((denorm_c.b & 0x7Fu) | (denorm_c.a & 0x80u)));
|
||||
else
|
||||
C.ga = C.rg;
|
||||
}
|
||||
// Copy of a 16bit source in to this target
|
||||
else if (PS_READ16_SRC)
|
||||
{
|
||||
C.rb = (float2)float((denorm_c.r >> 3) | (((denorm_c.g >> 3) & 0x7u) << 5));
|
||||
if (denorm_c.a & 0x80u)
|
||||
C.ga = (float2)float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.y & 0x80u));
|
||||
else
|
||||
C.ga = (float2)float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.x & 0x80u));
|
||||
}
|
||||
// Write RB part. Mask will take care of the correct destination
|
||||
else if (PS_READ_BA)
|
||||
{
|
||||
C.rb = C.bb;
|
||||
if (denorm_c.a & 0x80u)
|
||||
C.ga = (float2)(float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = (float2)(float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
}
|
||||
else
|
||||
{
|
||||
C.rb = C.rr;
|
||||
if (denorm_c.g & 0x80u)
|
||||
C.ga = (float2)(float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
|
||||
else
|
||||
C.ga = (float2)(float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
}
|
||||
}
|
||||
|
||||
// Must be done before alpha correction
|
||||
|
||||
// AA (Fixed one) will output a coverage of 1.0 as alpha
|
||||
@@ -1035,6 +1004,63 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
||||
|
||||
ps_blend(C, alpha_blend, input.p.xy);
|
||||
|
||||
if (PS_SHUFFLE)
|
||||
{
|
||||
if (!PS_SHUFFLE_SAME && !PS_READ16_SRC)
|
||||
{
|
||||
uint4 denorm_c_after = uint4(C);
|
||||
if (PS_READ_BA)
|
||||
{
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
}
|
||||
else
|
||||
{
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
}
|
||||
}
|
||||
|
||||
uint4 denorm_c = uint4(C);
|
||||
uint2 denorm_TA = uint2(float2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
// Special case for 32bit input and 16bit output, shuffle used by The Godfather
|
||||
if (PS_SHUFFLE_SAME)
|
||||
{
|
||||
if (PS_READ_BA)
|
||||
C = (float4)(float((denorm_c.b & 0x7Fu) | (denorm_c.a & 0x80u)));
|
||||
else
|
||||
C.ga = C.rg;
|
||||
}
|
||||
// Copy of a 16bit source in to this target
|
||||
else if (PS_READ16_SRC)
|
||||
{
|
||||
C.rb = (float2)float((denorm_c.r >> 3) | (((denorm_c.g >> 3) & 0x7u) << 5));
|
||||
if (denorm_c.a & 0x80u)
|
||||
C.ga = (float2)float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.y & 0x80u));
|
||||
else
|
||||
C.ga = (float2)float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.x & 0x80u));
|
||||
}
|
||||
// Write RB part. Mask will take care of the correct destination
|
||||
else if (PS_READ_BA)
|
||||
{
|
||||
C.rb = C.bb;
|
||||
if (denorm_c.a & 0x80u)
|
||||
C.ga = (float2)(float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = (float2)(float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
}
|
||||
else
|
||||
{
|
||||
C.rb = C.rr;
|
||||
if (denorm_c.g & 0x80u)
|
||||
C.ga = (float2)(float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
|
||||
else
|
||||
C.ga = (float2)(float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
}
|
||||
}
|
||||
|
||||
ps_dither(C.rgb, input.p.xy);
|
||||
|
||||
// Color clamp/wrap needs to be done after sw blending and dithering
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for text editor detection
|
||||
|
||||
@@ -452,15 +440,15 @@ vec4 sample_depth(vec2 st)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// warning t ranges from 0 to 255
|
||||
#if (PS_AEM_FMT == FMT_24)
|
||||
t.a = ( (PS_AEM == 0) || any(bvec3(t.rgb)) ) ? 255.0f * TA.x : 0.0f;
|
||||
#elif (PS_AEM_FMT == FMT_16)
|
||||
t.a = t.a >= 128.0f ? 255.0f * TA.y : ( (PS_AEM == 0) || any(bvec3(t.rgb)) ) ? 255.0f * TA.x : 0.0f;
|
||||
#elif PS_PAL_FMT != 0 && !PS_TALES_OF_ABYSS_HLE && !PS_URBAN_CHAOS_HLE
|
||||
t = trunc(sample_4p(uvec4(t.aaaa))[0] * 255.0f + 0.05f);
|
||||
#endif
|
||||
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -592,7 +580,7 @@ vec4 sample_color(vec2 st)
|
||||
c[i].a = ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f;
|
||||
//c[i].a = ( (PS_AEM == 0) || (sum > 0.0f) ) ? TA.x : 0.0f;
|
||||
#elif (PS_AEM_FMT == FMT_16)
|
||||
c[i].a = c[i].a >= 0.5 ? TA.y : ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f;
|
||||
c[i].a = c[i].a >= 0.5 ? TA.y : ( (PS_AEM == 0) || any(bvec3(ivec3(c[i].rgb * 255.0f) & ivec3(0xF8))) ) ? TA.x : 0.0f;
|
||||
//c[i].a = c[i].a >= 0.5 ? TA.y : ( (PS_AEM == 0) || (sum > 0.0f) ) ? TA.x : 0.0f;
|
||||
#endif
|
||||
}
|
||||
@@ -699,6 +687,21 @@ vec4 ps_color()
|
||||
vec4 T = sample_color(st);
|
||||
#endif
|
||||
|
||||
#if PS_SHUFFLE && !PS_SHUFFLE_SAME && !PS_READ16_SRC
|
||||
uvec4 denorm_c_before = uvec4(T);
|
||||
#if PS_READ_BA
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
#else
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
vec4 C = tfx(T, PSin.c);
|
||||
|
||||
atst(C);
|
||||
@@ -949,7 +952,56 @@ void ps_main()
|
||||
|
||||
vec4 C = ps_color();
|
||||
|
||||
// Must be done before alpha correction
|
||||
|
||||
// AA (Fixed one) will output a coverage of 1.0 as alpha
|
||||
#if PS_FIXED_ONE_A
|
||||
C.a = 128.0f;
|
||||
#endif
|
||||
|
||||
#if SW_AD_TO_HW
|
||||
vec4 RT = trunc(fetch_rt() * 255.0f + 0.1f);
|
||||
vec4 alpha_blend = vec4(RT.a / 128.0f);
|
||||
#else
|
||||
vec4 alpha_blend = vec4(C.a / 128.0f);
|
||||
#endif
|
||||
|
||||
// Correct the ALPHA value based on the output format
|
||||
#if (PS_DST_FMT == FMT_16)
|
||||
float A_one = 128.0f; // alpha output will be 0x80
|
||||
C.a = (PS_FBA != 0) ? A_one : step(128.0f, C.a) * A_one;
|
||||
#elif (PS_DST_FMT == FMT_32) && (PS_FBA != 0)
|
||||
if(C.a < 128.0f) C.a += 128.0f;
|
||||
#endif
|
||||
|
||||
// Get first primitive that will write a failling alpha value
|
||||
#if PS_DATE == 1
|
||||
// DATM == 0
|
||||
// Pixel with alpha equal to 1 will failed (128-255)
|
||||
SV_Target0 = (C.a > 127.5f) ? vec4(gl_PrimitiveID) : vec4(0x7FFFFFFF);
|
||||
return;
|
||||
#elif PS_DATE == 2
|
||||
// DATM == 1
|
||||
// Pixel with alpha equal to 0 will failed (0-127)
|
||||
SV_Target0 = (C.a < 127.5f) ? vec4(gl_PrimitiveID) : vec4(0x7FFFFFFF);
|
||||
return;
|
||||
#endif
|
||||
|
||||
ps_blend(C, alpha_blend);
|
||||
|
||||
|
||||
#if PS_SHUFFLE
|
||||
#if !PS_SHUFFLE_SAME && !PS_READ16_SRC
|
||||
uvec4 denorm_c_after = uvec4(C);
|
||||
#if PS_READ_BA
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
#else
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uvec4 denorm_c = uvec4(C);
|
||||
uvec2 denorm_TA = uvec2(vec2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
@@ -1003,43 +1055,6 @@ void ps_main()
|
||||
#endif // PS_SHUFFLE_SAME
|
||||
#endif // PS_SHUFFLE
|
||||
|
||||
// Must be done before alpha correction
|
||||
|
||||
// AA (Fixed one) will output a coverage of 1.0 as alpha
|
||||
#if PS_FIXED_ONE_A
|
||||
C.a = 128.0f;
|
||||
#endif
|
||||
|
||||
#if SW_AD_TO_HW
|
||||
vec4 RT = trunc(fetch_rt() * 255.0f + 0.1f);
|
||||
vec4 alpha_blend = vec4(RT.a / 128.0f);
|
||||
#else
|
||||
vec4 alpha_blend = vec4(C.a / 128.0f);
|
||||
#endif
|
||||
|
||||
// Correct the ALPHA value based on the output format
|
||||
#if (PS_DST_FMT == FMT_16)
|
||||
float A_one = 128.0f; // alpha output will be 0x80
|
||||
C.a = (PS_FBA != 0) ? A_one : step(128.0f, C.a) * A_one;
|
||||
#elif (PS_DST_FMT == FMT_32) && (PS_FBA != 0)
|
||||
if(C.a < 128.0f) C.a += 128.0f;
|
||||
#endif
|
||||
|
||||
// Get first primitive that will write a failling alpha value
|
||||
#if PS_DATE == 1
|
||||
// DATM == 0
|
||||
// Pixel with alpha equal to 1 will failed (128-255)
|
||||
SV_Target0 = (C.a > 127.5f) ? vec4(gl_PrimitiveID) : vec4(0x7FFFFFFF);
|
||||
return;
|
||||
#elif PS_DATE == 2
|
||||
// DATM == 1
|
||||
// Pixel with alpha equal to 0 will failed (0-127)
|
||||
SV_Target0 = (C.a < 127.5f) ? vec4(gl_PrimitiveID) : vec4(0x7FFFFFFF);
|
||||
return;
|
||||
#endif
|
||||
|
||||
ps_blend(C, alpha_blend);
|
||||
|
||||
ps_dither(C.rgb);
|
||||
|
||||
// Color clamp/wrap needs to be done after sw blending and dithering
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for text editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//#version 420 // Keep it for editor detection
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Vertex Shader
|
||||
@@ -701,6 +689,10 @@ vec4 sample_depth(vec2 st, ivec2 pos)
|
||||
{
|
||||
t.a = t.a >= 128.0f ? 255.0f * TA.y : ((PS_AEM == 0) || any(bvec3(t.rgb))) ? 255.0f * TA.x : 0.0f;
|
||||
}
|
||||
#elif PS_PAL_FMT != 0 && !PS_TALES_OF_ABYSS_HLE && !PS_URBAN_CHAOS_HLE
|
||||
{
|
||||
t = trunc(sample_4p(uvec4(t.aaaa))[0] * 255.0f + 0.05f);
|
||||
}
|
||||
#endif
|
||||
|
||||
return t;
|
||||
@@ -829,7 +821,7 @@ vec4 sample_color(vec2 st)
|
||||
#if (PS_AEM_FMT == FMT_24)
|
||||
c[i].a = (PS_AEM == 0 || any(bvec3(c[i].rgb))) ? TA.x : 0.0f;
|
||||
#elif (PS_AEM_FMT == FMT_16)
|
||||
c[i].a = (c[i].a >= 0.5) ? TA.y : ((PS_AEM == 0 || any(bvec3(c[i].rgb))) ? TA.x : 0.0f);
|
||||
c[i].a = (c[i].a >= 0.5) ? TA.y : ((PS_AEM == 0 || any(bvec3(ivec3(c[i].rgb * 255.0f) & ivec3(0xF8)))) ? TA.x : 0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -945,6 +937,21 @@ vec4 ps_color()
|
||||
vec4 T = sample_color(st);
|
||||
#endif
|
||||
|
||||
#if PS_SHUFFLE && !PS_SHUFFLE_SAME && !PS_READ16_SRC
|
||||
uvec4 denorm_c_before = uvec4(T);
|
||||
#if PS_READ_BA
|
||||
T.r = float((denorm_c_before.b << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.a << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.a & 0x80);
|
||||
#else
|
||||
T.r = float((denorm_c_before.r << 3) & 0xF8);
|
||||
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
|
||||
T.b = float((denorm_c_before.g << 1) & 0xF8);
|
||||
T.a = float(denorm_c_before.g & 0x80);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
vec4 C = tfx(T, vsIn.c);
|
||||
|
||||
atst(C);
|
||||
@@ -1196,40 +1203,6 @@ void main()
|
||||
|
||||
vec4 C = ps_color();
|
||||
|
||||
#if PS_SHUFFLE
|
||||
uvec4 denorm_c = uvec4(C);
|
||||
uvec2 denorm_TA = uvec2(vec2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
// Special case for 32bit input and 16bit output, shuffle used by The Godfather
|
||||
#if PS_SHUFFLE_SAME
|
||||
#if (PS_READ_BA)
|
||||
C = vec4(float((denorm_c.b & 0x7Fu) | (denorm_c.a & 0x80u)));
|
||||
#else
|
||||
C.ga = C.rg;
|
||||
#endif
|
||||
// Copy of a 16bit source in to this target
|
||||
#elif PS_READ16_SRC
|
||||
C.rb = vec2(float((denorm_c.r >> 3) | (((denorm_c.g >> 3) & 0x7u) << 5)));
|
||||
if ((denorm_c.a & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.x & 0x80u)));
|
||||
// Write RB part. Mask will take care of the correct destination
|
||||
#elif PS_READ_BA
|
||||
C.rb = C.bb;
|
||||
if ((denorm_c.a & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
#else
|
||||
C.rb = C.rr;
|
||||
if ((denorm_c.g & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
#endif // PS_SHUFFLE_SAME
|
||||
#endif // PS_SHUFFLE
|
||||
|
||||
// Must be done before alpha correction
|
||||
|
||||
// AA (Fixed one) will output a coverage of 1.0 as alpha
|
||||
@@ -1266,9 +1239,53 @@ void main()
|
||||
o_col0 = (C.a < 127.5f) ? vec4(gl_PrimitiveID) : vec4(0x7FFFFFFF);
|
||||
|
||||
#else
|
||||
|
||||
ps_blend(C, alpha_blend);
|
||||
|
||||
#if PS_SHUFFLE
|
||||
#if !PS_SHUFFLE_SAME && !PS_READ16_SRC
|
||||
uvec4 denorm_c_after = uvec4(C);
|
||||
#if PS_READ_BA
|
||||
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
#else
|
||||
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
|
||||
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uvec4 denorm_c = uvec4(C);
|
||||
uvec2 denorm_TA = uvec2(vec2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
// Special case for 32bit input and 16bit output, shuffle used by The Godfather
|
||||
#if PS_SHUFFLE_SAME
|
||||
#if (PS_READ_BA)
|
||||
C = vec4(float((denorm_c.b & 0x7Fu) | (denorm_c.a & 0x80u)));
|
||||
#else
|
||||
C.ga = C.rg;
|
||||
#endif
|
||||
// Copy of a 16bit source in to this target
|
||||
#elif PS_READ16_SRC
|
||||
C.rb = vec2(float((denorm_c.r >> 3) | (((denorm_c.g >> 3) & 0x7u) << 5)));
|
||||
if ((denorm_c.a & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.g >> 6) | ((denorm_c.b >> 3) << 2) | (denorm_TA.x & 0x80u)));
|
||||
// Write RB part. Mask will take care of the correct destination
|
||||
#elif PS_READ_BA
|
||||
C.rb = C.bb;
|
||||
if ((denorm_c.a & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
#else
|
||||
C.rb = C.rr;
|
||||
if ((denorm_c.g & 0x80u) != 0u)
|
||||
C.ga = vec2(float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)));
|
||||
else
|
||||
C.ga = vec2(float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)));
|
||||
#endif // PS_SHUFFLE_SAME
|
||||
#endif // PS_SHUFFLE
|
||||
|
||||
ps_dither(C.rgb);
|
||||
|
||||
// Color clamp/wrap needs to be done after sw blending and dithering
|
||||
|
||||
@@ -4,7 +4,6 @@ set(PCSX2_DEFS "")
|
||||
#-------------------------------------------------------------------------------
|
||||
# Misc option
|
||||
#-------------------------------------------------------------------------------
|
||||
option(DISABLE_BUILD_DATE "Disable including the binary compile date")
|
||||
option(ENABLE_TESTS "Enables building the unit tests" ON)
|
||||
option(LTO_PCSX2_CORE "Enable LTO/IPO/LTCG on the subset of pcsx2 that benefits most from it but not anything else")
|
||||
option(USE_VTUNE "Plug VTUNE to profile GS JIT.")
|
||||
@@ -38,21 +37,6 @@ endif()
|
||||
#-------------------------------------------------------------------------------
|
||||
option(USE_ASAN "Enable address sanitizer")
|
||||
|
||||
if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(USE_CLANG_CL TRUE)
|
||||
message(STATUS "Building with Clang-CL.")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
set(USE_CLANG TRUE)
|
||||
message(STATUS "Building with Clang/LLVM.")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(USE_GCC TRUE)
|
||||
message(STATUS "Building with GNU GCC")
|
||||
elseif(MSVC)
|
||||
message(STATUS "Building with MSVC")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# if no build type is set, use Devel as default
|
||||
# Note without the CMAKE_BUILD_TYPE options the value is still defined to ""
|
||||
@@ -81,47 +65,41 @@ mark_as_advanced(CMAKE_C_FLAGS_DEVEL CMAKE_CXX_FLAGS_DEVEL CMAKE_LINKER_FLAGS_DE
|
||||
#-------------------------------------------------------------------------------
|
||||
# Select the architecture
|
||||
#-------------------------------------------------------------------------------
|
||||
option(DISABLE_ADVANCE_SIMD "Disable advance use of SIMD (SSE2+ & AVX)" OFF)
|
||||
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "amd64" OR
|
||||
"${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
||||
# Multi-ISA only exists on x86.
|
||||
option(DISABLE_ADVANCE_SIMD "Disable advance use of SIMD (SSE2+ & AVX)" OFF)
|
||||
|
||||
# Print if we are cross compiling.
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "Cross compilation is enabled.")
|
||||
else()
|
||||
message(STATUS "Cross compilation is disabled.")
|
||||
endif()
|
||||
|
||||
# Architecture bitness detection
|
||||
include(TargetArch)
|
||||
target_architecture(PCSX2_TARGET_ARCHITECTURES)
|
||||
if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64")
|
||||
message(STATUS "Compiling a ${PCSX2_TARGET_ARCHITECTURES} build on a ${CMAKE_HOST_SYSTEM_PROCESSOR} host.")
|
||||
|
||||
# x86_64 requires -fPIC
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if(NOT DEFINED ARCH_FLAG AND NOT MSVC)
|
||||
if (DISABLE_ADVANCE_SIMD)
|
||||
set(ARCH_FLAG "-msse -msse2 -msse4.1 -mfxsr")
|
||||
else()
|
||||
#set(ARCH_FLAG "-march=native -fabi-version=6")
|
||||
set(ARCH_FLAG "-march=native")
|
||||
endif()
|
||||
elseif(NOT DEFINED ARCH_FLAG AND USE_CLANG_CL)
|
||||
set(ARCH_FLAG "-msse4.1")
|
||||
endif()
|
||||
list(APPEND PCSX2_DEFS _M_X86=1)
|
||||
set(_M_X86 1)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture: ${PCSX2_TARGET_ARCHITECTURES}")
|
||||
endif()
|
||||
string(REPLACE " " ";" ARCH_FLAG_LIST "${ARCH_FLAG}")
|
||||
add_compile_options("${ARCH_FLAG_LIST}")
|
||||
set(_M_X86 TRUE)
|
||||
if(DISABLE_ADVANCE_SIMD)
|
||||
message(STATUS "Building for x86-64 (Multi-ISA).")
|
||||
else()
|
||||
message(STATUS "Building for x86-64.")
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Set some default compiler flags
|
||||
#-------------------------------------------------------------------------------
|
||||
option(USE_PGO_GENERATE "Enable PGO optimization (generate profile)")
|
||||
option(USE_PGO_OPTIMIZE "Enable PGO optimization (use profile)")
|
||||
if(MSVC)
|
||||
# SSE4.1 is not set by MSVC, it uses _M_SSE instead.
|
||||
list(APPEND PCSX2_DEFS __SSE4_1__=1)
|
||||
|
||||
if(USE_CLANG_CL)
|
||||
# clang-cl => need to explicitly enable SSE4.1.
|
||||
add_compile_options("-msse4.1")
|
||||
endif()
|
||||
else()
|
||||
# Multi-ISA => SSE4, otherwise native.
|
||||
if (DISABLE_ADVANCE_SIMD)
|
||||
add_compile_options("-msse" "-msse2" "-msse4.1" "-mfxsr")
|
||||
else()
|
||||
# Can't use march=native on Apple Silicon.
|
||||
if(NOT APPLE OR "${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
|
||||
add_compile_options("-march=native")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
|
||||
# Require C++20.
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@@ -161,12 +139,24 @@ if(WIN32)
|
||||
$<${CONFIG_ANY_REL}:_ITERATOR_DEBUG_LEVEL=0>
|
||||
_HAS_EXCEPTIONS=0
|
||||
)
|
||||
list(APPEND PCSX2_DEFS _SCL_SECURE_NO_WARNINGS _UNICODE UNICODE)
|
||||
list(APPEND PCSX2_DEFS
|
||||
_CRT_NONSTDC_NO_WARNINGS
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
CRT_SECURE_NO_DEPRECATE
|
||||
_SCL_SECURE_NO_WARNINGS
|
||||
_UNICODE
|
||||
UNICODE
|
||||
)
|
||||
else()
|
||||
# Assume everything else is POSIX.
|
||||
list(APPEND PCSX2_DEFS
|
||||
__POSIX__
|
||||
)
|
||||
endif()
|
||||
|
||||
# Enable debug information in release builds for Linux.
|
||||
# Makes the backtrace actually meaningful.
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(LINUX)
|
||||
add_compile_options($<$<CONFIG:Release>:-g1>)
|
||||
endif()
|
||||
|
||||
@@ -204,22 +194,12 @@ endif()
|
||||
|
||||
# -Wno-attributes: "always_inline function might not be inlinable" <= real spam (thousand of warnings!!!)
|
||||
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
|
||||
# Note: future GCC (aka GCC 5.1.1) has less false positive so warning could maybe put back
|
||||
# -Wno-unused-function: warn for function not used in release build
|
||||
# -Wno-unused-value: lots of warning for this kind of statements "0 && ...". There are used to disable some parts of code in release/dev build.
|
||||
# -Wno-format*: Yeah, these need to be taken care of, but...
|
||||
# -Wno-stringop-truncation: Who comes up with these compiler warnings, anyways?
|
||||
# -Wno-stringop-overflow: Probably the same people as this one...
|
||||
# -Wno-maybe-uninitialized: Lots of gcc warnings like "‘test.GSVector8i::<anonymous>.GSVector8i::<unnamed union>::m’ may be used uninitialized" if this is removed.
|
||||
|
||||
if (MSVC)
|
||||
set(DEFAULT_WARNINGS)
|
||||
else()
|
||||
set(DEFAULT_WARNINGS -Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format -Wno-format-security -Wno-unused-value)
|
||||
endif()
|
||||
|
||||
if (USE_GCC)
|
||||
list(APPEND DEFAULT_WARNINGS -Wno-stringop-truncation -Wno-stringop-overflow -Wno-maybe-uninitialized )
|
||||
set(DEFAULT_WARNINGS -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers)
|
||||
endif()
|
||||
|
||||
if (USE_PGO_GENERATE OR USE_PGO_OPTIMIZE)
|
||||
@@ -250,11 +230,6 @@ endif()
|
||||
|
||||
set(PCSX2_WARNINGS ${DEFAULT_WARNINGS})
|
||||
|
||||
if(DISABLE_BUILD_DATE)
|
||||
message(STATUS "Disabling the inclusion of the binary compile date.")
|
||||
list(APPEND PCSX2_DEFS DISABLE_BUILD_DATE)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# MacOS-specific things
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -7,7 +7,7 @@ endmacro()
|
||||
macro(check_lib var lib)
|
||||
set(_arg_list ${ARGN})
|
||||
|
||||
if(PKG_CONFIG_FOUND AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED pcsx2_manually_found_${var})
|
||||
if(PKG_CONFIG_FOUND AND NOT DEFINED pcsx2_manually_found_${var})
|
||||
string(TOLOWER ${lib} lower_lib)
|
||||
pkg_search_module(${var} QUIET IMPORTED_TARGET ${lower_lib})
|
||||
endif()
|
||||
|
||||
45
cmake/FindLZ4.cmake
Normal file
45
cmake/FindLZ4.cmake
Normal file
@@ -0,0 +1,45 @@
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Finds liblz4.
|
||||
#
|
||||
# This module defines:
|
||||
# LZ4_FOUND
|
||||
# LZ4_INCLUDE_DIR
|
||||
# LZ4_LIBRARY
|
||||
#
|
||||
|
||||
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
|
||||
|
||||
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
||||
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
SELECT_LIBRARY_CONFIGURATIONS(LZ4)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
LZ4 DEFAULT_MSG
|
||||
LZ4_LIBRARY LZ4_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)
|
||||
|
||||
if(LZ4_FOUND AND NOT (TARGET LZ4::LZ4))
|
||||
add_library (LZ4::LZ4 UNKNOWN IMPORTED)
|
||||
set_target_properties(LZ4::LZ4
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION ${LZ4_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR})
|
||||
endif()
|
||||
@@ -1,32 +0,0 @@
|
||||
# Once done, this will define
|
||||
#
|
||||
# LIBC_FOUND - system has libc
|
||||
# LIBC_LIBRARIES - link these to use libc
|
||||
|
||||
if(LIBC_LIBRARIES)
|
||||
set(LIBC_FIND_QUIETLY TRUE)
|
||||
endif(LIBC_LIBRARIES)
|
||||
|
||||
find_library(libm NAMES m)
|
||||
|
||||
# OSX doesn't have rt. On Linux timer and aio dependency.
|
||||
if(APPLE)
|
||||
find_library(libdl NAMES dl)
|
||||
set(LIBC_LIBRARIES ${librt} ${libdl} ${libm})
|
||||
elseif(Linux)
|
||||
find_library(libdl NAMES dl)
|
||||
find_library(librt NAMES rt)
|
||||
set(LIBC_LIBRARIES ${librt} ${libdl} ${libm})
|
||||
else()
|
||||
# FreeBSD doesn't have libdl
|
||||
find_library(librt NAMES rt)
|
||||
set(LIBC_LIBRARIES ${librt} ${libm})
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libc DEFAULT_MSG LIBC_LIBRARIES)
|
||||
|
||||
mark_as_advanced(LIBC_LIBRARIES)
|
||||
|
||||
166
cmake/FindWebP.cmake
Normal file
166
cmake/FindWebP.cmake
Normal file
@@ -0,0 +1,166 @@
|
||||
# Copyright (C) 2020 Sony Interactive Entertainment Inc.
|
||||
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||
# Copyright (C) 2013 Igalia S.L.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindWebP
|
||||
--------------
|
||||
|
||||
Find WebP headers and libraries.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``WebP::libwebp``
|
||||
The WebP library, if found.
|
||||
|
||||
``WebP::demux``
|
||||
The WebP demux library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables in your project:
|
||||
|
||||
``WebP_FOUND``
|
||||
true if (the requested version of) WebP is available.
|
||||
``WebP_VERSION``
|
||||
the version of WebP.
|
||||
``WebP_LIBRARIES``
|
||||
the libraries to link against to use WebP.
|
||||
``WebP_INCLUDE_DIRS``
|
||||
where to find the WebP headers.
|
||||
``WebP_COMPILE_OPTIONS``
|
||||
this should be passed to target_compile_options(), if the
|
||||
target is not used for linking
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_WEBP QUIET libwebp)
|
||||
set(WebP_COMPILE_OPTIONS ${PC_WEBP_CFLAGS_OTHER})
|
||||
set(WebP_VERSION ${PC_WEBP_CFLAGS_VERSION})
|
||||
|
||||
find_path(WebP_INCLUDE_DIR
|
||||
NAMES webp/decode.h
|
||||
HINTS ${PC_WEBP_INCLUDEDIR} ${PC_WEBP_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(WebP_LIBRARY
|
||||
NAMES ${WebP_NAMES} webp libwebp
|
||||
HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
# There's nothing in the WebP headers that could be used to detect the exact
|
||||
# WebP version being used so don't attempt to do so. A version can only be found
|
||||
# through pkg-config
|
||||
if ("${WebP_FIND_VERSION}" VERSION_GREATER "${WebP_VERSION}")
|
||||
if (WebP_VERSION)
|
||||
message(FATAL_ERROR "Required version (" ${WebP_FIND_VERSION} ") is higher than found version (" ${WebP_VERSION} ")")
|
||||
else ()
|
||||
message(WARNING "Cannot determine WebP version without pkg-config")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Find components
|
||||
if (WebP_INCLUDE_DIR AND WebP_LIBRARY)
|
||||
set(_WebP_REQUIRED_LIBS_FOUND ON)
|
||||
set(WebP_LIBS_FOUND "WebP (required): ${WebP_LIBRARY}")
|
||||
else ()
|
||||
set(_WebP_REQUIRED_LIBS_FOUND OFF)
|
||||
set(WebP_LIBS_NOT_FOUND "WebP (required)")
|
||||
endif ()
|
||||
|
||||
if ("demux" IN_LIST WebP_FIND_COMPONENTS)
|
||||
find_library(WebP_DEMUX_LIBRARY
|
||||
NAMES ${WebP_DEMUX_NAMES} webpdemux libwebpdemux
|
||||
HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if (WebP_DEMUX_LIBRARY)
|
||||
if (WebP_FIND_REQUIRED_demux)
|
||||
list(APPEND WebP_LIBS_FOUND "demux (required): ${WebP_DEMUX_LIBRARY}")
|
||||
else ()
|
||||
list(APPEND WebP_LIBS_FOUND "demux (optional): ${WebP_DEMUX_LIBRARY}")
|
||||
endif ()
|
||||
else ()
|
||||
if (WebP_FIND_REQUIRED_demux)
|
||||
set(_WebP_REQUIRED_LIBS_FOUND OFF)
|
||||
list(APPEND WebP_LIBS_NOT_FOUND "demux (required)")
|
||||
else ()
|
||||
list(APPEND WebP_LIBS_NOT_FOUND "demux (optional)")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT WebP_FIND_QUIETLY)
|
||||
if (WebP_LIBS_FOUND)
|
||||
message(STATUS "Found the following WebP libraries:")
|
||||
foreach (found ${WebP_LIBS_FOUND})
|
||||
message(STATUS " ${found}")
|
||||
endforeach ()
|
||||
endif ()
|
||||
if (WebP_LIBS_NOT_FOUND)
|
||||
message(STATUS "The following WebP libraries were not found:")
|
||||
foreach (found ${WebP_LIBS_NOT_FOUND})
|
||||
message(STATUS " ${found}")
|
||||
endforeach ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(WebP
|
||||
FOUND_VAR WebP_FOUND
|
||||
REQUIRED_VARS WebP_INCLUDE_DIR WebP_LIBRARY _WebP_REQUIRED_LIBS_FOUND
|
||||
VERSION_VAR WebP_VERSION
|
||||
)
|
||||
|
||||
if (WebP_LIBRARY AND NOT TARGET WebP::libwebp)
|
||||
add_library(WebP::libwebp UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(WebP::libwebp PROPERTIES
|
||||
IMPORTED_LOCATION "${WebP_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${WebP_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${WebP_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (WebP_DEMUX_LIBRARY AND NOT TARGET WebP::demux)
|
||||
add_library(WebP::demux UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(WebP::demux PROPERTIES
|
||||
IMPORTED_LOCATION "${WebP_DEMUX_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${WebP_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${WebP_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
WebP_INCLUDE_DIR
|
||||
WebP_LIBRARY
|
||||
WebP_DEMUX_LIBRARY
|
||||
)
|
||||
|
||||
if (WebP_FOUND)
|
||||
set(WebP_LIBRARIES ${WebP_LIBRARY} ${WebP_DEMUX_LIBRARY})
|
||||
set(WebP_INCLUDE_DIRS ${WebP_INCLUDE_DIR})
|
||||
endif ()
|
||||
45
cmake/FindZstd.cmake
Normal file
45
cmake/FindZstd.cmake
Normal file
@@ -0,0 +1,45 @@
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#
|
||||
# - Try to find Facebook zstd library
|
||||
# This will define
|
||||
# Zstd_FOUND
|
||||
# Zstd_INCLUDE_DIR
|
||||
# Zstd_LIBRARY
|
||||
#
|
||||
|
||||
find_path(Zstd_INCLUDE_DIR NAMES zstd.h)
|
||||
|
||||
find_library(Zstd_LIBRARY_DEBUG NAMES zstdd zstd_staticd)
|
||||
find_library(Zstd_LIBRARY_RELEASE NAMES zstd zstd_static)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
SELECT_LIBRARY_CONFIGURATIONS(Zstd)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
Zstd DEFAULT_MSG
|
||||
Zstd_LIBRARY Zstd_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(Zstd_INCLUDE_DIR Zstd_LIBRARY)
|
||||
|
||||
if(Zstd_FOUND AND NOT (TARGET Zstd::Zstd))
|
||||
add_library (Zstd::Zstd UNKNOWN IMPORTED)
|
||||
set_target_properties(Zstd::Zstd
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION ${Zstd_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Zstd_INCLUDE_DIR})
|
||||
endif()
|
||||
@@ -1,139 +1,136 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# detectOperatingSystem
|
||||
#-------------------------------------------------------------------------------
|
||||
# This function detects on which OS cmake is run and set a flag to control the
|
||||
# build process. Supported OS: Linux, MacOSX, Windows
|
||||
#
|
||||
# On linux, it also set a flag for specific distribution (ie Fedora)
|
||||
#-------------------------------------------------------------------------------
|
||||
function(detectOperatingSystem)
|
||||
function(detect_operating_system)
|
||||
message(STATUS "CMake Version: ${CMAKE_VERSION}")
|
||||
message(STATUS "CMake System Name: ${CMAKE_SYSTEM_NAME}")
|
||||
|
||||
# LINUX wasn't added until CMake 3.25.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.25.0 AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# Have to make it visible in this scope as well for below.
|
||||
set(LINUX TRUE PARENT_SCOPE)
|
||||
set(LINUX TRUE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(Windows TRUE PARENT_SCOPE)
|
||||
elseif(UNIX AND APPLE)
|
||||
if(IOS)
|
||||
message(WARNING "iOS isn't supported, the build will most likely fail")
|
||||
endif()
|
||||
set(MacOSX TRUE PARENT_SCOPE)
|
||||
elseif(UNIX)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(Linux TRUE PARENT_SCOPE)
|
||||
if (EXISTS /etc/os-release)
|
||||
# Read the file without CR character
|
||||
file(STRINGS /etc/os-release OS_RELEASE)
|
||||
if("${OS_RELEASE}" MATCHES "^.*ID=fedora.*$")
|
||||
set(Fedora TRUE PARENT_SCOPE)
|
||||
message(STATUS "Build Fedora specific")
|
||||
elseif("${OS_RELEASE}" MATCHES "^.*ID=.*suse.*$")
|
||||
set(openSUSE TRUE PARENT_SCOPE)
|
||||
message(STATUS "Build openSUSE specific")
|
||||
endif()
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
|
||||
set(kFreeBSD TRUE PARENT_SCOPE)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
||||
set(GNU TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
message(STATUS "Building for Windows.")
|
||||
elseif(APPLE AND NOT IOS)
|
||||
message(STATUS "Building for MacOS.")
|
||||
elseif(LINUX)
|
||||
message(STATUS "Building for Linux.")
|
||||
elseif(BSD)
|
||||
message(STATUS "Building for *BSD.")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported platform.")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(detect_compiler)
|
||||
if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(USE_CLANG_CL TRUE PARENT_SCOPE)
|
||||
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||
message(STATUS "Building with Clang-CL.")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
set(USE_CLANG TRUE PARENT_SCOPE)
|
||||
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||
message(STATUS "Building with Clang/LLVM.")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(USE_GCC TRUE PARENT_SCOPE)
|
||||
set(IS_SUPPORTED_COMPILER FALSE PARENT_SCOPE)
|
||||
message(STATUS "Building with GNU GCC.")
|
||||
elseif(MSVC)
|
||||
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||
message(STATUS "Building with MSVC.")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(get_git_version_info)
|
||||
set(PCSX2_WC_TIME 0)
|
||||
set(PCSX2_GIT_REV "")
|
||||
set(PCSX2_GIT_TAG "")
|
||||
set(PCSX2_GIT_HASH "")
|
||||
if (GIT_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} show -s --format=%ci HEAD
|
||||
OUTPUT_VARIABLE PCSX2_WC_TIME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Output: "YYYY-MM-DD HH:MM:SS +HHMM" (last part is time zone, offset from UTC)
|
||||
string(REGEX REPLACE "[%:\\-]" "" PCSX2_WC_TIME "${PCSX2_WC_TIME}")
|
||||
string(REGEX REPLACE "([0-9]+) ([0-9]+).*" "\\1\\2" PCSX2_WC_TIME "${PCSX2_WC_TIME}")
|
||||
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --tags
|
||||
OUTPUT_VARIABLE PCSX2_GIT_REV
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} tag --points-at HEAD
|
||||
OUTPUT_VARIABLE PCSX2_GIT_TAG
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} tag --points-at HEAD --sort=version:refname
|
||||
OUTPUT_VARIABLE PCSX2_GIT_TAG_LIST
|
||||
RESULT_VARIABLE TAG_RESULT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
# CAUTION: There is a race here, this solves the problem of a commit being tagged multiple times (take the last tag)
|
||||
# however, if simultaneous builds are pushing tags to the same commit you might get inconsistent results (it's a race)
|
||||
#
|
||||
# The easy solution is, don't do that, but just something to be aware of.
|
||||
if(PCSX2_GIT_TAG_LIST AND TAG_RESULT EQUAL 0)
|
||||
string(REPLACE "\n" ";" PCSX2_GIT_TAG_LIST "${PCSX2_GIT_TAG_LIST}")
|
||||
if (PCSX2_GIT_TAG_LIST)
|
||||
list(GET PCSX2_GIT_TAG_LIST -1 PCSX2_GIT_TAG)
|
||||
message("Using tag: ${PCSX2_GIT_TAG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||
OUTPUT_VARIABLE PCSX2_GIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} log -1 --format=%cd --date=local
|
||||
OUTPUT_VARIABLE PCSX2_GIT_DATE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
endif()
|
||||
if ("${PCSX2_GIT_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" PCSX2_VERSION_LONG "${PCSX2_GIT_TAG}")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" PCSX2_VERSION_SHORT "${PCSX2_GIT_TAG}")
|
||||
elseif(PCSX2_GIT_REV)
|
||||
set(PCSX2_VERSION_LONG "${PCSX2_GIT_REV}")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?(-[a-z][a-z0-9]+)?" PCSX2_VERSION_SHORT "${PCSX2_VERSION_LONG}")
|
||||
else()
|
||||
set(PCSX2_VERSION_LONG "Unknown (git unavailable)")
|
||||
set(PCSX2_VERSION_SHORT "Unknown")
|
||||
endif()
|
||||
if ("${PCSX2_WC_TIME}" STREQUAL "")
|
||||
set(PCSX2_WC_TIME 0)
|
||||
if (NOT PCSX2_GIT_REV)
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
OUTPUT_VARIABLE PCSX2_GIT_REV
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if (NOT PCSX2_GIT_REV)
|
||||
set(PCSX2_GIT_REV "Unknown")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PCSX2_WC_TIME "${PCSX2_WC_TIME}" PARENT_SCOPE)
|
||||
set(PCSX2_GIT_REV "${PCSX2_GIT_REV}" PARENT_SCOPE)
|
||||
set(PCSX2_GIT_TAG "${PCSX2_GIT_TAG}" PARENT_SCOPE)
|
||||
set(PCSX2_GIT_HASH "${PCSX2_GIT_HASH}" PARENT_SCOPE)
|
||||
set(PCSX2_VERSION_LONG "${PCSX2_VERSION_LONG}" PARENT_SCOPE)
|
||||
set(PCSX2_VERSION_SHORT "${PCSX2_VERSION_SHORT}" PARENT_SCOPE)
|
||||
set(PCSX2_GIT_DATE "${PCSX2_GIT_DATE}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(write_svnrev_h)
|
||||
if(PCSX2_GIT_TAG)
|
||||
if ("${PCSX2_GIT_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
|
||||
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_TAGGED_COMMIT 1\n"
|
||||
"#define GIT_TAG_HI ${CMAKE_MATCH_1}\n"
|
||||
"#define GIT_TAG_MID ${CMAKE_MATCH_2}\n"
|
||||
"#define GIT_TAG_LO ${CMAKE_MATCH_3}\n"
|
||||
"#define GIT_REV \"\"\n"
|
||||
"#define GIT_HASH \"${PCSX2_GIT_HASH}\"\n"
|
||||
)
|
||||
else()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
|
||||
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_TAGGED_COMMIT 1\n"
|
||||
"#define GIT_REV \"\"\n"
|
||||
"#define GIT_HASH \"${PCSX2_GIT_HASH}\"\n"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define SVN_REV ${PCSX2_WC_TIME}ll\n"
|
||||
if ("${PCSX2_GIT_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_TAGGED_COMMIT 1\n"
|
||||
"#define GIT_TAG_HI ${CMAKE_MATCH_1}\n"
|
||||
"#define GIT_TAG_MID ${CMAKE_MATCH_2}\n"
|
||||
"#define GIT_TAG_LO ${CMAKE_MATCH_3}\n"
|
||||
"#define GIT_REV \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_HASH \"${PCSX2_GIT_HASH}\"\n"
|
||||
"#define GIT_DATE \"${PCSX2_GIT_DATE}\"\n"
|
||||
)
|
||||
elseif ("${PCSX2_GIT_REV}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_TAGGED_COMMIT 0\n"
|
||||
"#define GIT_TAG_HI ${CMAKE_MATCH_1}\n"
|
||||
"#define GIT_TAG_MID ${CMAKE_MATCH_2}\n"
|
||||
"#define GIT_TAG_LO ${CMAKE_MATCH_3}\n"
|
||||
"#define GIT_REV \"${PCSX2_GIT_REV}\"\n"
|
||||
"#define GIT_HASH \"${PCSX2_GIT_HASH}\"\n"
|
||||
"#define GIT_DATE \"${PCSX2_GIT_DATE}\"\n"
|
||||
)
|
||||
else()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h
|
||||
"#define GIT_TAG \"${PCSX2_GIT_TAG}\"\n"
|
||||
"#define GIT_TAGGED_COMMIT 0\n"
|
||||
"#define GIT_TAG_HI 0\n"
|
||||
"#define GIT_TAG_MID 0\n"
|
||||
"#define GIT_TAG_LO 0\n"
|
||||
"#define GIT_REV \"${PCSX2_GIT_REV}\"\n"
|
||||
"#define GIT_HASH \"${PCSX2_GIT_HASH}\"\n"
|
||||
"#define GIT_DATE \"${PCSX2_GIT_DATE}\"\n"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(check_compiler_version version_warn version_err)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||||
string(STRIP "${GCC_VERSION}" GCC_VERSION)
|
||||
if(GCC_VERSION VERSION_LESS ${version_err})
|
||||
message(FATAL_ERROR "PCSX2 doesn't support your old GCC ${GCC_VERSION}! Please upgrade it!
|
||||
|
||||
The minimum supported version is ${version_err} but ${version_warn} is warmly recommended")
|
||||
else()
|
||||
if(GCC_VERSION VERSION_LESS ${version_warn})
|
||||
message(WARNING "PCSX2 will stop supporting GCC ${GCC_VERSION} in the near future. Please upgrade to at least GCC ${version_warn}.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(GCC_VERSION "${GCC_VERSION}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -163,25 +160,6 @@ function(alias_library new old)
|
||||
add_library(${new} ALIAS _alias_${library_no_namespace})
|
||||
endfunction()
|
||||
|
||||
# Helper macro to generate resources on linux (based on glib)
|
||||
macro(add_custom_glib_res out xml prefix)
|
||||
set(RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/res")
|
||||
set(RESOURCE_FILES "${ARGN}")
|
||||
# Note: trying to combine --generate-source and --generate-header doesn't work.
|
||||
# It outputs whichever one comes last into the file named by the first
|
||||
add_custom_command(
|
||||
OUTPUT ${out}.h
|
||||
COMMAND glib-compile-resources --sourcedir "${RESOURCE_DIR}" --generate-header
|
||||
--c-name ${prefix} "${RESOURCE_DIR}/${xml}" --target=${out}.h
|
||||
DEPENDS res/${xml} ${RESOURCE_FILES})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${out}.cpp
|
||||
COMMAND glib-compile-resources --sourcedir "${RESOURCE_DIR}" --generate-source
|
||||
--c-name ${prefix} "${RESOURCE_DIR}/${xml}" --target=${out}.cpp
|
||||
DEPENDS res/${xml} ${RESOURCE_FILES})
|
||||
endmacro()
|
||||
|
||||
function(source_groups_from_vcxproj_filters file)
|
||||
file(READ "${file}" filecontent)
|
||||
get_filename_component(parent "${file}" DIRECTORY)
|
||||
@@ -235,6 +213,9 @@ function(fixup_file_properties target)
|
||||
if("${source}" MATCHES "\\.(inl|h)$")
|
||||
set_source_files_properties("${source}" PROPERTIES XCODE_EXPLICIT_FILE_TYPE sourcecode.cpp.h)
|
||||
endif()
|
||||
if("${source}" MATCHES "\\.(qm)$")
|
||||
set_source_files_properties("${source}" PROPERTIES XCODE_EXPLICIT_FILE_TYPE compiled)
|
||||
endif()
|
||||
# CMake makefile and ninja generators will attempt to share one PCH for both cpp and mm files
|
||||
# That's not actually OK
|
||||
if("${source}" MATCHES "\\.mm$")
|
||||
|
||||
@@ -8,7 +8,10 @@ if (WIN32)
|
||||
# We bundle everything on Windows
|
||||
add_subdirectory(3rdparty/zlib EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/libpng EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/libwebp EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/xz EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/zstd EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/lz4 EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/D3D12MemAlloc EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/winpixeventruntime EXCLUDE_FROM_ALL)
|
||||
set(FFMPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/3rdparty/ffmpeg/include")
|
||||
@@ -47,9 +50,9 @@ else()
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
## Use pcsx2 package to find module
|
||||
include(FindLibc)
|
||||
find_package(Zstd REQUIRED)
|
||||
find_package(LZ4 REQUIRED)
|
||||
find_package(WebP REQUIRED)
|
||||
|
||||
## Use CheckLib package to find module
|
||||
include(CheckLib)
|
||||
@@ -59,17 +62,9 @@ else()
|
||||
check_lib(EGL EGL EGL/egl.h)
|
||||
endif()
|
||||
|
||||
if(Linux)
|
||||
if(LINUX)
|
||||
check_lib(AIO aio libaio.h)
|
||||
# There are two udev pkg config files - udev.pc (wrong), libudev.pc (correct)
|
||||
# When cross compiling, pkg-config will be skipped so we have to look for
|
||||
# udev (it'll automatically be prefixed with lib). But when not cross
|
||||
# compiling, we have to look for libudev.pc. Argh. Hence the silliness below.
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
check_lib(LIBUDEV udev libudev.h)
|
||||
else()
|
||||
check_lib(LIBUDEV libudev libudev.h)
|
||||
endif()
|
||||
check_lib(LIBUDEV libudev libudev.h)
|
||||
endif()
|
||||
|
||||
if(X11_API)
|
||||
@@ -95,7 +90,7 @@ endif(WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Also need SDL2.
|
||||
find_package(SDL2 2.28.4 REQUIRED)
|
||||
find_package(SDL2 2.30.0 REQUIRED)
|
||||
|
||||
set(ACTUALLY_ENABLE_TESTS ${ENABLE_TESTS})
|
||||
if(ENABLE_TESTS)
|
||||
@@ -105,19 +100,6 @@ if(ENABLE_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(GCC_VERSION VERSION_GREATER_EQUAL "9.0" AND GCC_VERSION VERSION_LESS "9.2")
|
||||
message(WARNING "
|
||||
It looks like you are compiling with 9.0.x or 9.1.x. Using these versions is not recommended,
|
||||
as there is a bug known to cause the compiler to segfault while compiling. See patch
|
||||
https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=275ab714637a64672c6630cfd744af2c70957d5a
|
||||
Even with that patch, compiling with LTO may still segfault. Use at your own risk!
|
||||
This text being in a compile log in an open issue may cause it to be closed.")
|
||||
endif()
|
||||
|
||||
# Prevent fmt from being built with exceptions, or being thrown at call sites.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFMT_EXCEPTIONS=0")
|
||||
|
||||
add_subdirectory(3rdparty/fmt/fmt EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/rapidyaml/rapidyaml EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/lzma EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/libchdr EXCLUDE_FROM_ALL)
|
||||
@@ -133,13 +115,11 @@ add_library(fast_float INTERFACE)
|
||||
target_include_directories(fast_float INTERFACE 3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include)
|
||||
|
||||
add_subdirectory(3rdparty/jpgd EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/libwebp EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/simpleini EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/imgui EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/cpuinfo EXCLUDE_FROM_ALL)
|
||||
disable_compiler_warnings_for_target(cpuinfo)
|
||||
add_subdirectory(3rdparty/zydis EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/zstd EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/libzip EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/rcheevos EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(3rdparty/rapidjson EXCLUDE_FROM_ALL)
|
||||
@@ -168,8 +148,12 @@ endif()
|
||||
# Demangler for the debugger
|
||||
add_subdirectory(3rdparty/demangler EXCLUDE_FROM_ALL)
|
||||
|
||||
# Prevent fmt from being built with exceptions, or being thrown at call sites.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFMT_EXCEPTIONS=0")
|
||||
add_subdirectory(3rdparty/fmt/fmt EXCLUDE_FROM_ALL)
|
||||
|
||||
# Deliberately at the end. We don't want to set the flag on third-party projects.
|
||||
if(MSVC)
|
||||
# Don't warn about "deprecated" POSIX functions.
|
||||
add_definitions("-D_CRT_SECURE_NO_WARNINGS" "-DCRT_SECURE_NO_DEPRECATE")
|
||||
add_definitions("-D_CRT_NONSTDC_NO_WARNINGS" "-D_CRT_SECURE_NO_WARNINGS" "-DCRT_SECURE_NO_DEPRECATE")
|
||||
endif()
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
# Copyright (c) 2014 PCSX2 Dev Team
|
||||
# Copyright (c) 2012 Petroules Corporation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# https://github.com/petroules/solar-cmake/blob/master/TargetArch.cmake
|
||||
#
|
||||
# Based on the Qt 5 processor detection code, so should be very accurate
|
||||
# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h
|
||||
# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64)
|
||||
|
||||
# Regarding POWER/PowerPC, just as is noted in the Qt source,
|
||||
# "There are many more known variants/revisions that we do not handle/detect."
|
||||
|
||||
set(archdetect_c_code "
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
|
||||
#if defined(__ARM_ARCH_7__) \\
|
||||
|| defined(__ARM_ARCH_7A__) \\
|
||||
|| defined(__ARM_ARCH_7R__) \\
|
||||
|| defined(__ARM_ARCH_7M__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
|
||||
#error cmake_ARCH armv7
|
||||
#elif defined(__ARM_ARCH_6__) \\
|
||||
|| defined(__ARM_ARCH_6J__) \\
|
||||
|| defined(__ARM_ARCH_6T2__) \\
|
||||
|| defined(__ARM_ARCH_6Z__) \\
|
||||
|| defined(__ARM_ARCH_6K__) \\
|
||||
|| defined(__ARM_ARCH_6ZK__) \\
|
||||
|| defined(__ARM_ARCH_6M__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
|
||||
#error cmake_ARCH armv6
|
||||
#elif defined(__ARM_ARCH_5TEJ__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
|
||||
#error cmake_ARCH armv5
|
||||
#else
|
||||
#error cmake_ARCH arm
|
||||
#endif
|
||||
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
||||
#error cmake_ARCH i386
|
||||
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
|
||||
#error cmake_ARCH x86_64
|
||||
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||
#error cmake_ARCH ia64
|
||||
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\
|
||||
|| defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\
|
||||
|| defined(_M_MPPC) || defined(_M_PPC)
|
||||
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
||||
#error cmake_ARCH ppc64
|
||||
#else
|
||||
#error cmake_ARCH ppc
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#error cmake_ARCH unknown
|
||||
")
|
||||
|
||||
# Set ppc_support to TRUE before including this file or ppc and ppc64
|
||||
# will be treated as invalid architectures since they are no longer supported by Apple
|
||||
|
||||
function(target_architecture output_var)
|
||||
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
# On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set
|
||||
# First let's normalize the order of the values
|
||||
|
||||
# Note that it's not possible to compile PowerPC applications if you are using
|
||||
# the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we
|
||||
# disable it by default
|
||||
# See this page for more information:
|
||||
# http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4
|
||||
|
||||
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
|
||||
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
|
||||
|
||||
LIST(LENGTH CMAKE_OSX_ARCHITECTURES osx_arch_num)
|
||||
if(NOT (osx_arch_num EQUAL 1))
|
||||
message(FATAL_ERROR "Currently ${CMAKE_PROJECT_NAME} does not support multiple architectures in CMAKE_OSX_ARCHITECTURES")
|
||||
endif()
|
||||
|
||||
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
|
||||
if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
|
||||
set(osx_arch_ppc TRUE)
|
||||
elseif("${osx_arch}" STREQUAL "i386")
|
||||
set(osx_arch_i386 TRUE)
|
||||
elseif("${osx_arch}" STREQUAL "x86_64")
|
||||
set(osx_arch_x86_64 TRUE)
|
||||
elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support)
|
||||
set(osx_arch_ppc64 TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Now add all the architectures in our normalized order
|
||||
if(osx_arch_ppc)
|
||||
list(APPEND ARCH ppc)
|
||||
endif()
|
||||
|
||||
if(osx_arch_i386)
|
||||
list(APPEND ARCH i386)
|
||||
endif()
|
||||
|
||||
if(osx_arch_x86_64)
|
||||
list(APPEND ARCH x86_64)
|
||||
endif()
|
||||
|
||||
if(osx_arch_ppc64)
|
||||
list(APPEND ARCH ppc64)
|
||||
endif()
|
||||
|
||||
LIST(LENGTH ARCH osx_arch_num)
|
||||
if(osx_arch_num LESS 1)
|
||||
message(FATAL_ERROR "Invalid CMAKE_OSX_ARCHITECTURES: ${CMAKE_OSX_ARCHITECTURES}")
|
||||
endif()
|
||||
else()
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
|
||||
|
||||
enable_language(C)
|
||||
|
||||
# Detect the architecture in a rather creative way...
|
||||
# This compiles a small C program which is a series of ifdefs that selects a
|
||||
# particular #error preprocessor directive whose message string contains the
|
||||
# target architecture. The program will always fail to compile (both because
|
||||
# file is not a valid C program, and obviously because of the presence of the
|
||||
# #error preprocessor directives... but by exploiting the preprocessor in this
|
||||
# way, we can detect the correct target architecture even when cross-compiling,
|
||||
# since the program itself never needs to be run (only the compiler/preprocessor)
|
||||
try_run(
|
||||
run_result_unused
|
||||
compile_result_unused
|
||||
"${CMAKE_BINARY_DIR}"
|
||||
"${CMAKE_BINARY_DIR}/arch.c"
|
||||
COMPILE_OUTPUT_VARIABLE ARCH
|
||||
CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
|
||||
)
|
||||
|
||||
# Parse the architecture name from the compiler output
|
||||
string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}")
|
||||
|
||||
# Get rid of the value marker leaving just the architecture name
|
||||
string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}")
|
||||
|
||||
# If we are compiling with an unknown architecture this variable should
|
||||
# already be set to "unknown" but in the case that it's empty (i.e. due
|
||||
# to a typo in the code), then set it to unknown
|
||||
if (NOT ARCH)
|
||||
set(ARCH unknown)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(${output_var} "${ARCH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
// This module contains implementations of _aligned_malloc for platforms that don't have
|
||||
// it built into their CRT/libc.
|
||||
@@ -20,7 +8,9 @@
|
||||
|
||||
#include "common/AlignedMalloc.h"
|
||||
#include "common/Assertions.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
|
||||
void* _aligned_malloc(size_t size, size_t align)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#include "Threading.h"
|
||||
#include "General.h"
|
||||
#include "Assertions.h"
|
||||
#include "CrashHandler.h"
|
||||
#include "HostSys.h"
|
||||
#include "Threading.h"
|
||||
|
||||
#include <mutex>
|
||||
#include "fmt/core.h"
|
||||
|
||||
@@ -1,24 +1,10 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifndef __pxFUNCTION__
|
||||
#if defined(__GNUG__)
|
||||
#define __pxFUNCTION__ __PRETTY_FUNCTION__
|
||||
@@ -27,132 +13,39 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// pxAssert / pxAssertDev
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// Standard "nothrow" assertions. All assertions act as valid conditional statements that
|
||||
// return the result of the specified conditional; useful for handling failed assertions in
|
||||
// a "graceful" fashion when utilizing the "ignore" feature of assertion debugging.
|
||||
// These macros are mostly intended for "pseudo-weak" assumptions within code, most often for
|
||||
// testing threaded user interface code (threading of the UI is a prime example since often
|
||||
// even very robust assertions can fail in very rare conditions, due to the complex variety
|
||||
// of ways the user can invoke UI events).
|
||||
//
|
||||
// All macros return TRUE if the assertion succeeds, or FALSE if the assertion failed
|
||||
// (thus matching the condition of the assertion itself).
|
||||
//
|
||||
// pxAssertDev is an assertion tool for Devel builds, intended for sanity checking and/or
|
||||
// bounds checking variables in areas which are not performance critical. Another common
|
||||
// use is for checking thread affinity on utility functions.
|
||||
//
|
||||
// Credits: These macros are based on a combination of wxASSERT, MSVCRT's assert and the
|
||||
// ATL's Assertion/Assumption macros. the best of all worlds!
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// pxAssume / pxAssumeDev / pxFail / pxFailDev
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Assumptions are hints to the compiler that the condition will always be true,
|
||||
// the condition should never fail under any circumstance in release builds
|
||||
// or else you might get incorrect compiler generated code.
|
||||
//
|
||||
// Performance: All assumption/fail types optimize into __assume()/likely() directives in
|
||||
// Release builds (non-dev varieties optimize as such in Devel builds as well).
|
||||
// __assume(0) is a special form of __assume() which tells the compiler that the code path
|
||||
// is not reachable and will cause undefined results if it is reachable...
|
||||
//
|
||||
// Having pxFail and pxFailDev translate into __assume statements is very dangerous, since
|
||||
// it can lead to the compiler optimizing out code and leading to crashes in dev/release
|
||||
// builds. To have code optimized, explicitly use pxAssume(false) or pxAssumeDev(false,msg);
|
||||
|
||||
// pxAssertRel ->
|
||||
// Special release-mode assertion. Limited use since stack traces in release mode builds
|
||||
// (especially with LTCG) are highly suspect. But when troubleshooting crashes that only
|
||||
// rear ugly heads in optimized builds, this is one of the few tools we have.
|
||||
// pxAssertRel - assertion check even in Release builds.
|
||||
// pxFailRel - aborts program even in Release builds.
|
||||
//
|
||||
// pxAssert[Msg] - assertion check only in Debug/Devel builds, noop in Release.
|
||||
// pxAssume[Msg] - assertion check in Debug/Devel builds, optimization hint in Release builds.
|
||||
// pxFail - aborts program only in Debug/Devel builds, noop in Release.
|
||||
|
||||
extern void pxOnAssertFail(const char* file, int line, const char* func, const char* msg);
|
||||
|
||||
#define pxAssertRel(cond, msg) ((likely(cond)) || (pxOnAssertFail(__FILE__, __LINE__, __pxFUNCTION__, msg), false))
|
||||
#define pxAssumeRel(cond, msg) ((void)((!likely(cond)) && (pxOnAssertFail(__FILE__, __LINE__, __pxFUNCTION__, msg), false)))
|
||||
#define pxFailRel(msg) pxAssertRel(false, msg)
|
||||
#define pxAssertRel(cond, msg) do { if (!(cond)) [[unlikely]] { pxOnAssertFail(__FILE__, __LINE__, __pxFUNCTION__, msg); } } while(0)
|
||||
#define pxFailRel(msg) pxOnAssertFail(__FILE__, __LINE__, __pxFUNCTION__, msg)
|
||||
|
||||
#if defined(PCSX2_DEBUG)
|
||||
#if defined(PCSX2_DEBUG) || defined(PCSX2_DEVBUILD)
|
||||
|
||||
#define pxAssertMsg(cond, msg) pxAssertRel(cond, msg)
|
||||
#define pxAssertDev(cond, msg) pxAssertMsg(cond, msg)
|
||||
|
||||
#define pxAssumeMsg(cond, msg) pxAssumeRel(cond, msg)
|
||||
#define pxAssumeDev(cond, msg) pxAssumeRel(cond, msg)
|
||||
|
||||
#define pxFail(msg) pxAssertMsg(false, msg)
|
||||
#define pxFailDev(msg) pxAssertDev(false, msg)
|
||||
|
||||
#elif defined(PCSX2_DEVBUILD)
|
||||
|
||||
// Devel builds now will give you a release-mode assertion dialog window if any of the
|
||||
// following macro's 'cond' field is false.
|
||||
// Note: Only use pxAssume/Msg/Dev if you know what you're doing, __assume is supposed
|
||||
// to be used as an optimization hint, yet many devs have been using psAssume
|
||||
// thinking its the same as an assertion.
|
||||
// __assume(0) is also very dangerous because it is a special case of __assume() which
|
||||
// tells the compiler that the code path is not reachable, and it can cause unpredictable
|
||||
// results if the code path can be reached.
|
||||
// i.e. if (1) { __assume(0); something(); }
|
||||
// In the above example, something() may never be called.
|
||||
// __assume(0)'s real use is in optimizing stuff such as "default:" cases on a switch
|
||||
// statement. See jNO_DEFAULT
|
||||
|
||||
#define pxAssertMsg(cond, msg) pxAssertRel(cond, msg)
|
||||
#define pxAssertDev(cond, msg) pxAssertRel(cond, msg)
|
||||
|
||||
#define pxAssumeMsg(cond, msg) pxAssumeRel(cond, msg) //(__assume(cond))
|
||||
#define pxAssumeDev(cond, msg) pxAssumeRel(cond, msg)
|
||||
|
||||
#define pxFail(msg) pxAssertDev(false, msg)
|
||||
#define pxFailDev(msg) pxAssertDev(false, msg)
|
||||
#define pxAssumeMsg(cond, msg) pxAssertRel(cond, msg)
|
||||
#define pxFail(msg) pxFailRel(msg)
|
||||
|
||||
#else
|
||||
|
||||
// Release Builds just use __assume as an optimization, and return the conditional
|
||||
// as a result (which is optimized to nil if unused).
|
||||
|
||||
#define pxAssertMsg(cond, msg) (likely(cond))
|
||||
#define pxAssertDev(cond, msg) (likely(cond))
|
||||
|
||||
#define pxAssumeMsg(cond, msg) __assume(cond)
|
||||
#define pxAssumeDev(cond, msg) __assume(cond)
|
||||
|
||||
#define pxFail(msg) \
|
||||
do \
|
||||
{ \
|
||||
} while (0)
|
||||
|
||||
#define pxFailDev(msg) \
|
||||
do \
|
||||
{ \
|
||||
} while (0)
|
||||
#define pxAssertMsg(cond, msg) ((void)0)
|
||||
#define pxAssumeMsg(cond, msg) ASSUME(cond)
|
||||
#define pxFail(msg) ((void)0)
|
||||
|
||||
#endif
|
||||
|
||||
#define pxAssert(cond) pxAssertMsg(cond, #cond)
|
||||
#define pxAssume(cond) pxAssumeMsg(cond, #cond)
|
||||
|
||||
#define pxAssertRelease(cond, msg)
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// jNO_DEFAULT -- disables the default case in a switch, which improves switch optimization
|
||||
// under MSVC.
|
||||
// --------------------------------------------------------------------------------------
|
||||
// How it Works: pxAssumeDev turns into an __assume(0) under msvc compilers, which when specified
|
||||
// in the 'default:' case of a switch tells the compiler that the case is unreachable, so
|
||||
// that it will not generate any code, LUTs, or conditionals to handle it.
|
||||
//
|
||||
// * In debug/devel builds the default case will cause an assertion.
|
||||
//
|
||||
#ifndef jNO_DEFAULT
|
||||
// jNO_DEFAULT -- disables the default case in a switch, which improves switch optimization.
|
||||
#define jNO_DEFAULT \
|
||||
default: \
|
||||
{ \
|
||||
pxAssumeDev(0, "Incorrect usage of jNO_DEFAULT detected (default case is not unreachable!)"); \
|
||||
pxAssumeMsg(false, "Incorrect usage of jNO_DEFAULT detected (default case is not unreachable!)"); \
|
||||
break; \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
#include <bit>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
@@ -96,3 +85,16 @@ namespace Common
|
||||
return std::countl_zero(static_cast<u32>(n));
|
||||
}
|
||||
} // namespace Common
|
||||
|
||||
template <typename T>
|
||||
[[maybe_unused]] __fi static T GetBufferT(u8* buffer, u32 offset)
|
||||
{
|
||||
T value;
|
||||
std::memcpy(&value, buffer + offset, sizeof(value));
|
||||
return value;
|
||||
}
|
||||
|
||||
[[maybe_unused]] __fi static u8 GetBufferU8(u8* buffer, u32 offset) { return GetBufferT<u8>(buffer, offset); }
|
||||
[[maybe_unused]] __fi static u16 GetBufferU16(u8* buffer, u32 offset) { return GetBufferT<u16>(buffer, offset); }
|
||||
[[maybe_unused]] __fi static u32 GetBufferU32(u8* buffer, u32 offset) { return GetBufferT<u32>(buffer, offset); }
|
||||
[[maybe_unused]] __fi static u64 GetBufferU64(u8* buffer, u32 offset) { return GetBufferT<u64>(buffer, offset); }
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -17,11 +17,10 @@ target_sources(common PRIVATE
|
||||
Error.cpp
|
||||
FastJmp.cpp
|
||||
FileSystem.cpp
|
||||
General.cpp
|
||||
HostSys.cpp
|
||||
Image.cpp
|
||||
HTTPDownloader.cpp
|
||||
MemorySettingsInterface.cpp
|
||||
Misc.cpp
|
||||
MD5Digest.cpp
|
||||
PrecompiledHeader.cpp
|
||||
Perf.cpp
|
||||
@@ -37,7 +36,6 @@ target_sources(common PRIVATE
|
||||
WindowInfo.cpp
|
||||
emitter/avx.cpp
|
||||
emitter/bmi.cpp
|
||||
emitter/cpudetect.cpp
|
||||
emitter/fpu.cpp
|
||||
emitter/groups.cpp
|
||||
emitter/jmp.cpp
|
||||
@@ -45,8 +43,6 @@ target_sources(common PRIVATE
|
||||
emitter/legacy_sse.cpp
|
||||
emitter/movs.cpp
|
||||
emitter/simd.cpp
|
||||
emitter/LnxCpuDetect.cpp
|
||||
emitter/WinCpuDetect.cpp
|
||||
emitter/x86emitter.cpp
|
||||
Darwin/DarwinThreads.cpp
|
||||
Darwin/DarwinMisc.cpp
|
||||
@@ -72,10 +68,11 @@ target_sources(common PRIVATE
|
||||
Easing.h
|
||||
EnumOps.h
|
||||
Error.h
|
||||
FPControl.h
|
||||
FastJmp.h
|
||||
FileSystem.h
|
||||
General.h
|
||||
HashCombine.h
|
||||
HostSys.h
|
||||
HeterogeneousContainers.h
|
||||
Image.h
|
||||
LRUCache.h
|
||||
@@ -93,12 +90,14 @@ target_sources(common PRIVATE
|
||||
ScopedGuard.h
|
||||
SettingsInterface.h
|
||||
SettingsWrapper.h
|
||||
SingleRegisterTypes.h
|
||||
SmallString.h
|
||||
StringUtil.h
|
||||
Timer.h
|
||||
TextureDecompress.h
|
||||
Threading.h
|
||||
TraceLog.h
|
||||
VectorIntrin.h
|
||||
WAVWriter.h
|
||||
WindowInfo.h
|
||||
WrappedMemCopy.h
|
||||
@@ -123,12 +122,13 @@ target_sources(common PRIVATE
|
||||
emitter/legacy_instructions.h
|
||||
emitter/legacy_internal.h
|
||||
emitter/legacy_types.h
|
||||
emitter/tools.h
|
||||
emitter/x86emitter.h
|
||||
emitter/x86types.h
|
||||
Darwin/DarwinMisc.h
|
||||
)
|
||||
|
||||
set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
if(USE_VTUNE)
|
||||
target_link_libraries(common PUBLIC Vtune::Vtune)
|
||||
endif()
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2022 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -35,6 +23,8 @@ namespace CocoaTools
|
||||
std::optional<std::string> MoveToTrash(std::string_view file);
|
||||
/// Launch the given application once this one quits
|
||||
bool DelayedLaunch(std::string_view file);
|
||||
/// Open a Finder window to the given URL
|
||||
bool ShowInFinder(std::string_view file);
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2022 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#if ! __has_feature(objc_arc)
|
||||
#error "Compile this with -fobjc-arc"
|
||||
@@ -19,7 +7,7 @@
|
||||
|
||||
#include "CocoaTools.h"
|
||||
#include "Console.h"
|
||||
#include "General.h"
|
||||
#include "HostSys.h"
|
||||
#include "WindowInfo.h"
|
||||
#include <dlfcn.h>
|
||||
#include <mutex>
|
||||
@@ -29,6 +17,11 @@
|
||||
|
||||
// MARK: - Metal Layers
|
||||
|
||||
static NSString*_Nonnull NSStringFromStringView(std::string_view sv)
|
||||
{
|
||||
return [[NSString alloc] initWithBytes:sv.data() length:sv.size() encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
|
||||
bool CocoaTools::CreateMetalLayer(WindowInfo* wi)
|
||||
{
|
||||
if (![NSThread isMainThread])
|
||||
@@ -168,7 +161,7 @@ std::optional<std::string> CocoaTools::GetNonTranslocatedBundlePath()
|
||||
|
||||
std::optional<std::string> CocoaTools::MoveToTrash(std::string_view file)
|
||||
{
|
||||
NSURL* url = [NSURL fileURLWithPath:[[NSString alloc] initWithBytes:file.data() length:file.size() encoding:NSUTF8StringEncoding]];
|
||||
NSURL* url = [NSURL fileURLWithPath:NSStringFromStringView(file)];
|
||||
NSURL* new_url;
|
||||
if (![[NSFileManager defaultManager] trashItemAtURL:url resultingItemURL:&new_url error:nil])
|
||||
return std::nullopt;
|
||||
@@ -182,9 +175,17 @@ bool CocoaTools::DelayedLaunch(std::string_view file)
|
||||
[task setExecutableURL:[NSURL fileURLWithPath:@"/bin/sh"]];
|
||||
[task setEnvironment:@{
|
||||
@"WAITPID": [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]],
|
||||
@"LAUNCHAPP": [[NSString alloc] initWithBytes:file.data() length:file.size() encoding:NSUTF8StringEncoding],
|
||||
@"LAUNCHAPP": NSStringFromStringView(file),
|
||||
}];
|
||||
[task setArguments:@[@"-c", @"while /bin/ps -p $WAITPID > /dev/null; do /bin/sleep 0.1; done; exec /usr/bin/open \"$LAUNCHAPP\";"]];
|
||||
return [task launchAndReturnError:nil];
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Directory Services
|
||||
|
||||
bool CocoaTools::ShowInFinder(std::string_view file)
|
||||
{
|
||||
return [[NSWorkspace sharedWorkspace] selectFile:NSStringFromStringView(file)
|
||||
inFileViewerRootedAtPath:nil];
|
||||
}
|
||||
|
||||
@@ -1,536 +1,509 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#include "common/Threading.h"
|
||||
#include "common/TraceLog.h"
|
||||
#include "common/Console.h"
|
||||
#include "common/Assertions.h"
|
||||
#include "common/RedtapeWindows.h" // OutputDebugString
|
||||
#include "common/FileSystem.h"
|
||||
#include "common/SmallString.h"
|
||||
#include "common/Timer.h"
|
||||
|
||||
using namespace Threading;
|
||||
#include "fmt/format.h"
|
||||
|
||||
// thread-local console indentation setting.
|
||||
static thread_local int conlog_Indent(0);
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
// thread-local console color storage.
|
||||
static thread_local ConsoleColors conlog_Color(DefaultConsoleColor);
|
||||
|
||||
#ifdef __POSIX__
|
||||
#ifdef _WIN32
|
||||
#include "common/RedtapeWindows.h"
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
||||
static FILE* stdout_fp = stdout;
|
||||
|
||||
static bool checkSupportsColor()
|
||||
{
|
||||
if (!isatty(fileno(stdout_fp)))
|
||||
return false;
|
||||
char* term = getenv("TERM");
|
||||
if (!term || (0 == strcmp(term, "dumb")))
|
||||
return false;
|
||||
return true; // Probably supports color
|
||||
}
|
||||
|
||||
static bool supports_color = checkSupportsColor();
|
||||
|
||||
void Console_SetStdout(FILE* fp)
|
||||
{
|
||||
stdout_fp = fp;
|
||||
}
|
||||
#endif
|
||||
|
||||
// This function re-assigns the console log writer(s) to the specified target. It makes sure
|
||||
// to flush any contents from the buffered console log (which typically accumulates due to
|
||||
// log suspension during log file/window re-init operations) into the new log.
|
||||
//
|
||||
// Important! Only Assert and Null console loggers are allowed during C++ startup init (when
|
||||
// the program or DLL first loads). Other log targets rely on the static buffer and a
|
||||
// threaded mutex lock, which are only valid after C++ initialization has finished.
|
||||
void Console_SetActiveHandler(const IConsoleWriter& writer, FILE* flushfp)
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
// Dummy objects, need to get rid of them...
|
||||
ConsoleLogWriter<LOGLEVEL_INFO> Console;
|
||||
ConsoleLogWriter<LOGLEVEL_DEV> DevCon;
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConsoleLogWriter<LOGLEVEL_DEBUG> DbgConWriter;
|
||||
#else
|
||||
NullLogWriter DbgConWriter;
|
||||
#endif
|
||||
|
||||
#define TIMESTAMP_FORMAT_STRING "[{:10.4f}] "
|
||||
#define TIMESTAMP_PRINTF_STRING "[%10.4f] "
|
||||
|
||||
namespace Log
|
||||
{
|
||||
pxAssertDev(
|
||||
(writer.WriteRaw != NULL) && (writer.DoWriteLn != NULL) &&
|
||||
(writer.Newline != NULL) && (writer.SetTitle != NULL) &&
|
||||
(writer.DoSetColor != NULL),
|
||||
"Invalid IConsoleWriter object! All function pointer interfaces must be implemented.");
|
||||
static void WriteToConsole(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
static void WriteToDebug(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
static void WriteToFile(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
|
||||
Console = writer;
|
||||
DevConWriter = writer;
|
||||
static void UpdateMaxLevel();
|
||||
|
||||
#ifdef PCSX2_DEBUG
|
||||
DbgCon = writer;
|
||||
static void ExecuteCallbacks(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
|
||||
static Common::Timer::Value s_start_timestamp = Common::Timer::GetCurrentValue();
|
||||
|
||||
static LOGLEVEL s_max_level = LOGLEVEL_NONE;
|
||||
static LOGLEVEL s_console_level = LOGLEVEL_NONE;
|
||||
static LOGLEVEL s_debug_level = LOGLEVEL_NONE;
|
||||
static LOGLEVEL s_file_level = LOGLEVEL_NONE;
|
||||
static LOGLEVEL s_host_level = LOGLEVEL_NONE;
|
||||
static bool s_log_timestamps = true;
|
||||
|
||||
static FileSystem::ManagedCFilePtr s_file_handle;
|
||||
static std::string s_file_path;
|
||||
static std::mutex s_file_mutex;
|
||||
|
||||
static HostCallbackType s_host_callback;
|
||||
|
||||
#ifdef _WIN32
|
||||
static HANDLE s_hConsoleStdIn = NULL;
|
||||
static HANDLE s_hConsoleStdOut = NULL;
|
||||
static HANDLE s_hConsoleStdErr = NULL;
|
||||
#endif
|
||||
} // namespace Log
|
||||
|
||||
float Log::GetCurrentMessageTime()
|
||||
{
|
||||
return static_cast<float>(Common::Timer::ConvertValueToSeconds(Common::Timer::GetCurrentValue() - s_start_timestamp));
|
||||
}
|
||||
|
||||
__ri void Log::WriteToConsole(LOGLEVEL level, ConsoleColors color, std::string_view message)
|
||||
{
|
||||
static constexpr std::string_view s_ansi_color_codes[ConsoleColors_Count] = {
|
||||
"\033[0m"sv, // default
|
||||
"\033[30m\033[1m"sv, // black
|
||||
"\033[32m"sv, // green
|
||||
"\033[31m"sv, // red
|
||||
"\033[34m"sv, // blue
|
||||
"\033[35m"sv, // magenta
|
||||
"\033[35m"sv, // orange (FIXME)
|
||||
"\033[37m"sv, // gray
|
||||
"\033[36m"sv, // cyan
|
||||
"\033[33m"sv, // yellow
|
||||
"\033[37m"sv, // white
|
||||
"\033[30m\033[1m"sv, // strong black
|
||||
"\033[31m\033[1m"sv, // strong red
|
||||
"\033[32m\033[1m"sv, // strong green
|
||||
"\033[34m\033[1m"sv, // strong blue
|
||||
"\033[35m\033[1m"sv, // strong magenta
|
||||
"\033[35m\033[1m"sv, // strong orange (FIXME)
|
||||
"\033[37m\033[1m"sv, // strong gray
|
||||
"\033[36m\033[1m"sv, // strong cyan
|
||||
"\033[33m\033[1m"sv, // strong yellow
|
||||
"\033[37m\033[1m"sv, // strong white
|
||||
};
|
||||
|
||||
static constexpr size_t BUFFER_SIZE = 512;
|
||||
|
||||
SmallStackString<BUFFER_SIZE> buffer;
|
||||
buffer.reserve(32 + message.length());
|
||||
buffer.append(s_ansi_color_codes[color]);
|
||||
|
||||
if (s_log_timestamps)
|
||||
buffer.append_fmt(TIMESTAMP_FORMAT_STRING, Log::GetCurrentMessageTime());
|
||||
|
||||
buffer.append(message);
|
||||
buffer.append('\n');
|
||||
|
||||
#ifdef _WIN32
|
||||
const HANDLE hOutput = (level <= LOGLEVEL_WARNING) ? s_hConsoleStdErr : s_hConsoleStdOut;
|
||||
|
||||
// Convert to UTF-16 first so Unicode characters display correctly. NT is going to do it anyway...
|
||||
wchar_t wbuf[BUFFER_SIZE];
|
||||
wchar_t* wmessage_buf = wbuf;
|
||||
int wmessage_buflen = static_cast<int>(std::size(wbuf) - 1);
|
||||
if (buffer.length() >= std::size(wbuf))
|
||||
{
|
||||
wmessage_buflen = static_cast<int>(buffer.length());
|
||||
wmessage_buf = static_cast<wchar_t*>(std::malloc(static_cast<size_t>(wmessage_buflen) * sizeof(wchar_t)));
|
||||
if (!wmessage_buf)
|
||||
return;
|
||||
}
|
||||
|
||||
const int wmessage_size = MultiByteToWideChar(CP_UTF8, 0, buffer.data(), static_cast<int>(buffer.length()), wmessage_buf, wmessage_buflen);
|
||||
if (wmessage_size <= 0)
|
||||
goto cleanup;
|
||||
|
||||
DWORD chars_written;
|
||||
WriteConsoleW(hOutput, wmessage_buf, static_cast<DWORD>(wmessage_size), &chars_written, nullptr);
|
||||
|
||||
cleanup:
|
||||
if (wmessage_buf != wbuf)
|
||||
std::free(wmessage_buf);
|
||||
#else
|
||||
const int fd = (level <= LOGLEVEL_WARNING) ? STDERR_FILENO : STDOUT_FILENO;
|
||||
write(fd, buffer.data(), buffer.length());
|
||||
#endif
|
||||
}
|
||||
|
||||
// Writes text to the Visual Studio Output window (Microsoft Windows only).
|
||||
// On all other platforms this pipes to Stdout instead.
|
||||
static void MSW_OutputDebugString(const char* text)
|
||||
bool Log::IsConsoleOutputEnabled()
|
||||
{
|
||||
return (s_console_level > LOGLEVEL_NONE);
|
||||
}
|
||||
|
||||
void Log::SetConsoleOutputLevel(LOGLEVEL level)
|
||||
{
|
||||
if (s_console_level == level)
|
||||
return;
|
||||
|
||||
const bool was_enabled = (s_console_level > LOGLEVEL_NONE);
|
||||
const bool now_enabled = (level > LOGLEVEL_NONE);
|
||||
s_console_level = level;
|
||||
UpdateMaxLevel();
|
||||
|
||||
if (was_enabled == now_enabled)
|
||||
return;
|
||||
|
||||
// Worst that happens here is we write to a bad handle..
|
||||
|
||||
#if defined(_WIN32)
|
||||
static constexpr auto enable_virtual_terminal_processing = [](HANDLE hConsole) {
|
||||
DWORD old_mode;
|
||||
if (!GetConsoleMode(hConsole, &old_mode))
|
||||
return;
|
||||
|
||||
// already enabled?
|
||||
if (old_mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
return;
|
||||
|
||||
SetConsoleMode(hConsole, old_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||||
};
|
||||
|
||||
// On windows, no console is allocated by default on a windows based application
|
||||
static bool console_was_allocated = false;
|
||||
static HANDLE old_stdin = NULL;
|
||||
static HANDLE old_stdout = NULL;
|
||||
static HANDLE old_stderr = NULL;
|
||||
|
||||
if (now_enabled)
|
||||
{
|
||||
old_stdin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
old_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
old_stderr = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
if (!old_stdout)
|
||||
{
|
||||
// Attach to the parent console if we're running from a command window
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS) && !AllocConsole())
|
||||
return;
|
||||
|
||||
s_hConsoleStdIn = GetStdHandle(STD_INPUT_HANDLE);
|
||||
s_hConsoleStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
s_hConsoleStdErr = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
enable_virtual_terminal_processing(s_hConsoleStdOut);
|
||||
enable_virtual_terminal_processing(s_hConsoleStdErr);
|
||||
|
||||
std::FILE* fp;
|
||||
freopen_s(&fp, "CONIN$", "r", stdin);
|
||||
freopen_s(&fp, "CONOUT$", "w", stdout);
|
||||
freopen_s(&fp, "CONOUT$", "w", stderr);
|
||||
|
||||
console_was_allocated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
s_hConsoleStdIn = old_stdin;
|
||||
s_hConsoleStdOut = old_stdout;
|
||||
s_hConsoleStdErr = old_stderr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (console_was_allocated)
|
||||
{
|
||||
console_was_allocated = false;
|
||||
|
||||
std::FILE* fp;
|
||||
freopen_s(&fp, "NUL:", "w", stderr);
|
||||
freopen_s(&fp, "NUL:", "w", stdout);
|
||||
freopen_s(&fp, "NUL:", "w", stdin);
|
||||
|
||||
SetStdHandle(STD_ERROR_HANDLE, old_stderr);
|
||||
SetStdHandle(STD_OUTPUT_HANDLE, old_stdout);
|
||||
SetStdHandle(STD_INPUT_HANDLE, old_stdin);
|
||||
|
||||
s_hConsoleStdIn = NULL;
|
||||
s_hConsoleStdOut = NULL;
|
||||
s_hConsoleStdErr = NULL;
|
||||
|
||||
FreeConsole();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
__ri void Log::WriteToDebug(LOGLEVEL level, ConsoleColors color, std::string_view message)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static bool hasDebugger = IsDebuggerPresent();
|
||||
if (hasDebugger)
|
||||
OutputDebugStringA(text);
|
||||
static constexpr size_t BUFFER_SIZE = 512;
|
||||
|
||||
// Convert to UTF-16 first so Unicode characters display correctly. NT is going to do it anyway...
|
||||
wchar_t wbuf[BUFFER_SIZE];
|
||||
wchar_t* wmessage_buf = wbuf;
|
||||
int wmessage_buflen = static_cast<int>(std::size(wbuf) - 1);
|
||||
if (message.length() >= std::size(wbuf))
|
||||
{
|
||||
wmessage_buflen = static_cast<int>(message.length());
|
||||
wmessage_buf = static_cast<wchar_t*>(std::malloc((static_cast<size_t>(wmessage_buflen) + 2) * sizeof(wchar_t)));
|
||||
if (!wmessage_buf)
|
||||
return;
|
||||
}
|
||||
|
||||
int wmessage_size = 0;
|
||||
if (!message.empty()) [[likely]]
|
||||
{
|
||||
wmessage_size = MultiByteToWideChar(CP_UTF8, 0, message.data(), static_cast<int>(message.length()), wmessage_buf, wmessage_buflen);
|
||||
if (wmessage_size <= 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
wmessage_buf[wmessage_size++] = L'\n';
|
||||
wmessage_buf[wmessage_size++] = 0;
|
||||
OutputDebugStringW(wmessage_buf);
|
||||
|
||||
cleanup:
|
||||
if (wmessage_buf != wbuf)
|
||||
std::free(wmessage_buf);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Log::IsDebugOutputAvailable()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return IsDebuggerPresent();
|
||||
#else
|
||||
fputs(text, stdout_fp);
|
||||
fflush(stdout_fp);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleNull
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
static void ConsoleNull_SetTitle(const char* title) {}
|
||||
static void ConsoleNull_DoSetColor(ConsoleColors color) {}
|
||||
static void ConsoleNull_Newline() {}
|
||||
static void ConsoleNull_DoWrite(const char* fmt) {}
|
||||
static void ConsoleNull_DoWriteLn(const char* fmt) {}
|
||||
|
||||
const IConsoleWriter ConsoleWriter_Null =
|
||||
{
|
||||
ConsoleNull_DoWrite,
|
||||
ConsoleNull_DoWriteLn,
|
||||
ConsoleNull_DoSetColor,
|
||||
|
||||
ConsoleNull_DoWrite,
|
||||
ConsoleNull_Newline,
|
||||
ConsoleNull_SetTitle,
|
||||
|
||||
0, // instance-level indentation (should always be 0)
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Console_Stdout
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
#if defined(__POSIX__)
|
||||
static __fi const char* GetLinuxConsoleColor(ConsoleColors color)
|
||||
bool Log::IsDebugOutputEnabled()
|
||||
{
|
||||
switch (color)
|
||||
{
|
||||
case Color_Black:
|
||||
case Color_StrongBlack:
|
||||
return "\033[30m\033[1m";
|
||||
|
||||
case Color_Red:
|
||||
return "\033[31m";
|
||||
case Color_StrongRed:
|
||||
return "\033[31m\033[1m";
|
||||
|
||||
case Color_Green:
|
||||
return "\033[32m";
|
||||
case Color_StrongGreen:
|
||||
return "\033[32m\033[1m";
|
||||
|
||||
case Color_Yellow:
|
||||
return "\033[33m";
|
||||
case Color_StrongYellow:
|
||||
return "\033[33m\033[1m";
|
||||
|
||||
case Color_Blue:
|
||||
return "\033[34m";
|
||||
case Color_StrongBlue:
|
||||
return "\033[34m\033[1m";
|
||||
|
||||
// No orange, so use magenta.
|
||||
case Color_Orange:
|
||||
case Color_Magenta:
|
||||
return "\033[35m";
|
||||
case Color_StrongOrange:
|
||||
case Color_StrongMagenta:
|
||||
return "\033[35m\033[1m";
|
||||
|
||||
case Color_Cyan:
|
||||
return "\033[36m";
|
||||
case Color_StrongCyan:
|
||||
return "\033[36m\033[1m";
|
||||
|
||||
// Use 'white' instead of grey.
|
||||
case Color_Gray:
|
||||
case Color_White:
|
||||
return "\033[37m";
|
||||
case Color_StrongGray:
|
||||
case Color_StrongWhite:
|
||||
return "\033[37m\033[1m";
|
||||
|
||||
// On some other value being passed, clear any formatting.
|
||||
case Color_Default:
|
||||
default:
|
||||
return "\033[0m";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// One possible default write action at startup and shutdown is to use the stdout.
|
||||
static void ConsoleStdout_DoWrite(const char* fmt)
|
||||
{
|
||||
MSW_OutputDebugString(fmt);
|
||||
return (s_console_level > LOGLEVEL_NONE);
|
||||
}
|
||||
|
||||
// Default write action at startup and shutdown is to use the stdout.
|
||||
static void ConsoleStdout_DoWriteLn(const char* fmt)
|
||||
void Log::SetDebugOutputLevel(LOGLEVEL level)
|
||||
{
|
||||
MSW_OutputDebugString(fmt);
|
||||
MSW_OutputDebugString("\n");
|
||||
s_debug_level = level;
|
||||
UpdateMaxLevel();
|
||||
}
|
||||
|
||||
static void ConsoleStdout_Newline()
|
||||
__ri void Log::WriteToFile(LOGLEVEL level, ConsoleColors color, std::string_view message)
|
||||
{
|
||||
MSW_OutputDebugString("\n");
|
||||
}
|
||||
|
||||
static void ConsoleStdout_DoSetColor(ConsoleColors color)
|
||||
{
|
||||
#if defined(__POSIX__)
|
||||
if (!supports_color)
|
||||
std::unique_lock lock(s_file_mutex);
|
||||
if (!s_file_handle) [[unlikely]]
|
||||
return;
|
||||
fprintf(stdout_fp, "\033[0m%s", GetLinuxConsoleColor(color));
|
||||
fflush(stdout_fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ConsoleStdout_SetTitle(const char* title)
|
||||
{
|
||||
#if defined(__POSIX__)
|
||||
if (supports_color)
|
||||
fputs("\033]0;", stdout_fp);
|
||||
fputs(title, stdout_fp);
|
||||
if (supports_color)
|
||||
fputs("\007", stdout_fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
const IConsoleWriter ConsoleWriter_Stdout =
|
||||
if (!message.empty()) [[likely]]
|
||||
{
|
||||
ConsoleStdout_DoWrite, // Writes without newlines go to buffer to avoid error log spam.
|
||||
ConsoleStdout_DoWriteLn,
|
||||
ConsoleStdout_DoSetColor,
|
||||
|
||||
ConsoleNull_DoWrite, // writes from re-piped stdout are ignored here, lest we create infinite loop hell >_<
|
||||
ConsoleStdout_Newline,
|
||||
ConsoleStdout_SetTitle,
|
||||
0, // instance-level indentation (should always be 0)
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleAssert
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
static void ConsoleAssert_DoWrite(const char* fmt)
|
||||
{
|
||||
pxFailRel("Console class has not been initialized");
|
||||
}
|
||||
|
||||
static void ConsoleAssert_DoWriteLn(const char* fmt)
|
||||
{
|
||||
pxFailRel("Console class has not been initialized");
|
||||
}
|
||||
|
||||
const IConsoleWriter ConsoleWriter_Assert =
|
||||
{
|
||||
ConsoleAssert_DoWrite,
|
||||
ConsoleAssert_DoWriteLn,
|
||||
ConsoleNull_DoSetColor,
|
||||
|
||||
ConsoleNull_DoWrite,
|
||||
ConsoleNull_Newline,
|
||||
ConsoleNull_SetTitle,
|
||||
|
||||
0, // instance-level indentation (should always be 0)
|
||||
};
|
||||
|
||||
// =====================================================================================================
|
||||
// IConsoleWriter (implementations)
|
||||
// =====================================================================================================
|
||||
// (all non-virtual members that do common work and then pass the result through DoWrite
|
||||
// or DoWriteLn)
|
||||
|
||||
// Parameters:
|
||||
// glob_indent - this parameter is used to specify a global indentation setting. It is used by
|
||||
// WriteLn function, but defaults to 0 for Warning and Error calls. Local indentation always
|
||||
// applies to all writes.
|
||||
std::string IConsoleWriter::_addIndentation(const std::string& src, int glob_indent = 0) const
|
||||
{
|
||||
const int indent = glob_indent + _imm_indentation;
|
||||
|
||||
std::string indentStr;
|
||||
for (int i = 0; i < indent; i++)
|
||||
indentStr += '\t';
|
||||
|
||||
std::string result;
|
||||
result.reserve(src.length() + 16 * indent);
|
||||
result.append(indentStr);
|
||||
result.append(src);
|
||||
|
||||
std::string::size_type pos = result.find('\n');
|
||||
while (pos != std::string::npos)
|
||||
{
|
||||
result.insert(pos + 1, indentStr);
|
||||
pos = result.find('\n', pos + 1);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Sets the indentation to be applied to all WriteLn's. The indentation is added to the
|
||||
// primary write, and to any newlines specified within the write. Note that this applies
|
||||
// to calls to WriteLn *only* -- calls to Write bypass the indentation parser.
|
||||
const IConsoleWriter& IConsoleWriter::SetIndent(int tabcount) const
|
||||
{
|
||||
conlog_Indent += tabcount;
|
||||
pxAssert(conlog_Indent >= 0);
|
||||
return *this;
|
||||
}
|
||||
|
||||
IConsoleWriter IConsoleWriter::Indent(int tabcount) const
|
||||
{
|
||||
IConsoleWriter retval = *this;
|
||||
retval._imm_indentation = tabcount;
|
||||
return retval;
|
||||
}
|
||||
|
||||
// Changes the active console color.
|
||||
// This color will be unset by calls to colored text methods
|
||||
// such as ErrorMsg and Notice.
|
||||
const IConsoleWriter& IConsoleWriter::SetColor(ConsoleColors color) const
|
||||
{
|
||||
// Ignore current color requests since, well, the current color is already set. ;)
|
||||
if (color == Color_Current)
|
||||
return *this;
|
||||
|
||||
pxAssertMsg((color > Color_Current) && (color < ConsoleColors_Count), "Invalid ConsoleColor specified.");
|
||||
|
||||
if (conlog_Color != color)
|
||||
DoSetColor(conlog_Color = color);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
ConsoleColors IConsoleWriter::GetColor() const
|
||||
{
|
||||
return conlog_Color;
|
||||
}
|
||||
|
||||
// Restores the console color to default (usually black, or low-intensity white if the console uses a black background)
|
||||
const IConsoleWriter& IConsoleWriter::ClearColor() const
|
||||
{
|
||||
if (conlog_Color != DefaultConsoleColor)
|
||||
DoSetColor(conlog_Color = DefaultConsoleColor);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ASCII/UTF8 (char*)
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
bool IConsoleWriter::FormatV(const char* fmt, va_list args) const
|
||||
{
|
||||
// TODO: Make this less rubbish
|
||||
if ((_imm_indentation + conlog_Indent) > 0)
|
||||
{
|
||||
DoWriteLn(_addIndentation(StringUtil::StdStringFromFormatV(fmt, args), conlog_Indent).c_str());
|
||||
if (s_log_timestamps)
|
||||
{
|
||||
std::fprintf(s_file_handle.get(), TIMESTAMP_PRINTF_STRING "%.*s\n", GetCurrentMessageTime(),
|
||||
static_cast<int>(message.size()), message.data());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::fprintf(s_file_handle.get(), "%.*s\n", static_cast<int>(message.size()), message.data());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DoWriteLn(StringUtil::StdStringFromFormatV(fmt, args).c_str());
|
||||
if (s_log_timestamps)
|
||||
{
|
||||
std::fprintf(s_file_handle.get(), TIMESTAMP_PRINTF_STRING "\n", GetCurrentMessageTime());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::fputc('\n', s_file_handle.get());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
std::fflush(s_file_handle.get());
|
||||
}
|
||||
|
||||
bool IConsoleWriter::WriteLn(const char* fmt, ...) const
|
||||
bool Log::IsFileOutputEnabled()
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
FormatV(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return false;
|
||||
return (s_file_level > LOGLEVEL_NONE);
|
||||
}
|
||||
|
||||
bool IConsoleWriter::WriteLn(ConsoleColors color, const char* fmt, ...) const
|
||||
bool Log::SetFileOutputLevel(LOGLEVEL level, std::string path)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
ConsoleColorScope cs(color);
|
||||
FormatV(fmt, args);
|
||||
va_end(args);
|
||||
std::unique_lock lock(s_file_mutex);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IConsoleWriter::Error(const char* fmt, ...) const
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
ConsoleColorScope cs(Color_StrongRed);
|
||||
FormatV(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IConsoleWriter::Warning(const char* fmt, ...) const
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
ConsoleColorScope cs(Color_StrongOrange);
|
||||
FormatV(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IConsoleWriter::WriteLn(ConsoleColors color, const std::string& str) const
|
||||
{
|
||||
ConsoleColorScope cs(color);
|
||||
return WriteLn(str);
|
||||
}
|
||||
|
||||
bool IConsoleWriter::WriteLn(const std::string& str) const
|
||||
{
|
||||
// TODO: Make this less rubbish
|
||||
if ((_imm_indentation + conlog_Indent) > 0)
|
||||
const bool was_enabled = (s_file_level > LOGLEVEL_NONE);
|
||||
const bool new_enabled = (level > LOGLEVEL_NONE && !path.empty());
|
||||
if (was_enabled != new_enabled || (new_enabled && path == s_file_path))
|
||||
{
|
||||
DoWriteLn(_addIndentation(str, conlog_Indent).c_str());
|
||||
if (new_enabled)
|
||||
{
|
||||
if (!s_file_handle || s_file_path != path)
|
||||
{
|
||||
s_file_handle.reset();
|
||||
s_file_handle = FileSystem::OpenManagedCFile(path.c_str(), "wb");
|
||||
if (s_file_handle)
|
||||
{
|
||||
s_file_path = std::move(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
s_file_path = {};
|
||||
|
||||
if (IsConsoleOutputEnabled())
|
||||
WriteToConsole(LOGLEVEL_ERROR, Color_StrongRed, TinyString::from_fmt("Failed to open log file '{}'", path));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
s_file_handle.reset();
|
||||
s_file_path = {};
|
||||
}
|
||||
}
|
||||
|
||||
s_file_level = s_file_handle ? level : LOGLEVEL_NONE;
|
||||
return IsFileOutputEnabled();
|
||||
}
|
||||
|
||||
std::FILE* Log::GetFileLogHandle()
|
||||
{
|
||||
std::unique_lock lock(s_file_mutex);
|
||||
return s_file_handle.get();
|
||||
}
|
||||
|
||||
bool Log::IsHostOutputEnabled()
|
||||
{
|
||||
return (s_host_level > LOGLEVEL_NONE);
|
||||
}
|
||||
|
||||
void Log::SetHostOutputLevel(LOGLEVEL level, HostCallbackType callback)
|
||||
{
|
||||
s_host_callback = callback;
|
||||
s_host_level = callback ? level : LOGLEVEL_NONE;
|
||||
UpdateMaxLevel();
|
||||
}
|
||||
|
||||
bool Log::AreTimestampsEnabled()
|
||||
{
|
||||
return s_log_timestamps;
|
||||
}
|
||||
|
||||
void Log::SetTimestampsEnabled(bool enabled)
|
||||
{
|
||||
s_log_timestamps = enabled;
|
||||
}
|
||||
|
||||
LOGLEVEL Log::GetMaxLevel()
|
||||
{
|
||||
return s_max_level;
|
||||
}
|
||||
|
||||
__ri void Log::UpdateMaxLevel()
|
||||
{
|
||||
s_max_level = std::max(s_console_level, std::max(s_debug_level, std::max(s_file_level, s_host_level)));
|
||||
}
|
||||
|
||||
void Log::ExecuteCallbacks(LOGLEVEL level, ConsoleColors color, std::string_view message)
|
||||
{
|
||||
// TODO: Cache the message time.
|
||||
|
||||
// Split newlines into separate messages.
|
||||
std::string_view::size_type start_pos = 0;
|
||||
if (std::string_view::size_type end_pos = message.find('\n'); end_pos != std::string::npos) [[unlikely]]
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
std::string_view message_line;
|
||||
if (start_pos != end_pos)
|
||||
message_line = message.substr(start_pos, (end_pos == std::string_view::npos) ? end_pos : end_pos - start_pos);
|
||||
|
||||
ExecuteCallbacks(level, color, message_line);
|
||||
|
||||
if (end_pos == std::string_view::npos)
|
||||
return;
|
||||
|
||||
start_pos = end_pos + 1;
|
||||
end_pos = message.find('\n', start_pos);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
pxAssert(level > LOGLEVEL_NONE);
|
||||
if (level <= s_console_level)
|
||||
WriteToConsole(level, color, message);
|
||||
|
||||
if (level <= s_debug_level)
|
||||
WriteToDebug(level, color, message);
|
||||
|
||||
if (level <= s_file_level)
|
||||
WriteToFile(level, color, message);
|
||||
|
||||
if (level <= s_host_level)
|
||||
{
|
||||
// double check in case of race here
|
||||
const HostCallbackType callback = s_host_callback;
|
||||
if (callback)
|
||||
s_host_callback(level, color, message);
|
||||
}
|
||||
}
|
||||
|
||||
void Log::Write(LOGLEVEL level, ConsoleColors color, std::string_view message)
|
||||
{
|
||||
if (level > s_max_level)
|
||||
return;
|
||||
|
||||
ExecuteCallbacks(level, color, message);
|
||||
}
|
||||
|
||||
void Log::Writef(LOGLEVEL level, ConsoleColors color, const char* format, ...)
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, format);
|
||||
Writev(level, color, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void Log::Writev(LOGLEVEL level, ConsoleColors color, const char* format, va_list ap)
|
||||
{
|
||||
if (level > s_max_level)
|
||||
return;
|
||||
|
||||
std::va_list ap_copy;
|
||||
va_copy(ap_copy, ap);
|
||||
|
||||
#ifdef _WIN32
|
||||
const u32 required_size = static_cast<u32>(_vscprintf(format, ap_copy));
|
||||
#else
|
||||
const u32 required_size = std::vsnprintf(nullptr, 0, format, ap_copy);
|
||||
#endif
|
||||
va_end(ap_copy);
|
||||
|
||||
if (required_size < 512)
|
||||
{
|
||||
char buffer[512];
|
||||
const int len = std::vsnprintf(buffer, std::size(buffer), format, ap);
|
||||
if (len > 0)
|
||||
ExecuteCallbacks(level, color, std::string_view(buffer, static_cast<size_t>(len)));
|
||||
}
|
||||
else
|
||||
{
|
||||
DoWriteLn(str.c_str());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IConsoleWriter::Error(const std::string& str) const
|
||||
{
|
||||
return WriteLn(Color_StrongRed, str);
|
||||
}
|
||||
|
||||
bool IConsoleWriter::Warning(const std::string& str) const
|
||||
{
|
||||
return WriteLn(Color_StrongOrange, str);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleColorScope / ConsoleIndentScope
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
ConsoleColorScope::ConsoleColorScope(ConsoleColors newcolor)
|
||||
{
|
||||
m_IsScoped = false;
|
||||
m_newcolor = newcolor;
|
||||
EnterScope();
|
||||
}
|
||||
|
||||
ConsoleColorScope::~ConsoleColorScope()
|
||||
{
|
||||
LeaveScope();
|
||||
}
|
||||
|
||||
void ConsoleColorScope::EnterScope()
|
||||
{
|
||||
if (!m_IsScoped)
|
||||
{
|
||||
m_old_color = Console.GetColor();
|
||||
Console.SetColor(m_newcolor);
|
||||
m_IsScoped = true;
|
||||
char* buffer = new char[required_size + 1];
|
||||
const int len = std::vsnprintf(buffer, required_size + 1, format, ap);
|
||||
if (len > 0)
|
||||
ExecuteCallbacks(level, color, std::string_view(buffer, static_cast<size_t>(len)));
|
||||
delete[] buffer;
|
||||
}
|
||||
}
|
||||
|
||||
void ConsoleColorScope::LeaveScope()
|
||||
void Log::WriteFmtArgs(LOGLEVEL level, ConsoleColors color, fmt::string_view fmt, fmt::format_args args)
|
||||
{
|
||||
m_IsScoped = m_IsScoped && (Console.SetColor(m_old_color), false);
|
||||
}
|
||||
|
||||
ConsoleIndentScope::ConsoleIndentScope(int tabs)
|
||||
{
|
||||
m_IsScoped = false;
|
||||
m_amount = tabs;
|
||||
EnterScope();
|
||||
}
|
||||
|
||||
ConsoleIndentScope::~ConsoleIndentScope()
|
||||
{
|
||||
LeaveScope();
|
||||
}
|
||||
|
||||
void ConsoleIndentScope::EnterScope()
|
||||
{
|
||||
m_IsScoped = m_IsScoped || (Console.SetIndent(m_amount), true);
|
||||
}
|
||||
|
||||
void ConsoleIndentScope::LeaveScope()
|
||||
{
|
||||
m_IsScoped = m_IsScoped && (Console.SetIndent(-m_amount), false);
|
||||
}
|
||||
|
||||
|
||||
ConsoleAttrScope::ConsoleAttrScope(ConsoleColors newcolor, int indent)
|
||||
{
|
||||
m_old_color = Console.GetColor();
|
||||
Console.SetIndent(m_tabsize = indent);
|
||||
Console.SetColor(newcolor);
|
||||
}
|
||||
|
||||
ConsoleAttrScope::~ConsoleAttrScope()
|
||||
{
|
||||
Console.SetColor(m_old_color);
|
||||
Console.SetIndent(-m_tabsize);
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Default Writer for C++ init / startup:
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Currently all build types default to Stdout, which is very functional on Linux but not
|
||||
// always so useful on Windows (which itself lacks a proper stdout console without using
|
||||
// platform specific code). Under windows Stdout will attempt to write to the IDE Debug
|
||||
// console, if one is available (such as running pcsx2 via MSVC). If not available, then
|
||||
// the log message will pretty much be lost into the ether.
|
||||
//
|
||||
#define _DefaultWriter_ ConsoleWriter_Stdout
|
||||
|
||||
IConsoleWriter Console = _DefaultWriter_;
|
||||
IConsoleWriter DevConWriter = _DefaultWriter_;
|
||||
bool DevConWriterEnabled = false;
|
||||
|
||||
#ifdef PCSX2_DEBUG
|
||||
IConsoleWriter DbgConWriter = _DefaultWriter_;
|
||||
#endif
|
||||
|
||||
NullConsoleWriter NullCon = {};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleLogSource (implementations)
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// Writes to the console using the specified color. This overrides the default color setting
|
||||
// for this log.
|
||||
bool ConsoleLogSource::WriteV(ConsoleColors color, const char* fmt, va_list list) const
|
||||
{
|
||||
ConsoleColorScope cs(color);
|
||||
Console.WriteLn(StringUtil::StdStringFromFormatV(fmt, list));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Writes to the console using the source's default color. Note that the source's default
|
||||
// color will always be used, thus ConsoleColorScope() will not be effectual unless the
|
||||
// console's default color is Color_Default.
|
||||
bool ConsoleLogSource::WriteV(const char* fmt, va_list list) const
|
||||
{
|
||||
WriteV(DefaultColor, fmt, list);
|
||||
return false;
|
||||
if (level > s_max_level)
|
||||
return;
|
||||
|
||||
fmt::memory_buffer buffer;
|
||||
fmt::vformat_to(std::back_inserter(buffer), fmt, args);
|
||||
|
||||
ExecuteCallbacks(level, color, std::string_view(buffer.data(), buffer.size()));
|
||||
}
|
||||
|
||||
314
common/Console.h
314
common/Console.h
@@ -1,28 +1,19 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Pcsx2Defs.h"
|
||||
|
||||
#include "fmt/core.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
|
||||
// TODO: This whole thing needs to get ripped out.
|
||||
|
||||
enum ConsoleColors
|
||||
{
|
||||
Color_Current = -1,
|
||||
|
||||
Color_Default = 0,
|
||||
|
||||
Color_Black,
|
||||
@@ -54,191 +45,146 @@ enum ConsoleColors
|
||||
ConsoleColors_Count
|
||||
};
|
||||
|
||||
static const ConsoleColors DefaultConsoleColor = Color_Default;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// IConsoleWriter -- For printing messages to the console.
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// General ConsoleWrite Threading Guideline:
|
||||
// PCSX2 is a threaded environment and multiple threads can write to the console asynchronously.
|
||||
// Individual calls to ConsoleWriter APIs will be written in atomic fashion, however "partial"
|
||||
// logs may end up interrupted by logs on other threads. This is usually not a problem for
|
||||
// WriteLn, but may be undesirable for typical uses of Write. In cases where you want to
|
||||
// print multi-line blocks of uninterrupted logs, compound the entire log into a single large
|
||||
// string and issue that to WriteLn.
|
||||
//
|
||||
struct IConsoleWriter
|
||||
enum LOGLEVEL
|
||||
{
|
||||
// A direct console write, without tabbing or newlines. Useful to devs who want to do quick
|
||||
// logging of various junk; but should *not* be used in production code due.
|
||||
void(* WriteRaw)(const char* fmt);
|
||||
LOGLEVEL_NONE, // Silences all log traffic
|
||||
LOGLEVEL_ERROR,
|
||||
LOGLEVEL_WARNING,
|
||||
LOGLEVEL_INFO,
|
||||
LOGLEVEL_DEV,
|
||||
LOGLEVEL_DEBUG,
|
||||
LOGLEVEL_TRACE,
|
||||
|
||||
// WriteLn implementation for internal use only. Bypasses tabbing, prefixing, and other
|
||||
// formatting.
|
||||
void(* DoWriteLn)(const char* fmt);
|
||||
|
||||
// SetColor implementation for internal use only.
|
||||
void(* DoSetColor)(ConsoleColors color);
|
||||
|
||||
// Special implementation of DoWrite that's pretty much for MSVC use only.
|
||||
// All implementations should map to DoWrite, except Stdio which should map to Null.
|
||||
// (This avoids circular/recursive stdio output)
|
||||
void(* DoWriteFromStdout)(const char* fmt);
|
||||
|
||||
void(* Newline)();
|
||||
void(* SetTitle)(const char* title);
|
||||
|
||||
// internal value for indentation of individual lines. Use the Indent() member to invoke.
|
||||
int _imm_indentation;
|
||||
|
||||
// For internal use only.
|
||||
std::string _addIndentation(const std::string& src, int glob_indent) const;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Public members; call these to print stuff to console!
|
||||
//
|
||||
// All functions always return false. Return value is provided only so that we can easily
|
||||
// disable logs at compile time using the "0&&action" macro trick.
|
||||
|
||||
ConsoleColors GetColor() const;
|
||||
const IConsoleWriter& SetColor(ConsoleColors color) const;
|
||||
const IConsoleWriter& ClearColor() const;
|
||||
const IConsoleWriter& SetIndent(int tabcount = 1) const;
|
||||
|
||||
IConsoleWriter Indent(int tabcount = 1) const;
|
||||
|
||||
bool FormatV(const char* fmt, va_list args) const;
|
||||
bool WriteLn(ConsoleColors color, const char* fmt, ...) const;
|
||||
bool WriteLn(const char* fmt, ...) const;
|
||||
bool Error(const char* fmt, ...) const;
|
||||
bool Warning(const char* fmt, ...) const;
|
||||
|
||||
bool WriteLn(ConsoleColors color, const std::string& str) const;
|
||||
bool WriteLn(const std::string& str) const;
|
||||
bool Error(const std::string& str) const;
|
||||
bool Warning(const std::string& str) const;
|
||||
LOGLEVEL_COUNT,
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// NullConsoleWriter
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Used by Release builds for Debug and Devel writes (DbgCon / DevCon). Inlines to NOPs. :)
|
||||
//
|
||||
struct NullConsoleWriter
|
||||
// TODO: Move this elsewhere, add channels.
|
||||
|
||||
namespace Log
|
||||
{
|
||||
void WriteRaw(const char* fmt) {}
|
||||
void DoWriteLn(const char* fmt) {}
|
||||
void DoSetColor(ConsoleColors color) {}
|
||||
void DoWriteFromStdout(const char* fmt) {}
|
||||
void Newline() {}
|
||||
void SetTitle(const char* title) {}
|
||||
// log message callback type
|
||||
using HostCallbackType = void (*)(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
|
||||
// returns the time in seconds since the start of the process
|
||||
float GetCurrentMessageTime();
|
||||
|
||||
ConsoleColors GetColor() const { return Color_Current; }
|
||||
const NullConsoleWriter& SetColor(ConsoleColors color) const { return *this; }
|
||||
const NullConsoleWriter& ClearColor() const { return *this; }
|
||||
const NullConsoleWriter& SetIndent(int tabcount = 1) const { return *this; }
|
||||
// adds a standard console output
|
||||
bool IsConsoleOutputEnabled();
|
||||
void SetConsoleOutputLevel(LOGLEVEL level);
|
||||
|
||||
NullConsoleWriter Indent(int tabcount = 1) const { return NullConsoleWriter(); }
|
||||
// adds a debug console output
|
||||
bool IsDebugOutputAvailable();
|
||||
bool IsDebugOutputEnabled();
|
||||
void SetDebugOutputLevel(LOGLEVEL level);
|
||||
|
||||
bool FormatV(const char* fmt, va_list args) const { return false; }
|
||||
bool WriteLn(ConsoleColors color, const char* fmt, ...) const { return false; }
|
||||
bool WriteLn(const char* fmt, ...) const { return false; }
|
||||
bool Error(const char* fmt, ...) const { return false; }
|
||||
bool Warning(const char* fmt, ...) const { return false; }
|
||||
// adds a file output
|
||||
bool IsFileOutputEnabled();
|
||||
bool SetFileOutputLevel(LOGLEVEL level, std::string path);
|
||||
|
||||
// returns the log file, this is really dangerous to use if it changes...
|
||||
std::FILE* GetFileLogHandle();
|
||||
|
||||
// adds host output
|
||||
bool IsHostOutputEnabled();
|
||||
void SetHostOutputLevel(LOGLEVEL level, HostCallbackType callback);
|
||||
|
||||
// sets logging timestamps
|
||||
bool AreTimestampsEnabled();
|
||||
void SetTimestampsEnabled(bool enabled);
|
||||
|
||||
// Returns the current global filtering level.
|
||||
LOGLEVEL GetMaxLevel();
|
||||
|
||||
// writes a message to the log
|
||||
void Write(LOGLEVEL level, ConsoleColors color, std::string_view message);
|
||||
void Writef(LOGLEVEL level, ConsoleColors color, const char* format, ...);
|
||||
void Writev(LOGLEVEL level, ConsoleColors color, const char* format, va_list ap);
|
||||
void WriteFmtArgs(LOGLEVEL level, ConsoleColors color, fmt::string_view fmt, fmt::format_args args);
|
||||
|
||||
template <typename... T>
|
||||
__fi static void Write(LOGLEVEL level, ConsoleColors color, fmt::format_string<T...> fmt, T&&... args)
|
||||
{
|
||||
// Avoid arg packing if filtered.
|
||||
if (level <= GetMaxLevel())
|
||||
return WriteFmtArgs(level, color, fmt, fmt::make_format_args(args...));
|
||||
}
|
||||
} // namespace Log
|
||||
|
||||
// Adapter classes to handle old code.
|
||||
template <LOGLEVEL level>
|
||||
struct ConsoleLogWriter
|
||||
{
|
||||
__fi static void Error(std::string_view str) { Log::Write(level, Color_StrongRed, str); }
|
||||
__fi static void Warning(std::string_view str) { Log::Write(level, Color_StrongOrange, str); }
|
||||
__fi static void WriteLn(std::string_view str) { Log::Write(level, Color_Default, str); }
|
||||
__fi static void WriteLn(ConsoleColors color, std::string_view str) { Log::Write(level, color, str); }
|
||||
__fi static void WriteLn() { Log::Write(level, Color_Default, std::string_view()); }
|
||||
__fi static void FormatV(const char* format, va_list ap) { Log::Writev(level, Color_Default, format, ap); }
|
||||
__fi static void FormatV(ConsoleColors color, const char* format, va_list ap) { Log::Writev(level, color, format, ap); }
|
||||
|
||||
#define MAKE_PRINTF_CONSOLE_WRITER(color) \
|
||||
do \
|
||||
{ \
|
||||
std::va_list ap; \
|
||||
va_start(ap, format); \
|
||||
Log::Writev(level, color, format, ap); \
|
||||
va_end(ap); \
|
||||
} while (0)
|
||||
|
||||
// clang-format off
|
||||
__fi static void Error(const char* format, ...) { MAKE_PRINTF_CONSOLE_WRITER(Color_StrongRed); }
|
||||
__fi static void Warning(const char* format, ...) { MAKE_PRINTF_CONSOLE_WRITER(Color_StrongOrange); }
|
||||
__fi static void WriteLn(const char* format, ...) { MAKE_PRINTF_CONSOLE_WRITER(Color_Default); }
|
||||
__fi static void WriteLn(ConsoleColors color, const char* format, ...) { MAKE_PRINTF_CONSOLE_WRITER(color); }
|
||||
// clang-format on
|
||||
|
||||
#undef MAKE_PRINTF_CONSOLE_WRITER
|
||||
|
||||
#define MAKE_FMT_CONSOLE_WRITER(color) do \
|
||||
{ \
|
||||
if (level <= Log::GetMaxLevel()) \
|
||||
Log::WriteFmtArgs(level, color, fmt, fmt::make_format_args(args...)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
// clang-format off
|
||||
template<typename... T> __fi static void ErrorFmt(fmt::format_string<T...> fmt, T&&... args) { MAKE_FMT_CONSOLE_WRITER(Color_StrongRed); }
|
||||
template<typename... T> __fi static void WarningFmt(fmt::format_string<T...> fmt, T&&... args) { MAKE_FMT_CONSOLE_WRITER(Color_StrongOrange); }
|
||||
template<typename... T> __fi static void WriteLnFmt(fmt::format_string<T...> fmt, T&&... args) { MAKE_FMT_CONSOLE_WRITER(Color_Default); }
|
||||
template<typename... T> __fi static void WriteLnFmt(ConsoleColors color, fmt::format_string<T...> fmt, T&&... args) { MAKE_FMT_CONSOLE_WRITER(color); }
|
||||
// clang-format on
|
||||
|
||||
#undef MAKE_FMT_CONSOLE_WRITER
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleIndentScope
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Provides a scoped indentation of the IConsoleWriter interface for the current thread.
|
||||
// Any console writes performed from this scope will be indented by the specified number
|
||||
// of tab characters.
|
||||
//
|
||||
// Scoped Object Notes: Like most scoped objects, this is intended to be used as a stack
|
||||
// or temporary object only. Using it in a situation where the object's lifespan out-lives
|
||||
// a scope will almost certainly result in unintended /undefined side effects.
|
||||
//
|
||||
class ConsoleIndentScope
|
||||
struct NullLogWriter
|
||||
{
|
||||
DeclareNoncopyableObject(ConsoleIndentScope);
|
||||
// clang-format off
|
||||
__fi static bool Error(std::string_view str) { return false; }
|
||||
__fi static bool Warning(std::string_view str) { return false; }
|
||||
__fi static bool WriteLn(std::string_view str) { return false; }
|
||||
__fi static bool WriteLn(ConsoleColors color, std::string_view str) { return false; }
|
||||
__fi static bool WriteLn() { return false; }
|
||||
|
||||
protected:
|
||||
int m_amount;
|
||||
bool m_IsScoped;
|
||||
__fi static bool Error(const char* format, ...) { return false; }
|
||||
__fi static bool Warning(const char* format, ...) { return false; }
|
||||
__fi static bool WriteLn(const char* format, ...) { return false; }
|
||||
__fi static bool WriteLn(ConsoleColors color, const char* format, ...) { return false; }
|
||||
|
||||
public:
|
||||
// Constructor: The specified number of tabs will be appended to the current indentation
|
||||
// setting. The tabs will be unrolled when the object leaves scope or is destroyed.
|
||||
ConsoleIndentScope(int tabs = 1);
|
||||
virtual ~ConsoleIndentScope();
|
||||
void EnterScope();
|
||||
void LeaveScope();
|
||||
template<typename... T> __fi static bool ErrorFmt(fmt::format_string<T...> fmt, T&&... args) { return false; }
|
||||
template<typename... T> __fi static bool WarningFmt(fmt::format_string<T...> fmt, T&&... args) { return false; }
|
||||
template<typename... T> __fi static bool WriteLnFmt(fmt::format_string<T...> fmt, T&&... args) { return false; }
|
||||
template<typename... T> __fi static bool WriteLnFmt(ConsoleColors color, fmt::format_string<T...> fmt, T&&... args) { return false; }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleColorScope
|
||||
// --------------------------------------------------------------------------------------
|
||||
class ConsoleColorScope
|
||||
{
|
||||
DeclareNoncopyableObject(ConsoleColorScope);
|
||||
extern ConsoleLogWriter<LOGLEVEL_INFO> Console;
|
||||
extern ConsoleLogWriter<LOGLEVEL_DEV> DevCon;
|
||||
|
||||
protected:
|
||||
ConsoleColors m_newcolor;
|
||||
ConsoleColors m_old_color;
|
||||
bool m_IsScoped;
|
||||
|
||||
public:
|
||||
ConsoleColorScope(ConsoleColors newcolor);
|
||||
virtual ~ConsoleColorScope();
|
||||
void EnterScope();
|
||||
void LeaveScope();
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleAttrScope
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Applies both color and tab attributes in a single object constructor.
|
||||
//
|
||||
class ConsoleAttrScope
|
||||
{
|
||||
DeclareNoncopyableObject(ConsoleAttrScope);
|
||||
|
||||
protected:
|
||||
ConsoleColors m_old_color;
|
||||
int m_tabsize;
|
||||
|
||||
public:
|
||||
ConsoleAttrScope(ConsoleColors newcolor, int indent = 0);
|
||||
virtual ~ConsoleAttrScope();
|
||||
};
|
||||
|
||||
extern IConsoleWriter Console;
|
||||
|
||||
#if defined(__POSIX__)
|
||||
extern void Console_SetStdout(FILE* fp);
|
||||
#endif
|
||||
extern void Console_SetActiveHandler(const IConsoleWriter& writer, FILE* flushfp = NULL);
|
||||
|
||||
extern const IConsoleWriter ConsoleWriter_Null;
|
||||
extern const IConsoleWriter ConsoleWriter_Stdout;
|
||||
extern const IConsoleWriter ConsoleWriter_Assert;
|
||||
|
||||
extern NullConsoleWriter NullCon;
|
||||
|
||||
extern IConsoleWriter DevConWriter;
|
||||
extern bool DevConWriterEnabled;
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
#define DevCon DevConWriter
|
||||
#else
|
||||
#define DevCon DevConWriterEnabled&& DevConWriter
|
||||
#endif
|
||||
|
||||
#ifdef PCSX2_DEBUG
|
||||
extern IConsoleWriter DbgConWriter;
|
||||
#ifdef _DEBUG
|
||||
extern ConsoleLogWriter<LOGLEVEL_DEBUG> DbgConWriter;
|
||||
#define DbgCon DbgConWriter
|
||||
#else
|
||||
#define DbgCon 0 && NullCon
|
||||
extern NullLogWriter DbgConWriter;
|
||||
#define DbgCon 0 && DbgConWriter
|
||||
#endif
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#include "Pcsx2Defs.h"
|
||||
#include "CrashHandler.h"
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2022 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
@@ -28,7 +16,7 @@
|
||||
|
||||
#include "common/Pcsx2Types.h"
|
||||
#include "common/Console.h"
|
||||
#include "common/General.h"
|
||||
#include "common/HostSys.h"
|
||||
#include "common/Threading.h"
|
||||
#include "common/WindowInfo.h"
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2023 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#pragma once
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2014 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: LGPL-3.0+
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user