Compare commits
364 Commits
master
...
master_202
Author | SHA1 | Date | |
---|---|---|---|
|
dad2146e4e | ||
|
c2cf108498 | ||
|
ac592c4be9 | ||
|
bcace548e9 | ||
|
711089b46b | ||
|
955b51b994 | ||
|
bde1fe9f50 | ||
|
ecfcbcc9a2 | ||
|
a558ff0152 | ||
|
3d75c14457 | ||
|
1a4f50d800 | ||
|
3608cb90bb | ||
|
e2757f75a5 | ||
|
85319462bf | ||
|
6ba29bc062 | ||
|
0c5f7f8d41 | ||
|
88a66840ed | ||
|
7b0c77c101 | ||
|
232cfc3ffa | ||
|
58480f848e | ||
|
c8e01d29a8 | ||
|
cb26b07f0f | ||
|
7d7eed2a91 | ||
|
8ebc94d899 | ||
|
0945c9d5e9 | ||
|
8c0c3baf63 | ||
|
4ecb4a22b3 | ||
|
1086333105 | ||
|
95f1cb4187 | ||
|
0589915fe6 | ||
|
ae7fc8fb2f | ||
|
8f7260b4c1 | ||
|
1d3bccdd9a | ||
|
97d0a8f0ff | ||
|
bb6dd1fe42 | ||
|
bcfd20e343 | ||
|
cdc6606c02 | ||
|
c27fa394e7 | ||
|
1c916a0341 | ||
|
f7d5fd815c | ||
|
393d3a3887 | ||
|
12a1a16c6e | ||
|
d80038b02e | ||
|
b4b1b38404 | ||
|
cb5f1dc554 | ||
|
9f688b0f0f | ||
|
76708b8838 | ||
|
f7fbde3453 | ||
|
290aabdb5f | ||
|
af3efa2975 | ||
|
5cb361111b | ||
|
1379f37875 | ||
|
c514e9028b | ||
|
cd940db10c | ||
|
5d6b270037 | ||
|
5627e04195 | ||
|
c2c64a8098 | ||
|
f940aa7497 | ||
|
d9bb3efeb0 | ||
|
9965188e87 | ||
|
87ade92058 | ||
|
c0e31e3de6 | ||
|
b7b40b90c0 | ||
|
0d68596c54 | ||
|
1fb5659dec | ||
|
e2da4ca470 | ||
|
66e6c9581d | ||
|
8928837ed0 | ||
|
c129683607 | ||
|
ae07f57a84 | ||
|
44cbc4076b | ||
|
34094a70e7 | ||
|
c890ad6d60 | ||
|
65f4c3232c | ||
|
78f1ae8c0f | ||
|
5f73e23b14 | ||
|
ad021f205d | ||
|
b480b78588 | ||
|
e29f8a49d5 | ||
|
09897bfcc6 | ||
|
d61b062196 | ||
|
481d63913d | ||
|
b8c3d24275 | ||
|
da8db21006 | ||
|
3a16d5698e | ||
|
e937224646 | ||
|
afcb405e5f | ||
|
5d06457ad2 | ||
|
461cfd9e1d | ||
|
85069301e5 | ||
|
80306a8020 | ||
|
7d42c15c00 | ||
|
597e42d5f5 | ||
|
c76b7d88eb | ||
|
1d1797d90b | ||
|
84dc75806f | ||
|
ee3bd5e573 | ||
|
5b70997d38 | ||
|
7e16cab310 | ||
|
9a6a1045ee | ||
|
a77549d168 | ||
|
3a0156e8d0 | ||
|
0209aef466 | ||
|
85f3e33617 | ||
|
baf6d15d98 | ||
|
3d88756dde | ||
|
7c82fb6382 | ||
|
6abed35dbe | ||
|
11682a7be9 | ||
|
6f68cff90a | ||
|
972057e615 | ||
|
45ee06090a | ||
|
473d25b8fa | ||
|
ffd914df09 | ||
|
5595639b08 | ||
|
780a144e53 | ||
|
f23a4f73df | ||
|
2df0d04d2e | ||
|
eab2e7ec12 | ||
|
5792d378b5 | ||
|
516cb5f1c5 | ||
|
ef9c40869c | ||
|
d7d65cd8ab | ||
|
f03192a3c0 | ||
|
ae4b851e6d | ||
|
27aaa54594 | ||
|
5c385c0c9e | ||
|
ec751c7c68 | ||
|
f371369e85 | ||
|
463449e72a | ||
|
0d14ea8783 | ||
|
469a3a4eea | ||
|
1796965504 | ||
|
9f1114aace | ||
|
2ca4f58787 | ||
|
6412c9972f | ||
|
46c3b973f6 | ||
|
9a7b6c8a4b | ||
|
404c570781 | ||
|
254fedc569 | ||
|
5738cf946a | ||
|
320cc03abb | ||
|
69a8924344 | ||
|
c7135ae91f | ||
|
30dfe6a426 | ||
|
a395b8b9ba | ||
|
fc0ace03d2 | ||
|
1cfa0e97a2 | ||
|
6438c5e6c3 | ||
|
775a4a8fc2 | ||
|
13705ea11e | ||
|
42556badef | ||
|
93ddc0b5f3 | ||
|
1401ab9bfc | ||
|
743a0f8401 | ||
|
b13cd2d181 | ||
|
ff5b32e292 | ||
|
eadefb446e | ||
|
7fcde40d2b | ||
|
53f92965bd | ||
|
60a6775558 | ||
|
82fc02aa48 | ||
|
5cb0e2809e | ||
|
4ce770d23c | ||
|
2cf5086d36 | ||
|
b254548b39 | ||
|
e66a086560 | ||
|
1874932a5e | ||
|
b51c037fa1 | ||
|
a3176778c5 | ||
|
280b819386 | ||
|
ddf6c5aeca | ||
|
65d774f9cd | ||
|
fa3f1eea14 | ||
|
737fbcb490 | ||
|
d9f33b63fc | ||
|
a031198392 | ||
|
2798d82917 | ||
|
0e28702b82 | ||
|
bfdb1a78b3 | ||
|
cd6da64cf1 | ||
|
c6b6d82e92 | ||
|
a711ee239e | ||
|
93765b747d | ||
|
b3a2ae2ef5 | ||
|
f6044b6ba2 | ||
|
7e3f314a19 | ||
|
19b70633ec | ||
|
43bf0f89a6 | ||
|
fe32c0f474 | ||
|
5841556fb0 | ||
|
842bfa2beb | ||
|
0b134834ec | ||
|
b1ee6b870b | ||
|
9e445a4415 | ||
|
c042565065 | ||
|
cd959ce983 | ||
|
68fe005d1d | ||
|
a62c888e15 | ||
|
6aa04a3bd3 | ||
|
fd2d87f8d7 | ||
|
fdbe6cde46 | ||
|
13d337bfff | ||
|
9c1a855202 | ||
|
799e2bb3c2 | ||
|
4598e87fe0 | ||
|
729ca846ad | ||
|
1ff101c009 | ||
|
834e99c821 | ||
|
4ede2702c5 | ||
|
58fbfafd69 | ||
|
ef458ab0d9 | ||
|
675c9a6900 | ||
|
8c5d101588 | ||
|
b31e4b7e63 | ||
|
e0780107bd | ||
|
0a8fd29d02 | ||
|
0d93a232c2 | ||
|
783a5aacc0 | ||
|
a19c808774 | ||
|
81918d76bc | ||
|
5275104acb | ||
|
a02a70fd69 | ||
|
02d92c4096 | ||
|
b0ae67f4b6 | ||
|
174f07b526 | ||
|
7ed340c91e | ||
|
8fac89e7c8 | ||
|
ffc7e6acc3 | ||
|
f9a737dbd6 | ||
|
c491655371 | ||
|
c747e02100 | ||
|
4c46697866 | ||
|
ec41880219 | ||
|
96c129595d | ||
|
8c911f8f59 | ||
|
a7e7d98aac | ||
|
2fd197c9c8 | ||
|
ee6737e07b | ||
|
8e8f840394 | ||
|
e86f623bf8 | ||
|
8f9debfd65 | ||
|
f342e3cf17 | ||
|
c34a7e9e04 | ||
|
bda8d3753d | ||
|
eb8e4aa7b2 | ||
|
5c62b603ec | ||
|
b3528a4c70 | ||
|
4b40f2a581 | ||
|
90d30da5bb | ||
|
7ca2991171 | ||
|
ffbb89de98 | ||
|
003e19ba7e | ||
|
ac8a7a699e | ||
|
263c8939d2 | ||
|
9be1c670b2 | ||
|
83a7ba273d | ||
|
2493b8637b | ||
|
44ee7e545f | ||
|
0a85d122a1 | ||
|
a1576193b9 | ||
|
80105b12e9 | ||
|
fd9038efc9 | ||
|
a5366b1e7e | ||
|
c4af6bbdaf | ||
|
b4e72771a5 | ||
|
81042d8e12 | ||
|
d690e4d120 | ||
|
184fa8820b | ||
|
1968f08c37 | ||
|
7538244a03 | ||
|
d17dff9bfb | ||
|
5041721219 | ||
|
b317b99023 | ||
|
67fbf8efe9 | ||
|
967eb85a6a | ||
|
d0d6c9c93e | ||
|
5029373225 | ||
|
1d79e59870 | ||
|
6226463109 | ||
|
9e4e54cbd7 | ||
|
0b88b02b47 | ||
|
0231fbed80 | ||
|
853839e0b2 | ||
|
1ba645266d | ||
|
2079ca13fe | ||
|
d453ae7e1e | ||
|
162534ab56 | ||
|
1c5e081dfe | ||
|
902fee74f9 | ||
|
862d090b09 | ||
|
cfbd193ff3 | ||
|
f43141260c | ||
|
16cd2b79c0 | ||
|
0bb0bcc2c7 | ||
|
ebe77c59f2 | ||
|
991ec9f2b0 | ||
|
ba9a467f2b | ||
|
281ec2da7b | ||
|
77cd5ea046 | ||
|
d2a23098f2 | ||
|
f90853e30d | ||
|
2472e954f1 | ||
|
c8f37a97fd | ||
|
a1f58cb5eb | ||
|
a64559a4c0 | ||
|
628675deb6 | ||
|
43ed38242b | ||
|
8825af368a | ||
|
b719615714 | ||
|
a0755458c3 | ||
|
39926ce7a0 | ||
|
58b55c5cd6 | ||
|
4f544aa98c | ||
|
aa064f9f6b | ||
|
d8784c6acf | ||
|
930d93b86c | ||
|
b8b48bce4e | ||
|
ddafab17a9 | ||
|
c699fd7a48 | ||
|
27b1f62ecd | ||
|
48d9d05988 | ||
|
91ce94fd93 | ||
|
9160085b7a | ||
|
c623504308 | ||
|
324cf9b019 | ||
|
a9362d60c9 | ||
|
0f2e28ef5c | ||
|
4c4da0510e | ||
|
a60c447d31 | ||
|
56fb1e0549 | ||
|
43bb93795a | ||
|
37cecc53a2 | ||
|
0fb74ba437 | ||
|
0451a70b6e | ||
|
9656dedb95 | ||
|
c093b85654 | ||
|
4f1218c90d | ||
|
09e15e750d | ||
|
f5a9d9276c | ||
|
2a47fb0768 | ||
|
a64a3b9a0e | ||
|
d9c9103927 | ||
|
bc06218da3 | ||
|
832314a813 | ||
|
62cf3140dc | ||
|
035bb32281 | ||
|
2353fbe146 | ||
|
e110b458a3 | ||
|
27e84f9cfc | ||
|
f37bdd0121 | ||
|
b9cd650a24 | ||
|
88cdfb093a | ||
|
8ce38efd13 | ||
|
2acca2b6ca | ||
|
2064653bcd | ||
|
c48e96dc1f | ||
|
9c4524281b | ||
|
99a2391d05 | ||
|
7b54e7dfc7 | ||
|
3eac04285c | ||
|
3a4b387908 | ||
|
5b38151729 | ||
|
248a406e99 |
39
.appveyor/FindDependencies.ps1
Normal file
39
.appveyor/FindDependencies.ps1
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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
|
||||||
|
}
|
39
.appveyor/ProcessPdb.ps1
Normal file
39
.appveyor/ProcessPdb.ps1
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash -ex
|
|
||||||
|
|
||||||
# Run clang-format
|
|
||||||
./.ci/linux-clang-format/script.sh
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/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,10 +0,0 @@
|
|||||||
#!/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"
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/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,12 +1,3 @@
|
|||||||
---
|
|
||||||
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:
|
Please read the FAQ:
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,11 +0,0 @@
|
|||||||
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
134
.github/workflows/ci.yml
vendored
@ -1,134 +0,0 @@
|
|||||||
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"]'
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -12,7 +12,7 @@
|
|||||||
url = https://github.com/philsquared/Catch.git
|
url = https://github.com/philsquared/Catch.git
|
||||||
[submodule "dynarmic"]
|
[submodule "dynarmic"]
|
||||||
path = externals/dynarmic
|
path = externals/dynarmic
|
||||||
url = https://github.com/citra-emu/dynarmic.git
|
url = https://github.com/citra-emu/dynarmic-android
|
||||||
[submodule "xbyak"]
|
[submodule "xbyak"]
|
||||||
path = externals/xbyak
|
path = externals/xbyak
|
||||||
url = https://github.com/herumi/xbyak.git
|
url = https://github.com/herumi/xbyak.git
|
||||||
|
13
.lgtm.yml
13
.lgtm.yml
@ -1,13 +0,0 @@
|
|||||||
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
Normal file
87
.travis.yml
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
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
|
3
.travis/clang-format/deps.sh
Executable file
3
.travis/clang-format/deps.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
docker pull citraemu/build-environments:linux-clang-format
|
5
.travis/clang-format/docker.sh
Executable file
5
.travis/clang-format/docker.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
# Run clang-format
|
||||||
|
cd /citra
|
||||||
|
./.travis/clang-format/script.sh
|
@ -1,13 +1,13 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop \
|
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .travis* dist/*.desktop \
|
||||||
dist/*.svg dist/*.xml; then
|
dist/*.svg dist/*.xml; then
|
||||||
echo Trailing whitespace found, aborting
|
echo Trailing whitespace found, aborting
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Default clang-format points to default 3.5 version one
|
# Default clang-format points to default 3.5 version one
|
||||||
CLANG_FORMAT=clang-format-10
|
CLANG_FORMAT=clang-format-6.0
|
||||||
$CLANG_FORMAT --version
|
$CLANG_FORMAT --version
|
||||||
|
|
||||||
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
|
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
|
@ -10,11 +10,11 @@ cp -r dist/scripting "$REV_NAME"
|
|||||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
||||||
|
|
||||||
# Find out what release we are building
|
# Find out what release we are building
|
||||||
if [ -z $GIT_TAG_NAME ]; then
|
if [ -z $TRAVIS_TAG ]; then
|
||||||
RELEASE_NAME=head
|
RELEASE_NAME=head
|
||||||
else
|
else
|
||||||
RELEASE_NAME=$(echo $GIT_TAG_NAME | cut -d- -f1)
|
RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
|
||||||
if [ "$NAME" = "linux-mingw" ]; then
|
if [ "$NAME" = "MinGW build" ]; then
|
||||||
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
4
.travis/linux-flatpak/deps.sh
Executable file
4
.travis/linux-flatpak/deps.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
# Download the docker image that contains flatpak build dependencies
|
||||||
|
docker pull citraemu/build-environments:linux-flatpak
|
@ -87,8 +87,7 @@ cat > /tmp/org.citra.$REPO_NAME.json <<EOF
|
|||||||
"-DENABLE_QT_TRANSLATION=ON",
|
"-DENABLE_QT_TRANSLATION=ON",
|
||||||
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
|
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
|
||||||
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
|
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
|
||||||
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON",
|
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
|
||||||
"-DENABLE_FDK=ON"
|
|
||||||
],
|
],
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
"/bin/citra",
|
"/bin/citra",
|
5
.travis/linux-frozen/deps.sh
Executable file
5
.travis/linux-frozen/deps.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
sudo apt-get -y install binutils-gold
|
||||||
|
|
||||||
|
docker pull citraemu/build-environments:linux-frozen
|
@ -7,6 +7,7 @@ chmod a+x ~/bin/gold/ld
|
|||||||
export CFLAGS="-B$HOME/bin/gold $CFLAGS"
|
export CFLAGS="-B$HOME/bin/gold $CFLAGS"
|
||||||
export CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS"
|
export CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS"
|
||||||
|
|
||||||
|
cd /citra
|
||||||
|
|
||||||
mkdir build && cd build
|
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++
|
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++
|
3
.travis/linux-mingw/deps.sh
Executable file
3
.travis/linux-mingw/deps.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
docker pull citraemu/build-environments:linux-mingw
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# override CI ccache size
|
cd /citra
|
||||||
mkdir -p "$HOME/.ccache/"
|
# override Travis CI unreasonable ccache size
|
||||||
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
|
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
@ -27,4 +27,4 @@ cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
|
|||||||
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
|
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
|
||||||
rm -f package/mediaservice/*d.dll
|
rm -f package/mediaservice/*d.dll
|
||||||
|
|
||||||
python3 .ci/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
|
python3 .travis/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
|
@ -1,6 +1,3 @@
|
|||||||
try:
|
|
||||||
import lief
|
|
||||||
except ImportError:
|
|
||||||
import pefile
|
import pefile
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
@ -16,26 +13,13 @@ KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
|
|||||||
DLL_PATH = [
|
DLL_PATH = [
|
||||||
'/usr/x86_64-w64-mingw32/bin/',
|
'/usr/x86_64-w64-mingw32/bin/',
|
||||||
'/usr/x86_64-w64-mingw32/lib/',
|
'/usr/x86_64-w64-mingw32/lib/',
|
||||||
'/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/'
|
'/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
|
||||||
]
|
]
|
||||||
|
|
||||||
missing = []
|
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):
|
def parse_imports(file_name):
|
||||||
if globals().get('lief'):
|
|
||||||
return parse_imports_lief(file_name)
|
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
pe = pefile.PE(file_name, fast_load=True)
|
pe = pefile.PE(file_name, fast_load=True)
|
||||||
pe.parse_data_directories()
|
pe.parse_data_directories()
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
. .ci/common/pre-upload.sh
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
|
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||||
@ -10,4 +10,4 @@ mkdir "$REV_NAME"
|
|||||||
# get around the permission issues
|
# get around the permission issues
|
||||||
cp -r package/* "$REV_NAME"
|
cp -r package/* "$REV_NAME"
|
||||||
|
|
||||||
. .ci/common/post-upload.sh
|
. .travis/common/post-upload.sh
|
3
.travis/linux/deps.sh
Executable file
3
.travis/linux/deps.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
docker pull citraemu/build-environments:linux-fresh
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
cd /citra
|
||||||
|
|
||||||
mkdir build && cd build
|
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
|
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
|
ninja
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
. .ci/common/pre-upload.sh
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||||
@ -8,12 +8,12 @@ COMPRESSION_FLAGS="-cJvf"
|
|||||||
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/bin/Release/citra "$REV_NAME"
|
cp build/bin/citra "$REV_NAME"
|
||||||
cp build/bin/Release/citra-room "$REV_NAME"
|
cp build/bin/citra-room "$REV_NAME"
|
||||||
cp build/bin/Release/citra-qt "$REV_NAME"
|
cp build/bin/citra-qt "$REV_NAME"
|
||||||
|
|
||||||
# We need icons on Linux for .desktop entries
|
# We need icons on Linux for .desktop entries
|
||||||
mkdir "$REV_NAME/dist"
|
mkdir "$REV_NAME/dist"
|
||||||
cp dist/icon.png "$REV_NAME/dist/citra.png"
|
cp dist/icon.png "$REV_NAME/dist/citra.png"
|
||||||
|
|
||||||
. .ci/common/post-upload.sh
|
. .travis/common/post-upload.sh
|
@ -2,23 +2,12 @@
|
|||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||||
export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$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
|
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 -GNinja
|
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
|
||||||
ninja
|
make -j4
|
||||||
|
|
||||||
ccache -s
|
|
||||||
|
|
||||||
ctest -VV -C Release
|
ctest -VV -C Release
|
6
.travis/macos/deps.sh
Executable file
6
.travis/macos/deps.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
brew update
|
||||||
|
brew unlink python@2
|
||||||
|
brew install qt5 sdl2 p7zip ccache ffmpeg
|
||||||
|
pip3 install macpack
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
. .ci/common/pre-upload.sh
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||||
@ -8,9 +8,9 @@ COMPRESSION_FLAGS="-czvf"
|
|||||||
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/bin/Release/citra "$REV_NAME"
|
cp build/bin/citra "$REV_NAME"
|
||||||
cp -r build/bin/Release/citra-qt.app "$REV_NAME"
|
cp -r build/bin/citra-qt.app "$REV_NAME"
|
||||||
cp build/bin/Release/citra-room "$REV_NAME"
|
cp build/bin/citra-room "$REV_NAME"
|
||||||
|
|
||||||
# move libs into folder for deployment
|
# move libs into folder for deployment
|
||||||
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
|
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
|
||||||
@ -20,14 +20,10 @@ $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable=
|
|||||||
# move libs into folder for deployment
|
# move libs into folder for deployment
|
||||||
macpack "${REV_NAME}/citra" -d "libs"
|
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
|
# Make the launching script executable
|
||||||
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
|
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
|
||||||
|
|
||||||
# Verify loader instructions
|
# Verify loader instructions
|
||||||
find "$REV_NAME" -type f -exec otool -L {} \;
|
find "$REV_NAME" -exec otool -L {} \;
|
||||||
|
|
||||||
. .ci/common/post-upload.sh
|
. .travis/common/post-upload.sh
|
3
.travis/transifex/deps.sh
Executable file
3
.travis/transifex/deps.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
docker pull citraemu/build-environments:linux-transifex
|
1
.ci/transifex/docker.sh → .travis/transifex/docker.sh
Executable file → Normal file
1
.ci/transifex/docker.sh → .travis/transifex/docker.sh
Executable file → Normal file
@ -30,6 +30,7 @@ cmake --version
|
|||||||
gcc -v
|
gcc -v
|
||||||
tx --version
|
tx --version
|
||||||
|
|
||||||
|
cd /citra
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
|
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
|
||||||
make translation
|
make translation
|
@ -126,7 +126,7 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
# set up output paths for executable binaries
|
# set up output paths for executable binaries
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/$<CONFIG>)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
|
||||||
|
|
||||||
# System imported libraries
|
# System imported libraries
|
||||||
@ -186,7 +186,7 @@ if (ENABLE_QT)
|
|||||||
set(QT_PREFIX_HINT)
|
set(QT_PREFIX_HINT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Multimedia ${QT_PREFIX_HINT})
|
find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL Multimedia ${QT_PREFIX_HINT})
|
||||||
|
|
||||||
if (ENABLE_QT_TRANSLATION)
|
if (ENABLE_QT_TRANSLATION)
|
||||||
find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT})
|
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.
|
# against all the src files. This should be used before making a pull request.
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
|
|
||||||
set(CLANG_FORMAT_POSTFIX "-10")
|
set(CLANG_FORMAT_POSTFIX "-6.0")
|
||||||
find_program(CLANG_FORMAT
|
find_program(CLANG_FORMAT
|
||||||
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
||||||
clang-format
|
clang-format
|
||||||
@ -261,7 +261,7 @@ if (NOT CLANG_FORMAT)
|
|||||||
message(STATUS "Clang format not found! Downloading...")
|
message(STATUS "Clang format not found! Downloading...")
|
||||||
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
||||||
file(DOWNLOAD
|
file(DOWNLOAD
|
||||||
https://github.com/citra-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||||
"${CLANG_FORMAT}" SHOW_PROGRESS
|
"${CLANG_FORMAT}" SHOW_PROGRESS
|
||||||
STATUS DOWNLOAD_SUCCESS)
|
STATUS DOWNLOAD_SUCCESS)
|
||||||
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
||||||
@ -344,7 +344,7 @@ add_subdirectory(externals)
|
|||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if (USE_SYSTEM_BOOST)
|
if (USE_SYSTEM_BOOST)
|
||||||
find_package(Boost 1.70.0 COMPONENTS serialization REQUIRED)
|
find_package(Boost 1.70.0 QUIET REQUIRED)
|
||||||
else()
|
else()
|
||||||
add_library(Boost::boost ALIAS boost)
|
add_library(Boost::boost ALIAS boost)
|
||||||
add_library(Boost::serialization ALIAS boost_serialization)
|
add_library(Boost::serialization ALIAS boost_serialization)
|
||||||
|
@ -16,6 +16,7 @@ function(copy_citra_Qt5_deps target_dir)
|
|||||||
icuuc*.dll
|
icuuc*.dll
|
||||||
Qt5Core$<$<CONFIG:Debug>:d>.*
|
Qt5Core$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Gui$<$<CONFIG:Debug>:d>.*
|
Qt5Gui$<$<CONFIG:Debug>:d>.*
|
||||||
|
Qt5OpenGL$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Widgets$<$<CONFIG:Debug>:d>.*
|
Qt5Widgets$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Multimedia$<$<CONFIG:Debug>:d>.*
|
Qt5Multimedia$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Network$<$<CONFIG:Debug>:d>.*
|
Qt5Network$<$<CONFIG:Debug>:d>.*
|
||||||
|
@ -21,9 +21,9 @@ get_timestamp(BUILD_DATE)
|
|||||||
set(REPO_NAME "")
|
set(REPO_NAME "")
|
||||||
set(BUILD_VERSION "0")
|
set(BUILD_VERSION "0")
|
||||||
if (DEFINED ENV{CI})
|
if (DEFINED ENV{CI})
|
||||||
if (DEFINED ENV{GITHUB_ACTIONS})
|
if (DEFINED ENV{TRAVIS})
|
||||||
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY})
|
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
||||||
set(BUILD_TAG $ENV{GIT_TAG_NAME})
|
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
||||||
elseif(DEFINED ENV{APPVEYOR})
|
elseif(DEFINED ENV{APPVEYOR})
|
||||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
||||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
# 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)
|
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
Citra
|
Citra
|
||||||
==============
|
==============
|
||||||
[](https://github.com/citra-emu/citra/actions)
|
[](https://travis-ci.com/citra-emu/citra)
|
||||||
|
[](https://ci.appveyor.com/project/bunnei/citra)
|
||||||
[](https://app.bitrise.io/app/4ccd8e5720f0d13b)
|
[](https://app.bitrise.io/app/4ccd8e5720f0d13b)
|
||||||
[](https://discord.gg/FAXfZV9)
|
[](https://discord.gg/FAXfZV9)
|
||||||
|
|
||||||
@ -24,7 +25,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 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 check out the [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translations.
|
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.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
|
173
appveyor.yml
Normal file
173
appveyor.yml
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
# 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.
|
The next change in your repository that matches any of your trigger map event will start **deploy** workflow.
|
||||||
steps:
|
steps:
|
||||||
- cache-pull@2.4.0: {}
|
- cache-pull@2.0.1: {}
|
||||||
- script@1.1.6:
|
- script@1.1.5:
|
||||||
title: Install newer cmake
|
title: Install newer cmake
|
||||||
inputs:
|
inputs:
|
||||||
- content: |-
|
- content: |-
|
||||||
@ -52,7 +52,7 @@ workflows:
|
|||||||
sudo apt remove cmake -y
|
sudo apt remove cmake -y
|
||||||
sudo apt purge --auto-remove cmake -y
|
sudo apt purge --auto-remove cmake -y
|
||||||
sudo apt install ninja-build -y
|
sudo apt install ninja-build -y
|
||||||
version=3.19
|
version=3.10
|
||||||
build=2
|
build=2
|
||||||
mkdir ~/temp
|
mkdir ~/temp
|
||||||
cd ~/temp
|
cd ~/temp
|
||||||
@ -60,13 +60,13 @@ workflows:
|
|||||||
sudo mkdir /opt/cmake
|
sudo mkdir /opt/cmake
|
||||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
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"
|
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||||
- install-missing-android-tools@2.3.8:
|
- install-missing-android-tools@2.3.3:
|
||||||
inputs:
|
inputs:
|
||||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||||
- change-android-versioncode-and-versionname@1.1.1:
|
- change-android-versioncode-and-versionname@1.1.1:
|
||||||
inputs:
|
inputs:
|
||||||
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
|
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
|
||||||
- android-lint@0.9.8:
|
- android-lint@0.9.5:
|
||||||
inputs:
|
inputs:
|
||||||
- project_location: "$PROJECT_LOCATION"
|
- project_location: "$PROJECT_LOCATION"
|
||||||
- module: "$MODULE"
|
- module: "$MODULE"
|
||||||
@ -76,19 +76,19 @@ workflows:
|
|||||||
- project_location: "$PROJECT_LOCATION"
|
- project_location: "$PROJECT_LOCATION"
|
||||||
- module: "$MODULE"
|
- module: "$MODULE"
|
||||||
- variant: "$TEST_VARIANT"
|
- variant: "$TEST_VARIANT"
|
||||||
- android-build@0.10.3:
|
- android-build@0.9.5:
|
||||||
inputs:
|
inputs:
|
||||||
- project_location: "$PROJECT_LOCATION"
|
- project_location: "$PROJECT_LOCATION"
|
||||||
- module: "$MODULE"
|
- module: "$MODULE"
|
||||||
- variant: "$BUILD_VARIANT"
|
- variant: "$BUILD_VARIANT"
|
||||||
- sign-apk@1.2.3:
|
- sign-apk@1.2.3:
|
||||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
||||||
- deploy-to-bitrise-io@1.11.1: {}
|
- deploy-to-bitrise-io@1.3.18: {}
|
||||||
- cache-push@2.4.1: {}
|
- cache-push@2.0.5: {}
|
||||||
primary:
|
primary:
|
||||||
steps:
|
steps:
|
||||||
- cache-pull@2.4.0: {}
|
- cache-pull@2.0.1: {}
|
||||||
- script@1.1.6:
|
- script@1.1.5:
|
||||||
title: Install newer cmake
|
title: Install newer cmake
|
||||||
inputs:
|
inputs:
|
||||||
- content: |-
|
- content: |-
|
||||||
@ -97,7 +97,7 @@ workflows:
|
|||||||
sudo apt remove cmake -y
|
sudo apt remove cmake -y
|
||||||
sudo apt purge --auto-remove cmake -y
|
sudo apt purge --auto-remove cmake -y
|
||||||
sudo apt install ninja-build -y
|
sudo apt install ninja-build -y
|
||||||
version=3.19
|
version=3.10
|
||||||
build=2
|
build=2
|
||||||
mkdir ~/temp
|
mkdir ~/temp
|
||||||
cd ~/temp
|
cd ~/temp
|
||||||
@ -105,20 +105,20 @@ workflows:
|
|||||||
sudo mkdir /opt/cmake
|
sudo mkdir /opt/cmake
|
||||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
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"
|
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||||
- install-missing-android-tools@2.3.8:
|
- install-missing-android-tools@2.3.3:
|
||||||
inputs:
|
inputs:
|
||||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||||
- android-lint@0.9.8:
|
- android-lint@0.9.5:
|
||||||
inputs:
|
inputs:
|
||||||
- project_location: "$PROJECT_LOCATION"
|
- project_location: "$PROJECT_LOCATION"
|
||||||
- module: "$MODULE"
|
- module: "$MODULE"
|
||||||
- variant: "$TEST_VARIANT"
|
- variant: "$TEST_VARIANT"
|
||||||
- android-build@0.10.3:
|
- android-build@0.9.5:
|
||||||
inputs:
|
inputs:
|
||||||
- variant: Debug
|
- variant: Debug
|
||||||
- project_location: "$PROJECT_LOCATION"
|
- project_location: "$PROJECT_LOCATION"
|
||||||
- deploy-to-bitrise-io@1.11.1: {}
|
- deploy-to-bitrise-io@1.3.18: {}
|
||||||
- cache-push@2.4.1: {}
|
- cache-push@2.0.5: {}
|
||||||
app:
|
app:
|
||||||
envs:
|
envs:
|
||||||
- opts:
|
- opts:
|
||||||
|
68
dist/citra.manifest
vendored
68
dist/citra.manifest
vendored
@ -1,58 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly manifestVersion="1.0"
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
xmlns="urn:schemas-microsoft-com:asm.v1"
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
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>
|
<security>
|
||||||
<requestedPrivileges>
|
<requestedPrivileges>
|
||||||
<!--
|
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||||
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>
|
</requestedPrivileges>
|
||||||
</security>
|
</security>
|
||||||
</trustInfo>
|
</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>
|
965
dist/languages/da_DK.ts
vendored
965
dist/languages/da_DK.ts
vendored
File diff suppressed because it is too large
Load Diff
1209
dist/languages/de.ts
vendored
1209
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load Diff
968
dist/languages/es_ES.ts
vendored
968
dist/languages/es_ES.ts
vendored
File diff suppressed because it is too large
Load Diff
1035
dist/languages/fi.ts
vendored
1035
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load Diff
965
dist/languages/fi_FI.ts
vendored
965
dist/languages/fi_FI.ts
vendored
File diff suppressed because it is too large
Load Diff
1088
dist/languages/fr.ts
vendored
1088
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load Diff
5400
dist/languages/hu_HU.ts
vendored
Normal file
5400
dist/languages/hu_HU.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
971
dist/languages/id.ts
vendored
971
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load Diff
974
dist/languages/it.ts
vendored
974
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load Diff
987
dist/languages/ja_JP.ts
vendored
987
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load Diff
970
dist/languages/ko_KR.ts
vendored
970
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load Diff
965
dist/languages/lt_LT.ts
vendored
965
dist/languages/lt_LT.ts
vendored
File diff suppressed because it is too large
Load Diff
1006
dist/languages/nb.ts
vendored
1006
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load Diff
967
dist/languages/nl.ts
vendored
967
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load Diff
1205
dist/languages/pl_PL.ts
vendored
1205
dist/languages/pl_PL.ts
vendored
File diff suppressed because it is too large
Load Diff
1044
dist/languages/pt_BR.ts
vendored
1044
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load Diff
965
dist/languages/ro_RO.ts
vendored
965
dist/languages/ro_RO.ts
vendored
File diff suppressed because it is too large
Load Diff
965
dist/languages/ru_RU.ts
vendored
965
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load Diff
981
dist/languages/tr_TR.ts
vendored
981
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load Diff
967
dist/languages/vi_VN.ts
vendored
967
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load Diff
968
dist/languages/zh_CN.ts
vendored
968
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load Diff
967
dist/languages/zh_TW.ts
vendored
967
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load Diff
23
externals/CMakeLists.txt
vendored
23
externals/CMakeLists.txt
vendored
@ -30,20 +30,13 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
|
|||||||
# Crypto++
|
# Crypto++
|
||||||
add_subdirectory(cryptopp)
|
add_subdirectory(cryptopp)
|
||||||
|
|
||||||
# Xbyak
|
|
||||||
if (ARCHITECTURE_x86_64)
|
|
||||||
add_library(xbyak INTERFACE)
|
|
||||||
target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
|
|
||||||
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Dynarmic
|
# Dynarmic
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
|
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
|
||||||
set(DYNARMIC_TESTS OFF)
|
add_library(xbyak INTERFACE)
|
||||||
|
option(DYNARMIC_TESTS OFF)
|
||||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||||
set(DYNARMIC_FRONTENDS "A32")
|
set(DYNARMIC_FRONTENDS "A32")
|
||||||
add_subdirectory(dynarmic)
|
add_subdirectory(dynarmic)
|
||||||
endif()
|
|
||||||
|
|
||||||
# libfmt
|
# libfmt
|
||||||
add_subdirectory(fmt)
|
add_subdirectory(fmt)
|
||||||
@ -79,9 +72,17 @@ target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
|
|||||||
# Teakra
|
# Teakra
|
||||||
add_subdirectory(teakra EXCLUDE_FROM_ALL)
|
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
|
# Zstandard
|
||||||
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
|
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/externals/zstd/lib>)
|
target_include_directories(libzstd_static INTERFACE ./zstd/lib)
|
||||||
|
|
||||||
# ENet
|
# ENet
|
||||||
add_subdirectory(enet)
|
add_subdirectory(enet)
|
||||||
|
2
externals/catch
vendored
2
externals/catch
vendored
@ -1 +1 @@
|
|||||||
Subproject commit de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad
|
Subproject commit 15cf3caaceb21172ea42a24e595a2eb58c3ec960
|
2
externals/cubeb
vendored
2
externals/cubeb
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1d66483ad2b93f0e00e175f9480c771af90003a7
|
Subproject commit 616d773441b5355800ce64197a699e6cd6b36172
|
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 358cf6f0357baae3e3bb5788431acf1068f897b5
|
Subproject commit adeb4940dd3ca92677bd3c3b0ce1ec6174493b00
|
2
externals/fmt
vendored
2
externals/fmt
vendored
@ -1 +1 @@
|
|||||||
Subproject commit cc09f1a6798c085c325569ef466bcdcffdc266d4
|
Subproject commit 4b8f8fac96a7819f28f4be523ca10a2d5d8aaaf2
|
2
externals/inih/inih
vendored
2
externals/inih/inih
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1e80a47dffbda813604f0913e2ad68c7054c14e4
|
Subproject commit 2023872dfffb38b6a98f2c45a0eb25652aaea91f
|
4
externals/json/README.md
vendored
4
externals/json/README.md
vendored
@ -1,9 +1,9 @@
|
|||||||
JSON for Modern C++
|
JSON for Modern C++
|
||||||
===================
|
===================
|
||||||
|
|
||||||
v3.9.0
|
v3.1.2
|
||||||
|
|
||||||
This is a mirror providing the single required header file.
|
This is a mirror providing the single required header file.
|
||||||
|
|
||||||
The original repository can be found at:
|
The original repository can be found at:
|
||||||
https://github.com/nlohmann/json/commit/d34771cafc87b358ba421faca28facc7f8080174
|
https://github.com/nlohmann/json/commit/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe
|
||||||
|
17945
externals/json/json.hpp
vendored
17945
externals/json/json.hpp
vendored
File diff suppressed because it is too large
Load Diff
65
externals/microprofile/microprofile.h
vendored
65
externals/microprofile/microprofile.h
vendored
@ -152,11 +152,9 @@ typedef uint16_t MicroProfileGroupId;
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <algorithm>
|
|
||||||
#include <array>
|
|
||||||
#include <atomic>
|
|
||||||
#include <mutex>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <mutex>
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
#ifndef MICROPROFILE_API
|
#ifndef MICROPROFILE_API
|
||||||
#define MICROPROFILE_API
|
#define MICROPROFILE_API
|
||||||
@ -607,45 +605,28 @@ struct MicroProfileFrameState
|
|||||||
|
|
||||||
struct MicroProfileThreadLog
|
struct MicroProfileThreadLog
|
||||||
{
|
{
|
||||||
std::array<MicroProfileLogEntry, MICROPROFILE_BUFFER_SIZE> Log{};
|
MicroProfileLogEntry Log[MICROPROFILE_BUFFER_SIZE];
|
||||||
|
|
||||||
std::atomic<uint32_t> nPut{0};
|
std::atomic<uint32_t> nPut;
|
||||||
std::atomic<uint32_t> nGet{0};
|
std::atomic<uint32_t> nGet;
|
||||||
uint32_t nActive = 0;
|
uint32_t nActive;
|
||||||
uint32_t nGpu = 0;
|
uint32_t nGpu;
|
||||||
ThreadIdType nThreadId{};
|
ThreadIdType nThreadId;
|
||||||
|
|
||||||
std::array<uint32_t, MICROPROFILE_STACK_MAX> nStack{};
|
uint32_t nStack[MICROPROFILE_STACK_MAX];
|
||||||
std::array<int64_t, MICROPROFILE_STACK_MAX> nChildTickStack{};
|
int64_t nChildTickStack[MICROPROFILE_STACK_MAX];
|
||||||
uint32_t nStackPos = 0;
|
uint32_t nStackPos;
|
||||||
|
|
||||||
|
|
||||||
std::array<uint8_t, MICROPROFILE_MAX_GROUPS> nGroupStackPos{};
|
uint8_t nGroupStackPos[MICROPROFILE_MAX_GROUPS];
|
||||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nGroupTicks{};
|
int64_t nGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nAggregateGroupTicks{};
|
int64_t nAggregateGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
THREAD_MAX_LEN = 64,
|
THREAD_MAX_LEN = 64,
|
||||||
};
|
};
|
||||||
char ThreadName[64]{};
|
char ThreadName[64];
|
||||||
int nFreeListNext = 0;
|
int nFreeListNext;
|
||||||
|
|
||||||
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
|
#if MICROPROFILE_GPU_TIMERS_D3D11
|
||||||
@ -946,11 +927,7 @@ typedef HANDLE MicroProfileThread;
|
|||||||
DWORD _stdcall ThreadTrampoline(void* pFunc)
|
DWORD _stdcall ThreadTrampoline(void* pFunc)
|
||||||
{
|
{
|
||||||
MicroProfileThreadFunc F = (MicroProfileThreadFunc)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)
|
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
||||||
@ -1041,7 +1018,7 @@ static void MicroProfileCreateThreadLogKey()
|
|||||||
#else
|
#else
|
||||||
MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0;
|
MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0;
|
||||||
#endif
|
#endif
|
||||||
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)
|
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)
|
||||||
|
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(g_MicroProfileFlip, "MicroProfile", "MicroProfileFlip", 0x3355ee);
|
MICROPROFILE_DEFINE(g_MicroProfileFlip, "MicroProfile", "MicroProfileFlip", 0x3355ee);
|
||||||
@ -1174,7 +1151,6 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
|||||||
MP_ASSERT(pLog->nPut.load() == 0);
|
MP_ASSERT(pLog->nPut.load() == 0);
|
||||||
MP_ASSERT(pLog->nGet.load() == 0);
|
MP_ASSERT(pLog->nGet.load() == 0);
|
||||||
S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext;
|
S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext;
|
||||||
pLog->Reset();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1182,6 +1158,7 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
|||||||
S.nMemUsage += sizeof(MicroProfileThreadLog);
|
S.nMemUsage += sizeof(MicroProfileThreadLog);
|
||||||
S.Pool[S.nNumLogs++] = pLog;
|
S.Pool[S.nNumLogs++] = pLog;
|
||||||
}
|
}
|
||||||
|
memset(pLog, 0, sizeof(*pLog));
|
||||||
int len = (int)strlen(pName);
|
int len = (int)strlen(pName);
|
||||||
int maxlen = sizeof(pLog->ThreadName)-1;
|
int maxlen = sizeof(pLog->ThreadName)-1;
|
||||||
len = len < maxlen ? len : maxlen;
|
len = len < maxlen ? len : maxlen;
|
||||||
@ -1229,8 +1206,8 @@ void MicroProfileOnThreadExit()
|
|||||||
{
|
{
|
||||||
S.Frames[i].nLogStart[nLogIndex] = 0;
|
S.Frames[i].nLogStart[nLogIndex] = 0;
|
||||||
}
|
}
|
||||||
pLog->nGroupStackPos.fill(0);
|
memset(pLog->nGroupStackPos, 0, sizeof(pLog->nGroupStackPos));
|
||||||
pLog->nGroupTicks.fill(0);
|
memset(pLog->nGroupTicks, 0, sizeof(pLog->nGroupTicks));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
206
externals/microprofile/microprofileui.h
vendored
206
externals/microprofile/microprofileui.h
vendored
@ -169,13 +169,14 @@ MICROPROFILEUI_API void MicroProfileCustomGroup(const char* pCustomName, uint32_
|
|||||||
MICROPROFILEUI_API void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer);
|
MICROPROFILEUI_API void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer);
|
||||||
|
|
||||||
#ifdef MICROPROFILEUI_IMPL
|
#ifdef MICROPROFILEUI_IMPL
|
||||||
#include <inttypes.h>
|
#ifdef _WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000);
|
MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000);
|
||||||
MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00);
|
MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00);
|
||||||
@ -226,10 +227,10 @@ struct SOptionDesc
|
|||||||
uint8_t nIndex;
|
uint8_t nIndex;
|
||||||
bool bSelected;
|
bool bSelected;
|
||||||
};
|
};
|
||||||
static const std::array<uint32_t, 6> g_MicroProfileAggregatePresets{0, 10, 20, 30, 60, 120};
|
static uint32_t 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 float 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 uint32_t g_MicroProfileOpacityPresets[] = {0x40, 0x80, 0xc0, 0xff};
|
||||||
static const std::array<const char*, 7> g_MicroProfilePresetNames
|
static const char* g_MicroProfilePresetNames[] =
|
||||||
{
|
{
|
||||||
MICROPROFILE_DEFAULT_PRESET,
|
MICROPROFILE_DEFAULT_PRESET,
|
||||||
"Render",
|
"Render",
|
||||||
@ -242,8 +243,8 @@ static const std::array<const char*, 7> g_MicroProfilePresetNames
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MICROPROFILE_NUM_REFERENCE_PRESETS = g_MicroProfileReferenceTimePresets.size(),
|
MICROPROFILE_NUM_REFERENCE_PRESETS = sizeof(g_MicroProfileReferenceTimePresets)/sizeof(g_MicroProfileReferenceTimePresets[0]),
|
||||||
MICROPROFILE_NUM_OPACITY_PRESETS = g_MicroProfileOpacityPresets.size(),
|
MICROPROFILE_NUM_OPACITY_PRESETS = sizeof(g_MicroProfileOpacityPresets)/sizeof(g_MicroProfileOpacityPresets[0]),
|
||||||
#if MICROPROFILE_CONTEXT_SWITCH_TRACE
|
#if MICROPROFILE_CONTEXT_SWITCH_TRACE
|
||||||
MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7,
|
MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7,
|
||||||
#else
|
#else
|
||||||
@ -325,9 +326,9 @@ struct MicroProfileUI
|
|||||||
|
|
||||||
MicroProfileUI g_MicroProfileUI;
|
MicroProfileUI g_MicroProfileUI;
|
||||||
#define UI g_MicroProfileUI
|
#define UI g_MicroProfileUI
|
||||||
static const std::array<uint32_t, 2> g_nMicroProfileBackColors{ 0x474747, 0x313131 };
|
static uint32_t g_nMicroProfileBackColors[2] = { 0x474747, 0x313131 };
|
||||||
#define MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS 16
|
#define MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS 16
|
||||||
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
|
static uint32_t g_nMicroProfileContextSwitchThreadColors[MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS] = //palette generated by http://tools.medialab.sciences-po.fr/iwanthue/index.php
|
||||||
{
|
{
|
||||||
0x63607B,
|
0x63607B,
|
||||||
0x755E2B,
|
0x755E2B,
|
||||||
@ -355,7 +356,7 @@ void MicroProfileInitUI()
|
|||||||
{
|
{
|
||||||
bInitialized = true;
|
bInitialized = true;
|
||||||
memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI));
|
memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI));
|
||||||
UI.nActiveMenu = UINT32_MAX;
|
UI.nActiveMenu = (uint32_t)-1;
|
||||||
UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f;
|
UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f;
|
||||||
UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f;
|
UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f;
|
||||||
|
|
||||||
@ -367,7 +368,7 @@ void MicroProfileInitUI()
|
|||||||
UI.nWidth = 100;
|
UI.nWidth = 100;
|
||||||
UI.nHeight = 100;
|
UI.nHeight = 100;
|
||||||
|
|
||||||
UI.nCustomActive = UINT32_MAX;
|
UI.nCustomActive = (uint32_t)-1;
|
||||||
UI.nCustomTimerCount = 0;
|
UI.nCustomTimerCount = 0;
|
||||||
UI.nCustomCount = 0;
|
UI.nCustomCount = 0;
|
||||||
|
|
||||||
@ -497,8 +498,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);
|
MicroProfileDrawBox(nX-MICROPROFILE_TEXT_WIDTH, nY, nX, nY + MICROPROFILE_TEXT_WIDTH, pColors[i]|0xff000000);
|
||||||
}
|
}
|
||||||
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
|
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_MAX, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, (uint32_t)-1, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
||||||
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -521,7 +522,7 @@ void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, u
|
|||||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000);
|
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000);
|
||||||
for(uint32_t i = 0; i < nNumStrings; ++i)
|
for(uint32_t i = 0; i < nNumStrings; ++i)
|
||||||
{
|
{
|
||||||
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i], (uint32_t)strlen(ppStrings[i]));
|
MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i], (uint32_t)strlen(ppStrings[i]));
|
||||||
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -780,7 +781,7 @@ void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId,
|
|||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
int64_t nTickIn = -1;
|
int64_t nTickIn = -1;
|
||||||
uint32_t nThreadBefore = UINT32_MAX;
|
uint32_t nThreadBefore = -1;
|
||||||
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
||||||
float fMsToScreen = UI.nWidth / UI.fDetailedRange;
|
float fMsToScreen = UI.nWidth / UI.fDetailedRange;
|
||||||
float fMouseX = (float)UI.nMouseX;
|
float fMouseX = (float)UI.nMouseX;
|
||||||
@ -948,10 +949,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
|
|
||||||
uint32_t nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadAfter;
|
uint32_t nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadAfter;
|
||||||
uint32_t nContextSwitchHoverThreadBefore = S.nContextSwitchHoverThreadBefore;
|
uint32_t nContextSwitchHoverThreadBefore = S.nContextSwitchHoverThreadBefore;
|
||||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX;
|
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
|
||||||
|
|
||||||
uint32_t nContextSwitchStart = UINT32_MAX;
|
uint32_t nContextSwitchStart = -1;
|
||||||
uint32_t nContextSwitchEnd = UINT32_MAX;
|
uint32_t nContextSwitchEnd = -1;
|
||||||
S.nContextSwitchHoverCpuNext = 0xff;
|
S.nContextSwitchHoverCpuNext = 0xff;
|
||||||
S.nContextSwitchHoverTickIn = -1;
|
S.nContextSwitchHoverTickIn = -1;
|
||||||
S.nContextSwitchHoverTickOut = -1;
|
S.nContextSwitchHoverTickOut = -1;
|
||||||
@ -1004,10 +1005,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
}while(pFrameLogFirst != pFrameFirst);
|
}while(pFrameLogFirst != pFrameFirst);
|
||||||
|
|
||||||
|
|
||||||
if (nGet == UINT32_MAX) {
|
if(nGet == (uint32_t)-1)
|
||||||
continue;
|
continue;
|
||||||
}
|
MP_ASSERT(nGet != (uint32_t)-1);
|
||||||
MP_ASSERT(nGet != UINT32_MAX);
|
|
||||||
|
|
||||||
nPut = pFrameLogLast->nLogStart[i];
|
nPut = pFrameLogLast->nLogStart[i];
|
||||||
|
|
||||||
@ -1023,9 +1023,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu;
|
int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu;
|
||||||
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
|
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
|
||||||
uint64_t nThreadId = pLog->nThreadId;
|
uint64_t nThreadId = pLog->nThreadId;
|
||||||
snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s", nThreadId, &pLog->ThreadName[0] );
|
snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s", nThreadId, &pLog->ThreadName[0] );
|
||||||
nY += 3;
|
nY += 3;
|
||||||
uint32_t nThreadColor = UINT32_MAX;
|
uint32_t nThreadColor = -1;
|
||||||
if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore)
|
if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore)
|
||||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||||
MicroProfileDrawText(0, nY, nThreadColor, &ThreadName[0], (uint32_t)strlen(&ThreadName[0]));
|
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];
|
uint32_t nEnd = nRange[j][1];
|
||||||
for(uint32_t k = nStart; k < nEnd; ++k)
|
for(uint32_t k = nStart; k < nEnd; ++k)
|
||||||
{
|
{
|
||||||
MicroProfileLogEntry* pEntry = &pLog->Log[k];
|
MicroProfileLogEntry* pEntry = pLog->Log + k;
|
||||||
int nType = MicroProfileLogType(*pEntry);
|
int nType = MicroProfileLogType(*pEntry);
|
||||||
if(MP_LOG_ENTER == nType)
|
if(MP_LOG_ENTER == nType)
|
||||||
{
|
{
|
||||||
@ -1066,7 +1066,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
MicroProfileLogEntry* pEntryEnter = &pLog->Log[nStack[nStackPos-1]];
|
MicroProfileLogEntry* pEntryEnter = pLog->Log + nStack[nStackPos-1];
|
||||||
if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry))
|
if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry))
|
||||||
{
|
{
|
||||||
//uprintf("mismatch %llx %llx\n", pEntryEnter->nToken, pEntry->nToken);
|
//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);
|
uint32_t nIntegerWidth = (uint32_t)(fXEnd - fXStart);
|
||||||
if(nIntegerWidth)
|
if(nIntegerWidth)
|
||||||
{
|
{
|
||||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
if(bHover && UI.nActiveMenu == -1)
|
||||||
{
|
{
|
||||||
nHoverToken = MicroProfileLogTimerIndex(*pEntry);
|
nHoverToken = MicroProfileLogTimerIndex(*pEntry);
|
||||||
#if MICROPROFILE_DEBUG
|
#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;
|
int nCharacters = (nTextWidth - 2*MICROPROFILE_TEXT_WIDTH) / MICROPROFILE_TEXT_WIDTH;
|
||||||
if(nCharacters>0)
|
if(nCharacters>0)
|
||||||
{
|
{
|
||||||
MicroProfileDrawText(fXStartText + 1, fYStart + 1, UINT32_MAX, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters));
|
MicroProfileDrawText(fXStartText+1, fYStart+1, -1, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1158,7 +1158,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
int nLineX = (int)floor(fXAvg+0.5f);
|
int nLineX = (int)floor(fXAvg+0.5f);
|
||||||
if(nLineX != (int)nLinesDrawn[nStackPos])
|
if(nLineX != (int)nLinesDrawn[nStackPos])
|
||||||
{
|
{
|
||||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
if(bHover && UI.nActiveMenu == -1)
|
||||||
{
|
{
|
||||||
nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry);
|
nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry);
|
||||||
nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd);
|
nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd);
|
||||||
@ -1235,9 +1235,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
// nThreadId is 32-bit on Windows
|
// 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) );
|
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
|
#else
|
||||||
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) );
|
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) );
|
||||||
#endif
|
#endif
|
||||||
uint32_t nThreadColor = UINT32_MAX;
|
uint32_t nThreadColor = -1;
|
||||||
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
|
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
|
||||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||||
MicroProfileDrawDetailedContextSwitchBars(nY+2, nThreadId, nContextSwitchStart, nContextSwitchEnd, nBaseTicksCpu, nBaseY);
|
MicroProfileDrawDetailedContextSwitchBars(nY+2, nThreadId, nContextSwitchStart, nContextSwitchEnd, nBaseTicksCpu, nBaseY);
|
||||||
@ -1249,6 +1249,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
|
|
||||||
S.nContextSwitchHoverCpu = S.nContextSwitchHoverCpuNext;
|
S.nContextSwitchHoverCpu = S.nContextSwitchHoverCpuNext;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UI.pDisplayMouseOver = pMouseOverNext;
|
UI.pDisplayMouseOver = pMouseOverNext;
|
||||||
|
|
||||||
if(!S.nRunning)
|
if(!S.nRunning)
|
||||||
@ -1283,10 +1286,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
||||||
float fStartTextX = fXStart - fStartTextWidth - 2;
|
float fStartTextX = fXStart - fStartTextWidth - 2;
|
||||||
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||||
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart);
|
MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
|
||||||
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
|
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);
|
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_MAX, sBuffer, nLenEnd);
|
MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
|
||||||
|
|
||||||
if(UI.nMouseRight)
|
if(UI.nMouseRight)
|
||||||
{
|
{
|
||||||
@ -1313,10 +1316,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
||||||
float fStartTextX = fXStart - fStartTextWidth - 2;
|
float fStartTextX = fXStart - fStartTextWidth - 2;
|
||||||
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||||
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart);
|
MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
|
||||||
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
|
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);
|
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_MAX, sBuffer, nLenEnd);
|
MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1362,7 +1365,7 @@ void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uin
|
|||||||
fBaseX = fXStart;
|
fBaseX = fXStart;
|
||||||
uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU;
|
uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU;
|
||||||
if(nIndex == nSelectedFrame)
|
if(nIndex == nSelectedFrame)
|
||||||
nColor = UINT32_MAX;
|
nColor = (uint32_t)-1;
|
||||||
MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar);
|
MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar);
|
||||||
if(pNext->nFrameStartCpu > nCpuStart)
|
if(pNext->nFrameStartCpu > nCpuStart)
|
||||||
{
|
{
|
||||||
@ -1384,7 +1387,7 @@ void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
|||||||
uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1;
|
uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1;
|
||||||
|
|
||||||
int nSelectedFrame = -1;
|
int nSelectedFrame = -1;
|
||||||
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == UINT32_MAX)
|
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
nSelectedFrame = ((MICROPROFILE_NUM_FRAMES) * (UI.nWidth-UI.nMouseX) / UI.nWidth);
|
nSelectedFrame = ((MICROPROFILE_NUM_FRAMES) * (UI.nWidth-UI.nMouseX) / UI.nWidth);
|
||||||
@ -1422,7 +1425,7 @@ void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
|||||||
if(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]);
|
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_MAX, pName, (uint32_t)strlen(pName));
|
MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, pName, (uint32_t)strlen(pName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1437,7 +1440,7 @@ void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName,
|
|||||||
uint32_t nCount = 0;
|
uint32_t nCount = 0;
|
||||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||||
{
|
{
|
||||||
uint64_t nMask = 1ULL << j;
|
uint64_t nMask = 1ll << j;
|
||||||
if(nMask & nGroup)
|
if(nMask & nGroup)
|
||||||
{
|
{
|
||||||
nY += MICROPROFILE_TEXT_HEIGHT + 1;
|
nY += MICROPROFILE_TEXT_HEIGHT + 1;
|
||||||
@ -1518,7 +1521,7 @@ void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nMask <<= 1;
|
nMask <<= 1ll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1540,7 +1543,7 @@ void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t n
|
|||||||
snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pTimers[nIdx]);
|
snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pTimers[nIdx]);
|
||||||
if (!pTimers2)
|
if (!pTimers2)
|
||||||
MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar);
|
MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar);
|
||||||
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, (uint32_t)strlen(sBuffer));
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, (uint32_t)strlen(sBuffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1561,7 +1564,7 @@ void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
|||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
char sBuffer[SBUF_MAX];
|
char sBuffer[SBUF_MAX];
|
||||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5d", S.Frame[nTimer].nCount);//fix
|
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5d", S.Frame[nTimer].nCount);//fix
|
||||||
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, nLen);
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
|
uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
|
||||||
@ -1585,7 +1588,7 @@ void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint
|
|||||||
float fRcpFrames = pArgs->fRcpFrames;
|
float fRcpFrames = pArgs->fRcpFrames;
|
||||||
char sBuffer[SBUF_MAX];
|
char sBuffer[SBUF_MAX];
|
||||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames);
|
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames);
|
||||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen);
|
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||||
@ -1606,8 +1609,8 @@ void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
|||||||
{
|
{
|
||||||
uint64_t* pCounters = (uint64_t*)pExtra;
|
uint64_t* pCounters = (uint64_t*)pExtra;
|
||||||
char sBuffer[SBUF_MAX];
|
char sBuffer[SBUF_MAX];
|
||||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5" PRIu64, pCounters[nTimer]);
|
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5llu", pCounters[nTimer]);
|
||||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen);
|
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||||
@ -1664,7 +1667,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
|||||||
if(bMouseOver)
|
if(bMouseOver)
|
||||||
{
|
{
|
||||||
float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX;
|
float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX;
|
||||||
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, UINT32_MAX);
|
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, (uint32_t)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1703,7 +1706,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
|||||||
|
|
||||||
char buf[32];
|
char buf[32];
|
||||||
int nLen = snprintf(buf, sizeof(buf)-1, "%5.2fms", S.fReferenceTime);
|
int nLen = snprintf(buf, sizeof(buf)-1, "%5.2fms", S.fReferenceTime);
|
||||||
MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), UINT32_MAX, buf, nLen);
|
MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), (uint32_t)-1, buf, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1779,7 +1782,7 @@ void MicroProfileDumpTimers()
|
|||||||
|
|
||||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||||
{
|
{
|
||||||
uint64_t nMask = 1ULL << j;
|
uint64_t nMask = 1ll << j;
|
||||||
if(nMask & nActiveGroup)
|
if(nMask & nActiveGroup)
|
||||||
{
|
{
|
||||||
MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName);
|
MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName);
|
||||||
@ -1820,7 +1823,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
|||||||
uint32_t nNumGroups = 0;
|
uint32_t nNumGroups = 0;
|
||||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||||
{
|
{
|
||||||
if(nActiveGroup & (1ULL << j))
|
if(nActiveGroup & (1ll << j))
|
||||||
{
|
{
|
||||||
nNumTimers += S.GroupInfo[j].nNumTimers;
|
nNumTimers += S.GroupInfo[j].nNumTimers;
|
||||||
nNumGroups += 1;
|
nNumGroups += 1;
|
||||||
@ -1875,7 +1878,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
|||||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||||
{
|
{
|
||||||
uint32_t nY0 = nY + i * (nHeight + 1);
|
uint32_t nY0 = nY + i * (nHeight + 1);
|
||||||
bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
bool bInside = (UI.nActiveMenu == -1) && ((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)));
|
MicroProfileDrawBox(nX, nY0, nWidth+nX, nY0 + (nHeight+1)+1, UI.nOpacityBackground | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
|
||||||
}
|
}
|
||||||
nX += 10;
|
nX += 10;
|
||||||
@ -1924,22 +1927,22 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
|||||||
nY = nHeight + 3 - UI.nOffsetY;
|
nY = nHeight + 3 - UI.nOffsetY;
|
||||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||||
{
|
{
|
||||||
const uint32_t nY0 = nY + i * (nHeight + 1);
|
uint32_t nY0 = nY + i * (nHeight + 1);
|
||||||
const bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
bool bInside = (UI.nActiveMenu == -1) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||||
MicroProfileDrawBox(nX, nY0, nTimerWidth, nY0 + (nHeight+1)+1, 0xff0000000 | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
|
MicroProfileDrawBox(nX, nY0, nTimerWidth, nY0 + (nHeight+1)+1, 0xff0000000 | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
|
||||||
}
|
}
|
||||||
nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1;
|
nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1;
|
||||||
|
|
||||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||||
{
|
{
|
||||||
if(nActiveGroup & (1ULL << j))
|
if(nActiveGroup & (1ll << j))
|
||||||
{
|
{
|
||||||
MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, UINT32_MAX, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen);
|
MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, (uint32_t)-1, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen);
|
||||||
nLegendOffset += S.GroupInfo[j].nNumTimers+1;
|
nLegendOffset += S.GroupInfo[j].nNumTimers+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MicroProfileDrawHeader(nX, nTimerWidth-5, "Group");
|
MicroProfileDrawHeader(nX, nTimerWidth-5, "Group");
|
||||||
MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_MAX, "Timer", 5);
|
MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, "Timer", 5);
|
||||||
MicroProfileDrawLineVertical(nTimerWidth, 0, nTotalHeight+nY, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
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]);
|
MicroProfileDrawLineHorizontal(0, nWidth, 2*MICROPROFILE_TEXT_HEIGHT + 3, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
||||||
}
|
}
|
||||||
@ -2000,7 +2003,7 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*bSelected = 0 != (S.nActiveGroupWanted & (1ULL << Item.nIndex));
|
*bSelected = 0 != (S.nActiveGroupWanted & (1ll << Item.nIndex));
|
||||||
snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName);
|
snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName);
|
||||||
}
|
}
|
||||||
return buffer;
|
return buffer;
|
||||||
@ -2012,18 +2015,16 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
|||||||
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(static_cast<uint32_t>(nIndex) < g_MicroProfileAggregatePresets.size())
|
if(nIndex < sizeof(g_MicroProfileAggregatePresets)/sizeof(g_MicroProfileAggregatePresets[0]))
|
||||||
{
|
{
|
||||||
uint32_t val = g_MicroProfileAggregatePresets[nIndex];
|
int val = g_MicroProfileAggregatePresets[nIndex];
|
||||||
*bSelected = S.nAggregateFlip == val;
|
*bSelected = (int)S.nAggregateFlip == val;
|
||||||
if(0 == val)
|
if(0 == val)
|
||||||
{
|
|
||||||
return "Infinite";
|
return "Infinite";
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
snprintf(buf, sizeof(buf)-1, "%7u", val);
|
snprintf(buf, sizeof(buf)-1, "%7d", val);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2097,12 +2098,10 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
|||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
*bSelected = false;
|
*bSelected = false;
|
||||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||||
int nIndexSave = nIndex - nNumPresets - 1;
|
int nIndexSave = nIndex - nNumPresets - 1;
|
||||||
if(nIndex == nNumPresets)
|
if(nIndex == nNumPresets)
|
||||||
{
|
|
||||||
return "--";
|
return "--";
|
||||||
}
|
|
||||||
else if(nIndexSave >=0 && nIndexSave <nNumPresets)
|
else if(nIndexSave >=0 && nIndexSave <nNumPresets)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]);
|
snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]);
|
||||||
@ -2121,13 +2120,13 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
|||||||
|
|
||||||
const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
if(UINT32_MAX == UI.nCustomActive)
|
if((uint32_t)-1 == UI.nCustomActive)
|
||||||
{
|
{
|
||||||
*bSelected = nIndex == 0;
|
*bSelected = nIndex == 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*bSelected = nIndex-2 == static_cast<int>(UI.nCustomActive);
|
*bSelected = nIndex-2 == UI.nCustomActive;
|
||||||
}
|
}
|
||||||
switch(nIndex)
|
switch(nIndex)
|
||||||
{
|
{
|
||||||
@ -2203,7 +2202,7 @@ void MicroProfileUIClickGroups(int nIndex)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
MP_ASSERT(Item.nIndex < S.nGroupCount);
|
MP_ASSERT(Item.nIndex < S.nGroupCount);
|
||||||
S.nActiveGroupWanted ^= (1ULL << Item.nIndex);
|
S.nActiveGroupWanted ^= (1ll << Item.nIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2274,7 +2273,7 @@ void MicroProfileUIClickOptions(int nIndex)
|
|||||||
|
|
||||||
void MicroProfileUIClickPreset(int nIndex)
|
void MicroProfileUIClickPreset(int nIndex)
|
||||||
{
|
{
|
||||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||||
int nIndexSave = nIndex - nNumPresets - 1;
|
int nIndexSave = nIndex - nNumPresets - 1;
|
||||||
if(nIndexSave >= 0 && nIndexSave < nNumPresets)
|
if(nIndexSave >= 0 && nIndexSave < nNumPresets)
|
||||||
{
|
{
|
||||||
@ -2311,7 +2310,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
|
|
||||||
uint32_t nX = 0;
|
uint32_t nX = 0;
|
||||||
uint32_t nY = 0;
|
uint32_t nY = 0;
|
||||||
|
bool bMouseOver = UI.nMouseY < MICROPROFILE_TEXT_HEIGHT + 1;
|
||||||
#define SBUF_SIZE 256
|
#define SBUF_SIZE 256
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]);
|
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]);
|
||||||
@ -2322,7 +2321,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
uint32_t nNumMenuItems = 0;
|
uint32_t nNumMenuItems = 0;
|
||||||
|
|
||||||
int nLen = snprintf(buffer, 127, "MicroProfile");
|
int nLen = snprintf(buffer, 127, "MicroProfile");
|
||||||
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen);
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
|
||||||
nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||||
pMenuText[nNumMenuItems++] = "Mode";
|
pMenuText[nNumMenuItems++] = "Mode";
|
||||||
pMenuText[nNumMenuItems++] = "Groups";
|
pMenuText[nNumMenuItems++] = "Groups";
|
||||||
@ -2410,7 +2409,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
uint32_t nSelectMenu = UINT32_MAX;
|
uint32_t nSelectMenu = (uint32_t)-1;
|
||||||
for(uint32_t i = 0; i < nNumMenuItems; ++i)
|
for(uint32_t i = 0; i < nNumMenuItems; ++i)
|
||||||
{
|
{
|
||||||
nMenuX[i] = nX;
|
nMenuX[i] = nX;
|
||||||
@ -2420,17 +2419,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);
|
MicroProfileDrawBox(nX-1, nY, nX + nLen * (MICROPROFILE_TEXT_WIDTH+1), nY +(MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff888888);
|
||||||
nSelectMenu = i;
|
nSelectMenu = i;
|
||||||
if((UI.nMouseLeft || UI.nMouseRight) && i == (uint32_t)nPauseIndex)
|
if((UI.nMouseLeft || UI.nMouseRight) && i == (int)nPauseIndex)
|
||||||
{
|
{
|
||||||
S.nToggleRunning = 1;
|
S.nToggleRunning = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MicroProfileDrawText(nX, nY, UINT32_MAX, pMenuText[i], (uint32_t)strlen(pMenuText[i]));
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, pMenuText[i], (uint32_t)strlen(pMenuText[i]));
|
||||||
nX += (nLen+1) * (MICROPROFILE_TEXT_WIDTH+1);
|
nX += (nLen+1) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||||
}
|
}
|
||||||
uint32_t nMenu = nSelectMenu != UINT32_MAX ? nSelectMenu : UI.nActiveMenu;
|
uint32_t nMenu = nSelectMenu != (uint32_t)-1 ? nSelectMenu : UI.nActiveMenu;
|
||||||
UI.nActiveMenu = nMenu;
|
UI.nActiveMenu = nMenu;
|
||||||
if(UINT32_MAX != nMenu)
|
if((uint32_t)-1 != nMenu)
|
||||||
{
|
{
|
||||||
nX = nMenuX[nMenu];
|
nX = nMenuX[nMenu];
|
||||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||||
@ -2451,9 +2450,9 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
{
|
{
|
||||||
UI.nActiveMenu = nMenu;
|
UI.nActiveMenu = nMenu;
|
||||||
}
|
}
|
||||||
else if(nSelectMenu == UINT32_MAX)
|
else if(nSelectMenu == (uint32_t)-1)
|
||||||
{
|
{
|
||||||
UI.nActiveMenu = UINT32_MAX;
|
UI.nActiveMenu = (uint32_t)-1;
|
||||||
}
|
}
|
||||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]);
|
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]);
|
||||||
for(int i = 0; i < nNumLines; ++i)
|
for(int i = 0; i < nNumLines; ++i)
|
||||||
@ -2462,6 +2461,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
const char* pString = CB(i, &bSelected);
|
const char* pString = CB(i, &bSelected);
|
||||||
if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1)
|
if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1)
|
||||||
{
|
{
|
||||||
|
bMouseOver = true;
|
||||||
if(UI.nMouseLeft || UI.nMouseRight)
|
if(UI.nMouseLeft || UI.nMouseRight)
|
||||||
{
|
{
|
||||||
CBClick[nMenu](i);
|
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);
|
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888);
|
||||||
}
|
}
|
||||||
int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString);
|
int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString);
|
||||||
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen);
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
|
||||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2484,7 +2484,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
float fMaxMs = fToMs * S.nFlipMaxDisplay;
|
float fMaxMs = fToMs * S.nFlipMaxDisplay;
|
||||||
int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs);
|
int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs);
|
||||||
pMenuText[nNumMenuItems++] = &FrameTimeMessage[0];
|
pMenuText[nNumMenuItems++] = &FrameTimeMessage[0];
|
||||||
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, UINT32_MAX, FrameTimeMessage, nLen);
|
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, -1, FrameTimeMessage, nLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2538,7 +2538,7 @@ void MicroProfileMoveGraph()
|
|||||||
|
|
||||||
void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||||
{
|
{
|
||||||
if(UINT32_MAX != UI.nCustomActive)
|
if((uint32_t)-1 != UI.nCustomActive)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
MP_ASSERT(UI.nCustomActive < MICROPROFILE_CUSTOM_MAX);
|
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;
|
pColors[i] = S.TimerInfo[nTimerIndex].nColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Avg", sizeof("Avg")-1);
|
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_MAX, "Max", sizeof("Max")-1);
|
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, (uint32_t)-1, "Max", sizeof("Max")-1);
|
||||||
for(uint32_t i = 0; i < nCount; ++i)
|
for(uint32_t i = 0; i < nCount; ++i)
|
||||||
{
|
{
|
||||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||||
@ -2582,10 +2582,10 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
|||||||
int nSize;
|
int nSize;
|
||||||
uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING;
|
uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING;
|
||||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]);
|
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]);
|
||||||
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize);
|
MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||||
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeMax[i]);
|
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeMax[i]);
|
||||||
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize);
|
MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||||
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName);
|
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName);
|
||||||
MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize);
|
MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize);
|
||||||
@ -2599,9 +2599,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
|||||||
nOffsetY = nOffsetYBase;
|
nOffsetY = nOffsetYBase;
|
||||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
||||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg";
|
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg";
|
||||||
MicroProfileDrawText(nMaxOffsetX, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString)));
|
MicroProfileDrawText(nMaxOffsetX, nOffsetY, (uint32_t)-1, pString, strlen(pString));
|
||||||
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
||||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize);
|
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||||
for(uint32_t i = 0; i < nCount; ++i)
|
for(uint32_t i = 0; i < nCount; ++i)
|
||||||
{
|
{
|
||||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||||
@ -2613,9 +2613,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
|||||||
{
|
{
|
||||||
nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT);
|
nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT);
|
||||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg";
|
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg";
|
||||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString)));
|
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, (uint32_t)-1, pString, strlen(pString));
|
||||||
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
|
||||||
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize);
|
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||||
float fPosX = MICROPROFILE_CUSTOM_PADDING;
|
float fPosX = MICROPROFILE_CUSTOM_PADDING;
|
||||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
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.nHoverTime = 0;
|
||||||
UI.nHoverFrame = -1;
|
UI.nHoverFrame = -1;
|
||||||
if(S.nDisplay != MP_DRAW_DETAILED)
|
if(S.nDisplay != MP_DRAW_DETAILED)
|
||||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX;
|
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
|
||||||
MicroProfileMoveGraph();
|
MicroProfileMoveGraph();
|
||||||
|
|
||||||
|
|
||||||
@ -2798,13 +2798,13 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(UI.nActiveMenu == UINT32_MAX && !bMouseOverGraph)
|
if(UI.nActiveMenu == -1 && !bMouseOverGraph)
|
||||||
{
|
{
|
||||||
if(UI.nHoverToken != MICROPROFILE_INVALID_TOKEN)
|
if(UI.nHoverToken != MICROPROFILE_INVALID_TOKEN)
|
||||||
{
|
{
|
||||||
MicroProfileDrawFloatTooltip(UI.nMouseX, UI.nMouseY, UI.nHoverToken, UI.nHoverTime);
|
MicroProfileDrawFloatTooltip(UI.nMouseX, UI.nMouseY, UI.nHoverToken, UI.nHoverTime);
|
||||||
}
|
}
|
||||||
else if(S.nContextSwitchHoverThreadAfter != UINT32_MAX && S.nContextSwitchHoverThreadBefore != UINT32_MAX)
|
else if(S.nContextSwitchHoverThreadAfter != -1 && S.nContextSwitchHoverThreadBefore != -1)
|
||||||
{
|
{
|
||||||
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
||||||
MicroProfileStringArray ToolTip;
|
MicroProfileStringArray ToolTip;
|
||||||
@ -2820,7 +2820,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
|||||||
MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference );
|
MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference );
|
||||||
MicroProfileStringArrayAddLiteral(&ToolTip, "CPU");
|
MicroProfileStringArrayAddLiteral(&ToolTip, "CPU");
|
||||||
MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu);
|
MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu);
|
||||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX);
|
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2858,7 +2858,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX);
|
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
|
||||||
}
|
}
|
||||||
if(UI.nMouseLeft)
|
if(UI.nMouseLeft)
|
||||||
{
|
{
|
||||||
@ -2883,7 +2883,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
|||||||
#endif
|
#endif
|
||||||
m.unlock();
|
m.unlock();
|
||||||
}
|
}
|
||||||
else if(UI.nCustomActive != UINT32_MAX)
|
else if(UI.nCustomActive != (uint32_t)-1)
|
||||||
{
|
{
|
||||||
std::recursive_mutex& m = MicroProfileGetMutex();
|
std::recursive_mutex& m = MicroProfileGetMutex();
|
||||||
m.lock();
|
m.lock();
|
||||||
@ -3179,7 +3179,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
|||||||
{
|
{
|
||||||
if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName))
|
if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName))
|
||||||
{
|
{
|
||||||
S.nActiveGroupWanted |= (1ULL << j);
|
S.nActiveGroupWanted |= (1ll << j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3212,7 +3212,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
|||||||
uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex;
|
uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex;
|
||||||
if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName))
|
if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName))
|
||||||
{
|
{
|
||||||
MicroProfileToken nToken = MicroProfileMakeToken(1ULL << nGroupIndex, (uint16_t)j);
|
MicroProfileToken nToken = MicroProfileMakeToken(1ll << nGroupIndex, (uint16_t)j);
|
||||||
S.Graph[i].nToken = nToken; // note: group index is stored here but is checked without in MicroProfileToggleGraph()!
|
S.Graph[i].nToken = nToken; // note: group index is stored here but is checked without in MicroProfileToggleGraph()!
|
||||||
S.TimerInfo[j].bGraph = true;
|
S.TimerInfo[j].bGraph = true;
|
||||||
if(nToken != nPrevToken)
|
if(nToken != nPrevToken)
|
||||||
@ -3235,7 +3235,7 @@ uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return UINT32_MAX;
|
return (uint32_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||||
@ -3251,7 +3251,7 @@ uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
|||||||
uint32_t nIndex = UI.nCustomCount;
|
uint32_t nIndex = UI.nCustomCount;
|
||||||
UI.nCustomCount++;
|
UI.nCustomCount++;
|
||||||
memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex]));
|
memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex]));
|
||||||
size_t nLen = strlen(pCustomName);
|
uint32_t nLen = (uint32_t)strlen(pCustomName);
|
||||||
if(nLen > MICROPROFILE_NAME_MAX_LEN-1)
|
if(nLen > MICROPROFILE_NAME_MAX_LEN-1)
|
||||||
nLen = MICROPROFILE_NAME_MAX_LEN-1;
|
nLen = MICROPROFILE_NAME_MAX_LEN-1;
|
||||||
memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen);
|
memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen);
|
||||||
@ -3309,7 +3309,7 @@ void MicroProfileCustomGroupEnable(uint32_t nIndex)
|
|||||||
void MicroProfileCustomGroupToggle(const char* pCustomName)
|
void MicroProfileCustomGroupToggle(const char* pCustomName)
|
||||||
{
|
{
|
||||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||||
if(nIndex == UINT32_MAX || nIndex == UI.nCustomActive)
|
if(nIndex == (uint32_t)-1 || nIndex == UI.nCustomActive)
|
||||||
{
|
{
|
||||||
MicroProfileCustomGroupDisable();
|
MicroProfileCustomGroupDisable();
|
||||||
}
|
}
|
||||||
@ -3328,13 +3328,13 @@ void MicroProfileCustomGroupDisable()
|
|||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
S.nForceGroupUI = 0;
|
S.nForceGroupUI = 0;
|
||||||
UI.nCustomActive = UINT32_MAX;
|
UI.nCustomActive = (uint32_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer)
|
void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer)
|
||||||
{
|
{
|
||||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||||
if(UINT32_MAX == nIndex)
|
if((uint32_t)-1 == nIndex)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3344,7 +3344,7 @@ void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup
|
|||||||
MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first.
|
MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first.
|
||||||
UI.Custom[nIndex].pTimers[nTimerIndex] = nToken;
|
UI.Custom[nIndex].pTimers[nTimerIndex] = nToken;
|
||||||
uint16_t nGroup = MicroProfileGetGroupIndex(nToken);
|
uint16_t nGroup = MicroProfileGetGroupIndex(nToken);
|
||||||
UI.Custom[nIndex].nGroupMask |= (1ULL << nGroup);
|
UI.Custom[nIndex].nGroupMask |= (1ll << nGroup);
|
||||||
UI.Custom[nIndex].nNumTimers++;
|
UI.Custom[nIndex].nNumTimers++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
externals/xbyak
vendored
2
externals/xbyak
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c306b8e5786eeeb87b8925a8af5c3bf057ff5a90
|
Subproject commit 1de435ed04c8e74775804da944d176baf0ce56e2
|
2
externals/zstd
vendored
2
externals/zstd
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 97a3da1df009d4dc67251de0c4b1c9d7fe286fc1
|
Subproject commit 10f0e6993f9d2f682da6d04aa2385b7d53cbb4ee
|
@ -35,6 +35,8 @@ if (MSVC)
|
|||||||
add_compile_options(
|
add_compile_options(
|
||||||
/W3
|
/W3
|
||||||
/MP
|
/MP
|
||||||
|
/Zi
|
||||||
|
/Zo
|
||||||
/permissive-
|
/permissive-
|
||||||
/EHsc
|
/EHsc
|
||||||
/volatile:iso
|
/volatile:iso
|
||||||
@ -47,15 +49,6 @@ if (MSVC)
|
|||||||
/external:W0
|
/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
|
# /GS- - No stack buffer overflow checks
|
||||||
add_compile_options("$<$<CONFIG:Release>:/GS->")
|
add_compile_options("$<$<CONFIG:Release>:/GS->")
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ android {
|
|||||||
// TODO If this is ever modified, change application_id in strings.xml
|
// TODO If this is ever modified, change application_id in strings.xml
|
||||||
applicationId "org.citra.citra_emu"
|
applicationId "org.citra.citra_emu"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 29
|
targetSdkVersion 28
|
||||||
versionCode autoVersion
|
versionCode autoVersion
|
||||||
versionName getVersion()
|
versionName getVersion()
|
||||||
ndk.abiFilters abiFilter
|
ndk.abiFilters abiFilter
|
||||||
@ -121,7 +121,7 @@ dependencies {
|
|||||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
||||||
|
|
||||||
implementation 'com.android.billingclient:billing:2.0.3'
|
implementation 'com.android.billingclient:billing:2.2.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
def getVersion() {
|
def getVersion() {
|
||||||
|
@ -28,8 +28,7 @@
|
|||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:isGame="true"
|
android:isGame="true"
|
||||||
android:banner="@mipmap/ic_launcher"
|
android:banner="@mipmap/ic_launcher">
|
||||||
android:requestLegacyExternalStorage="true">
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="org.citra.citra_emu.ui.main.MainActivity"
|
android:name="org.citra.citra_emu.ui.main.MainActivity"
|
||||||
|
@ -6,11 +6,8 @@
|
|||||||
|
|
||||||
package org.citra.citra_emu;
|
package org.citra.citra_emu;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
@ -19,21 +16,15 @@ import android.widget.EditText;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.DialogFragment;
|
|
||||||
|
|
||||||
import org.citra.citra_emu.activities.EmulationActivity;
|
import org.citra.citra_emu.activities.EmulationActivity;
|
||||||
import org.citra.citra_emu.applets.SoftwareKeyboard;
|
|
||||||
import org.citra.citra_emu.utils.EmulationMenuSettings;
|
import org.citra.citra_emu.utils.EmulationMenuSettings;
|
||||||
import org.citra.citra_emu.utils.Log;
|
import org.citra.citra_emu.utils.Log;
|
||||||
import org.citra.citra_emu.utils.PermissionsHandler;
|
import org.citra.citra_emu.utils.PermissionsHandler;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import static android.Manifest.permission.CAMERA;
|
import static android.Manifest.permission.CAMERA;
|
||||||
import static android.Manifest.permission.RECORD_AUDIO;
|
import static android.Manifest.permission.RECORD_AUDIO;
|
||||||
@ -218,114 +209,6 @@ public final class NativeLibrary {
|
|||||||
*/
|
*/
|
||||||
public static native void SwapScreens(boolean swap_screens, int rotation);
|
public static native void SwapScreens(boolean swap_screens, int rotation);
|
||||||
|
|
||||||
public enum CoreError {
|
|
||||||
ErrorSystemFiles,
|
|
||||||
ErrorSavestate,
|
|
||||||
ErrorUnknown,
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean coreErrorAlertResult = false;
|
|
||||||
private static final Object coreErrorAlertLock = new Object();
|
|
||||||
|
|
||||||
public static class CoreErrorDialogFragment extends DialogFragment {
|
|
||||||
static CoreErrorDialogFragment newInstance(String title, String message) {
|
|
||||||
CoreErrorDialogFragment frag = new CoreErrorDialogFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
args.putString("title", title);
|
|
||||||
args.putString("message", message);
|
|
||||||
frag.setArguments(args);
|
|
||||||
return frag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
|
||||||
final Activity emulationActivity = Objects.requireNonNull(getActivity());
|
|
||||||
|
|
||||||
final String title = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("title"));
|
|
||||||
final String message = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("message"));
|
|
||||||
|
|
||||||
return new AlertDialog.Builder(emulationActivity)
|
|
||||||
.setTitle(title)
|
|
||||||
.setMessage(message)
|
|
||||||
.setPositiveButton(R.string.continue_button, (dialog, which) -> {
|
|
||||||
coreErrorAlertResult = true;
|
|
||||||
synchronized (coreErrorAlertLock) {
|
|
||||||
coreErrorAlertLock.notify();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.abort_button, (dialog, which) -> {
|
|
||||||
coreErrorAlertResult = false;
|
|
||||||
synchronized (coreErrorAlertLock) {
|
|
||||||
coreErrorAlertLock.notify();
|
|
||||||
}
|
|
||||||
}).setOnDismissListener(dialog -> {
|
|
||||||
coreErrorAlertResult = true;
|
|
||||||
synchronized (coreErrorAlertLock) {
|
|
||||||
coreErrorAlertLock.notify();
|
|
||||||
}
|
|
||||||
}).create();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void OnCoreErrorImpl(String title, String message) {
|
|
||||||
final EmulationActivity emulationActivity = sEmulationActivity.get();
|
|
||||||
if (emulationActivity == null) {
|
|
||||||
Log.error("[NativeLibrary] EmulationActivity not present");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CoreErrorDialogFragment fragment = CoreErrorDialogFragment.newInstance(title, message);
|
|
||||||
fragment.show(emulationActivity.getSupportFragmentManager(), "coreError");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles a core error.
|
|
||||||
* @return true: continue; false: abort
|
|
||||||
*/
|
|
||||||
public static boolean OnCoreError(CoreError error, String details) {
|
|
||||||
final EmulationActivity emulationActivity = sEmulationActivity.get();
|
|
||||||
if (emulationActivity == null) {
|
|
||||||
Log.error("[NativeLibrary] EmulationActivity not present");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String title, message;
|
|
||||||
switch (error) {
|
|
||||||
case ErrorSystemFiles: {
|
|
||||||
title = emulationActivity.getString(R.string.system_archive_not_found);
|
|
||||||
message = emulationActivity.getString(R.string.system_archive_not_found_message, details.isEmpty() ? emulationActivity.getString(R.string.system_archive_general) : details);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ErrorSavestate: {
|
|
||||||
title = emulationActivity.getString(R.string.save_load_error);
|
|
||||||
message = details;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ErrorUnknown: {
|
|
||||||
title = emulationActivity.getString(R.string.fatal_error);
|
|
||||||
message = emulationActivity.getString(R.string.fatal_error_message);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show the AlertDialog on the main thread.
|
|
||||||
emulationActivity.runOnUiThread(() -> OnCoreErrorImpl(title, message));
|
|
||||||
|
|
||||||
// Wait for the lock to notify that it is complete.
|
|
||||||
synchronized (coreErrorAlertLock) {
|
|
||||||
try {
|
|
||||||
coreErrorAlertLock.wait();
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return coreErrorAlertResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isPortraitMode() {
|
public static boolean isPortraitMode() {
|
||||||
return CitraApplication.getAppContext().getResources().getConfiguration().orientation ==
|
return CitraApplication.getAppContext().getResources().getConfiguration().orientation ==
|
||||||
Configuration.ORIENTATION_PORTRAIT;
|
Configuration.ORIENTATION_PORTRAIT;
|
||||||
@ -604,19 +487,6 @@ public final class NativeLibrary {
|
|||||||
|
|
||||||
public static native void InstallCIAS(String[] path);
|
public static native void InstallCIAS(String[] path);
|
||||||
|
|
||||||
public static final int SAVESTATE_SLOT_COUNT = 10;
|
|
||||||
|
|
||||||
public static final class SavestateInfo {
|
|
||||||
public int slot;
|
|
||||||
public Date time;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public static native SavestateInfo[] GetSavestateInfo();
|
|
||||||
|
|
||||||
public static native void SaveState(int slot);
|
|
||||||
public static native void LoadState(int slot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button type for use in onTouchEvent
|
* Button type for use in onTouchEvent
|
||||||
*/
|
*/
|
||||||
|
@ -14,9 +14,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.SubMenu;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -27,7 +25,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.core.app.NotificationManagerCompat;
|
import androidx.core.app.NotificationManagerCompat;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import org.citra.citra_emu.CitraApplication;
|
|
||||||
import org.citra.citra_emu.NativeLibrary;
|
import org.citra.citra_emu.NativeLibrary;
|
||||||
import org.citra.citra_emu.R;
|
import org.citra.citra_emu.R;
|
||||||
import org.citra.citra_emu.features.settings.model.view.InputBindingSetting;
|
import org.citra.citra_emu.features.settings.model.view.InputBindingSetting;
|
||||||
@ -229,8 +226,8 @@ public final class EmulationActivity extends AppCompatActivity {
|
|||||||
finish();
|
finish();
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
|
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
|
||||||
NativeLibrary.UnPauseEmulation())
|
{
|
||||||
.setOnCancelListener(dialogInterface ->
|
}).setOnDismissListener(dialogInterface ->
|
||||||
NativeLibrary.UnPauseEmulation())
|
NativeLibrary.UnPauseEmulation())
|
||||||
.create()
|
.create()
|
||||||
.show();
|
.show();
|
||||||
@ -306,66 +303,6 @@ public final class EmulationActivity extends AppCompatActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisplaySavestateWarning() {
|
|
||||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
|
||||||
if (preferences.getBoolean("savestateWarningShown", false)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LayoutInflater inflater = mEmulationFragment.requireActivity().getLayoutInflater();
|
|
||||||
View view = inflater.inflate(R.layout.dialog_checkbox, null);
|
|
||||||
CheckBox checkBox = view.findViewById(R.id.checkBox);
|
|
||||||
|
|
||||||
new AlertDialog.Builder(this)
|
|
||||||
.setTitle(R.string.savestate_warning_title)
|
|
||||||
.setMessage(R.string.savestate_warning_message)
|
|
||||||
.setView(view)
|
|
||||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
|
||||||
preferences.edit().putBoolean("savestateWarningShown", checkBox.isChecked()).apply();
|
|
||||||
})
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
|
||||||
super.onPrepareOptionsMenu(menu);
|
|
||||||
|
|
||||||
final NativeLibrary.SavestateInfo[] savestates = NativeLibrary.GetSavestateInfo();
|
|
||||||
if (savestates == null) {
|
|
||||||
menu.findItem(R.id.menu_emulation_save_state).setVisible(false);
|
|
||||||
menu.findItem(R.id.menu_emulation_load_state).setVisible(false);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
menu.findItem(R.id.menu_emulation_save_state).setVisible(true);
|
|
||||||
menu.findItem(R.id.menu_emulation_load_state).setVisible(true);
|
|
||||||
|
|
||||||
final SubMenu saveStateMenu = menu.findItem(R.id.menu_emulation_save_state).getSubMenu();
|
|
||||||
final SubMenu loadStateMenu = menu.findItem(R.id.menu_emulation_load_state).getSubMenu();
|
|
||||||
saveStateMenu.clear();
|
|
||||||
loadStateMenu.clear();
|
|
||||||
|
|
||||||
// Update savestates information
|
|
||||||
for (int i = 0; i < NativeLibrary.SAVESTATE_SLOT_COUNT; ++i) {
|
|
||||||
final int slot = i + 1;
|
|
||||||
final String text = getString(R.string.emulation_empty_state_slot, slot);
|
|
||||||
saveStateMenu.add(text).setEnabled(true).setOnMenuItemClickListener((item) -> {
|
|
||||||
DisplaySavestateWarning();
|
|
||||||
NativeLibrary.SaveState(slot);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
loadStateMenu.add(text).setEnabled(false).setOnMenuItemClickListener((item) -> {
|
|
||||||
NativeLibrary.LoadState(slot);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
for (final NativeLibrary.SavestateInfo info : savestates) {
|
|
||||||
final String text = getString(R.string.emulation_occupied_state_slot, info.slot, info.time);
|
|
||||||
saveStateMenu.getItem(info.slot - 1).setTitle(text);
|
|
||||||
loadStateMenu.getItem(info.slot - 1).setTitle(text).setEnabled(true);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("WrongConstant")
|
@SuppressWarnings("WrongConstant")
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
@ -1,139 +0,0 @@
|
|||||||
// Copyright 2021 Citra Emulator Project
|
|
||||||
// Licensed under GPLv2 or any later version
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
package org.citra.citra_emu.disk_shader_cache;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ProgressBar;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.fragment.app.DialogFragment;
|
|
||||||
|
|
||||||
import org.citra.citra_emu.NativeLibrary;
|
|
||||||
import org.citra.citra_emu.R;
|
|
||||||
import org.citra.citra_emu.activities.EmulationActivity;
|
|
||||||
import org.citra.citra_emu.utils.Log;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class DiskShaderCacheProgress {
|
|
||||||
|
|
||||||
// Equivalent to VideoCore::LoadCallbackStage
|
|
||||||
public enum LoadCallbackStage {
|
|
||||||
Prepare,
|
|
||||||
Decompile,
|
|
||||||
Build,
|
|
||||||
Complete,
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Object finishLock = new Object();
|
|
||||||
private static ProgressDialogFragment fragment;
|
|
||||||
|
|
||||||
public static class ProgressDialogFragment extends DialogFragment {
|
|
||||||
ProgressBar progressBar;
|
|
||||||
TextView progressText;
|
|
||||||
AlertDialog dialog;
|
|
||||||
|
|
||||||
static ProgressDialogFragment newInstance(String title, String message) {
|
|
||||||
ProgressDialogFragment frag = new ProgressDialogFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
args.putString("title", title);
|
|
||||||
args.putString("message", message);
|
|
||||||
frag.setArguments(args);
|
|
||||||
return frag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
|
||||||
final Activity emulationActivity = Objects.requireNonNull(getActivity());
|
|
||||||
|
|
||||||
final String title = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("title"));
|
|
||||||
final String message = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("message"));
|
|
||||||
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(emulationActivity);
|
|
||||||
View view = inflater.inflate(R.layout.dialog_progress_bar, null);
|
|
||||||
|
|
||||||
progressBar = view.findViewById(R.id.progress_bar);
|
|
||||||
progressText = view.findViewById(R.id.progress_text);
|
|
||||||
progressText.setText("");
|
|
||||||
|
|
||||||
setCancelable(false);
|
|
||||||
setRetainInstance(true);
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity);
|
|
||||||
builder.setTitle(title);
|
|
||||||
builder.setMessage(message);
|
|
||||||
builder.setView(view);
|
|
||||||
builder.setNegativeButton(android.R.string.cancel, null);
|
|
||||||
|
|
||||||
dialog = builder.create();
|
|
||||||
dialog.create();
|
|
||||||
|
|
||||||
dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setOnClickListener((v) -> emulationActivity.onBackPressed());
|
|
||||||
|
|
||||||
synchronized (finishLock) {
|
|
||||||
finishLock.notifyAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
return dialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onUpdateProgress(String msg, int progress, int max) {
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(() -> {
|
|
||||||
progressBar.setProgress(progress);
|
|
||||||
progressBar.setMax(max);
|
|
||||||
progressText.setText(String.format("%d/%d", progress, max));
|
|
||||||
dialog.setMessage(msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void prepareDialog() {
|
|
||||||
NativeLibrary.sEmulationActivity.get().runOnUiThread(() -> {
|
|
||||||
final EmulationActivity emulationActivity = NativeLibrary.sEmulationActivity.get();
|
|
||||||
fragment = ProgressDialogFragment.newInstance(emulationActivity.getString(R.string.loading), emulationActivity.getString(R.string.preparing_shaders));
|
|
||||||
fragment.show(emulationActivity.getSupportFragmentManager(), "diskShaders");
|
|
||||||
});
|
|
||||||
|
|
||||||
synchronized (finishLock) {
|
|
||||||
try {
|
|
||||||
finishLock.wait();
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void loadProgress(LoadCallbackStage stage, int progress, int max) {
|
|
||||||
final EmulationActivity emulationActivity = NativeLibrary.sEmulationActivity.get();
|
|
||||||
if (emulationActivity == null) {
|
|
||||||
Log.error("[DiskShaderCacheProgress] EmulationActivity not present");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (stage) {
|
|
||||||
case Prepare:
|
|
||||||
prepareDialog();
|
|
||||||
break;
|
|
||||||
case Decompile:
|
|
||||||
fragment.onUpdateProgress(emulationActivity.getString(R.string.preparing_shaders), progress, max);
|
|
||||||
break;
|
|
||||||
case Build:
|
|
||||||
fragment.onUpdateProgress(emulationActivity.getString(R.string.building_shaders), progress, max);
|
|
||||||
break;
|
|
||||||
case Complete:
|
|
||||||
// Workaround for when dialog is dismissed when the app is in the background
|
|
||||||
fragment.dismissAllowingStateLoss();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -97,11 +97,13 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) {
|
public void onBackPressed() {
|
||||||
if (!addToStack && getFragment() != null) {
|
mPresenter.onBackPressed();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) {
|
||||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||||
|
|
||||||
if (addToStack) {
|
if (addToStack) {
|
||||||
@ -114,6 +116,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||||||
}
|
}
|
||||||
|
|
||||||
transaction.addToBackStack(null);
|
transaction.addToBackStack(null);
|
||||||
|
mPresenter.addToStack();
|
||||||
}
|
}
|
||||||
transaction.replace(R.id.frame_content, SettingsFragment.newInstance(menuTag, gameID), FRAGMENT_TAG);
|
transaction.replace(R.id.frame_content, SettingsFragment.newInstance(menuTag, gameID), FRAGMENT_TAG);
|
||||||
|
|
||||||
@ -204,6 +207,11 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||||||
Toast.makeText(this, message, is_long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, message, is_long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void popBackStack() {
|
||||||
|
getSupportFragmentManager().popBackStackImmediate();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSettingChanged() {
|
public void onSettingChanged() {
|
||||||
mPresenter.onSettingChanged();
|
mPresenter.onSettingChanged();
|
||||||
|
@ -22,6 +22,8 @@ public final class SettingsActivityPresenter {
|
|||||||
|
|
||||||
private Settings mSettings = new Settings();
|
private Settings mSettings = new Settings();
|
||||||
|
|
||||||
|
private int mStackCount;
|
||||||
|
|
||||||
private boolean mShouldSave;
|
private boolean mShouldSave;
|
||||||
|
|
||||||
private DirectoryStateReceiver directoryStateReceiver;
|
private DirectoryStateReceiver directoryStateReceiver;
|
||||||
@ -43,6 +45,7 @@ public final class SettingsActivityPresenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
|
this.mStackCount = 0;
|
||||||
prepareCitraDirectoriesIfNeeded();
|
prepareCitraDirectoriesIfNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +117,19 @@ public final class SettingsActivityPresenter {
|
|||||||
NativeLibrary.ReloadSettings();
|
NativeLibrary.ReloadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addToStack() {
|
||||||
|
mStackCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (mStackCount > 0) {
|
||||||
|
mView.popBackStack();
|
||||||
|
mStackCount--;
|
||||||
|
} else {
|
||||||
|
mView.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void onSettingChanged() {
|
public void onSettingChanged() {
|
||||||
mShouldSave = true;
|
mShouldSave = true;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,11 @@ public interface SettingsActivityView {
|
|||||||
*/
|
*/
|
||||||
void showToastMessage(String message, boolean is_long);
|
void showToastMessage(String message, boolean is_long);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the previous fragment.
|
||||||
|
*/
|
||||||
|
void popBackStack();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* End the activity.
|
* End the activity.
|
||||||
*/
|
*/
|
||||||
|
@ -357,7 +357,6 @@ public final class SettingsFragmentPresenter {
|
|||||||
Setting shadersAccurateMul = rendererSection.getSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL);
|
Setting shadersAccurateMul = rendererSection.getSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL);
|
||||||
Setting render3dMode = rendererSection.getSetting(SettingsFile.KEY_RENDER_3D);
|
Setting render3dMode = rendererSection.getSetting(SettingsFile.KEY_RENDER_3D);
|
||||||
Setting factor3d = rendererSection.getSetting(SettingsFile.KEY_FACTOR_3D);
|
Setting factor3d = rendererSection.getSetting(SettingsFile.KEY_FACTOR_3D);
|
||||||
Setting useDiskShaderCache = rendererSection.getSetting(SettingsFile.KEY_USE_DISK_SHADER_CACHE);
|
|
||||||
|
|
||||||
SettingSection layoutSection = mSettings.getSection(Settings.SECTION_LAYOUT);
|
SettingSection layoutSection = mSettings.getSection(Settings.SECTION_LAYOUT);
|
||||||
Setting cardboardScreenSize = layoutSection.getSetting(SettingsFile.KEY_CARDBOARD_SCREEN_SIZE);
|
Setting cardboardScreenSize = layoutSection.getSetting(SettingsFile.KEY_CARDBOARD_SCREEN_SIZE);
|
||||||
@ -369,7 +368,6 @@ public final class SettingsFragmentPresenter {
|
|||||||
sl.add(new CheckBoxSetting(SettingsFile.KEY_FILTER_MODE, Settings.SECTION_RENDERER, R.string.linear_filtering, R.string.linear_filtering_description, true, filterMode));
|
sl.add(new CheckBoxSetting(SettingsFile.KEY_FILTER_MODE, Settings.SECTION_RENDERER, R.string.linear_filtering, R.string.linear_filtering_description, true, filterMode));
|
||||||
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_ASYNCHRONOUS_GPU_EMULATION, Settings.SECTION_RENDERER, R.string.asynchronous_gpu, R.string.asynchronous_gpu_description, true, useAsynchronousGpuEmulation));
|
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_ASYNCHRONOUS_GPU_EMULATION, Settings.SECTION_RENDERER, R.string.asynchronous_gpu, R.string.asynchronous_gpu_description, true, useAsynchronousGpuEmulation));
|
||||||
sl.add(new CheckBoxSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL, Settings.SECTION_RENDERER, R.string.shaders_accurate_mul, R.string.shaders_accurate_mul_description, false, shadersAccurateMul));
|
sl.add(new CheckBoxSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL, Settings.SECTION_RENDERER, R.string.shaders_accurate_mul, R.string.shaders_accurate_mul_description, false, shadersAccurateMul));
|
||||||
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_DISK_SHADER_CACHE, Settings.SECTION_RENDERER, R.string.use_disk_shader_cache, R.string.use_disk_shader_cache_description, true, useDiskShaderCache));
|
|
||||||
|
|
||||||
sl.add(new HeaderSetting(null, null, R.string.stereoscopy, 0));
|
sl.add(new HeaderSetting(null, null, R.string.stereoscopy, 0));
|
||||||
sl.add(new SingleChoiceSetting(SettingsFile.KEY_RENDER_3D, Settings.SECTION_RENDERER, R.string.render3d, 0, R.array.render3dModes, R.array.render3dValues, 0, render3dMode));
|
sl.add(new SingleChoiceSetting(SettingsFile.KEY_RENDER_3D, Settings.SECTION_RENDERER, R.string.render3d, 0, R.array.render3dModes, R.array.render3dValues, 0, render3dMode));
|
||||||
|
@ -43,7 +43,6 @@ public final class SettingsFile {
|
|||||||
public static final String KEY_HW_SHADER = "use_hw_shader";
|
public static final String KEY_HW_SHADER = "use_hw_shader";
|
||||||
public static final String KEY_SHADERS_ACCURATE_MUL = "shaders_accurate_mul";
|
public static final String KEY_SHADERS_ACCURATE_MUL = "shaders_accurate_mul";
|
||||||
public static final String KEY_USE_SHADER_JIT = "use_shader_jit";
|
public static final String KEY_USE_SHADER_JIT = "use_shader_jit";
|
||||||
public static final String KEY_USE_DISK_SHADER_CACHE = "use_disk_shader_cache";
|
|
||||||
public static final String KEY_USE_VSYNC = "use_vsync_new";
|
public static final String KEY_USE_VSYNC = "use_vsync_new";
|
||||||
public static final String KEY_RESOLUTION_FACTOR = "resolution_factor";
|
public static final String KEY_RESOLUTION_FACTOR = "resolution_factor";
|
||||||
public static final String KEY_FRAME_LIMIT_ENABLED = "use_frame_limit";
|
public static final String KEY_FRAME_LIMIT_ENABLED = "use_frame_limit";
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/frontend/camera/factory.h"
|
#include "core/frontend/camera/factory.h"
|
||||||
#include "core/frontend/camera/interface.h"
|
#include "core/frontend/camera/interface.h"
|
||||||
#include "core/hle/service/cam/cam.h"
|
|
||||||
|
|
||||||
namespace Camera::NDK {
|
namespace Camera::NDK {
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/frontend/camera/factory.h"
|
#include "core/frontend/camera/factory.h"
|
||||||
#include "core/frontend/camera/interface.h"
|
#include "core/frontend/camera/interface.h"
|
||||||
#include "core/hle/service/cam/cam.h"
|
|
||||||
#include "jni/id_cache.h"
|
#include "jni/id_cache.h"
|
||||||
|
|
||||||
namespace Camera::StillImage {
|
namespace Camera::StillImage {
|
||||||
|
@ -123,17 +123,10 @@ void Config::ReadValues() {
|
|||||||
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
|
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
|
||||||
Settings::values.resolution_factor =
|
Settings::values.resolution_factor =
|
||||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
|
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
|
||||||
Settings::values.use_disk_shader_cache =
|
|
||||||
sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", true);
|
|
||||||
Settings::values.use_vsync_new = sdl2_config->GetBoolean("Renderer", "use_vsync_new", true);
|
Settings::values.use_vsync_new = sdl2_config->GetBoolean("Renderer", "use_vsync_new", true);
|
||||||
|
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
|
||||||
// Work around to map Android setting for enabling the frame limiter to the format Citra expects
|
|
||||||
if (sdl2_config->GetBoolean("Renderer", "use_frame_limit", true)) {
|
|
||||||
Settings::values.frame_limit =
|
Settings::values.frame_limit =
|
||||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
|
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
|
||||||
} else {
|
|
||||||
Settings::values.frame_limit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Settings::values.render_3d = static_cast<Settings::StereoRenderOption>(
|
Settings::values.render_3d = static_cast<Settings::StereoRenderOption>(
|
||||||
sdl2_config->GetInteger("Renderer", "render_3d", 0));
|
sdl2_config->GetInteger("Renderer", "render_3d", 0));
|
||||||
|
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