Compare commits
624 Commits
master_202
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
6f6f9a0910 | ||
|
1ba43c726d | ||
|
bed6a4f12f | ||
|
9415de2372 | ||
|
bbe7221e1a | ||
|
9669dd647a | ||
|
455cd56343 | ||
|
68301c05a9 | ||
|
1a24521046 | ||
|
0b32c2792e | ||
|
3e171e2d65 | ||
|
14154d8e78 | ||
|
6d9e652eb0 | ||
|
fceb98a310 | ||
|
164006d8ba | ||
|
8b7055f33e | ||
|
f8dbaa2044 | ||
|
7a044d9586 | ||
|
39c002f6cd | ||
|
c5dd439e53 | ||
|
1acc0884db | ||
|
9ed737b609 | ||
|
84cf87c40d | ||
|
f627440bb3 | ||
|
7928c4b152 | ||
|
5ea0430669 | ||
|
9f143505da | ||
|
5f79f9ed6d | ||
|
0184e1af53 | ||
|
ce6b480bee | ||
|
c029c9fe6c | ||
|
b38ff54af6 | ||
|
a56eba77fb | ||
|
c0942a59c8 | ||
|
cf84342e35 | ||
|
8a31ffaf22 | ||
|
77c8cb23a0 | ||
|
a748c2cc7e | ||
|
ab285bb6bb | ||
|
0507234077 | ||
|
a09d30298e | ||
|
08432346f7 | ||
|
d5e765fa53 | ||
|
428b0910ef | ||
|
337da335d6 | ||
|
6aa9b1c9dc | ||
|
bf02579927 | ||
|
8027b7cfe7 | ||
|
98205a3324 | ||
|
e2689ee93c | ||
|
b55da9bef3 | ||
|
a6a4eb7a7a | ||
|
7fc4de5330 | ||
|
3c40cbf6fb | ||
|
c8345b2cb4 | ||
|
3bc5c81c7f | ||
|
84d295a06d | ||
|
ac686b1be4 | ||
|
8dfd31510b | ||
|
7f9f84f9ea | ||
|
1e34cde400 | ||
|
355312170c | ||
|
b605845090 | ||
|
31fb157ae6 | ||
|
813b6008a2 | ||
|
c4f7e2dc95 | ||
|
a0fd0deab6 | ||
|
9a438c4339 | ||
|
fa3b832998 | ||
|
6b5c730d6f | ||
|
7682c469d4 | ||
|
384c577fee | ||
|
30c9d79a27 | ||
|
0111746fa2 | ||
|
dadd9fcc6f | ||
|
d6ff4b0cf9 | ||
|
b7db81d227 | ||
|
36548d1dd4 | ||
|
07c4e5fc2e | ||
|
082a263cd2 | ||
|
1c450ed5ba | ||
|
f46ee115de | ||
|
e47f713efc | ||
|
730a722308 | ||
|
f013919f28 | ||
|
53d2b678a3 | ||
|
3121e9cebc | ||
|
7f59b74089 | ||
|
995cd31ae6 | ||
|
5a4392f0c5 | ||
|
7504974a6a | ||
|
1a6cad6cac | ||
|
1e3c9e74dc | ||
|
fe1c0f89c5 | ||
|
ba3ca5057f | ||
|
f143ed8fc5 | ||
|
bc4629e1f1 | ||
|
19f245cdbc | ||
|
b9f863b231 | ||
|
3a6923aa61 | ||
|
780bf21134 | ||
|
6317c58897 | ||
|
b6c91905cc | ||
|
2b85a8277d | ||
|
d203ffa6ef | ||
|
ccc9f26338 | ||
|
caa66c1eff | ||
|
be2b64c324 | ||
|
f53f0ff316 | ||
|
b1d0fa6749 | ||
|
55f72465ea | ||
|
70b82efc42 | ||
|
30d4f8014d | ||
|
8055a423fa | ||
|
089a665b1e | ||
|
0cc0e9e746 | ||
|
baa12c851b | ||
|
5f898fb2d2 | ||
|
2db8e2ed37 | ||
|
d06f7b826b | ||
|
9b60a92ebe | ||
|
36433590df | ||
|
6c1b948805 | ||
|
7b12acdcd1 | ||
|
0e0e12702a | ||
|
3f7ed24686 | ||
|
39a49aa78c | ||
|
3edf1f8f18 | ||
|
f6c51f80a3 | ||
|
e7c4046aca | ||
|
8cf4a70a68 | ||
|
0ae7ae8ced | ||
|
e5041e011a | ||
|
04baf9abd6 | ||
|
3a700afe5c | ||
|
48af8cba34 | ||
|
55f1300d59 | ||
|
ba87e97761 | ||
|
645076a715 | ||
|
603845d460 | ||
|
6c973067ac | ||
|
e42469acf8 | ||
|
01a74a9fc5 | ||
|
380f5bc77f | ||
|
fb60eeccf1 | ||
|
ea7cfc4483 | ||
|
af3276176e | ||
|
d984ce421a | ||
|
2831a4ab37 | ||
|
e2162c6168 | ||
|
26122505c4 | ||
|
9429e2a854 | ||
|
2868ba6998 | ||
|
d93eb52a1e | ||
|
77ab3ef290 | ||
|
5cfc37470e | ||
|
1a659ae4b6 | ||
|
be539cb115 | ||
|
eaacd20bd9 | ||
|
2c4c83533b | ||
|
9f147be995 | ||
|
0d5c0ff075 | ||
|
2c95987fbf | ||
|
da71226961 | ||
|
e2142b7461 | ||
|
293c037386 | ||
|
67baf8e4b6 | ||
|
ce86ae9c9c | ||
|
751c3a22b7 | ||
|
fa8fd3c9d5 | ||
|
9857801675 | ||
|
6f22277c2f | ||
|
12bc8cab14 | ||
|
f20aa01e70 | ||
|
93518fbe7d | ||
|
6d8fe91686 | ||
|
7bd24c73f5 | ||
|
242e3022d1 | ||
|
fed4c804fe | ||
|
2f0914c392 | ||
|
e932eb4dc2 | ||
|
1e9d18d024 | ||
|
db09b31479 | ||
|
296fd21b6a | ||
|
844e609f87 | ||
|
93f0757b25 | ||
|
a726715a93 | ||
|
e6d5591eef | ||
|
d2f0aae455 | ||
|
7179268c6a | ||
|
acfb45f091 | ||
|
4707d92831 | ||
|
43b03ff53d | ||
|
3f8c1febfc | ||
|
988e4dac67 | ||
|
783b9b0a7f | ||
|
1d9272fe99 | ||
|
c343263997 | ||
|
b6529e2759 | ||
|
2f763bb77c | ||
|
5eec390e6f | ||
|
e19ce5ac73 | ||
|
63b3e8757c | ||
|
5b1c4fe125 | ||
|
f6312a22e4 | ||
|
c95c064ae4 | ||
|
433c741bb8 | ||
|
68e390941e | ||
|
b1bedc6a8b | ||
|
9bd0f6ae56 | ||
|
f054b4de23 | ||
|
e9d69d1ac9 | ||
|
6c2a6d7e05 | ||
|
7968deb7b7 | ||
|
b63e84f70b | ||
|
b0a6bab618 | ||
|
be1b9da7ee | ||
|
d1065d066f | ||
|
24733e45d1 | ||
|
ccfd60ea91 | ||
|
37728bb9ab | ||
|
f6d77090b5 | ||
|
0ff5fdcda1 | ||
|
42c5729f5c | ||
|
b1e78a2f4e | ||
|
9442b74961 | ||
|
24087ad937 | ||
|
0282c5ff18 | ||
|
e4571be98b | ||
|
562d7a5170 | ||
|
5b3e5de381 | ||
|
e4c31b27bd | ||
|
dbf4b070aa | ||
|
d6e25e86b7 | ||
|
523c909fde | ||
|
37787added | ||
|
d2dc0910c6 | ||
|
691f19b806 | ||
|
b5bd173b6a | ||
|
376fc0e9b9 | ||
|
953087d19c | ||
|
6750f929db | ||
|
e266309d01 | ||
|
d51c68b089 | ||
|
e0e91d45ac | ||
|
f64f11f595 | ||
|
a0c7666afa | ||
|
68eb56d83b | ||
|
b5550c3c6c | ||
|
6b6bbba169 | ||
|
d7f67e3b33 | ||
|
b2b2a007be | ||
|
a0455900ba | ||
|
089faaf26c | ||
|
3b4ddcf2a3 | ||
|
90e5a6e34e | ||
|
3fb7defe07 | ||
|
f3db8d2aee | ||
|
8b2d9a4ee8 | ||
|
185332cb27 | ||
|
35b11971a6 | ||
|
7466fa270d | ||
|
27e6acac96 | ||
|
9ebe7c318b | ||
|
eb3270e8d6 | ||
|
5b67c9c17c | ||
|
a6509d465c | ||
|
3e96783918 | ||
|
4acacc74cf | ||
|
dff524aca8 | ||
|
075585c6f8 | ||
|
c64a90f015 | ||
|
1ba77cd276 | ||
|
fc24a8bb94 | ||
|
8ecd73bb5b | ||
|
9d5dafe811 | ||
|
4a7d733f90 | ||
|
2a690a3064 | ||
|
efeed943d8 | ||
|
f4fa4e8d15 | ||
|
ac97f0aeb8 | ||
|
aa42eedc41 | ||
|
3659fe923c | ||
|
4af54e1e0c | ||
|
2fdfa12d45 | ||
|
eff3b033fc | ||
|
67d0ccfc0d | ||
|
329bc311a5 | ||
|
e01f2ee73d | ||
|
83c7a97dee | ||
|
3628fdd735 | ||
|
241b4a2eb7 | ||
|
e2c2d28290 | ||
|
5ce7aae1f7 | ||
|
ded451bc9d | ||
|
6857bc32a8 | ||
|
8cc2f340e5 | ||
|
01b78f9d8d | ||
|
04ee044418 | ||
|
32dba15d34 | ||
|
1a28e90a72 | ||
|
8295234ab7 | ||
|
d7e037ff2e | ||
|
6b92be6df5 | ||
|
0584931a28 | ||
|
17e6080e1b | ||
|
1c12ed99fc | ||
|
60e8f9a574 | ||
|
7fe84b8447 | ||
|
4fb8d4a882 | ||
|
ead2d23473 | ||
|
47ee116db4 | ||
|
38ef3bb184 | ||
|
b70b16b65d | ||
|
643b8ab2c5 | ||
|
e24022bb07 | ||
|
6eb247fb96 | ||
|
2471198523 | ||
|
b5825fe96e | ||
|
8525cd0198 | ||
|
1dd78cd1e9 | ||
|
2503527ccc | ||
|
eed922c5a6 | ||
|
1766e239d0 | ||
|
690e2ec2e5 | ||
|
431799ab8f | ||
|
dbd494d62b | ||
|
27b89a6083 | ||
|
b68153fe28 | ||
|
822c5b1ab5 | ||
|
1bd3f19807 | ||
|
231517d3b6 | ||
|
cd5e760d98 | ||
|
5c723b19a1 | ||
|
9d2ac5f5a8 | ||
|
8ea56b4c1d | ||
|
c034844da4 | ||
|
76ba97c552 | ||
|
1500e566c6 | ||
|
9ad53436e8 | ||
|
8dabd94c02 | ||
|
0377f77973 | ||
|
1122821d9c | ||
|
57b332151f | ||
|
1c795b70fd | ||
|
a745f61bfe | ||
|
b617d60f1e | ||
|
b7df79a3e0 | ||
|
e30d9034a5 | ||
|
af47702d0c | ||
|
634b6e1156 | ||
|
95e47fc144 | ||
|
6f02d2d160 | ||
|
a04d5b7b9c | ||
|
fc49a1bad6 | ||
|
6ad8a5ca32 | ||
|
114cd5d1b6 | ||
|
7ea3800d94 | ||
|
946922c522 | ||
|
fb220b9198 | ||
|
367d5457af | ||
|
8053bd3a01 | ||
|
e0d05c32ab | ||
|
85f7ad6240 | ||
|
37d7152a7e | ||
|
2dafa2fd4d | ||
|
949fc9f5fc | ||
|
f5c450cc39 | ||
|
1f1db90303 | ||
|
e1c0dc276c | ||
|
34a7b96de9 | ||
|
01f23fdef9 | ||
|
c38345faf2 | ||
|
6422a7ae49 | ||
|
2bd02dda98 | ||
|
bb2a9e63b0 | ||
|
50aafb78c2 | ||
|
850b18f048 | ||
|
0b3e71a32c | ||
|
95cd4417b0 | ||
|
14f55ac742 | ||
|
03929d8cff | ||
|
7d49c5ca05 | ||
|
af2e78520f | ||
|
84e0372b36 | ||
|
ff04924c5d | ||
|
78b8dfc808 | ||
|
71b8ddb8a9 | ||
|
33e5d16c89 | ||
|
b9d7181a63 | ||
|
8981ca983f | ||
|
b72e60a47f | ||
|
95529a8b1d | ||
|
d21b8fb1b1 | ||
|
7f20d8bb88 | ||
|
3be52f818a | ||
|
49c0766b73 | ||
|
b660adea0f | ||
|
a2f9fef97e | ||
|
3fb1988b5b | ||
|
981ffb5090 | ||
|
b3cab3c450 | ||
|
f8eb4b7edc | ||
|
8e3c7674d8 | ||
|
c2d36cde9f | ||
|
e6c479f497 | ||
|
5c58620618 | ||
|
7806206e90 | ||
|
2ddecf35d2 | ||
|
5776bdda82 | ||
|
ff56fdf37d | ||
|
e770fd6e95 | ||
|
8290423d16 | ||
|
2e3834f880 | ||
|
00c798991c | ||
|
611b186a97 | ||
|
6b2e7b77cc | ||
|
e2adb51494 | ||
|
a1d6396a90 | ||
|
a131f9eb74 | ||
|
2461f67a98 | ||
|
fa67789dcd | ||
|
2539215f18 | ||
|
85e9ba897d | ||
|
935e88a580 | ||
|
75f9c2cc13 | ||
|
8df502a688 | ||
|
8d2e28cf76 | ||
|
aeba818634 | ||
|
7c6d7905a4 | ||
|
e33677b021 | ||
|
9c08409e0e | ||
|
045d20e076 | ||
|
a841ce6451 | ||
|
50eb634583 | ||
|
0e534f7e61 | ||
|
c1d7ba4d60 | ||
|
251b265777 | ||
|
755393da90 | ||
|
1653ebaa45 | ||
|
9c76120a13 | ||
|
f00c4a4cf5 | ||
|
1265c37bab | ||
|
a6fbc1c9e3 | ||
|
ce16653cc8 | ||
|
6876f1aaa4 | ||
|
6f2bbbcced | ||
|
c38f7b4fa6 | ||
|
b4a6763484 | ||
|
8a67605450 | ||
|
5f1eb7146d | ||
|
e6ef00b41d | ||
|
820c288236 | ||
|
ab6c605e59 | ||
|
fb49ce462f | ||
|
987f910a86 | ||
|
39e0644993 | ||
|
3c1211e9fe | ||
|
26e8b755f0 | ||
|
b3915c23a0 | ||
|
dbd6b8adc3 | ||
|
da908a9ed1 | ||
|
94013c8e00 | ||
|
94d1f695ee | ||
|
54a95e9c58 | ||
|
20139141f7 | ||
|
fdf0825369 | ||
|
3f13e1cc24 | ||
|
f0e3637c7a | ||
|
702af87f0d | ||
|
c557b290af | ||
|
4888a14c12 | ||
|
c37dc23481 | ||
|
6f45b402e7 | ||
|
664f5da105 | ||
|
36780040a6 | ||
|
2f5eec3576 | ||
|
7ae0fc7338 | ||
|
8f0aebcd4f | ||
|
a13a230511 | ||
|
21fb9d63f4 | ||
|
182ffa4243 | ||
|
3fa12d43f5 | ||
|
4f058c04e8 | ||
|
2d972f91b2 | ||
|
0c9e7735f6 | ||
|
4efeace8ee | ||
|
1aaec7938f | ||
|
02d6032afb | ||
|
3115529be7 | ||
|
6772e46153 | ||
|
7a8d576164 | ||
|
a89261d397 | ||
|
eca33d2de8 | ||
|
23b67849d5 | ||
|
de3d7cf49f | ||
|
80c9f9abbb | ||
|
8b82a228f0 | ||
|
5055212063 | ||
|
5683f86ed3 | ||
|
d870651df7 | ||
|
c4ac36b9b2 | ||
|
03c002ee2a | ||
|
bf03fb83ae | ||
|
045efe8268 | ||
|
0133ebe0bc | ||
|
8f7ac4d8cc | ||
|
f2ccc8482f | ||
|
2e0ce86c9e | ||
|
652a87f210 | ||
|
33d233fffa | ||
|
1efe80bd10 | ||
|
a4f57e6910 | ||
|
1bb20571b1 | ||
|
1c8461fdea | ||
|
e12ee55faa | ||
|
51d348b087 | ||
|
aced133a3d | ||
|
1032b60d9b | ||
|
ff9c3b0531 | ||
|
a26b466ac8 | ||
|
faf9162dbd | ||
|
860ccf2a41 | ||
|
a576eb633f | ||
|
017631e51b | ||
|
df9e230d63 | ||
|
df83449d21 | ||
|
84c42bf581 | ||
|
1128f5f8ee | ||
|
e97ecdc2b8 | ||
|
316a64961c | ||
|
2ba35cab73 | ||
|
6a77547bde | ||
|
66846836bc | ||
|
2f01046f77 | ||
|
a39e0ea3b1 | ||
|
5d4a3a2d46 | ||
|
f4be733355 | ||
|
f6b543886c | ||
|
e48110bdf4 | ||
|
4135a12cb5 | ||
|
08e508e846 | ||
|
a5fd11c213 | ||
|
1255d82b67 | ||
|
855dc9f0fc | ||
|
88c0288cb1 | ||
|
550cc859b5 | ||
|
69f4aacccf | ||
|
f2d26eb73b | ||
|
2a676858be | ||
|
1e2e9e555a | ||
|
8d6927dc4c | ||
|
41f42d8df3 | ||
|
0ca0aad946 | ||
|
8164e58eab | ||
|
9a6fb16c06 | ||
|
07d2daf2f9 | ||
|
3d9d071262 | ||
|
08e4614817 | ||
|
683fb833f2 | ||
|
7bcfff4e71 | ||
|
a6efc7c1ee | ||
|
21d7c4faa8 | ||
|
9d99755d4f | ||
|
9c2986de41 | ||
|
9394724902 | ||
|
1d5d278f8d | ||
|
09ebfebc91 | ||
|
8f05bb780a | ||
|
f72be7af2d | ||
|
52470d5f60 | ||
|
57da84ba63 | ||
|
b94f21eacd | ||
|
b4ec50ba21 | ||
|
c3673ac9cd | ||
|
967f6500cf | ||
|
a34888804b | ||
|
08f3fdfaec | ||
|
7c578b0579 | ||
|
d88d22080d | ||
|
f6ced5def0 | ||
|
1722701c07 | ||
|
897e473da4 | ||
|
a83f819160 | ||
|
88edf9d62c | ||
|
97d1430ee5 | ||
|
96fa75fb93 | ||
|
f4e727cc19 | ||
|
60282f35fe | ||
|
bd7ee8c315 | ||
|
835efd321e | ||
|
add0deb3c5 | ||
|
910cc9efc1 | ||
|
265b0aa444 | ||
|
662c348b6c | ||
|
ea2584c54d | ||
|
cae4b7aaf7 | ||
|
c4a4b40b2d | ||
|
e79de3107e | ||
|
7444c95132 | ||
|
372c653ec3 | ||
|
485d64ae73 | ||
|
6d65319c85 | ||
|
3090f840a8 | ||
|
8a080146c9 | ||
|
cb44e4408d | ||
|
902cc1eb49 | ||
|
353780e1c9 | ||
|
b80c6f7534 | ||
|
d04071d6b3 | ||
|
31cb3d7a44 | ||
|
8ce81b19be | ||
|
f7aaa37bf2 | ||
|
1504018a56 | ||
|
2b031e4eaf | ||
|
11792682fb | ||
|
e79e991681 | ||
|
9645c1e1b2 | ||
|
01b9302a28 | ||
|
fbf24e3ca4 | ||
|
950c032837 | ||
|
841522f59c | ||
|
bf1166d0ee | ||
|
1f375f2511 |
@ -1,39 +0,0 @@
|
||||
# Set-up Visual Studio Command Prompt environment for PowerShell
|
||||
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\"
|
||||
cmd /c "VsDevCmd.bat -arch=x64 & set" | foreach {
|
||||
if ($_ -match "=") {
|
||||
$v = $_.split("="); Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])"
|
||||
}
|
||||
}
|
||||
popd
|
||||
|
||||
function Which ($search_path, $name) {
|
||||
($search_path).Split(";") | Get-ChildItem -Filter $name | Select -First 1 -Exp FullName
|
||||
}
|
||||
|
||||
function GetDeps ($search_path, $binary) {
|
||||
((dumpbin /dependents $binary).Where({ $_ -match "dependencies:"}, "SkipUntil") | Select-String "[^ ]*\.dll").Matches | foreach {
|
||||
Which $search_path $_.Value
|
||||
}
|
||||
}
|
||||
|
||||
function RecursivelyGetDeps ($search_path, $binary) {
|
||||
$final_deps = @()
|
||||
$deps_to_process = GetDeps $search_path $binary
|
||||
while ($deps_to_process.Count -gt 0) {
|
||||
$current, $deps_to_process = $deps_to_process
|
||||
if ($final_deps -contains $current) { continue }
|
||||
|
||||
# Is this a system dll file?
|
||||
# We use the same algorithm that cmake uses to determine this.
|
||||
if ($current -match "$([regex]::Escape($env:SystemRoot))\\sys") { continue }
|
||||
if ($current -match "$([regex]::Escape($env:WinDir))\\sys") { continue }
|
||||
if ($current -match "\\msvc[^\\]+dll") { continue }
|
||||
if ($current -match "\\api-ms-win-[^\\]+dll") { continue }
|
||||
|
||||
$final_deps += $current
|
||||
$new_deps = GetDeps $search_path $current
|
||||
$deps_to_process += ($new_deps | ?{-not ($final_deps -contains $_)})
|
||||
}
|
||||
return $final_deps
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
# Generate pdb files for mingw
|
||||
if ($env:BUILD_TYPE -eq 'mingw') {
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/citra-emu/ext-windows-bin/master/cv2pdb/cv2pdb.exe -OutFile cv2pdb.exe
|
||||
foreach ($exe in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "citra*.exe") {
|
||||
.\cv2pdb $exe.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Specify source locations in pdb via srcsrv.ini
|
||||
$srcsrv = "SRCSRV: ini ------------------------------------------------`r`n"
|
||||
$srcsrv += "VERSION=2`r`n"
|
||||
$srcsrv += "VERCTRL=http`r`n"
|
||||
$srcsrv += "SRCSRV: variables ------------------------------------------`r`n"
|
||||
$srcsrv += "SRCSRVTRG=https://raw.githubusercontent.com/%var2%/%var3%/%var4%`r`n"
|
||||
$srcsrv += "SRCSRV: source files ---------------------------------------`r`n"
|
||||
foreach ($repo in @{
|
||||
"citra-emu/citra" = ""
|
||||
"citra-emu/ext-boost" = "externals/boost"
|
||||
"citra-emu/ext-soundtouch" = "externals/soundtouch"
|
||||
"fmtlib/fmt" = "externals/fmt"
|
||||
"herumi/xbyak" = "externals/xbyak"
|
||||
"lsalzman/enet" = "externals/enet"
|
||||
"MerryMage/dynarmic" = "externals/dynarmic"
|
||||
"neobrain/nihstro" = "externals/nihstro"
|
||||
}.GetEnumerator()) {
|
||||
pushd
|
||||
cd $repo.Value
|
||||
$rev = git rev-parse HEAD
|
||||
$files = git ls-tree --name-only --full-tree -r HEAD
|
||||
foreach ($file in $files) {
|
||||
$srcsrv += "$(pwd)\$($file -replace '/','\')*$($repo.Name)*$rev*$file`r`n"
|
||||
}
|
||||
popd
|
||||
}
|
||||
$srcsrv += "SRCSRV: end ------------------------------------------------`r`n"
|
||||
Set-Content -Path srcsrv.ini -Value $srcsrv
|
||||
foreach ($pdb in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "*.pdb") {
|
||||
& "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:srcsrv.ini -p:$pdb.FullName -s:srcsrv
|
||||
}
|
@ -10,11 +10,11 @@ cp -r dist/scripting "$REV_NAME"
|
||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
||||
|
||||
# Find out what release we are building
|
||||
if [ -z $TRAVIS_TAG ]; then
|
||||
if [ -z $GIT_TAG_NAME ]; then
|
||||
RELEASE_NAME=head
|
||||
else
|
||||
RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
|
||||
if [ "$NAME" = "MinGW build" ]; then
|
||||
RELEASE_NAME=$(echo $GIT_TAG_NAME | cut -d- -f1)
|
||||
if [ "$NAME" = "linux-mingw" ]; then
|
||||
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
||||
fi
|
||||
fi
|
4
.ci/linux-clang-format/docker.sh
Executable file
4
.ci/linux-clang-format/docker.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# Run clang-format
|
||||
./.ci/linux-clang-format/script.sh
|
@ -1,13 +1,13 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .travis* dist/*.desktop \
|
||||
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop \
|
||||
dist/*.svg dist/*.xml; then
|
||||
echo Trailing whitespace found, aborting
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Default clang-format points to default 3.5 version one
|
||||
CLANG_FORMAT=clang-format-6.0
|
||||
CLANG_FORMAT=clang-format-10
|
||||
$CLANG_FORMAT --version
|
||||
|
||||
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
|
@ -87,7 +87,8 @@ cat > /tmp/org.citra.$REPO_NAME.json <<EOF
|
||||
"-DENABLE_QT_TRANSLATION=ON",
|
||||
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
|
||||
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
|
||||
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
|
||||
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON",
|
||||
"-DENABLE_FDK=ON"
|
||||
],
|
||||
"cleanup": [
|
||||
"/bin/citra",
|
@ -1,7 +1,5 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
cd /citra
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
|
||||
ninja
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .travis/common/pre-upload.sh
|
||||
. .ci/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
@ -8,12 +8,12 @@ COMPRESSION_FLAGS="-cJvf"
|
||||
|
||||
mkdir "$REV_NAME"
|
||||
|
||||
cp build/bin/citra "$REV_NAME"
|
||||
cp build/bin/citra-room "$REV_NAME"
|
||||
cp build/bin/citra-qt "$REV_NAME"
|
||||
cp build/bin/Release/citra "$REV_NAME"
|
||||
cp build/bin/Release/citra-room "$REV_NAME"
|
||||
cp build/bin/Release/citra-qt "$REV_NAME"
|
||||
|
||||
# We need icons on Linux for .desktop entries
|
||||
mkdir "$REV_NAME/dist"
|
||||
cp dist/icon.png "$REV_NAME/dist/citra.png"
|
||||
|
||||
. .travis/common/post-upload.sh
|
||||
. .ci/common/post-upload.sh
|
@ -7,7 +7,6 @@ chmod a+x ~/bin/gold/ld
|
||||
export CFLAGS="-B$HOME/bin/gold $CFLAGS"
|
||||
export CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS"
|
||||
|
||||
cd /citra
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
cd /citra
|
||||
# override Travis CI unreasonable ccache size
|
||||
# override CI ccache size
|
||||
mkdir -p "$HOME/.ccache/"
|
||||
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
|
||||
|
||||
mkdir build && cd build
|
||||
@ -27,4 +27,4 @@ cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
|
||||
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
|
||||
rm -f package/mediaservice/*d.dll
|
||||
|
||||
python3 .travis/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
|
||||
python3 .ci/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
|
@ -1,4 +1,7 @@
|
||||
import pefile
|
||||
try:
|
||||
import lief
|
||||
except ImportError:
|
||||
import pefile
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
@ -13,13 +16,26 @@ KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
|
||||
DLL_PATH = [
|
||||
'/usr/x86_64-w64-mingw32/bin/',
|
||||
'/usr/x86_64-w64-mingw32/lib/',
|
||||
'/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
|
||||
'/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/'
|
||||
]
|
||||
|
||||
missing = []
|
||||
|
||||
|
||||
def parse_imports_lief(filename):
|
||||
results = []
|
||||
pe = lief.parse(filename)
|
||||
for entry in pe.imports:
|
||||
name = entry.name
|
||||
if name.upper() not in KNOWN_SYS_DLLS and not re.match(string=name, pattern=r'.*32\.DLL'):
|
||||
results.append(name)
|
||||
return results
|
||||
|
||||
|
||||
def parse_imports(file_name):
|
||||
if globals().get('lief'):
|
||||
return parse_imports_lief(file_name)
|
||||
|
||||
results = []
|
||||
pe = pefile.PE(file_name, fast_load=True)
|
||||
pe.parse_data_directories()
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .travis/common/pre-upload.sh
|
||||
. .ci/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||
@ -10,4 +10,4 @@ mkdir "$REV_NAME"
|
||||
# get around the permission issues
|
||||
cp -r package/* "$REV_NAME"
|
||||
|
||||
. .travis/common/post-upload.sh
|
||||
. .ci/common/post-upload.sh
|
@ -2,12 +2,23 @@
|
||||
|
||||
set -o pipefail
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||
export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH"
|
||||
# ccache configurations
|
||||
export CCACHE_CPP2=yes
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
|
||||
export CC="ccache clang"
|
||||
export CXX="ccache clang++"
|
||||
export LDFLAGS="-L/usr/local/opt/llvm/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/llvm/include"
|
||||
|
||||
ccache -s
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
|
||||
make -j4
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON -GNinja
|
||||
ninja
|
||||
|
||||
ccache -s
|
||||
|
||||
ctest -VV -C Release
|
7
.ci/macos/deps.sh
Executable file
7
.ci/macos/deps.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
brew update
|
||||
brew unlink python@2 || true
|
||||
rm '/usr/local/bin/2to3' || true
|
||||
brew install qt5 sdl2 p7zip ccache ffmpeg llvm ninja || true
|
||||
pip3 install macpack
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .travis/common/pre-upload.sh
|
||||
. .ci/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||
@ -8,9 +8,9 @@ COMPRESSION_FLAGS="-czvf"
|
||||
|
||||
mkdir "$REV_NAME"
|
||||
|
||||
cp build/bin/citra "$REV_NAME"
|
||||
cp -r build/bin/citra-qt.app "$REV_NAME"
|
||||
cp build/bin/citra-room "$REV_NAME"
|
||||
cp build/bin/Release/citra "$REV_NAME"
|
||||
cp -r build/bin/Release/citra-qt.app "$REV_NAME"
|
||||
cp build/bin/Release/citra-room "$REV_NAME"
|
||||
|
||||
# move libs into folder for deployment
|
||||
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
|
||||
@ -20,10 +20,14 @@ $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable=
|
||||
# move libs into folder for deployment
|
||||
macpack "${REV_NAME}/citra" -d "libs"
|
||||
|
||||
# workaround for libc++
|
||||
install_name_tool -change @loader_path/../Frameworks/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
|
||||
install_name_tool -change @loader_path/libs/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra"
|
||||
|
||||
# Make the launching script executable
|
||||
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
|
||||
|
||||
# Verify loader instructions
|
||||
find "$REV_NAME" -exec otool -L {} \;
|
||||
find "$REV_NAME" -type f -exec otool -L {} \;
|
||||
|
||||
. .travis/common/post-upload.sh
|
||||
. .ci/common/post-upload.sh
|
1
.travis/transifex/docker.sh → .ci/transifex/docker.sh
Normal file → Executable file
1
.travis/transifex/docker.sh → .ci/transifex/docker.sh
Normal file → Executable file
@ -30,7 +30,6 @@ cmake --version
|
||||
gcc -v
|
||||
tx --version
|
||||
|
||||
cd /citra
|
||||
mkdir build && cd build
|
||||
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
|
||||
make translation
|
10
.ci/windows-msvc/build.sh
Normal file
10
.ci/windows-msvc/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
|
||||
|
||||
ninja
|
||||
# show the caching efficiency
|
||||
buildcache -s
|
||||
|
||||
ctest -VV -C Release || echo "::error ::Test error occurred on Windows MSVC build"
|
10
.ci/windows-msvc/deps.sh
Normal file
10
.ci/windows-msvc/deps.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
BUILDCACHE_VERSION="0.22.3"
|
||||
|
||||
choco install wget ninja
|
||||
# Install buildcache
|
||||
wget "https://github.com/mbitsnbites/buildcache/releases/download/v${BUILDCACHE_VERSION}/buildcache-win-mingw.zip"
|
||||
7z x 'buildcache-win-mingw.zip'
|
||||
mv ./buildcache/bin/buildcache.exe "/c/ProgramData/chocolatey/bin"
|
||||
rm -rf ./buildcache/
|
@ -1,3 +1,12 @@
|
||||
---
|
||||
name: Bug Report / Feature Request
|
||||
about: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with Citra or you are requesting a feature you believe would make Citra better.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!---
|
||||
|
||||
Please read the FAQ:
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Citra Discord
|
||||
url: https://citra-emu.org/discord/
|
||||
about: If you are experiencing an issue with Citra, and you need tech support, or if you have a general question, try asking in the official Citra Discord linked here. Piracy is not allowed.
|
||||
- name: Community forums
|
||||
url: https://community.citra-emu.org
|
||||
about: This is an alternative place for tech support, however helpers there are not as active.
|
||||
- name: Citra Android
|
||||
url: https://github.com/citra-emu/citra-android
|
||||
about: If you need tech support on Citra Android, you should use either of the above two options. If you want to file an issue, you should go to the Android repo linked here.
|
134
.github/workflows/ci.yml
vendored
Normal file
134
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,134 @@
|
||||
name: citra-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
tags: [ "*" ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
image: ["linux-clang-format", "linux-fresh", "linux-frozen", "linux-mingw"]
|
||||
container: citraemu/build-environments:${{ matrix.image }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.image }}-
|
||||
- name: Query tag name
|
||||
uses: little-core-labs/get-git-tag@v3.0.2
|
||||
id: tagName
|
||||
- name: Build
|
||||
run: ./.ci/${{ matrix.image }}/docker.sh
|
||||
env:
|
||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||
- name: Pack
|
||||
run: ./.ci/${{ matrix.image }}/upload.sh
|
||||
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
|
||||
env:
|
||||
NAME: ${{ matrix.image }}
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
|
||||
with:
|
||||
name: ${{ matrix.image }}
|
||||
path: artifacts/
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/Library/Caches/ccache
|
||||
key: ${{ runner.os }}-macos-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-macos-
|
||||
- name: Query tag name
|
||||
uses: little-core-labs/get-git-tag@v3.0.2
|
||||
id: tagName
|
||||
- name: Install dependencies
|
||||
run: ./.ci/macos/deps.sh
|
||||
- name: Build
|
||||
run: ./.ci/macos/build.sh
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.13"
|
||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||
- name: Pack
|
||||
run: ./.ci/macos/upload.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: macos
|
||||
path: artifacts/
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.buildcache
|
||||
key: ${{ runner.os }}-win-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-win-
|
||||
- name: Install dependencies
|
||||
run: ./.ci/windows-msvc/deps.sh
|
||||
shell: bash
|
||||
- name: Set up MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Build
|
||||
run: ./.ci/windows-msvc/build.sh
|
||||
shell: bash
|
||||
env:
|
||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||
transifex:
|
||||
runs-on: ubuntu-latest
|
||||
container: citraemu/build-environments:linux-transifex
|
||||
if: ${{ github.repository == 'citra-emu/citra' && !github.head_ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Update Translation
|
||||
run: ./.ci/transifex/docker.sh
|
||||
env:
|
||||
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, macos]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
- name: Query tag name
|
||||
uses: little-core-labs/get-git-tag@v3.0.2
|
||||
id: tagName
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.tagName.outputs.tag }}
|
||||
release_name: ${{ steps.tagName.outputs.tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload artifacts
|
||||
uses: alexellis/upload-assets@0.2.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip"]'
|
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -12,7 +12,7 @@
|
||||
url = https://github.com/philsquared/Catch.git
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://github.com/MerryMage/dynarmic.git
|
||||
url = https://github.com/citra-emu/dynarmic.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
@ -49,3 +49,6 @@
|
||||
[submodule "zstd"]
|
||||
path = externals/zstd
|
||||
url = https://github.com/facebook/zstd.git
|
||||
[submodule "libyuv"]
|
||||
path = externals/libyuv
|
||||
url = https://github.com/lemenkov/libyuv.git
|
||||
|
13
.lgtm.yml
Normal file
13
.lgtm.yml
Normal file
@ -0,0 +1,13 @@
|
||||
path_classifiers:
|
||||
library: "externals"
|
||||
extraction:
|
||||
cpp:
|
||||
prepare:
|
||||
packages:
|
||||
- "libsdl2-dev"
|
||||
- "qtmultimedia5-dev"
|
||||
- "clang-format-6.0"
|
||||
- "libtbb-dev"
|
||||
- "libjack-jackd2-dev"
|
||||
- "doxygen"
|
||||
- "graphviz"
|
87
.travis.yml
87
.travis.yml
@ -1,87 +0,0 @@
|
||||
language: cpp
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: NAME="clang-format"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
install: "./.travis/clang-format/deps.sh"
|
||||
script: "./.travis/clang-format/build.sh"
|
||||
- os: linux
|
||||
env: NAME="linux build"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- p7zip-full
|
||||
install: "./.travis/linux/deps.sh"
|
||||
script: "./.travis/linux/build.sh"
|
||||
after_success: "./.travis/linux/upload.sh"
|
||||
cache: ccache
|
||||
- if: repo = citra-emu/citra AND branch = master AND type = push
|
||||
os: linux
|
||||
env: NAME="transifex push"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
install: "./.travis/transifex/deps.sh"
|
||||
script: "./.travis/transifex/build.sh"
|
||||
- os: osx
|
||||
env: NAME="macos build"
|
||||
sudo: false
|
||||
osx_image: xcode10.2
|
||||
install: "./.travis/macos/deps.sh"
|
||||
script: "./.travis/macos/build.sh"
|
||||
after_success: "./.travis/macos/upload.sh"
|
||||
cache: ccache
|
||||
- os: linux
|
||||
env: NAME="linux build (debug, frozen versions of dependencies, no additional CMake flags)"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
cache: ccache
|
||||
install: "./.travis/linux-frozen/deps.sh"
|
||||
script: "./.travis/linux-frozen/build.sh"
|
||||
- os: linux
|
||||
env: NAME="MinGW build"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- p7zip-full
|
||||
install: "./.travis/linux-mingw/deps.sh"
|
||||
script: "./.travis/linux-mingw/build.sh"
|
||||
after_success: "./.travis/linux-mingw/upload.sh"
|
||||
cache: ccache
|
||||
- if: repo =~ ^.*\/(citra-canary|citra-nightly)$ AND tag IS present
|
||||
git:
|
||||
depth: false
|
||||
os: linux
|
||||
env: NAME="flatpak build"
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services: docker
|
||||
cache: ccache
|
||||
install: "./.travis/linux-flatpak/deps.sh"
|
||||
script: "./.travis/linux-flatpak/build.sh"
|
||||
after_script: "./.travis/linux-flatpak/finish.sh"
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: Mck15DIWaJdxDiS3aYVlM9N3G6y8VKUI1rnwII7/iolfm1s94U+tgvbheZDmT7SSbFyaGaYO/E8HrV/uZR9Vvs7ev20sHsTN1u60OTWfDIIyHs9SqjhcGbtq95m9/dMFschOYqTOR+gAs5BsxjuoeAotHdhpQEwvkO2oo5oR0zhGy45gjFnVvtcxT/IfpZBIpVgcK3aLb9zT6ekcJbSiPmEB15iLq3xXd0nFUNtEZdX3D6Veye4n5jB6n72qN8JVoKvPZAwaC2K0pZxpcGJaXDchLsw1q+4eCvdz6UJfUemeQ/uMAmjfeQ3wrzYGXe3nCM3WmX5wosCsB0mw4zYatzl3si6CZ1W+0GkV4Rwlx03dfp7v3EeFhTsXYCaXqhwuLZnWOLUik8t9vaSoFUx4nUIRwfO9kAMUJQSpLuHNO2nT01s3GxvqxzczuLQ9he5nGSi0RRodUzDwek1qUp6I4uV3gRHKz4B07YIc1i2fK88NLXjyQ0uLVZ+7Oq1+kgDp6+N7vvXXZ5qZ17tdaysSbKEE0Y8zsoXw7Rk1tPN19vrCS+TSpomNMyQyne1k+I5iZ/qkxPTLAS5qI6Utc2dL3GJdxWRAEfGNO9AIX3GV/jmmKfdcvwGsCYP8hxqs5vLYfgacw3D8NLf1941lQUwavC17jm9EV9g5G3Pn1Cp516E=
|
||||
file_glob: true
|
||||
file: "artifacts/*"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://api.citra-emu.org/code/travis/notify
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
docker pull citraemu/build-environments:linux-clang-format
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# Run clang-format
|
||||
cd /citra
|
||||
./.travis/clang-format/script.sh
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# Download the docker image that contains flatpak build dependencies
|
||||
docker pull citraemu/build-environments:linux-flatpak
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
sudo apt-get -y install binutils-gold
|
||||
|
||||
docker pull citraemu/build-environments:linux-frozen
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
docker pull citraemu/build-environments:linux-mingw
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
docker pull citraemu/build-environments:linux-fresh
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
brew update
|
||||
brew unlink python@2
|
||||
brew install qt5 sdl2 p7zip ccache ffmpeg
|
||||
pip3 install macpack
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
docker pull citraemu/build-environments:linux-transifex
|
@ -126,7 +126,7 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# set up output paths for executable binaries
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/$<CONFIG>)
|
||||
|
||||
|
||||
# System imported libraries
|
||||
@ -186,7 +186,7 @@ if (ENABLE_QT)
|
||||
set(QT_PREFIX_HINT)
|
||||
endif()
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL Multimedia ${QT_PREFIX_HINT})
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Multimedia ${QT_PREFIX_HINT})
|
||||
|
||||
if (ENABLE_QT_TRANSLATION)
|
||||
find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT})
|
||||
@ -250,7 +250,7 @@ endif()
|
||||
# against all the src files. This should be used before making a pull request.
|
||||
# =======================================================================
|
||||
|
||||
set(CLANG_FORMAT_POSTFIX "-6.0")
|
||||
set(CLANG_FORMAT_POSTFIX "-10")
|
||||
find_program(CLANG_FORMAT
|
||||
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
||||
clang-format
|
||||
@ -261,7 +261,7 @@ if (NOT CLANG_FORMAT)
|
||||
message(STATUS "Clang format not found! Downloading...")
|
||||
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
||||
file(DOWNLOAD
|
||||
https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
https://github.com/citra-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
"${CLANG_FORMAT}" SHOW_PROGRESS
|
||||
STATUS DOWNLOAD_SUCCESS)
|
||||
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
||||
@ -344,7 +344,7 @@ add_subdirectory(externals)
|
||||
|
||||
# Boost
|
||||
if (USE_SYSTEM_BOOST)
|
||||
find_package(Boost 1.70.0 QUIET REQUIRED)
|
||||
find_package(Boost 1.70.0 COMPONENTS serialization REQUIRED)
|
||||
else()
|
||||
add_library(Boost::boost ALIAS boost)
|
||||
add_library(Boost::serialization ALIAS boost_serialization)
|
||||
|
@ -16,7 +16,6 @@ function(copy_citra_Qt5_deps target_dir)
|
||||
icuuc*.dll
|
||||
Qt5Core$<$<CONFIG:Debug>:d>.*
|
||||
Qt5Gui$<$<CONFIG:Debug>:d>.*
|
||||
Qt5OpenGL$<$<CONFIG:Debug>:d>.*
|
||||
Qt5Widgets$<$<CONFIG:Debug>:d>.*
|
||||
Qt5Multimedia$<$<CONFIG:Debug>:d>.*
|
||||
Qt5Network$<$<CONFIG:Debug>:d>.*
|
||||
|
@ -21,9 +21,9 @@ get_timestamp(BUILD_DATE)
|
||||
set(REPO_NAME "")
|
||||
set(BUILD_VERSION "0")
|
||||
if (DEFINED ENV{CI})
|
||||
if (DEFINED ENV{TRAVIS})
|
||||
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
||||
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
||||
if (DEFINED ENV{GITHUB_ACTIONS})
|
||||
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY})
|
||||
set(BUILD_TAG $ENV{GIT_TAG_NAME})
|
||||
elseif(DEFINED ENV{APPVEYOR})
|
||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
||||
|
12
CMakeModules/MSVCCache.cmake
Executable file
12
CMakeModules/MSVCCache.cmake
Executable file
@ -0,0 +1,12 @@
|
||||
# buildcache wrapper
|
||||
OPTION(USE_CCACHE "Use buildcache for compilation" OFF)
|
||||
IF(USE_CCACHE)
|
||||
FIND_PROGRAM(CCACHE buildcache)
|
||||
IF (CCACHE)
|
||||
MESSAGE(STATUS "Using buildcache found in PATH")
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
|
||||
ELSE(CCACHE)
|
||||
MESSAGE(WARNING "USE_CCACHE enabled, but no buildcache executable found")
|
||||
ENDIF(CCACHE)
|
||||
ENDIF(USE_CCACHE)
|
@ -47,7 +47,7 @@ IF(NOT DEFINED ENV{MINGW_DEBUG_INFO})
|
||||
MESSAGE("* WINDRES : ${WINDRES}")
|
||||
MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
|
||||
MESSAGE("* STRIP : ${STRIP}")
|
||||
MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
|
||||
MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
|
||||
MESSAGE("")
|
||||
# So that the debug info only appears once
|
||||
SET(ENV{MINGW_DEBUG_INFO} SHOWN)
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
Citra
|
||||
==============
|
||||
[](https://travis-ci.com/citra-emu/citra)
|
||||
[](https://ci.appveyor.com/project/bunnei/citra)
|
||||
[](https://github.com/citra-emu/citra/actions)
|
||||
[](https://app.bitrise.io/app/4ccd8e5720f0d13b)
|
||||
[](https://discord.gg/FAXfZV9)
|
||||
|
||||
@ -25,7 +24,7 @@ Most of the development happens on GitHub. It's also where [our central reposito
|
||||
|
||||
If you want to contribute please take a look at the [Contributor's Guide](https://github.com/citra-emu/citra/wiki/Contributing) and [Developer Information](https://github.com/citra-emu/citra/wiki/Developer-Information). You should also contact any of the developers in the forum in order to know about the current state of the emulator because the [TODO list](https://docs.google.com/document/d/1SWIop0uBI9IW8VGg97TAtoT_CHNoP42FzYmvG1F4QDA) isn't maintained anymore.
|
||||
|
||||
If you want to contribute to the user interface translation, please checkout [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translation.
|
||||
If you want to contribute to the user interface translation, please check out the [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translations.
|
||||
|
||||
### Building
|
||||
|
||||
|
173
appveyor.yml
173
appveyor.yml
@ -1,173 +0,0 @@
|
||||
# shallow clone
|
||||
clone_depth: 10
|
||||
|
||||
cache:
|
||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||
|
||||
os: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
# Tell msys2 to add mingw64 to the path
|
||||
MSYSTEM: MINGW64
|
||||
# Tell msys2 to inherit the current directory when starting the shell
|
||||
CHERE_INVOKING: 1
|
||||
matrix:
|
||||
- BUILD_TYPE: mingw
|
||||
- BUILD_TYPE: msvc
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
install:
|
||||
- git submodule update --init --recursive
|
||||
- ps: |
|
||||
if ($env:BUILD_TYPE -eq 'mingw') {
|
||||
$dependencies = "mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-ffmpeg"
|
||||
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-SDL2-2.0.12-1-any.pkg.tar.xz"
|
||||
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies"
|
||||
# (HACK) ignore errors
|
||||
0
|
||||
}
|
||||
|
||||
before_build:
|
||||
- mkdir %BUILD_TYPE%_build
|
||||
- cd %BUILD_TYPE%_build
|
||||
- ps: |
|
||||
$COMPAT = if ($env:ENABLE_COMPATIBILITY_REPORTING -eq $null) {0} else {$env:ENABLE_COMPATIBILITY_REPORTING}
|
||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
|
||||
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON .. 2>&1 && exit 0'
|
||||
} else {
|
||||
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON .. 2>&1"
|
||||
}
|
||||
- cd ..
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||
# https://www.appveyor.com/docs/build-phase
|
||||
msbuild msvc_build/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
} else {
|
||||
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -j4 -C mingw_build/ 2>&1'
|
||||
}
|
||||
|
||||
after_build:
|
||||
- ps: |
|
||||
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
||||
$GITREV = $(git show -s --format='%h')
|
||||
|
||||
# Find out which kind of release we are producing by tag name
|
||||
if ($env:APPVEYOR_REPO_TAG_NAME) {
|
||||
$RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-')
|
||||
} else {
|
||||
# There is no repo tag - make assumptions
|
||||
$RELEASE_DIST = "head"
|
||||
}
|
||||
|
||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||
# Where are these spaces coming from? Regardless, let's remove them
|
||||
$MSVC_BUILD_ZIP = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||
$MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||
$MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||
|
||||
# set the build names as env vars so the artifacts can upload them
|
||||
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
|
||||
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
|
||||
$env:BUILD_UPDATE = $MSVC_SEVENZIP
|
||||
|
||||
mkdir $RELEASE_DIST
|
||||
Copy-Item .\msvc_build\bin\release\* -Destination $RELEASE_DIST -Recurse
|
||||
Copy-Item .\license.txt -Destination $RELEASE_DIST
|
||||
Copy-Item .\README.md -Destination $RELEASE_DIST
|
||||
|
||||
# process PDBs
|
||||
. "./.appveyor/ProcessPdb.ps1"
|
||||
7z a -tzip $MSVC_BUILD_PDB $RELEASE_DIST\*.pdb
|
||||
rm $RELEASE_DIST\*.pdb
|
||||
|
||||
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
||||
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
||||
} else {
|
||||
$MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||
$MINGW_BUILD_PDB = "citra-windows-mingw-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||
$MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||
|
||||
# store the build information in env vars so we can use them as artifacts
|
||||
$env:BUILD_ZIP = $MINGW_BUILD_ZIP
|
||||
$env:BUILD_SYMBOLS = $MINGW_BUILD_PDB
|
||||
$env:BUILD_UPDATE = $MINGW_SEVENZIP
|
||||
|
||||
$CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
|
||||
$CMAKE_BINARY_DIR = "$CMAKE_SOURCE_DIR/mingw_build"
|
||||
$RELEASE_DIST = $RELEASE_DIST + "-mingw"
|
||||
|
||||
mkdir $RELEASE_DIST
|
||||
mkdir $RELEASE_DIST/platforms
|
||||
mkdir $RELEASE_DIST/mediaservice
|
||||
mkdir $RELEASE_DIST/styles
|
||||
mkdir $RELEASE_DIST/imageformats
|
||||
|
||||
# copy the compiled binaries and other release files to the release folder
|
||||
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "citra*.exe" | Copy-Item -destination $RELEASE_DIST
|
||||
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
|
||||
Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
|
||||
|
||||
# copy the qt windows plugin dll to platforms
|
||||
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/platforms/qwindows.dll" -force -destination "$RELEASE_DIST/platforms"
|
||||
|
||||
# copy the qt mediaservice plugin dll
|
||||
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/mediaservice/dsengine.dll" -force -destination "$RELEASE_DIST/mediaservice"
|
||||
|
||||
# copy the qt windows vista style dll to platforms
|
||||
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/styles/qwindowsvistastyle.dll" -force -destination "$RELEASE_DIST/styles"
|
||||
|
||||
# copy the qt imageformats plugin dlls to imageformats
|
||||
Get-ChildItem "C:/msys64/mingw64/share/qt5/plugins/imageformats" -Exclude "*d.dll" | Copy-Item -force -destination "$RELEASE_DIST/imageformats"
|
||||
|
||||
# copy all the dll dependencies to the release folder
|
||||
. "./.appveyor/FindDependencies.ps1"
|
||||
$DLLSearchPath = "C:\msys64\mingw64\bin;$env:PATH"
|
||||
$MingwDLLs = RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra.exe"
|
||||
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra-qt.exe"
|
||||
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\imageformats\qjpeg.dll"
|
||||
Write-Host "Detected the following dependencies:"
|
||||
Write-Host $MingwDLLs
|
||||
foreach ($file in $MingwDLLs) {
|
||||
Copy-Item -path "$file" -force -destination "$RELEASE_DIST"
|
||||
}
|
||||
|
||||
# process PDBs
|
||||
. "./.appveyor/ProcessPdb.ps1"
|
||||
7z a -tzip $MINGW_BUILD_PDB $RELEASE_DIST\*.pdb
|
||||
rm $RELEASE_DIST\*.pdb
|
||||
|
||||
7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
|
||||
7z a $MINGW_SEVENZIP $RELEASE_DIST
|
||||
}
|
||||
|
||||
test_script:
|
||||
- cd %BUILD_TYPE%_build
|
||||
- ps: |
|
||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||
ctest -VV -C Release
|
||||
} else {
|
||||
C:\msys64\usr\bin\bash.exe -lc "ctest -VV -C Release"
|
||||
}
|
||||
- cd ..
|
||||
|
||||
artifacts:
|
||||
- path: $(BUILD_ZIP)
|
||||
name: build
|
||||
type: zip
|
||||
- path: $(BUILD_SYMBOLS)
|
||||
name: debugsymbols
|
||||
- path: $(BUILD_UPDATE)
|
||||
name: update
|
||||
|
||||
notifications:
|
||||
- provider: Webhook
|
||||
url: https://api.citra-emu.org/code/appveyor/notify
|
32
bitrise.yml
32
bitrise.yml
@ -42,8 +42,8 @@ workflows:
|
||||
|
||||
The next change in your repository that matches any of your trigger map event will start **deploy** workflow.
|
||||
steps:
|
||||
- cache-pull@2.0.1: {}
|
||||
- script@1.1.5:
|
||||
- cache-pull@2.4.0: {}
|
||||
- script@1.1.6:
|
||||
title: Install newer cmake
|
||||
inputs:
|
||||
- content: |-
|
||||
@ -52,7 +52,7 @@ workflows:
|
||||
sudo apt remove cmake -y
|
||||
sudo apt purge --auto-remove cmake -y
|
||||
sudo apt install ninja-build -y
|
||||
version=3.10
|
||||
version=3.19
|
||||
build=2
|
||||
mkdir ~/temp
|
||||
cd ~/temp
|
||||
@ -60,13 +60,13 @@ workflows:
|
||||
sudo mkdir /opt/cmake
|
||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
||||
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||
- install-missing-android-tools@2.3.3:
|
||||
- install-missing-android-tools@2.3.8:
|
||||
inputs:
|
||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||
- change-android-versioncode-and-versionname@1.1.1:
|
||||
inputs:
|
||||
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
|
||||
- android-lint@0.9.5:
|
||||
- android-lint@0.9.8:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
@ -76,19 +76,19 @@ workflows:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$TEST_VARIANT"
|
||||
- android-build@0.9.5:
|
||||
- android-build@0.10.3:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$BUILD_VARIANT"
|
||||
- sign-apk@1.2.3:
|
||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
||||
- deploy-to-bitrise-io@1.3.18: {}
|
||||
- cache-push@2.0.5: {}
|
||||
- deploy-to-bitrise-io@1.11.1: {}
|
||||
- cache-push@2.4.1: {}
|
||||
primary:
|
||||
steps:
|
||||
- cache-pull@2.0.1: {}
|
||||
- script@1.1.5:
|
||||
- cache-pull@2.4.0: {}
|
||||
- script@1.1.6:
|
||||
title: Install newer cmake
|
||||
inputs:
|
||||
- content: |-
|
||||
@ -97,7 +97,7 @@ workflows:
|
||||
sudo apt remove cmake -y
|
||||
sudo apt purge --auto-remove cmake -y
|
||||
sudo apt install ninja-build -y
|
||||
version=3.10
|
||||
version=3.19
|
||||
build=2
|
||||
mkdir ~/temp
|
||||
cd ~/temp
|
||||
@ -105,20 +105,20 @@ workflows:
|
||||
sudo mkdir /opt/cmake
|
||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
||||
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||
- install-missing-android-tools@2.3.3:
|
||||
- install-missing-android-tools@2.3.8:
|
||||
inputs:
|
||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||
- android-lint@0.9.5:
|
||||
- android-lint@0.9.8:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$TEST_VARIANT"
|
||||
- android-build@0.9.5:
|
||||
- android-build@0.10.3:
|
||||
inputs:
|
||||
- variant: Debug
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- deploy-to-bitrise-io@1.3.18: {}
|
||||
- cache-push@2.0.5: {}
|
||||
- deploy-to-bitrise-io@1.11.1: {}
|
||||
- cache-push@2.4.1: {}
|
||||
app:
|
||||
envs:
|
||||
- opts:
|
||||
|
80
dist/citra.manifest
vendored
80
dist/citra.manifest
vendored
@ -1,24 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
<assembly manifestVersion="1.0"
|
||||
xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings>
|
||||
<!-- Windows 7/8/8.1/10 -->
|
||||
<dpiAware
|
||||
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
true/pm
|
||||
</dpiAware>
|
||||
<!-- Windows 10, version 1607 or later -->
|
||||
<dpiAwareness
|
||||
xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
|
||||
PerMonitorV2
|
||||
</dpiAwareness>
|
||||
<!-- Windows 10, version 1703 or later -->
|
||||
<gdiScaling
|
||||
xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">
|
||||
true
|
||||
</gdiScaling>
|
||||
<ws2:longPathAware
|
||||
xmlns:ws3="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
|
||||
true
|
||||
</ws2:longPathAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility
|
||||
xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<trustInfo
|
||||
xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<!--
|
||||
UAC settings:
|
||||
- app should run at same integrity level as calling process
|
||||
- app does not need to manipulate windows belonging to
|
||||
higher-integrity-level processes
|
||||
-->
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false"
|
||||
/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
|
933
dist/languages/da_DK.ts
vendored
933
dist/languages/da_DK.ts
vendored
File diff suppressed because it is too large
Load Diff
1177
dist/languages/de.ts
vendored
1177
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load Diff
936
dist/languages/es_ES.ts
vendored
936
dist/languages/es_ES.ts
vendored
File diff suppressed because it is too large
Load Diff
1003
dist/languages/fi.ts
vendored
1003
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load Diff
933
dist/languages/fi_FI.ts
vendored
933
dist/languages/fi_FI.ts
vendored
File diff suppressed because it is too large
Load Diff
1140
dist/languages/fr.ts
vendored
1140
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load Diff
5400
dist/languages/hu_HU.ts
vendored
5400
dist/languages/hu_HU.ts
vendored
File diff suppressed because it is too large
Load Diff
939
dist/languages/id.ts
vendored
939
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load Diff
942
dist/languages/it.ts
vendored
942
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load Diff
955
dist/languages/ja_JP.ts
vendored
955
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load Diff
942
dist/languages/ko_KR.ts
vendored
942
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load Diff
933
dist/languages/lt_LT.ts
vendored
933
dist/languages/lt_LT.ts
vendored
File diff suppressed because it is too large
Load Diff
976
dist/languages/nb.ts
vendored
976
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load Diff
935
dist/languages/nl.ts
vendored
935
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load Diff
1177
dist/languages/pl_PL.ts
vendored
1177
dist/languages/pl_PL.ts
vendored
File diff suppressed because it is too large
Load Diff
1016
dist/languages/pt_BR.ts
vendored
1016
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load Diff
933
dist/languages/ro_RO.ts
vendored
933
dist/languages/ro_RO.ts
vendored
File diff suppressed because it is too large
Load Diff
935
dist/languages/ru_RU.ts
vendored
935
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load Diff
949
dist/languages/tr_TR.ts
vendored
949
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load Diff
933
dist/languages/vi_VN.ts
vendored
933
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load Diff
938
dist/languages/zh_CN.ts
vendored
938
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load Diff
935
dist/languages/zh_TW.ts
vendored
935
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load Diff
27
externals/CMakeLists.txt
vendored
27
externals/CMakeLists.txt
vendored
@ -30,11 +30,16 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
|
||||
# Crypto++
|
||||
add_subdirectory(cryptopp)
|
||||
|
||||
# Dynarmic
|
||||
# Xbyak
|
||||
if (ARCHITECTURE_x86_64)
|
||||
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
|
||||
add_library(xbyak INTERFACE)
|
||||
option(DYNARMIC_TESTS OFF)
|
||||
target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
|
||||
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
|
||||
endif()
|
||||
|
||||
# Dynarmic
|
||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
|
||||
set(DYNARMIC_TESTS OFF)
|
||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||
set(DYNARMIC_FRONTENDS "A32")
|
||||
add_subdirectory(dynarmic)
|
||||
@ -74,17 +79,9 @@ target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
|
||||
# Teakra
|
||||
add_subdirectory(teakra EXCLUDE_FROM_ALL)
|
||||
|
||||
# Xbyak
|
||||
if (ARCHITECTURE_x86_64)
|
||||
# Defined before "dynarmic" above
|
||||
# add_library(xbyak INTERFACE)
|
||||
target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
|
||||
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
|
||||
endif()
|
||||
|
||||
# Zstandard
|
||||
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
|
||||
target_include_directories(libzstd_static INTERFACE ./zstd/lib)
|
||||
target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/externals/zstd/lib>)
|
||||
|
||||
# ENet
|
||||
add_subdirectory(enet)
|
||||
@ -131,4 +128,8 @@ if (ENABLE_WEB_SERVICE)
|
||||
endif()
|
||||
|
||||
# lodepng
|
||||
add_subdirectory(lodepng)
|
||||
add_subdirectory(lodepng)
|
||||
|
||||
# libyuv
|
||||
add_subdirectory(libyuv)
|
||||
target_include_directories(yuv INTERFACE ./libyuv/include)
|
||||
|
2
externals/catch
vendored
2
externals/catch
vendored
@ -1 +1 @@
|
||||
Subproject commit 15cf3caaceb21172ea42a24e595a2eb58c3ec960
|
||||
Subproject commit de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad
|
2
externals/cubeb
vendored
2
externals/cubeb
vendored
@ -1 +1 @@
|
||||
Subproject commit 616d773441b5355800ce64197a699e6cd6b36172
|
||||
Subproject commit 1d66483ad2b93f0e00e175f9480c771af90003a7
|
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
@ -1 +1 @@
|
||||
Subproject commit 8d1699ba2db216e569e998ea318d5cde47720e97
|
||||
Subproject commit 358cf6f0357baae3e3bb5788431acf1068f897b5
|
2
externals/fmt
vendored
2
externals/fmt
vendored
@ -1 +1 @@
|
||||
Subproject commit 4b8f8fac96a7819f28f4be523ca10a2d5d8aaaf2
|
||||
Subproject commit cc09f1a6798c085c325569ef466bcdcffdc266d4
|
2
externals/inih/inih
vendored
2
externals/inih/inih
vendored
@ -1 +1 @@
|
||||
Subproject commit 2023872dfffb38b6a98f2c45a0eb25652aaea91f
|
||||
Subproject commit 1e80a47dffbda813604f0913e2ad68c7054c14e4
|
4
externals/json/README.md
vendored
4
externals/json/README.md
vendored
@ -1,9 +1,9 @@
|
||||
JSON for Modern C++
|
||||
===================
|
||||
|
||||
v3.1.2
|
||||
v3.9.0
|
||||
|
||||
This is a mirror providing the single required header file.
|
||||
|
||||
The original repository can be found at:
|
||||
https://github.com/nlohmann/json/commit/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe
|
||||
https://github.com/nlohmann/json/commit/d34771cafc87b358ba421faca28facc7f8080174
|
||||
|
18435
externals/json/json.hpp
vendored
18435
externals/json/json.hpp
vendored
File diff suppressed because it is too large
Load Diff
1
externals/libyuv
vendored
Submodule
1
externals/libyuv
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 45f1f2b201672b699b35da20267a5f2c41318264
|
65
externals/microprofile/microprofile.h
vendored
65
externals/microprofile/microprofile.h
vendored
@ -152,9 +152,11 @@ typedef uint16_t MicroProfileGroupId;
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#ifndef MICROPROFILE_API
|
||||
#define MICROPROFILE_API
|
||||
@ -605,28 +607,45 @@ struct MicroProfileFrameState
|
||||
|
||||
struct MicroProfileThreadLog
|
||||
{
|
||||
MicroProfileLogEntry Log[MICROPROFILE_BUFFER_SIZE];
|
||||
std::array<MicroProfileLogEntry, MICROPROFILE_BUFFER_SIZE> Log{};
|
||||
|
||||
std::atomic<uint32_t> nPut;
|
||||
std::atomic<uint32_t> nGet;
|
||||
uint32_t nActive;
|
||||
uint32_t nGpu;
|
||||
ThreadIdType nThreadId;
|
||||
std::atomic<uint32_t> nPut{0};
|
||||
std::atomic<uint32_t> nGet{0};
|
||||
uint32_t nActive = 0;
|
||||
uint32_t nGpu = 0;
|
||||
ThreadIdType nThreadId{};
|
||||
|
||||
uint32_t nStack[MICROPROFILE_STACK_MAX];
|
||||
int64_t nChildTickStack[MICROPROFILE_STACK_MAX];
|
||||
uint32_t nStackPos;
|
||||
std::array<uint32_t, MICROPROFILE_STACK_MAX> nStack{};
|
||||
std::array<int64_t, MICROPROFILE_STACK_MAX> nChildTickStack{};
|
||||
uint32_t nStackPos = 0;
|
||||
|
||||
|
||||
uint8_t nGroupStackPos[MICROPROFILE_MAX_GROUPS];
|
||||
int64_t nGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||
int64_t nAggregateGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||
std::array<uint8_t, MICROPROFILE_MAX_GROUPS> nGroupStackPos{};
|
||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nGroupTicks{};
|
||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nAggregateGroupTicks{};
|
||||
enum
|
||||
{
|
||||
THREAD_MAX_LEN = 64,
|
||||
};
|
||||
char ThreadName[64];
|
||||
int nFreeListNext;
|
||||
char ThreadName[64]{};
|
||||
int nFreeListNext = 0;
|
||||
|
||||
void Reset() {
|
||||
Log.fill({});
|
||||
nPut = 0;
|
||||
nGet = 0;
|
||||
nActive = 0;
|
||||
nGpu = 0;
|
||||
nThreadId = {};
|
||||
nStack.fill(0);
|
||||
nChildTickStack.fill(0);
|
||||
nStackPos = 0;
|
||||
nGroupStackPos.fill(0);
|
||||
nGroupTicks.fill(0);
|
||||
nAggregateGroupTicks.fill(0);
|
||||
std::fill(std::begin(ThreadName), std::end(ThreadName), '\0');
|
||||
nFreeListNext = 0;
|
||||
}
|
||||
};
|
||||
|
||||
#if MICROPROFILE_GPU_TIMERS_D3D11
|
||||
@ -927,7 +946,11 @@ typedef HANDLE MicroProfileThread;
|
||||
DWORD _stdcall ThreadTrampoline(void* pFunc)
|
||||
{
|
||||
MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc;
|
||||
return (uint32_t)F(0);
|
||||
|
||||
// The return value of F will always return a void*, however, this is for
|
||||
// compatibility with pthreads. The underlying "address" of the pointer
|
||||
// is always a 32-bit value, so this cast is safe to perform.
|
||||
return static_cast<DWORD>(reinterpret_cast<uint64_t>(F(0)));
|
||||
}
|
||||
|
||||
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
||||
@ -1018,7 +1041,7 @@ static void MicroProfileCreateThreadLogKey()
|
||||
#else
|
||||
MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0;
|
||||
#endif
|
||||
static bool g_bUseLock = false; /// This is used because windows does not support using mutexes under dll init(which is where global initialization is handled)
|
||||
static std::atomic<bool> g_bUseLock{false}; /// This is used because windows does not support using mutexes under dll init(which is where global initialization is handled)
|
||||
|
||||
|
||||
MICROPROFILE_DEFINE(g_MicroProfileFlip, "MicroProfile", "MicroProfileFlip", 0x3355ee);
|
||||
@ -1151,6 +1174,7 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
||||
MP_ASSERT(pLog->nPut.load() == 0);
|
||||
MP_ASSERT(pLog->nGet.load() == 0);
|
||||
S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext;
|
||||
pLog->Reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1158,7 +1182,6 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
||||
S.nMemUsage += sizeof(MicroProfileThreadLog);
|
||||
S.Pool[S.nNumLogs++] = pLog;
|
||||
}
|
||||
memset(pLog, 0, sizeof(*pLog));
|
||||
int len = (int)strlen(pName);
|
||||
int maxlen = sizeof(pLog->ThreadName)-1;
|
||||
len = len < maxlen ? len : maxlen;
|
||||
@ -1206,8 +1229,8 @@ void MicroProfileOnThreadExit()
|
||||
{
|
||||
S.Frames[i].nLogStart[nLogIndex] = 0;
|
||||
}
|
||||
memset(pLog->nGroupStackPos, 0, sizeof(pLog->nGroupStackPos));
|
||||
memset(pLog->nGroupTicks, 0, sizeof(pLog->nGroupTicks));
|
||||
pLog->nGroupStackPos.fill(0);
|
||||
pLog->nGroupTicks.fill(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
212
externals/microprofile/microprofileui.h
vendored
212
externals/microprofile/microprofileui.h
vendored
@ -169,14 +169,13 @@ MICROPROFILEUI_API void MicroProfileCustomGroup(const char* pCustomName, uint32_
|
||||
MICROPROFILEUI_API void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer);
|
||||
|
||||
#ifdef MICROPROFILEUI_IMPL
|
||||
#ifdef _WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000);
|
||||
MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00);
|
||||
@ -227,10 +226,10 @@ struct SOptionDesc
|
||||
uint8_t nIndex;
|
||||
bool bSelected;
|
||||
};
|
||||
static uint32_t g_MicroProfileAggregatePresets[] = {0, 10, 20, 30, 60, 120};
|
||||
static float g_MicroProfileReferenceTimePresets[] = {5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f};
|
||||
static uint32_t g_MicroProfileOpacityPresets[] = {0x40, 0x80, 0xc0, 0xff};
|
||||
static const char* g_MicroProfilePresetNames[] =
|
||||
static const std::array<uint32_t, 6> g_MicroProfileAggregatePresets{0, 10, 20, 30, 60, 120};
|
||||
static const std::array<float, 10> g_MicroProfileReferenceTimePresets{5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f};
|
||||
static const std::array<uint32_t, 4> g_MicroProfileOpacityPresets{0x40, 0x80, 0xc0, 0xff};
|
||||
static const std::array<const char*, 7> g_MicroProfilePresetNames
|
||||
{
|
||||
MICROPROFILE_DEFAULT_PRESET,
|
||||
"Render",
|
||||
@ -243,8 +242,8 @@ static const char* g_MicroProfilePresetNames[] =
|
||||
|
||||
enum
|
||||
{
|
||||
MICROPROFILE_NUM_REFERENCE_PRESETS = sizeof(g_MicroProfileReferenceTimePresets)/sizeof(g_MicroProfileReferenceTimePresets[0]),
|
||||
MICROPROFILE_NUM_OPACITY_PRESETS = sizeof(g_MicroProfileOpacityPresets)/sizeof(g_MicroProfileOpacityPresets[0]),
|
||||
MICROPROFILE_NUM_REFERENCE_PRESETS = g_MicroProfileReferenceTimePresets.size(),
|
||||
MICROPROFILE_NUM_OPACITY_PRESETS = g_MicroProfileOpacityPresets.size(),
|
||||
#if MICROPROFILE_CONTEXT_SWITCH_TRACE
|
||||
MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7,
|
||||
#else
|
||||
@ -326,9 +325,9 @@ struct MicroProfileUI
|
||||
|
||||
MicroProfileUI g_MicroProfileUI;
|
||||
#define UI g_MicroProfileUI
|
||||
static uint32_t g_nMicroProfileBackColors[2] = { 0x474747, 0x313131 };
|
||||
static const std::array<uint32_t, 2> g_nMicroProfileBackColors{ 0x474747, 0x313131 };
|
||||
#define MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS 16
|
||||
static uint32_t g_nMicroProfileContextSwitchThreadColors[MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS] = //palette generated by http://tools.medialab.sciences-po.fr/iwanthue/index.php
|
||||
static const std::array<uint32_t, MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS> g_nMicroProfileContextSwitchThreadColors //palette generated by http://tools.medialab.sciences-po.fr/iwanthue/index.php
|
||||
{
|
||||
0x63607B,
|
||||
0x755E2B,
|
||||
@ -356,7 +355,7 @@ void MicroProfileInitUI()
|
||||
{
|
||||
bInitialized = true;
|
||||
memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI));
|
||||
UI.nActiveMenu = (uint32_t)-1;
|
||||
UI.nActiveMenu = UINT32_MAX;
|
||||
UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f;
|
||||
UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f;
|
||||
|
||||
@ -368,7 +367,7 @@ void MicroProfileInitUI()
|
||||
UI.nWidth = 100;
|
||||
UI.nHeight = 100;
|
||||
|
||||
UI.nCustomActive = (uint32_t)-1;
|
||||
UI.nCustomActive = UINT32_MAX;
|
||||
UI.nCustomTimerCount = 0;
|
||||
UI.nCustomCount = 0;
|
||||
|
||||
@ -498,8 +497,8 @@ void MicroProfileDrawFloatWindow(uint32_t nX, uint32_t nY, const char** ppString
|
||||
{
|
||||
MicroProfileDrawBox(nX-MICROPROFILE_TEXT_WIDTH, nY, nX, nY + MICROPROFILE_TEXT_WIDTH, pColors[i]|0xff000000);
|
||||
}
|
||||
MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
|
||||
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, (uint32_t)-1, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
||||
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
|
||||
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, UINT32_MAX, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
||||
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
||||
}
|
||||
}
|
||||
@ -522,7 +521,7 @@ void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, u
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000);
|
||||
for(uint32_t i = 0; i < nNumStrings; ++i)
|
||||
{
|
||||
MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i], (uint32_t)strlen(ppStrings[i]));
|
||||
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i], (uint32_t)strlen(ppStrings[i]));
|
||||
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
||||
}
|
||||
}
|
||||
@ -781,7 +780,7 @@ void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId,
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
int64_t nTickIn = -1;
|
||||
uint32_t nThreadBefore = -1;
|
||||
uint32_t nThreadBefore = UINT32_MAX;
|
||||
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
||||
float fMsToScreen = UI.nWidth / UI.fDetailedRange;
|
||||
float fMouseX = (float)UI.nMouseX;
|
||||
@ -949,10 +948,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
|
||||
uint32_t nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadAfter;
|
||||
uint32_t nContextSwitchHoverThreadBefore = S.nContextSwitchHoverThreadBefore;
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX;
|
||||
|
||||
uint32_t nContextSwitchStart = -1;
|
||||
uint32_t nContextSwitchEnd = -1;
|
||||
uint32_t nContextSwitchStart = UINT32_MAX;
|
||||
uint32_t nContextSwitchEnd = UINT32_MAX;
|
||||
S.nContextSwitchHoverCpuNext = 0xff;
|
||||
S.nContextSwitchHoverTickIn = -1;
|
||||
S.nContextSwitchHoverTickOut = -1;
|
||||
@ -1005,9 +1004,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
}while(pFrameLogFirst != pFrameFirst);
|
||||
|
||||
|
||||
if(nGet == (uint32_t)-1)
|
||||
if (nGet == UINT32_MAX) {
|
||||
continue;
|
||||
MP_ASSERT(nGet != (uint32_t)-1);
|
||||
}
|
||||
MP_ASSERT(nGet != UINT32_MAX);
|
||||
|
||||
nPut = pFrameLogLast->nLogStart[i];
|
||||
|
||||
@ -1023,9 +1023,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu;
|
||||
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
|
||||
uint64_t nThreadId = pLog->nThreadId;
|
||||
snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s", nThreadId, &pLog->ThreadName[0] );
|
||||
snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s", nThreadId, &pLog->ThreadName[0] );
|
||||
nY += 3;
|
||||
uint32_t nThreadColor = -1;
|
||||
uint32_t nThreadColor = UINT32_MAX;
|
||||
if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore)
|
||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||
MicroProfileDrawText(0, nY, nThreadColor, &ThreadName[0], (uint32_t)strlen(&ThreadName[0]));
|
||||
@ -1048,7 +1048,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
uint32_t nEnd = nRange[j][1];
|
||||
for(uint32_t k = nStart; k < nEnd; ++k)
|
||||
{
|
||||
MicroProfileLogEntry* pEntry = pLog->Log + k;
|
||||
MicroProfileLogEntry* pEntry = &pLog->Log[k];
|
||||
int nType = MicroProfileLogType(*pEntry);
|
||||
if(MP_LOG_ENTER == nType)
|
||||
{
|
||||
@ -1066,7 +1066,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
continue;
|
||||
}
|
||||
|
||||
MicroProfileLogEntry* pEntryEnter = pLog->Log + nStack[nStackPos-1];
|
||||
MicroProfileLogEntry* pEntryEnter = &pLog->Log[nStack[nStackPos-1]];
|
||||
if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry))
|
||||
{
|
||||
//uprintf("mismatch %llx %llx\n", pEntryEnter->nToken, pEntry->nToken);
|
||||
@ -1126,7 +1126,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
uint32_t nIntegerWidth = (uint32_t)(fXEnd - fXStart);
|
||||
if(nIntegerWidth)
|
||||
{
|
||||
if(bHover && UI.nActiveMenu == -1)
|
||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
||||
{
|
||||
nHoverToken = MicroProfileLogTimerIndex(*pEntry);
|
||||
#if MICROPROFILE_DEBUG
|
||||
@ -1146,7 +1146,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int nCharacters = (nTextWidth - 2*MICROPROFILE_TEXT_WIDTH) / MICROPROFILE_TEXT_WIDTH;
|
||||
if(nCharacters>0)
|
||||
{
|
||||
MicroProfileDrawText(fXStartText+1, fYStart+1, -1, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters));
|
||||
MicroProfileDrawText(fXStartText + 1, fYStart + 1, UINT32_MAX, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1158,7 +1158,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int nLineX = (int)floor(fXAvg+0.5f);
|
||||
if(nLineX != (int)nLinesDrawn[nStackPos])
|
||||
{
|
||||
if(bHover && UI.nActiveMenu == -1)
|
||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
||||
{
|
||||
nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry);
|
||||
nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd);
|
||||
@ -1235,9 +1235,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
// nThreadId is 32-bit on Windows
|
||||
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
|
||||
#else
|
||||
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
|
||||
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
|
||||
#endif
|
||||
uint32_t nThreadColor = -1;
|
||||
uint32_t nThreadColor = UINT32_MAX;
|
||||
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
|
||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||
MicroProfileDrawDetailedContextSwitchBars(nY+2, nThreadId, nContextSwitchStart, nContextSwitchEnd, nBaseTicksCpu, nBaseY);
|
||||
@ -1249,9 +1249,6 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
|
||||
S.nContextSwitchHoverCpu = S.nContextSwitchHoverCpuNext;
|
||||
|
||||
|
||||
|
||||
|
||||
UI.pDisplayMouseOver = pMouseOverNext;
|
||||
|
||||
if(!S.nRunning)
|
||||
@ -1286,10 +1283,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
||||
float fStartTextX = fXStart - fStartTextWidth - 2;
|
||||
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart);
|
||||
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
|
||||
MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
|
||||
MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd);
|
||||
|
||||
if(UI.nMouseRight)
|
||||
{
|
||||
@ -1316,10 +1313,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
||||
float fStartTextX = fXStart - fStartTextWidth - 2;
|
||||
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart);
|
||||
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
|
||||
MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
|
||||
MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1365,7 +1362,7 @@ void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uin
|
||||
fBaseX = fXStart;
|
||||
uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU;
|
||||
if(nIndex == nSelectedFrame)
|
||||
nColor = (uint32_t)-1;
|
||||
nColor = UINT32_MAX;
|
||||
MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar);
|
||||
if(pNext->nFrameStartCpu > nCpuStart)
|
||||
{
|
||||
@ -1387,7 +1384,7 @@ void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
||||
uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1;
|
||||
|
||||
int nSelectedFrame = -1;
|
||||
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == -1)
|
||||
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == UINT32_MAX)
|
||||
{
|
||||
|
||||
nSelectedFrame = ((MICROPROFILE_NUM_FRAMES) * (UI.nWidth-UI.nMouseX) / UI.nWidth);
|
||||
@ -1425,7 +1422,7 @@ void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
||||
if(pName)
|
||||
{
|
||||
MicroProfileDrawBox(nX-8, MICROPROFILE_TEXT_HEIGHT + 2, nX + nWidth+5, MICROPROFILE_TEXT_HEIGHT + 2 + (MICROPROFILE_TEXT_HEIGHT+1), 0xff000000|g_nMicroProfileBackColors[1]);
|
||||
MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, pName, (uint32_t)strlen(pName));
|
||||
MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_MAX, pName, (uint32_t)strlen(pName));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1440,7 +1437,7 @@ void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName,
|
||||
uint32_t nCount = 0;
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
uint64_t nMask = 1ll << j;
|
||||
uint64_t nMask = 1ULL << j;
|
||||
if(nMask & nGroup)
|
||||
{
|
||||
nY += MICROPROFILE_TEXT_HEIGHT + 1;
|
||||
@ -1521,7 +1518,7 @@ void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float*
|
||||
}
|
||||
}
|
||||
}
|
||||
nMask <<= 1ll;
|
||||
nMask <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1543,7 +1540,7 @@ void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t n
|
||||
snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pTimers[nIdx]);
|
||||
if (!pTimers2)
|
||||
MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar);
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, (uint32_t)strlen(sBuffer));
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, (uint32_t)strlen(sBuffer));
|
||||
}
|
||||
|
||||
|
||||
@ -1564,7 +1561,7 @@ void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
char sBuffer[SBUF_MAX];
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5d", S.Frame[nTimer].nCount);//fix
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, nLen);
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, nLen);
|
||||
}
|
||||
|
||||
uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
|
||||
@ -1588,7 +1585,7 @@ void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint
|
||||
float fRcpFrames = pArgs->fRcpFrames;
|
||||
char sBuffer[SBUF_MAX];
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen);
|
||||
}
|
||||
|
||||
uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||
@ -1609,8 +1606,8 @@ void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
||||
{
|
||||
uint64_t* pCounters = (uint64_t*)pExtra;
|
||||
char sBuffer[SBUF_MAX];
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5llu", pCounters[nTimer]);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5" PRIu64, pCounters[nTimer]);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen);
|
||||
}
|
||||
|
||||
uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||
@ -1667,7 +1664,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
if(bMouseOver)
|
||||
{
|
||||
float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX;
|
||||
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, (uint32_t)-1);
|
||||
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, UINT32_MAX);
|
||||
}
|
||||
|
||||
|
||||
@ -1706,7 +1703,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
|
||||
char buf[32];
|
||||
int nLen = snprintf(buf, sizeof(buf)-1, "%5.2fms", S.fReferenceTime);
|
||||
MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), (uint32_t)-1, buf, nLen);
|
||||
MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), UINT32_MAX, buf, nLen);
|
||||
}
|
||||
|
||||
|
||||
@ -1782,7 +1779,7 @@ void MicroProfileDumpTimers()
|
||||
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
uint64_t nMask = 1ll << j;
|
||||
uint64_t nMask = 1ULL << j;
|
||||
if(nMask & nActiveGroup)
|
||||
{
|
||||
MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName);
|
||||
@ -1823,7 +1820,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
uint32_t nNumGroups = 0;
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
if(nActiveGroup & (1ll << j))
|
||||
if(nActiveGroup & (1ULL << j))
|
||||
{
|
||||
nNumTimers += S.GroupInfo[j].nNumTimers;
|
||||
nNumGroups += 1;
|
||||
@ -1878,7 +1875,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||
{
|
||||
uint32_t nY0 = nY + i * (nHeight + 1);
|
||||
bool bInside = (UI.nActiveMenu == -1) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||
bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||
MicroProfileDrawBox(nX, nY0, nWidth+nX, nY0 + (nHeight+1)+1, UI.nOpacityBackground | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
|
||||
}
|
||||
nX += 10;
|
||||
@ -1927,22 +1924,22 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
nY = nHeight + 3 - UI.nOffsetY;
|
||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||
{
|
||||
uint32_t nY0 = nY + i * (nHeight + 1);
|
||||
bool bInside = (UI.nActiveMenu == -1) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||
const uint32_t nY0 = nY + i * (nHeight + 1);
|
||||
const bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||
MicroProfileDrawBox(nX, nY0, nTimerWidth, nY0 + (nHeight+1)+1, 0xff0000000 | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
|
||||
}
|
||||
nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1;
|
||||
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
if(nActiveGroup & (1ll << j))
|
||||
if(nActiveGroup & (1ULL << j))
|
||||
{
|
||||
MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, (uint32_t)-1, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen);
|
||||
MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, UINT32_MAX, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen);
|
||||
nLegendOffset += S.GroupInfo[j].nNumTimers+1;
|
||||
}
|
||||
}
|
||||
MicroProfileDrawHeader(nX, nTimerWidth-5, "Group");
|
||||
MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, "Timer", 5);
|
||||
MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_MAX, "Timer", 5);
|
||||
MicroProfileDrawLineVertical(nTimerWidth, 0, nTotalHeight+nY, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
||||
MicroProfileDrawLineHorizontal(0, nWidth, 2*MICROPROFILE_TEXT_HEIGHT + 3, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
||||
}
|
||||
@ -2003,7 +2000,7 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
||||
}
|
||||
else
|
||||
{
|
||||
*bSelected = 0 != (S.nActiveGroupWanted & (1ll << Item.nIndex));
|
||||
*bSelected = 0 != (S.nActiveGroupWanted & (1ULL << Item.nIndex));
|
||||
snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName);
|
||||
}
|
||||
return buffer;
|
||||
@ -2015,16 +2012,18 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
||||
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
if(nIndex < sizeof(g_MicroProfileAggregatePresets)/sizeof(g_MicroProfileAggregatePresets[0]))
|
||||
if(static_cast<uint32_t>(nIndex) < g_MicroProfileAggregatePresets.size())
|
||||
{
|
||||
int val = g_MicroProfileAggregatePresets[nIndex];
|
||||
*bSelected = (int)S.nAggregateFlip == val;
|
||||
if(0 == val)
|
||||
uint32_t val = g_MicroProfileAggregatePresets[nIndex];
|
||||
*bSelected = S.nAggregateFlip == val;
|
||||
if (0 == val)
|
||||
{
|
||||
return "Infinite";
|
||||
}
|
||||
else
|
||||
{
|
||||
static char buf[128];
|
||||
snprintf(buf, sizeof(buf)-1, "%7d", val);
|
||||
snprintf(buf, sizeof(buf)-1, "%7u", val);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
@ -2098,11 +2097,13 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
||||
{
|
||||
static char buf[128];
|
||||
*bSelected = false;
|
||||
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
||||
int nIndexSave = nIndex - nNumPresets - 1;
|
||||
if(nIndex == nNumPresets)
|
||||
if (nIndex == nNumPresets)
|
||||
{
|
||||
return "--";
|
||||
else if(nIndexSave >=0 && nIndexSave <nNumPresets)
|
||||
}
|
||||
else if(nIndexSave >=0 && nIndexSave < nNumPresets)
|
||||
{
|
||||
snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]);
|
||||
return buf;
|
||||
@ -2120,13 +2121,13 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
||||
|
||||
const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
||||
{
|
||||
if((uint32_t)-1 == UI.nCustomActive)
|
||||
if(UINT32_MAX == UI.nCustomActive)
|
||||
{
|
||||
*bSelected = nIndex == 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*bSelected = nIndex-2 == UI.nCustomActive;
|
||||
*bSelected = nIndex-2 == static_cast<int>(UI.nCustomActive);
|
||||
}
|
||||
switch(nIndex)
|
||||
{
|
||||
@ -2202,7 +2203,7 @@ void MicroProfileUIClickGroups(int nIndex)
|
||||
else
|
||||
{
|
||||
MP_ASSERT(Item.nIndex < S.nGroupCount);
|
||||
S.nActiveGroupWanted ^= (1ll << Item.nIndex);
|
||||
S.nActiveGroupWanted ^= (1ULL << Item.nIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2273,7 +2274,7 @@ void MicroProfileUIClickOptions(int nIndex)
|
||||
|
||||
void MicroProfileUIClickPreset(int nIndex)
|
||||
{
|
||||
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
||||
int nIndexSave = nIndex - nNumPresets - 1;
|
||||
if(nIndexSave >= 0 && nIndexSave < nNumPresets)
|
||||
{
|
||||
@ -2310,7 +2311,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
|
||||
uint32_t nX = 0;
|
||||
uint32_t nY = 0;
|
||||
bool bMouseOver = UI.nMouseY < MICROPROFILE_TEXT_HEIGHT + 1;
|
||||
|
||||
#define SBUF_SIZE 256
|
||||
char buffer[256];
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]);
|
||||
@ -2321,7 +2322,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
uint32_t nNumMenuItems = 0;
|
||||
|
||||
int nLen = snprintf(buffer, 127, "MicroProfile");
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen);
|
||||
nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||
pMenuText[nNumMenuItems++] = "Mode";
|
||||
pMenuText[nNumMenuItems++] = "Groups";
|
||||
@ -2409,7 +2410,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
};
|
||||
|
||||
|
||||
uint32_t nSelectMenu = (uint32_t)-1;
|
||||
uint32_t nSelectMenu = UINT32_MAX;
|
||||
for(uint32_t i = 0; i < nNumMenuItems; ++i)
|
||||
{
|
||||
nMenuX[i] = nX;
|
||||
@ -2419,17 +2420,17 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
MicroProfileDrawBox(nX-1, nY, nX + nLen * (MICROPROFILE_TEXT_WIDTH+1), nY +(MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff888888);
|
||||
nSelectMenu = i;
|
||||
if((UI.nMouseLeft || UI.nMouseRight) && i == (int)nPauseIndex)
|
||||
if((UI.nMouseLeft || UI.nMouseRight) && i == (uint32_t)nPauseIndex)
|
||||
{
|
||||
S.nToggleRunning = 1;
|
||||
}
|
||||
}
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, pMenuText[i], (uint32_t)strlen(pMenuText[i]));
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, pMenuText[i], (uint32_t)strlen(pMenuText[i]));
|
||||
nX += (nLen+1) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||
}
|
||||
uint32_t nMenu = nSelectMenu != (uint32_t)-1 ? nSelectMenu : UI.nActiveMenu;
|
||||
uint32_t nMenu = nSelectMenu != UINT32_MAX ? nSelectMenu : UI.nActiveMenu;
|
||||
UI.nActiveMenu = nMenu;
|
||||
if((uint32_t)-1 != nMenu)
|
||||
if(UINT32_MAX != nMenu)
|
||||
{
|
||||
nX = nMenuX[nMenu];
|
||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||
@ -2450,9 +2451,9 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
UI.nActiveMenu = nMenu;
|
||||
}
|
||||
else if(nSelectMenu == (uint32_t)-1)
|
||||
else if(nSelectMenu == UINT32_MAX)
|
||||
{
|
||||
UI.nActiveMenu = (uint32_t)-1;
|
||||
UI.nActiveMenu = UINT32_MAX;
|
||||
}
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]);
|
||||
for(int i = 0; i < nNumLines; ++i)
|
||||
@ -2461,7 +2462,6 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
const char* pString = CB(i, &bSelected);
|
||||
if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1)
|
||||
{
|
||||
bMouseOver = true;
|
||||
if(UI.nMouseLeft || UI.nMouseRight)
|
||||
{
|
||||
CBClick[nMenu](i);
|
||||
@ -2469,7 +2469,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888);
|
||||
}
|
||||
int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString);
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen);
|
||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||
}
|
||||
}
|
||||
@ -2484,7 +2484,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
float fMaxMs = fToMs * S.nFlipMaxDisplay;
|
||||
int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs);
|
||||
pMenuText[nNumMenuItems++] = &FrameTimeMessage[0];
|
||||
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, -1, FrameTimeMessage, nLen);
|
||||
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, UINT32_MAX, FrameTimeMessage, nLen);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2538,7 +2538,7 @@ void MicroProfileMoveGraph()
|
||||
|
||||
void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
if((uint32_t)-1 != UI.nCustomActive)
|
||||
if(UINT32_MAX != UI.nCustomActive)
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
MP_ASSERT(UI.nCustomActive < MICROPROFILE_CUSTOM_MAX);
|
||||
@ -2571,8 +2571,8 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
pColors[i] = S.TimerInfo[nTimerIndex].nColor;
|
||||
}
|
||||
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, (uint32_t)-1, "Avg", sizeof("Avg")-1);
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, (uint32_t)-1, "Max", sizeof("Max")-1);
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Avg", sizeof("Avg")-1);
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Max", sizeof("Max")-1);
|
||||
for(uint32_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||
@ -2582,10 +2582,10 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
int nSize;
|
||||
uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING;
|
||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize);
|
||||
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeMax[i]);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize);
|
||||
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize);
|
||||
@ -2599,9 +2599,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
nOffsetY = nOffsetYBase;
|
||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg";
|
||||
MicroProfileDrawText(nMaxOffsetX, nOffsetY, (uint32_t)-1, pString, strlen(pString));
|
||||
MicroProfileDrawText(nMaxOffsetX, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString)));
|
||||
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize);
|
||||
for(uint32_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||
@ -2613,9 +2613,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT);
|
||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg";
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, (uint32_t)-1, pString, strlen(pString));
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString)));
|
||||
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize);
|
||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||
float fPosX = MICROPROFILE_CUSTOM_PADDING;
|
||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
||||
@ -2668,7 +2668,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
UI.nHoverTime = 0;
|
||||
UI.nHoverFrame = -1;
|
||||
if(S.nDisplay != MP_DRAW_DETAILED)
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX;
|
||||
MicroProfileMoveGraph();
|
||||
|
||||
|
||||
@ -2798,13 +2798,13 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
|
||||
|
||||
|
||||
if(UI.nActiveMenu == -1 && !bMouseOverGraph)
|
||||
if(UI.nActiveMenu == UINT32_MAX && !bMouseOverGraph)
|
||||
{
|
||||
if(UI.nHoverToken != MICROPROFILE_INVALID_TOKEN)
|
||||
{
|
||||
MicroProfileDrawFloatTooltip(UI.nMouseX, UI.nMouseY, UI.nHoverToken, UI.nHoverTime);
|
||||
}
|
||||
else if(S.nContextSwitchHoverThreadAfter != -1 && S.nContextSwitchHoverThreadBefore != -1)
|
||||
else if(S.nContextSwitchHoverThreadAfter != UINT32_MAX && S.nContextSwitchHoverThreadBefore != UINT32_MAX)
|
||||
{
|
||||
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
||||
MicroProfileStringArray ToolTip;
|
||||
@ -2820,7 +2820,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference );
|
||||
MicroProfileStringArrayAddLiteral(&ToolTip, "CPU");
|
||||
MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu);
|
||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
|
||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX);
|
||||
|
||||
|
||||
}
|
||||
@ -2858,7 +2858,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
|
||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX);
|
||||
}
|
||||
if(UI.nMouseLeft)
|
||||
{
|
||||
@ -2883,7 +2883,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
#endif
|
||||
m.unlock();
|
||||
}
|
||||
else if(UI.nCustomActive != (uint32_t)-1)
|
||||
else if(UI.nCustomActive != UINT32_MAX)
|
||||
{
|
||||
std::recursive_mutex& m = MicroProfileGetMutex();
|
||||
m.lock();
|
||||
@ -3179,7 +3179,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
||||
{
|
||||
if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName))
|
||||
{
|
||||
S.nActiveGroupWanted |= (1ll << j);
|
||||
S.nActiveGroupWanted |= (1ULL << j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3212,7 +3212,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
||||
uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex;
|
||||
if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName))
|
||||
{
|
||||
MicroProfileToken nToken = MicroProfileMakeToken(1ll << nGroupIndex, (uint16_t)j);
|
||||
MicroProfileToken nToken = MicroProfileMakeToken(1ULL << nGroupIndex, (uint16_t)j);
|
||||
S.Graph[i].nToken = nToken; // note: group index is stored here but is checked without in MicroProfileToggleGraph()!
|
||||
S.TimerInfo[j].bGraph = true;
|
||||
if(nToken != nPrevToken)
|
||||
@ -3235,7 +3235,7 @@ uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return (uint32_t)-1;
|
||||
return UINT32_MAX;
|
||||
}
|
||||
|
||||
uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||
@ -3251,7 +3251,7 @@ uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||
uint32_t nIndex = UI.nCustomCount;
|
||||
UI.nCustomCount++;
|
||||
memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex]));
|
||||
uint32_t nLen = (uint32_t)strlen(pCustomName);
|
||||
size_t nLen = strlen(pCustomName);
|
||||
if(nLen > MICROPROFILE_NAME_MAX_LEN-1)
|
||||
nLen = MICROPROFILE_NAME_MAX_LEN-1;
|
||||
memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen);
|
||||
@ -3309,7 +3309,7 @@ void MicroProfileCustomGroupEnable(uint32_t nIndex)
|
||||
void MicroProfileCustomGroupToggle(const char* pCustomName)
|
||||
{
|
||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||
if(nIndex == (uint32_t)-1 || nIndex == UI.nCustomActive)
|
||||
if(nIndex == UINT32_MAX || nIndex == UI.nCustomActive)
|
||||
{
|
||||
MicroProfileCustomGroupDisable();
|
||||
}
|
||||
@ -3328,13 +3328,13 @@ void MicroProfileCustomGroupDisable()
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
S.nForceGroupUI = 0;
|
||||
UI.nCustomActive = (uint32_t)-1;
|
||||
UI.nCustomActive = UINT32_MAX;
|
||||
}
|
||||
|
||||
void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer)
|
||||
{
|
||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||
if((uint32_t)-1 == nIndex)
|
||||
if(UINT32_MAX == nIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -3344,7 +3344,7 @@ void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup
|
||||
MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first.
|
||||
UI.Custom[nIndex].pTimers[nTimerIndex] = nToken;
|
||||
uint16_t nGroup = MicroProfileGetGroupIndex(nToken);
|
||||
UI.Custom[nIndex].nGroupMask |= (1ll << nGroup);
|
||||
UI.Custom[nIndex].nGroupMask |= (1ULL << nGroup);
|
||||
UI.Custom[nIndex].nNumTimers++;
|
||||
}
|
||||
|
||||
|
2
externals/xbyak
vendored
2
externals/xbyak
vendored
@ -1 +1 @@
|
||||
Subproject commit 1de435ed04c8e74775804da944d176baf0ce56e2
|
||||
Subproject commit c306b8e5786eeeb87b8925a8af5c3bf057ff5a90
|
2
externals/zstd
vendored
2
externals/zstd
vendored
@ -1 +1 @@
|
||||
Subproject commit 10f0e6993f9d2f682da6d04aa2385b7d53cbb4ee
|
||||
Subproject commit 97a3da1df009d4dc67251de0c4b1c9d7fe286fc1
|
@ -35,8 +35,6 @@ if (MSVC)
|
||||
add_compile_options(
|
||||
/W3
|
||||
/MP
|
||||
/Zi
|
||||
/Zo
|
||||
/permissive-
|
||||
/EHsc
|
||||
/volatile:iso
|
||||
@ -49,6 +47,15 @@ if (MSVC)
|
||||
/external:W0
|
||||
)
|
||||
|
||||
# Since MSVC's debugging information is not very deterministic, so we have to disable it
|
||||
# when using ccache or other caching tools
|
||||
if (NOT USE_CCACHE)
|
||||
add_compile_options(
|
||||
/Zi
|
||||
/Zo
|
||||
)
|
||||
endif()
|
||||
|
||||
# /GS- - No stack buffer overflow checks
|
||||
add_compile_options("$<$<CONFIG:Release>:/GS->")
|
||||
|
||||
@ -110,8 +117,10 @@ endif()
|
||||
if (ENABLE_QT)
|
||||
add_subdirectory(citra_qt)
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
add_subdirectory(android/app/src/main/cpp)
|
||||
include_directories(android/app/src/main)
|
||||
add_subdirectory(android/app/src/main/jni)
|
||||
else()
|
||||
add_subdirectory(dedicated_room)
|
||||
endif()
|
||||
|
68
src/android/.gitignore
vendored
68
src/android/.gitignore
vendored
@ -1,10 +1,62 @@
|
||||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.idea/
|
||||
|
||||
# Keystore files
|
||||
# Uncomment the following line if you do not want to check your keystore files in.
|
||||
#*.jks
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
|
||||
# CXX compile cache
|
||||
app/.cxx
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
google-services.json
|
||||
|
||||
# Freeline
|
||||
freeline.py
|
||||
freeline/
|
||||
freeline_project_description.json
|
||||
|
||||
# fastlane
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/test_output
|
||||
fastlane/readme.md
|
||||
|
@ -1,8 +1,16 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
/**
|
||||
* Use the number of seconds/10 since Jan 1 2016 as the versionCode.
|
||||
* This lets us upload a new build at most every 10 seconds for the
|
||||
* next 680 years.
|
||||
*/
|
||||
def autoVersion = (int) (((new Date().getTime() / 1000) - 1451606400) / 10)
|
||||
def buildType
|
||||
def abiFilter = "arm64-v8a" //, "x86"
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 29
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@ -13,34 +21,54 @@ android {
|
||||
// This is important as it will run lint but not abort on error
|
||||
// Lint has some overly obnoxious "errors" that should really be warnings
|
||||
abortOnError false
|
||||
|
||||
//Uncomment disable lines for test builds...
|
||||
//disable 'MissingTranslation'bin
|
||||
//disable 'ExtraTranslation'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.citra_emu"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 26
|
||||
|
||||
versionCode(getBuildVersionCode())
|
||||
|
||||
versionName "${getVersion()}"
|
||||
// TODO If this is ever modified, change application_id in strings.xml
|
||||
applicationId "org.citra.citra_emu"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 29
|
||||
versionCode autoVersion
|
||||
versionName getVersion()
|
||||
ndk.abiFilters abiFilter
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
if (project.hasProperty('keystore')) {
|
||||
storeFile file(project.property('keystore'))
|
||||
storePassword project.property('storepass')
|
||||
keyAlias project.property('keyalias')
|
||||
keyPassword project.property('keypass')
|
||||
}
|
||||
}
|
||||
//release {
|
||||
// storeFile file('')
|
||||
// storePassword System.getenv('ANDROID_KEYPASS')
|
||||
// keyAlias = 'key0'
|
||||
// keyPassword System.getenv('ANDROID_KEYPASS')
|
||||
//}
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
buildType = variant.buildType.name // sets the current build type
|
||||
}
|
||||
|
||||
// Define build types, which are orthogonal to product flavors.
|
||||
buildTypes {
|
||||
|
||||
// Signed by release key, allowing for upload to Play Store.
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
|
||||
// builds a release build that doesn't need signing
|
||||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||
relWithDebInfo {
|
||||
initWith release
|
||||
applicationIdSuffix ".debug"
|
||||
versionNameSuffix '-debug'
|
||||
signingConfig signingConfigs.debug
|
||||
minifyEnabled false
|
||||
testCoverageEnabled false
|
||||
debuggable true
|
||||
jniDebuggable true
|
||||
}
|
||||
|
||||
// Signed by debug key disallowing distribution on Play Store.
|
||||
@ -49,13 +77,14 @@ android {
|
||||
// TODO If this is ever modified, change application_id in debug/strings.xml
|
||||
applicationIdSuffix ".debug"
|
||||
versionNameSuffix '-debug'
|
||||
debuggable true
|
||||
jniDebuggable true
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version getCmakeVersion()
|
||||
version "3.10.2"
|
||||
path "../../../CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
@ -65,76 +94,46 @@ android {
|
||||
cmake {
|
||||
arguments "-DENABLE_QT=0", // Don't use QT
|
||||
"-DENABLE_SDL2=0", // Don't use SDL
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DENABLE_CUBEB=0",
|
||||
"-DANDROID_STL=c++_shared"
|
||||
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
|
||||
"-DANDROID_ARM_NEON=true" // cryptopp requires Neon to work
|
||||
|
||||
abiFilters "arm64-v8a"
|
||||
|
||||
targets "citra-android"
|
||||
abiFilters abiFilter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
androidSupportVersion = '26.1.0'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.android.support:support-v13:$androidSupportVersion"
|
||||
implementation "com.android.support:cardview-v7:$androidSupportVersion"
|
||||
implementation "com.android.support:recyclerview-v7:$androidSupportVersion"
|
||||
implementation "com.android.support:design:$androidSupportVersion"
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.2.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
|
||||
// Android TV UI libraries.
|
||||
implementation "com.android.support:leanback-v17:$androidSupportVersion"
|
||||
// For loading huge screenshots from the disk.
|
||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
||||
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
|
||||
// Allows FRP-style asynchronous operations in Android.
|
||||
implementation 'io.reactivex:rxandroid:1.2.1'
|
||||
implementation 'com.nononsenseapps:filepicker:4.2.1'
|
||||
implementation 'org.ini4j:ini4j:0.5.4'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
||||
|
||||
testImplementation "com.android.support.test:runner:1.0.2"
|
||||
androidTestImplementation "com.android.support.test:runner:1.0.1"
|
||||
implementation 'com.android.billingclient:billing:2.0.3'
|
||||
}
|
||||
|
||||
def getVersion() {
|
||||
def versionNumber = '0.0'
|
||||
def versionName = '0.0'
|
||||
|
||||
try {
|
||||
versionNumber = 'git describe --always --long'.execute([], project.rootDir).text
|
||||
versionName = 'git describe --always --long'.execute([], project.rootDir).text
|
||||
.trim()
|
||||
.replaceAll(/(-0)?-[^-]+$/, "")
|
||||
} catch (Exception e) {
|
||||
logger.error('Cannot find git, defaulting to dummy version number')
|
||||
}
|
||||
|
||||
return versionNumber
|
||||
}
|
||||
|
||||
|
||||
def getBuildVersionCode() {
|
||||
try {
|
||||
def versionNumber = 'git rev-list --first-parent --count HEAD'.execute([], project.rootDir).text
|
||||
.trim()
|
||||
return Integer.valueOf(versionNumber)
|
||||
} catch (Exception e) {
|
||||
logger.error('Cannot find git, defaulting to dummy version number')
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
def getCmakeVersion() {
|
||||
try {
|
||||
// Tokenized form of the output will be - ["cmake", "version", "M.m.p-rcx"], the version number
|
||||
// will be at index 2
|
||||
def version_string = 'cmake -version'.execute([], project.rootDir).text
|
||||
.trim().tokenize()[2]
|
||||
|
||||
return version_string
|
||||
}
|
||||
catch(Exception e) {
|
||||
logger.error('Cannot find Cmake, using default Cmake')
|
||||
}
|
||||
|
||||
return null
|
||||
return versionName
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.citra_emu.citra;
|
||||
package org.citra.citra_emu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("org.citra_emu.citra_android", appContext.getPackageName());
|
||||
assertEquals("org.citra.citra_emu", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -1,39 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.citra_emu.citra">
|
||||
package="org.citra.citra_emu">
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-feature android:glEsVersion="0x00030001" />
|
||||
<uses-feature android:glEsVersion="0x00030002" android:required="true" />
|
||||
|
||||
<uses-feature android:name="android.hardware.opengles.aep" android:required="true" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera.any"
|
||||
android:required="false" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
||||
|
||||
<application
|
||||
android:name="org.citra_emu.citra.CitraApplication"
|
||||
android:label="Citra"
|
||||
android:icon="@mipmap/ic_citra"
|
||||
android:allowBackup="true"
|
||||
android:name="org.citra.citra_emu.CitraApplication"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
android:supportsRtl="true"
|
||||
android:isGame="true"
|
||||
android:banner="@mipmap/ic_citra">
|
||||
android:banner="@mipmap/ic_launcher"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
|
||||
<activity
|
||||
android:name=".ui.main.MainActivity"
|
||||
android:theme="@style/CitraBase">
|
||||
android:name="org.citra.citra_emu.ui.main.MainActivity"
|
||||
android:theme="@style/CitraBase"
|
||||
android:resizeableActivity="false">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.features.settings.ui.SettingsActivity"
|
||||
android:configChanges="orientation|screenSize|uiMode"
|
||||
android:theme="@style/CitraSettingsBase"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.activities.EmulationActivity"
|
||||
android:resizeableActivity="false"
|
||||
android:theme="@style/CitraEmulationBase"
|
||||
android:launchMode="singleTop"/>
|
||||
|
||||
<service android:name="org.citra.citra_emu.utils.ForegroundService"/>
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.activities.CustomFilePickerActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/FilePickerTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.GET_CONTENT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name="org.citra.citra_emu.utils.DirectoryInitialization"/>
|
||||
|
||||
<provider
|
||||
android:name="org.citra.citra_emu.model.GameProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:enabled="true"
|
||||
android:exported="false">
|
||||
</provider>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.filesprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/nnf_provider_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
@ -1,16 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
add_library(citra-android SHARED
|
||||
logging/log.cpp
|
||||
logging/logcat_backend.cpp
|
||||
logging/logcat_backend.h
|
||||
native_interface.cpp
|
||||
native_interface.h
|
||||
ui/main/main_activity.cpp
|
||||
)
|
||||
|
||||
# find Android's log library
|
||||
find_library(log-lib log)
|
||||
|
||||
target_link_libraries(citra-android ${log-lib} core common inih)
|
||||
target_include_directories(citra-android PRIVATE "../../../../../" "./")
|
@ -1,15 +0,0 @@
|
||||
#include "common/logging/log.h"
|
||||
#include "native_interface.h"
|
||||
|
||||
namespace Log {
|
||||
extern "C" {
|
||||
JNICALL void Java_org_citra_1emu_citra_LOG_logEntry(JNIEnv* env, jclass type, jint level,
|
||||
jstring file_name, jint line_number,
|
||||
jstring function, jstring msg) {
|
||||
using CitraJNI::GetJString;
|
||||
FmtLogMessage(Class::Frontend, static_cast<Level>(level), GetJString(env, file_name).data(),
|
||||
static_cast<unsigned int>(line_number), GetJString(env, function).data(),
|
||||
GetJString(env, msg).data());
|
||||
}
|
||||
}
|
||||
} // namespace Log
|
@ -1,38 +0,0 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <android/log.h>
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/text_formatter.h"
|
||||
#include "logcat_backend.h"
|
||||
|
||||
namespace Log {
|
||||
void LogcatBackend::Write(const Entry& entry) {
|
||||
android_LogPriority priority;
|
||||
switch (entry.log_level) {
|
||||
case Level::Trace:
|
||||
priority = ANDROID_LOG_VERBOSE;
|
||||
break;
|
||||
case Level::Debug:
|
||||
priority = ANDROID_LOG_DEBUG;
|
||||
break;
|
||||
case Level::Info:
|
||||
priority = ANDROID_LOG_INFO;
|
||||
break;
|
||||
case Level::Warning:
|
||||
priority = ANDROID_LOG_WARN;
|
||||
break;
|
||||
case Level::Error:
|
||||
priority = ANDROID_LOG_ERROR;
|
||||
break;
|
||||
case Level::Critical:
|
||||
priority = ANDROID_LOG_FATAL;
|
||||
break;
|
||||
case Level::Count:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
__android_log_print(priority, "citra", "%s\n", FormatLogMessage(entry).c_str());
|
||||
}
|
||||
} // namespace Log
|
@ -1,22 +0,0 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/logging/backend.h"
|
||||
|
||||
namespace Log {
|
||||
class LogcatBackend : public Backend {
|
||||
public:
|
||||
static const char* Name() {
|
||||
return "Logcat";
|
||||
}
|
||||
|
||||
const char* GetName() const override {
|
||||
return Name();
|
||||
}
|
||||
|
||||
void Write(const Entry& entry) override;
|
||||
};
|
||||
} // namespace Log
|
@ -1,22 +0,0 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "native_interface.h"
|
||||
|
||||
namespace CitraJNI {
|
||||
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
std::string GetJString(JNIEnv* env, jstring jstr) {
|
||||
std::string result = "";
|
||||
if (!jstr)
|
||||
return result;
|
||||
|
||||
const char* s = env->GetStringUTFChars(jstr, nullptr);
|
||||
result = s;
|
||||
env->ReleaseStringUTFChars(jstr, s);
|
||||
return result;
|
||||
}
|
||||
} // namespace CitraJNI
|
@ -1,16 +0,0 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <jni.h>
|
||||
|
||||
namespace CitraJNI {
|
||||
extern "C" {
|
||||
jint JNI_OnLoad(JavaVM* vm, void* reserved);
|
||||
}
|
||||
|
||||
std::string GetJString(JNIEnv* env, jstring jstr);
|
||||
} // namespace CitraJNI
|
@ -1,31 +0,0 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/common_paths.h"
|
||||
#include "common/file_util.h"
|
||||
#include "common/logging/filter.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/settings.h"
|
||||
#include "logging/logcat_backend.h"
|
||||
#include "native_interface.h"
|
||||
|
||||
namespace MainActivity {
|
||||
extern "C" {
|
||||
JNICALL void Java_org_citra_1emu_citra_ui_main_MainActivity_initUserPath(JNIEnv* env, jclass type,
|
||||
jstring path) {
|
||||
FileUtil::SetUserPath(CitraJNI::GetJString(env, path) + '/');
|
||||
}
|
||||
|
||||
JNICALL void Java_org_citra_1emu_citra_ui_main_MainActivity_initLogging(JNIEnv* env, jclass type) {
|
||||
Log::Filter log_filter(Log::Level::Debug);
|
||||
log_filter.ParseFilterString(Settings::values.log_filter);
|
||||
Log::SetGlobalFilter(log_filter);
|
||||
|
||||
const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir);
|
||||
FileUtil::CreateFullPath(log_dir);
|
||||
Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE));
|
||||
Log::AddBackend(std::make_unique<Log::LogcatBackend>());
|
||||
}
|
||||
};
|
||||
}; // namespace MainActivity
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user