Compare commits
368 Commits
master
...
master_202
Author | SHA1 | Date | |
---|---|---|---|
|
89204de7be | ||
|
a859199e96 | ||
|
ad81589ab1 | ||
|
bf6c23cc6d | ||
|
b81b3bf85b | ||
|
df7242cc58 | ||
|
b211ac4bed | ||
|
5a7defc635 | ||
|
a3dfde7645 | ||
|
95347a10bd | ||
|
5aef24fed0 | ||
|
7d7f3b243b | ||
|
27c0bf8c6f | ||
|
ecac063292 | ||
|
1cfdb67eaf | ||
|
4664c99d60 | ||
|
edb5bc91e3 | ||
|
fd23b7f60f | ||
|
457444bf70 | ||
|
810c7f3b8b | ||
|
4c383e6b46 | ||
|
7448fc72b0 | ||
|
cd54d6fc18 | ||
|
f32331ba95 | ||
|
1fb4464b39 | ||
|
6e9e1506da | ||
|
aa764c69c5 | ||
|
983554286f | ||
|
854d1af3d0 | ||
|
35d79e5df6 | ||
|
a2b58a2114 | ||
|
d0b6aedd73 | ||
|
96b9039d21 | ||
|
d9950621dd | ||
|
18eef6d586 | ||
|
bd9445bddf | ||
|
b31861e466 | ||
|
dbee75a3ca | ||
|
7b852fdeb0 | ||
|
a4c55f4b8e | ||
|
5922a0d6fe | ||
|
44f97cf8f3 | ||
|
bdf6889327 | ||
|
72be97b1f5 | ||
|
4a2afeb492 | ||
|
f92adbd02a | ||
|
a0d2462905 | ||
|
894fdd06a3 | ||
|
aab8c0247a | ||
|
e9049552e6 | ||
|
ff01745845 | ||
|
25c0b47ff9 | ||
|
7366ebd481 | ||
|
564d2da926 | ||
|
54602c1769 | ||
|
5eeee3370b | ||
|
7bca6a9e63 | ||
|
22378138a1 | ||
|
5c6cbd6fa4 | ||
|
bc153f8c0c | ||
|
4d128a9014 | ||
|
05839ddf6e | ||
|
5e90a14d94 | ||
|
f813f3fede | ||
|
0d2d260ca8 | ||
|
0611a761c1 | ||
|
dacc2452b9 | ||
|
c8c2801bee | ||
|
c6e363532b | ||
|
ecc9737531 | ||
|
4155085d34 | ||
|
b882958602 | ||
|
d0da65ef73 | ||
|
063edc587a | ||
|
3b4e8b9fbc | ||
|
5e52853078 | ||
|
370318aba4 | ||
|
cf8da5978d | ||
|
04152c3a1f | ||
|
49e968deee | ||
|
59f89adbaa | ||
|
7dfa26b416 | ||
|
49a4154594 | ||
|
322d8f7159 | ||
|
46447ab8ce | ||
|
3b20de131e | ||
|
7d93f46a03 | ||
|
8a7dacb9c7 | ||
|
db8bec4af2 | ||
|
daa19eafc6 | ||
|
3d194c200a | ||
|
49ecd2f65c | ||
|
b1bc4c213d | ||
|
f8d7a025b3 | ||
|
3a61f85684 | ||
|
6542e8338b | ||
|
4be9e52f81 | ||
|
36c915e57b | ||
|
45ae85f0b8 | ||
|
5aceb9580e | ||
|
e801417bde | ||
|
45b4f33d0c | ||
|
775bce41fd | ||
|
945e765bb0 | ||
|
68ebd303c9 | ||
|
98f9ae8359 | ||
|
e825fd1438 | ||
|
ce8c1bf96c | ||
|
e9d4e8c03d | ||
|
ce363ca113 | ||
|
22f8c9e405 | ||
|
21eb5fe246 | ||
|
47feff4c4f | ||
|
7c09fe9fb4 | ||
|
affc973a02 | ||
|
5de54bc93a | ||
|
1fc2aa6679 | ||
|
b6750641ee | ||
|
d00f1f8ac3 | ||
|
8e4faa97a1 | ||
|
cbadf433fc | ||
|
a6b03f68ac | ||
|
467cf70873 | ||
|
5374bab531 | ||
|
3ce657d214 | ||
|
1c6a42f336 | ||
|
71dd559b91 | ||
|
721a23c066 | ||
|
7bf84a260e | ||
|
fe8fec0852 | ||
|
6f4fd98d2c | ||
|
eae42948e2 | ||
|
5b53214f66 | ||
|
3dc6c7a1aa | ||
|
93499e5543 | ||
|
74d406db72 | ||
|
e1e6974ac3 | ||
|
e6e78c2159 | ||
|
9d6394db2c | ||
|
2aec53ee39 | ||
|
4a4ff6dd79 | ||
|
bd2ff3d75b | ||
|
45e645cb4c | ||
|
36772fa7f2 | ||
|
f8d162ea00 | ||
|
304eec9ffd | ||
|
a5e047f9d6 | ||
|
85247452d1 | ||
|
0a664c4dcf | ||
|
25e95aa774 | ||
|
d488620fb5 | ||
|
623984dc06 | ||
|
8c3883ecb4 | ||
|
6c3b9ec099 | ||
|
09247f3d57 | ||
|
d3b92417c7 | ||
|
481a4542aa | ||
|
8cde6cc5b3 | ||
|
ef3e0dd8bd | ||
|
46c529f849 | ||
|
36c96561b3 | ||
|
dd08a3e0e0 | ||
|
d069fd7a29 | ||
|
aa56bbfeb6 | ||
|
d6fea7396a | ||
|
f6352ab45d | ||
|
c8601ba975 | ||
|
b5cafc8fd1 | ||
|
eee0f42381 | ||
|
1577ca5082 | ||
|
cf45e97b94 | ||
|
b9375da143 | ||
|
22158d0e0e | ||
|
8771cde5fc | ||
|
cbfe2718be | ||
|
a644f6fde1 | ||
|
25fa439ca9 | ||
|
a4180f1aef | ||
|
2e67d85915 | ||
|
8f031d10f2 | ||
|
434f545f05 | ||
|
b4c92de212 | ||
|
8e71778137 | ||
|
f0309a28cb | ||
|
220a30ebb6 | ||
|
016718ab28 | ||
|
ce4db4de92 | ||
|
8caa46c37a | ||
|
79bef4a9dc | ||
|
742dd691f3 | ||
|
e6bbe0a18c | ||
|
ed2932e996 | ||
|
274c8fd4a5 | ||
|
5b2ff17df6 | ||
|
a9463d81a9 | ||
|
c4f104a4d3 | ||
|
0a394aac53 | ||
|
3a7a8d9c2c | ||
|
99bcf21a8a | ||
|
e59f616866 | ||
|
f6b05a645d | ||
|
e3b5846231 | ||
|
d0b84c78cc | ||
|
cd9d01c837 | ||
|
8f16824fbb | ||
|
cd23001e5a | ||
|
657480e7ba | ||
|
274b16f667 | ||
|
2dfc0c2243 | ||
|
65b6068e9a | ||
|
03a8b81a07 | ||
|
3fe88ecb79 | ||
|
64d9e6304d | ||
|
b808196faa | ||
|
8236432f44 | ||
|
1fef8faecc | ||
|
49a51b8863 | ||
|
76fada5016 | ||
|
64de97b6b5 | ||
|
d3bd1e77c1 | ||
|
a56ccfa03b | ||
|
9db0103990 | ||
|
1a2d0a4c27 | ||
|
b02995ffb8 | ||
|
365e9cd37f | ||
|
1dca51b477 | ||
|
ec192c5ca4 | ||
|
9d9cc9154a | ||
|
c303562494 | ||
|
c0b3dd3aa7 | ||
|
8121783c33 | ||
|
0f058098ac | ||
|
011e982b3c | ||
|
4d62a7ebdd | ||
|
915ebbc7eb | ||
|
d438821c6d | ||
|
289e419dc3 | ||
|
1bf244c859 | ||
|
0dcd531110 | ||
|
7c96dc1fc5 | ||
|
8a64b4c249 | ||
|
15ff77dbb9 | ||
|
ad0c69c150 | ||
|
c84e30749c | ||
|
08a31941a9 | ||
|
4491a2a4ad | ||
|
d76f82dd16 | ||
|
f3ff3743fc | ||
|
f0a520755f | ||
|
91d85e62c7 | ||
|
35fcff95ba | ||
|
3e484db1c5 | ||
|
e43f3a2732 | ||
|
f6b2ab207a | ||
|
44e8947ebc | ||
|
8f6e36656f | ||
|
d642d73b20 | ||
|
bca9002c7c | ||
|
0a9b677a14 | ||
|
74d8c3301e | ||
|
d30641963e | ||
|
ed05605237 | ||
|
9f9bdbbb7e | ||
|
ecfb9a0de2 | ||
|
102e8ff8cf | ||
|
a5633c97ce | ||
|
1cdb851098 | ||
|
cf8234ed86 | ||
|
d091f4b4a0 | ||
|
9b591cf321 | ||
|
19b1cd2bfd | ||
|
fa4386dfd4 | ||
|
75436edada | ||
|
00e0cd1827 | ||
|
2b2aed15a5 | ||
|
2b3962a86e | ||
|
bd75e7d840 | ||
|
a10290e6f8 | ||
|
d4a950d29b | ||
|
cf0ac0c998 | ||
|
230ca50639 | ||
|
27f9f5b56d | ||
|
2a1f66ed45 | ||
|
bb8b58a638 | ||
|
f58018eb90 | ||
|
6afd32aecc | ||
|
54b0d3ac7e | ||
|
9ed543a2ca | ||
|
dc47b8a034 | ||
|
cbe0b74694 | ||
|
0ad9e0ebbe | ||
|
4da1d3541a | ||
|
8fccc896f3 | ||
|
644048c3e5 | ||
|
0d4fb44ba4 | ||
|
695ee7c45f | ||
|
04aa0243df | ||
|
3df9329965 | ||
|
3d151821de | ||
|
3a0f6eeb69 | ||
|
4a8935b267 | ||
|
1713b707e8 | ||
|
6b07055672 | ||
|
6d17c46a2a | ||
|
6cf5976cc5 | ||
|
524480433a | ||
|
47af9510a8 | ||
|
ba317b3761 | ||
|
2b4a4088da | ||
|
99b0af93e4 | ||
|
b0aea27156 | ||
|
ffe85bb5bc | ||
|
fb5aaae771 | ||
|
9f238df8c1 | ||
|
6505b6dafd | ||
|
2cf5eddf4e | ||
|
9f992cfe95 | ||
|
00a8bffb89 | ||
|
db39e15982 | ||
|
8611ed2aa8 | ||
|
3675587528 | ||
|
4d8d28bcb9 | ||
|
a75935fafc | ||
|
be4868de28 | ||
|
791dfe6451 | ||
|
9fabee9c66 | ||
|
f656bff46f | ||
|
99f3db3d69 | ||
|
f48d28bb92 | ||
|
7024fa2296 | ||
|
cf72f266a9 | ||
|
34553e385b | ||
|
cba96af5a3 | ||
|
d4003193bc | ||
|
71eb3898b6 | ||
|
c54b1fa0e1 | ||
|
91990cf09d | ||
|
7b77c35edf | ||
|
d3d9aa637d | ||
|
f91e8e1cf0 | ||
|
7db684f1cd | ||
|
2952363549 | ||
|
eb094e377f | ||
|
18d08a9d0d | ||
|
359bfe8b55 | ||
|
6a3fa8423a | ||
|
74e9708afb | ||
|
8703051be0 | ||
|
2afd0c62db | ||
|
54a60a581e | ||
|
722d35ed1a | ||
|
c8f4941c0f | ||
|
fd76432869 | ||
|
d2ced94670 | ||
|
81a060f802 | ||
|
c7c41586ca | ||
|
68cabace70 | ||
|
d68d0aa8e0 | ||
|
fa48f28aff | ||
|
c0a9ca70db | ||
|
133f9251dc | ||
|
f277d60bf5 | ||
|
180aabe2db | ||
|
fd7b0a6e11 | ||
|
8484c160a9 | ||
|
60a5c0968c | ||
|
9bda3eedaf | ||
|
a4c16e2e25 |
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,24 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
set -o pipefail
|
||||
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH"
|
||||
# ccache configurations
|
||||
export CCACHE_CPP2=yes
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
|
||||
export CC="ccache clang"
|
||||
export CXX="ccache clang++"
|
||||
export LDFLAGS="-L/usr/local/opt/llvm/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/llvm/include"
|
||||
|
||||
ccache -s
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON -GNinja
|
||||
ninja
|
||||
|
||||
ccache -s
|
||||
|
||||
ctest -VV -C Release
|
@ -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/
|
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
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://github.com/citra-emu/dynarmic.git
|
||||
url = https://github.com/citra-emu/dynarmic-android
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
|
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
|
||||
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,6 +1,6 @@
|
||||
#!/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
|
||||
echo Trailing whitespace found, aborting
|
||||
exit 1
|
@ -10,11 +10,11 @@ cp -r dist/scripting "$REV_NAME"
|
||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
||||
|
||||
# Find out what release we are building
|
||||
if [ -z $GIT_TAG_NAME ]; then
|
||||
if [ -z $TRAVIS_TAG ]; then
|
||||
RELEASE_NAME=head
|
||||
else
|
||||
RELEASE_NAME=$(echo $GIT_TAG_NAME | cut -d- -f1)
|
||||
if [ "$NAME" = "linux-mingw" ]; then
|
||||
RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
|
||||
if [ "$NAME" = "MinGW build" ]; then
|
||||
RELEASE_NAME="${RELEASE_NAME}-mingw"
|
||||
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",
|
||||
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
|
||||
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
|
||||
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON",
|
||||
"-DENABLE_FDK=ON"
|
||||
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
|
||||
],
|
||||
"cleanup": [
|
||||
"/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 CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS"
|
||||
|
||||
cd /citra
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++
|
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
|
||||
|
||||
# override CI ccache size
|
||||
mkdir -p "$HOME/.ccache/"
|
||||
cd /citra
|
||||
# override Travis CI unreasonable ccache size
|
||||
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
|
||||
|
||||
mkdir build && cd build
|
||||
@ -27,4 +27,4 @@ cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
|
||||
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
|
||||
rm -f package/mediaservice/*d.dll
|
||||
|
||||
python3 .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,7 +1,4 @@
|
||||
try:
|
||||
import lief
|
||||
except ImportError:
|
||||
import pefile
|
||||
import pefile
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
@ -22,20 +19,7 @@ DLL_PATH = [
|
||||
missing = []
|
||||
|
||||
|
||||
def parse_imports_lief(filename):
|
||||
results = []
|
||||
pe = lief.parse(filename)
|
||||
for entry in pe.imports:
|
||||
name = entry.name
|
||||
if name.upper() not in KNOWN_SYS_DLLS and not re.match(string=name, pattern=r'.*32\.DLL'):
|
||||
results.append(name)
|
||||
return results
|
||||
|
||||
|
||||
def parse_imports(file_name):
|
||||
if globals().get('lief'):
|
||||
return parse_imports_lief(file_name)
|
||||
|
||||
results = []
|
||||
pe = pefile.PE(file_name, fast_load=True)
|
||||
pe.parse_data_directories()
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .ci/common/pre-upload.sh
|
||||
. .travis/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||
@ -10,4 +10,4 @@ mkdir "$REV_NAME"
|
||||
# get around the permission issues
|
||||
cp -r package/* "$REV_NAME"
|
||||
|
||||
. .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
|
||||
|
||||
cd /citra
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
|
||||
ninja
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .ci/common/pre-upload.sh
|
||||
. .travis/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
@ -16,4 +16,4 @@ cp build/bin/Release/citra-qt "$REV_NAME"
|
||||
mkdir "$REV_NAME/dist"
|
||||
cp dist/icon.png "$REV_NAME/dist/citra.png"
|
||||
|
||||
. .ci/common/post-upload.sh
|
||||
. .travis/common/post-upload.sh
|
24
.travis/macos/build.sh
Executable file
24
.travis/macos/build.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
set -o pipefail
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH"
|
||||
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
export LDFLAGS="-L/usr/local/opt/llvm/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/llvm/include"
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
|
||||
# make -j4 takes more than 50 minutes when there is no ccache available on Travis CI
|
||||
# and when Travis CI timeouts a job after 50 minutes it won't store any ccache get so far.
|
||||
# To avoid to be stuck forever with failing build, gtimeout will stop make command before
|
||||
# Travis CI timeouts, and this will allow Travis CI to successfully store any ccache get so far,
|
||||
# and iterating this process, the ccache will build up till the make command will succeed.
|
||||
# 50 minutes == 3000 seconds; ~1000 seconds are needed by deps.sh; hence:
|
||||
gtimeout 1500 make -j4
|
||||
|
||||
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 llvm
|
||||
pip3 install macpack
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
. .ci/common/pre-upload.sh
|
||||
. .travis/common/pre-upload.sh
|
||||
|
||||
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||
@ -20,14 +20,10 @@ $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable=
|
||||
# move libs into folder for deployment
|
||||
macpack "${REV_NAME}/citra" -d "libs"
|
||||
|
||||
# workaround for libc++
|
||||
install_name_tool -change @loader_path/../Frameworks/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
|
||||
install_name_tool -change @loader_path/libs/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra"
|
||||
|
||||
# Make the launching script executable
|
||||
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
|
||||
|
||||
# Verify loader instructions
|
||||
find "$REV_NAME" -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
|
||||
tx --version
|
||||
|
||||
cd /citra
|
||||
mkdir build && cd build
|
||||
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
|
||||
make translation
|
@ -21,9 +21,9 @@ get_timestamp(BUILD_DATE)
|
||||
set(REPO_NAME "")
|
||||
set(BUILD_VERSION "0")
|
||||
if (DEFINED ENV{CI})
|
||||
if (DEFINED ENV{GITHUB_ACTIONS})
|
||||
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY})
|
||||
set(BUILD_TAG $ENV{GIT_TAG_NAME})
|
||||
if (DEFINED ENV{TRAVIS})
|
||||
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
||||
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
||||
elseif(DEFINED ENV{APPVEYOR})
|
||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_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)
|
@ -47,7 +47,7 @@ IF(NOT DEFINED ENV{MINGW_DEBUG_INFO})
|
||||
MESSAGE("* WINDRES : ${WINDRES}")
|
||||
MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
|
||||
MESSAGE("* STRIP : ${STRIP}")
|
||||
MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
|
||||
MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
|
||||
MESSAGE("")
|
||||
# So that the debug info only appears once
|
||||
SET(ENV{MINGW_DEBUG_INFO} SHOWN)
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
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://discord.gg/FAXfZV9)
|
||||
|
||||
|
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.
|
||||
steps:
|
||||
- cache-pull@2.4.0: {}
|
||||
- script@1.1.6:
|
||||
- cache-pull@2.0.1: {}
|
||||
- script@1.1.5:
|
||||
title: Install newer cmake
|
||||
inputs:
|
||||
- content: |-
|
||||
@ -52,7 +52,7 @@ workflows:
|
||||
sudo apt remove cmake -y
|
||||
sudo apt purge --auto-remove cmake -y
|
||||
sudo apt install ninja-build -y
|
||||
version=3.19
|
||||
version=3.10
|
||||
build=2
|
||||
mkdir ~/temp
|
||||
cd ~/temp
|
||||
@ -60,13 +60,13 @@ workflows:
|
||||
sudo mkdir /opt/cmake
|
||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
||||
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||
- install-missing-android-tools@2.3.8:
|
||||
- install-missing-android-tools@2.3.3:
|
||||
inputs:
|
||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||
- change-android-versioncode-and-versionname@1.1.1:
|
||||
inputs:
|
||||
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
|
||||
- android-lint@0.9.8:
|
||||
- android-lint@0.9.5:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
@ -76,19 +76,19 @@ workflows:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$TEST_VARIANT"
|
||||
- android-build@0.10.3:
|
||||
- android-build@0.9.5:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$BUILD_VARIANT"
|
||||
- sign-apk@1.2.3:
|
||||
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
|
||||
- deploy-to-bitrise-io@1.11.1: {}
|
||||
- cache-push@2.4.1: {}
|
||||
- deploy-to-bitrise-io@1.3.18: {}
|
||||
- cache-push@2.0.5: {}
|
||||
primary:
|
||||
steps:
|
||||
- cache-pull@2.4.0: {}
|
||||
- script@1.1.6:
|
||||
- cache-pull@2.0.1: {}
|
||||
- script@1.1.5:
|
||||
title: Install newer cmake
|
||||
inputs:
|
||||
- content: |-
|
||||
@ -97,7 +97,7 @@ workflows:
|
||||
sudo apt remove cmake -y
|
||||
sudo apt purge --auto-remove cmake -y
|
||||
sudo apt install ninja-build -y
|
||||
version=3.19
|
||||
version=3.10
|
||||
build=2
|
||||
mkdir ~/temp
|
||||
cd ~/temp
|
||||
@ -105,20 +105,20 @@ workflows:
|
||||
sudo mkdir /opt/cmake
|
||||
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
|
||||
envman add --key PATH --value "/opt/cmake/bin:$PATH"
|
||||
- install-missing-android-tools@2.3.8:
|
||||
- install-missing-android-tools@2.3.3:
|
||||
inputs:
|
||||
- gradlew_path: "$PROJECT_LOCATION/gradlew"
|
||||
- android-lint@0.9.8:
|
||||
- android-lint@0.9.5:
|
||||
inputs:
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- module: "$MODULE"
|
||||
- variant: "$TEST_VARIANT"
|
||||
- android-build@0.10.3:
|
||||
- android-build@0.9.5:
|
||||
inputs:
|
||||
- variant: Debug
|
||||
- project_location: "$PROJECT_LOCATION"
|
||||
- deploy-to-bitrise-io@1.11.1: {}
|
||||
- cache-push@2.4.1: {}
|
||||
- deploy-to-bitrise-io@1.3.18: {}
|
||||
- cache-push@2.0.5: {}
|
||||
app:
|
||||
envs:
|
||||
- opts:
|
||||
|
506
dist/languages/da_DK.ts
vendored
506
dist/languages/da_DK.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/de.ts
vendored
506
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/es_ES.ts
vendored
506
dist/languages/es_ES.ts
vendored
File diff suppressed because it is too large
Load Diff
550
dist/languages/fi.ts
vendored
550
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/fi_FI.ts
vendored
506
dist/languages/fi_FI.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/fr.ts
vendored
506
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load Diff
5549
dist/languages/hu_HU.ts
vendored
Normal file
5549
dist/languages/hu_HU.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
518
dist/languages/id.ts
vendored
518
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/it.ts
vendored
506
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/ja_JP.ts
vendored
506
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/ko_KR.ts
vendored
506
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/lt_LT.ts
vendored
506
dist/languages/lt_LT.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/nb.ts
vendored
506
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/nl.ts
vendored
506
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/pl_PL.ts
vendored
506
dist/languages/pl_PL.ts
vendored
File diff suppressed because it is too large
Load Diff
522
dist/languages/pt_BR.ts
vendored
522
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/ro_RO.ts
vendored
506
dist/languages/ro_RO.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/ru_RU.ts
vendored
506
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/tr_TR.ts
vendored
506
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/vi_VN.ts
vendored
506
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/zh_CN.ts
vendored
506
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load Diff
506
dist/languages/zh_TW.ts
vendored
506
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load Diff
29
externals/CMakeLists.txt
vendored
29
externals/CMakeLists.txt
vendored
@ -30,20 +30,13 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
|
||||
# Crypto++
|
||||
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
|
||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
|
||||
set(DYNARMIC_TESTS OFF)
|
||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||
set(DYNARMIC_FRONTENDS "A32")
|
||||
add_subdirectory(dynarmic)
|
||||
endif()
|
||||
# Dynarmic will skip defining xbyak if it's already defined, we then define it below
|
||||
add_library(xbyak INTERFACE)
|
||||
option(DYNARMIC_TESTS OFF)
|
||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||
set(DYNARMIC_FRONTENDS "A32")
|
||||
add_subdirectory(dynarmic)
|
||||
|
||||
# libfmt
|
||||
add_subdirectory(fmt)
|
||||
@ -79,9 +72,17 @@ target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
|
||||
# Teakra
|
||||
add_subdirectory(teakra EXCLUDE_FROM_ALL)
|
||||
|
||||
# Xbyak
|
||||
if (ARCHITECTURE_x86_64)
|
||||
# Defined before "dynarmic" above
|
||||
# add_library(xbyak INTERFACE)
|
||||
target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
|
||||
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
|
||||
endif()
|
||||
|
||||
# Zstandard
|
||||
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
|
||||
target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/externals/zstd/lib>)
|
||||
target_include_directories(libzstd_static INTERFACE ./zstd/lib)
|
||||
|
||||
# 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 cd4af11efc9c622896a3e4cb599fa28668ca3d05
|
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++
|
||||
===================
|
||||
|
||||
v3.9.0
|
||||
v3.1.2
|
||||
|
||||
This is a mirror providing the single required header file.
|
||||
|
||||
The original repository can be found at:
|
||||
https://github.com/nlohmann/json/commit/d34771cafc87b358ba421faca28facc7f8080174
|
||||
https://github.com/nlohmann/json/commit/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe
|
||||
|
18467
externals/json/json.hpp
vendored
18467
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 <string.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
|
||||
#ifndef MICROPROFILE_API
|
||||
#define MICROPROFILE_API
|
||||
@ -607,45 +605,28 @@ struct MicroProfileFrameState
|
||||
|
||||
struct MicroProfileThreadLog
|
||||
{
|
||||
std::array<MicroProfileLogEntry, MICROPROFILE_BUFFER_SIZE> Log{};
|
||||
MicroProfileLogEntry Log[MICROPROFILE_BUFFER_SIZE];
|
||||
|
||||
std::atomic<uint32_t> nPut{0};
|
||||
std::atomic<uint32_t> nGet{0};
|
||||
uint32_t nActive = 0;
|
||||
uint32_t nGpu = 0;
|
||||
ThreadIdType nThreadId{};
|
||||
std::atomic<uint32_t> nPut;
|
||||
std::atomic<uint32_t> nGet;
|
||||
uint32_t nActive;
|
||||
uint32_t nGpu;
|
||||
ThreadIdType nThreadId;
|
||||
|
||||
std::array<uint32_t, MICROPROFILE_STACK_MAX> nStack{};
|
||||
std::array<int64_t, MICROPROFILE_STACK_MAX> nChildTickStack{};
|
||||
uint32_t nStackPos = 0;
|
||||
uint32_t nStack[MICROPROFILE_STACK_MAX];
|
||||
int64_t nChildTickStack[MICROPROFILE_STACK_MAX];
|
||||
uint32_t nStackPos;
|
||||
|
||||
|
||||
std::array<uint8_t, MICROPROFILE_MAX_GROUPS> nGroupStackPos{};
|
||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nGroupTicks{};
|
||||
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nAggregateGroupTicks{};
|
||||
uint8_t nGroupStackPos[MICROPROFILE_MAX_GROUPS];
|
||||
int64_t nGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||
int64_t nAggregateGroupTicks[MICROPROFILE_MAX_GROUPS];
|
||||
enum
|
||||
{
|
||||
THREAD_MAX_LEN = 64,
|
||||
};
|
||||
char ThreadName[64]{};
|
||||
int nFreeListNext = 0;
|
||||
|
||||
void Reset() {
|
||||
Log.fill({});
|
||||
nPut = 0;
|
||||
nGet = 0;
|
||||
nActive = 0;
|
||||
nGpu = 0;
|
||||
nThreadId = {};
|
||||
nStack.fill(0);
|
||||
nChildTickStack.fill(0);
|
||||
nStackPos = 0;
|
||||
nGroupStackPos.fill(0);
|
||||
nGroupTicks.fill(0);
|
||||
nAggregateGroupTicks.fill(0);
|
||||
std::fill(std::begin(ThreadName), std::end(ThreadName), '\0');
|
||||
nFreeListNext = 0;
|
||||
}
|
||||
char ThreadName[64];
|
||||
int nFreeListNext;
|
||||
};
|
||||
|
||||
#if MICROPROFILE_GPU_TIMERS_D3D11
|
||||
@ -946,11 +927,7 @@ typedef HANDLE MicroProfileThread;
|
||||
DWORD _stdcall ThreadTrampoline(void* pFunc)
|
||||
{
|
||||
MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc;
|
||||
|
||||
// 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)));
|
||||
return (uint32_t)F(0);
|
||||
}
|
||||
|
||||
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
||||
@ -1041,7 +1018,7 @@ static void MicroProfileCreateThreadLogKey()
|
||||
#else
|
||||
MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0;
|
||||
#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);
|
||||
@ -1174,7 +1151,6 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
||||
MP_ASSERT(pLog->nPut.load() == 0);
|
||||
MP_ASSERT(pLog->nGet.load() == 0);
|
||||
S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext;
|
||||
pLog->Reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1182,6 +1158,7 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
|
||||
S.nMemUsage += sizeof(MicroProfileThreadLog);
|
||||
S.Pool[S.nNumLogs++] = pLog;
|
||||
}
|
||||
memset(pLog, 0, sizeof(*pLog));
|
||||
int len = (int)strlen(pName);
|
||||
int maxlen = sizeof(pLog->ThreadName)-1;
|
||||
len = len < maxlen ? len : maxlen;
|
||||
@ -1229,8 +1206,8 @@ void MicroProfileOnThreadExit()
|
||||
{
|
||||
S.Frames[i].nLogStart[nLogIndex] = 0;
|
||||
}
|
||||
pLog->nGroupStackPos.fill(0);
|
||||
pLog->nGroupTicks.fill(0);
|
||||
memset(pLog->nGroupStackPos, 0, sizeof(pLog->nGroupStackPos));
|
||||
memset(pLog->nGroupTicks, 0, sizeof(pLog->nGroupTicks));
|
||||
}
|
||||
}
|
||||
|
||||
|
212
externals/microprofile/microprofileui.h
vendored
212
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);
|
||||
|
||||
#ifdef MICROPROFILEUI_IMPL
|
||||
#include <inttypes.h>
|
||||
#ifdef _WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000);
|
||||
MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00);
|
||||
@ -226,10 +227,10 @@ struct SOptionDesc
|
||||
uint8_t nIndex;
|
||||
bool bSelected;
|
||||
};
|
||||
static const std::array<uint32_t, 6> g_MicroProfileAggregatePresets{0, 10, 20, 30, 60, 120};
|
||||
static const std::array<float, 10> g_MicroProfileReferenceTimePresets{5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f};
|
||||
static const std::array<uint32_t, 4> g_MicroProfileOpacityPresets{0x40, 0x80, 0xc0, 0xff};
|
||||
static const std::array<const char*, 7> g_MicroProfilePresetNames
|
||||
static uint32_t g_MicroProfileAggregatePresets[] = {0, 10, 20, 30, 60, 120};
|
||||
static float g_MicroProfileReferenceTimePresets[] = {5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f};
|
||||
static uint32_t g_MicroProfileOpacityPresets[] = {0x40, 0x80, 0xc0, 0xff};
|
||||
static const char* g_MicroProfilePresetNames[] =
|
||||
{
|
||||
MICROPROFILE_DEFAULT_PRESET,
|
||||
"Render",
|
||||
@ -242,8 +243,8 @@ static const std::array<const char*, 7> g_MicroProfilePresetNames
|
||||
|
||||
enum
|
||||
{
|
||||
MICROPROFILE_NUM_REFERENCE_PRESETS = g_MicroProfileReferenceTimePresets.size(),
|
||||
MICROPROFILE_NUM_OPACITY_PRESETS = g_MicroProfileOpacityPresets.size(),
|
||||
MICROPROFILE_NUM_REFERENCE_PRESETS = sizeof(g_MicroProfileReferenceTimePresets)/sizeof(g_MicroProfileReferenceTimePresets[0]),
|
||||
MICROPROFILE_NUM_OPACITY_PRESETS = sizeof(g_MicroProfileOpacityPresets)/sizeof(g_MicroProfileOpacityPresets[0]),
|
||||
#if MICROPROFILE_CONTEXT_SWITCH_TRACE
|
||||
MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7,
|
||||
#else
|
||||
@ -325,9 +326,9 @@ struct MicroProfileUI
|
||||
|
||||
MicroProfileUI 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
|
||||
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,
|
||||
0x755E2B,
|
||||
@ -355,7 +356,7 @@ void MicroProfileInitUI()
|
||||
{
|
||||
bInitialized = true;
|
||||
memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI));
|
||||
UI.nActiveMenu = UINT32_MAX;
|
||||
UI.nActiveMenu = (uint32_t)-1;
|
||||
UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f;
|
||||
UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f;
|
||||
|
||||
@ -367,7 +368,7 @@ void MicroProfileInitUI()
|
||||
UI.nWidth = 100;
|
||||
UI.nHeight = 100;
|
||||
|
||||
UI.nCustomActive = UINT32_MAX;
|
||||
UI.nCustomActive = (uint32_t)-1;
|
||||
UI.nCustomTimerCount = 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);
|
||||
}
|
||||
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
|
||||
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, UINT32_MAX, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
||||
MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
|
||||
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, (uint32_t)-1, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -780,7 +781,7 @@ void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId,
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
int64_t nTickIn = -1;
|
||||
uint32_t nThreadBefore = UINT32_MAX;
|
||||
uint32_t nThreadBefore = -1;
|
||||
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
|
||||
float fMsToScreen = UI.nWidth / UI.fDetailedRange;
|
||||
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 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 nContextSwitchEnd = UINT32_MAX;
|
||||
uint32_t nContextSwitchStart = -1;
|
||||
uint32_t nContextSwitchEnd = -1;
|
||||
S.nContextSwitchHoverCpuNext = 0xff;
|
||||
S.nContextSwitchHoverTickIn = -1;
|
||||
S.nContextSwitchHoverTickOut = -1;
|
||||
@ -1004,10 +1005,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
}while(pFrameLogFirst != pFrameFirst);
|
||||
|
||||
|
||||
if (nGet == UINT32_MAX) {
|
||||
if(nGet == (uint32_t)-1)
|
||||
continue;
|
||||
}
|
||||
MP_ASSERT(nGet != UINT32_MAX);
|
||||
MP_ASSERT(nGet != (uint32_t)-1);
|
||||
|
||||
nPut = pFrameLogLast->nLogStart[i];
|
||||
|
||||
@ -1023,9 +1023,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu;
|
||||
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
|
||||
uint64_t nThreadId = pLog->nThreadId;
|
||||
snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s", nThreadId, &pLog->ThreadName[0] );
|
||||
snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s", nThreadId, &pLog->ThreadName[0] );
|
||||
nY += 3;
|
||||
uint32_t nThreadColor = UINT32_MAX;
|
||||
uint32_t nThreadColor = -1;
|
||||
if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore)
|
||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||
MicroProfileDrawText(0, nY, nThreadColor, &ThreadName[0], (uint32_t)strlen(&ThreadName[0]));
|
||||
@ -1048,7 +1048,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
uint32_t nEnd = nRange[j][1];
|
||||
for(uint32_t k = nStart; k < nEnd; ++k)
|
||||
{
|
||||
MicroProfileLogEntry* pEntry = &pLog->Log[k];
|
||||
MicroProfileLogEntry* pEntry = pLog->Log + k;
|
||||
int nType = MicroProfileLogType(*pEntry);
|
||||
if(MP_LOG_ENTER == nType)
|
||||
{
|
||||
@ -1066,7 +1066,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
continue;
|
||||
}
|
||||
|
||||
MicroProfileLogEntry* pEntryEnter = &pLog->Log[nStack[nStackPos-1]];
|
||||
MicroProfileLogEntry* pEntryEnter = pLog->Log + nStack[nStackPos-1];
|
||||
if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry))
|
||||
{
|
||||
//uprintf("mismatch %llx %llx\n", pEntryEnter->nToken, pEntry->nToken);
|
||||
@ -1126,7 +1126,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
uint32_t nIntegerWidth = (uint32_t)(fXEnd - fXStart);
|
||||
if(nIntegerWidth)
|
||||
{
|
||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
||||
if(bHover && UI.nActiveMenu == -1)
|
||||
{
|
||||
nHoverToken = MicroProfileLogTimerIndex(*pEntry);
|
||||
#if MICROPROFILE_DEBUG
|
||||
@ -1146,7 +1146,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int nCharacters = (nTextWidth - 2*MICROPROFILE_TEXT_WIDTH) / MICROPROFILE_TEXT_WIDTH;
|
||||
if(nCharacters>0)
|
||||
{
|
||||
MicroProfileDrawText(fXStartText + 1, fYStart + 1, 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
|
||||
@ -1158,7 +1158,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
int nLineX = (int)floor(fXAvg+0.5f);
|
||||
if(nLineX != (int)nLinesDrawn[nStackPos])
|
||||
{
|
||||
if(bHover && UI.nActiveMenu == UINT32_MAX)
|
||||
if(bHover && UI.nActiveMenu == -1)
|
||||
{
|
||||
nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry);
|
||||
nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd);
|
||||
@ -1235,9 +1235,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
// nThreadId is 32-bit on Windows
|
||||
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
|
||||
#else
|
||||
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%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
|
||||
uint32_t nThreadColor = UINT32_MAX;
|
||||
uint32_t nThreadColor = -1;
|
||||
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
|
||||
nThreadColor = UI.nHoverColorShared|0x906060;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
|
||||
UI.pDisplayMouseOver = pMouseOverNext;
|
||||
|
||||
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 fStartTextX = fXStart - fStartTextWidth - 2;
|
||||
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);
|
||||
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)
|
||||
{
|
||||
@ -1313,10 +1316,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
||||
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
|
||||
float fStartTextX = fXStart - fStartTextWidth - 2;
|
||||
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart);
|
||||
MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
|
||||
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
|
||||
MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
|
||||
MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_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;
|
||||
uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU;
|
||||
if(nIndex == nSelectedFrame)
|
||||
nColor = UINT32_MAX;
|
||||
nColor = (uint32_t)-1;
|
||||
MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar);
|
||||
if(pNext->nFrameStartCpu > nCpuStart)
|
||||
{
|
||||
@ -1384,7 +1387,7 @@ void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
||||
uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1;
|
||||
|
||||
int nSelectedFrame = -1;
|
||||
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == 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);
|
||||
@ -1422,7 +1425,7 @@ void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
||||
if(pName)
|
||||
{
|
||||
MicroProfileDrawBox(nX-8, MICROPROFILE_TEXT_HEIGHT + 2, nX + nWidth+5, MICROPROFILE_TEXT_HEIGHT + 2 + (MICROPROFILE_TEXT_HEIGHT+1), 0xff000000|g_nMicroProfileBackColors[1]);
|
||||
MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_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;
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
uint64_t nMask = 1ULL << j;
|
||||
uint64_t nMask = 1ll << j;
|
||||
if(nMask & nGroup)
|
||||
{
|
||||
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]);
|
||||
if (!pTimers2)
|
||||
MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar);
|
||||
MicroProfileDrawText(nX, nY, UINT32_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();
|
||||
char sBuffer[SBUF_MAX];
|
||||
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)
|
||||
@ -1585,7 +1588,7 @@ void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint
|
||||
float fRcpFrames = pArgs->fRcpFrames;
|
||||
char sBuffer[SBUF_MAX];
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_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)
|
||||
@ -1606,8 +1609,8 @@ void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
||||
{
|
||||
uint64_t* pCounters = (uint64_t*)pExtra;
|
||||
char sBuffer[SBUF_MAX];
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5" PRIu64, pCounters[nTimer]);
|
||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen);
|
||||
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5llu", pCounters[nTimer]);
|
||||
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)
|
||||
@ -1664,7 +1667,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
if(bMouseOver)
|
||||
{
|
||||
float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX;
|
||||
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, UINT32_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];
|
||||
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)
|
||||
{
|
||||
uint64_t nMask = 1ULL << j;
|
||||
uint64_t nMask = 1ll << j;
|
||||
if(nMask & nActiveGroup)
|
||||
{
|
||||
MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName);
|
||||
@ -1820,7 +1823,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
uint32_t nNumGroups = 0;
|
||||
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
|
||||
{
|
||||
if(nActiveGroup & (1ULL << j))
|
||||
if(nActiveGroup & (1ll << j))
|
||||
{
|
||||
nNumTimers += S.GroupInfo[j].nNumTimers;
|
||||
nNumGroups += 1;
|
||||
@ -1875,7 +1878,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||
{
|
||||
uint32_t nY0 = nY + i * (nHeight + 1);
|
||||
bool bInside = (UI.nActiveMenu == 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)));
|
||||
}
|
||||
nX += 10;
|
||||
@ -1924,22 +1927,22 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||
nY = nHeight + 3 - UI.nOffsetY;
|
||||
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
|
||||
{
|
||||
const uint32_t nY0 = nY + i * (nHeight + 1);
|
||||
const bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
|
||||
uint32_t nY0 = nY + i * (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)));
|
||||
}
|
||||
nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
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]);
|
||||
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
|
||||
{
|
||||
*bSelected = 0 != (S.nActiveGroupWanted & (1ULL << Item.nIndex));
|
||||
*bSelected = 0 != (S.nActiveGroupWanted & (1ll << Item.nIndex));
|
||||
snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName);
|
||||
}
|
||||
return buffer;
|
||||
@ -2012,18 +2015,16 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
||||
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
||||
{
|
||||
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];
|
||||
*bSelected = S.nAggregateFlip == val;
|
||||
if (0 == val)
|
||||
{
|
||||
int val = g_MicroProfileAggregatePresets[nIndex];
|
||||
*bSelected = (int)S.nAggregateFlip == val;
|
||||
if(0 == val)
|
||||
return "Infinite";
|
||||
}
|
||||
else
|
||||
{
|
||||
static char buf[128];
|
||||
snprintf(buf, sizeof(buf)-1, "%7u", val);
|
||||
snprintf(buf, sizeof(buf)-1, "%7d", val);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
@ -2097,13 +2098,11 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
||||
{
|
||||
static char buf[128];
|
||||
*bSelected = false;
|
||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
||||
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||
int nIndexSave = nIndex - nNumPresets - 1;
|
||||
if (nIndex == nNumPresets)
|
||||
{
|
||||
if(nIndex == nNumPresets)
|
||||
return "--";
|
||||
}
|
||||
else if(nIndexSave >=0 && nIndexSave < nNumPresets)
|
||||
else if(nIndexSave >=0 && nIndexSave <nNumPresets)
|
||||
{
|
||||
snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]);
|
||||
return buf;
|
||||
@ -2121,13 +2120,13 @@ const char* MicroProfileUIMenuPreset(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;
|
||||
}
|
||||
else
|
||||
{
|
||||
*bSelected = nIndex-2 == static_cast<int>(UI.nCustomActive);
|
||||
*bSelected = nIndex-2 == UI.nCustomActive;
|
||||
}
|
||||
switch(nIndex)
|
||||
{
|
||||
@ -2203,7 +2202,7 @@ void MicroProfileUIClickGroups(int nIndex)
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size());
|
||||
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||
int nIndexSave = nIndex - nNumPresets - 1;
|
||||
if(nIndexSave >= 0 && nIndexSave < nNumPresets)
|
||||
{
|
||||
@ -2311,7 +2310,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
|
||||
uint32_t nX = 0;
|
||||
uint32_t nY = 0;
|
||||
|
||||
bool bMouseOver = UI.nMouseY < MICROPROFILE_TEXT_HEIGHT + 1;
|
||||
#define SBUF_SIZE 256
|
||||
char buffer[256];
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]);
|
||||
@ -2322,7 +2321,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
uint32_t nNumMenuItems = 0;
|
||||
|
||||
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);
|
||||
pMenuText[nNumMenuItems++] = "Mode";
|
||||
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)
|
||||
{
|
||||
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);
|
||||
nSelectMenu = i;
|
||||
if((UI.nMouseLeft || UI.nMouseRight) && i == (uint32_t)nPauseIndex)
|
||||
if((UI.nMouseLeft || UI.nMouseRight) && i == (int)nPauseIndex)
|
||||
{
|
||||
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);
|
||||
}
|
||||
uint32_t nMenu = nSelectMenu != UINT32_MAX ? nSelectMenu : UI.nActiveMenu;
|
||||
uint32_t nMenu = nSelectMenu != (uint32_t)-1 ? nSelectMenu : UI.nActiveMenu;
|
||||
UI.nActiveMenu = nMenu;
|
||||
if(UINT32_MAX != nMenu)
|
||||
if((uint32_t)-1 != nMenu)
|
||||
{
|
||||
nX = nMenuX[nMenu];
|
||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||
@ -2451,9 +2450,9 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
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]);
|
||||
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);
|
||||
if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1)
|
||||
{
|
||||
bMouseOver = true;
|
||||
if(UI.nMouseLeft || UI.nMouseRight)
|
||||
{
|
||||
CBClick[nMenu](i);
|
||||
@ -2469,7 +2469,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888);
|
||||
}
|
||||
int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString);
|
||||
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen);
|
||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
|
||||
nY += MICROPROFILE_TEXT_HEIGHT+1;
|
||||
}
|
||||
}
|
||||
@ -2484,7 +2484,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||
float fMaxMs = fToMs * S.nFlipMaxDisplay;
|
||||
int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs);
|
||||
pMenuText[nNumMenuItems++] = &FrameTimeMessage[0];
|
||||
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, 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)
|
||||
{
|
||||
if(UINT32_MAX != UI.nCustomActive)
|
||||
if((uint32_t)-1 != UI.nCustomActive)
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
MP_ASSERT(UI.nCustomActive < MICROPROFILE_CUSTOM_MAX);
|
||||
@ -2571,8 +2571,8 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
pColors[i] = S.TimerInfo[nTimerIndex].nColor;
|
||||
}
|
||||
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Avg", sizeof("Avg")-1);
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Max", sizeof("Max")-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_t)-1, "Max", sizeof("Max")-1);
|
||||
for(uint32_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||
@ -2582,10 +2582,10 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
int nSize;
|
||||
uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING;
|
||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
|
||||
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
|
||||
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);
|
||||
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName);
|
||||
MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize);
|
||||
@ -2599,9 +2599,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
nOffsetY = nOffsetYBase;
|
||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg";
|
||||
MicroProfileDrawText(nMaxOffsetX, nOffsetY, UINT32_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);
|
||||
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)
|
||||
{
|
||||
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
|
||||
@ -2613,9 +2613,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||
{
|
||||
nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT);
|
||||
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg";
|
||||
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, UINT32_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);
|
||||
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);
|
||||
float fPosX = MICROPROFILE_CUSTOM_PADDING;
|
||||
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? pTimeMax : pTimeAvg;
|
||||
@ -2668,7 +2668,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
UI.nHoverTime = 0;
|
||||
UI.nHoverFrame = -1;
|
||||
if(S.nDisplay != MP_DRAW_DETAILED)
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX;
|
||||
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
|
||||
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)
|
||||
{
|
||||
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());
|
||||
MicroProfileStringArray ToolTip;
|
||||
@ -2820,7 +2820,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference );
|
||||
MicroProfileStringArrayAddLiteral(&ToolTip, "CPU");
|
||||
MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu);
|
||||
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, 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
|
||||
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)
|
||||
{
|
||||
@ -2883,7 +2883,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||
#endif
|
||||
m.unlock();
|
||||
}
|
||||
else if(UI.nCustomActive != UINT32_MAX)
|
||||
else if(UI.nCustomActive != (uint32_t)-1)
|
||||
{
|
||||
std::recursive_mutex& m = MicroProfileGetMutex();
|
||||
m.lock();
|
||||
@ -3179,7 +3179,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
||||
{
|
||||
if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName))
|
||||
{
|
||||
S.nActiveGroupWanted |= (1ULL << j);
|
||||
S.nActiveGroupWanted |= (1ll << j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3212,7 +3212,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
||||
uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex;
|
||||
if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName))
|
||||
{
|
||||
MicroProfileToken nToken = MicroProfileMakeToken(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.TimerInfo[j].bGraph = true;
|
||||
if(nToken != nPrevToken)
|
||||
@ -3235,7 +3235,7 @@ uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return UINT32_MAX;
|
||||
return (uint32_t)-1;
|
||||
}
|
||||
|
||||
uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||
@ -3251,7 +3251,7 @@ uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||
uint32_t nIndex = UI.nCustomCount;
|
||||
UI.nCustomCount++;
|
||||
memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex]));
|
||||
size_t nLen = strlen(pCustomName);
|
||||
uint32_t nLen = (uint32_t)strlen(pCustomName);
|
||||
if(nLen > MICROPROFILE_NAME_MAX_LEN-1)
|
||||
nLen = MICROPROFILE_NAME_MAX_LEN-1;
|
||||
memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen);
|
||||
@ -3309,7 +3309,7 @@ void MicroProfileCustomGroupEnable(uint32_t nIndex)
|
||||
void MicroProfileCustomGroupToggle(const char* pCustomName)
|
||||
{
|
||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||
if(nIndex == UINT32_MAX || nIndex == UI.nCustomActive)
|
||||
if(nIndex == (uint32_t)-1 || nIndex == UI.nCustomActive)
|
||||
{
|
||||
MicroProfileCustomGroupDisable();
|
||||
}
|
||||
@ -3328,13 +3328,13 @@ void MicroProfileCustomGroupDisable()
|
||||
{
|
||||
MicroProfile& S = *MicroProfileGet();
|
||||
S.nForceGroupUI = 0;
|
||||
UI.nCustomActive = UINT32_MAX;
|
||||
UI.nCustomActive = (uint32_t)-1;
|
||||
}
|
||||
|
||||
void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer)
|
||||
{
|
||||
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
|
||||
if(UINT32_MAX == nIndex)
|
||||
if((uint32_t)-1 == nIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -3344,7 +3344,7 @@ void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup
|
||||
MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first.
|
||||
UI.Custom[nIndex].pTimers[nTimerIndex] = nToken;
|
||||
uint16_t nGroup = MicroProfileGetGroupIndex(nToken);
|
||||
UI.Custom[nIndex].nGroupMask |= (1ULL << nGroup);
|
||||
UI.Custom[nIndex].nGroupMask |= (1ll << nGroup);
|
||||
UI.Custom[nIndex].nNumTimers++;
|
||||
}
|
||||
|
||||
|
2
externals/xbyak
vendored
2
externals/xbyak
vendored
@ -1 +1 @@
|
||||
Subproject commit c306b8e5786eeeb87b8925a8af5c3bf057ff5a90
|
||||
Subproject commit 18c9caaa0a3ed5706c39f5aa86cce0db6e65b174
|
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(
|
||||
/W3
|
||||
/MP
|
||||
/Zi
|
||||
/Zo
|
||||
/permissive-
|
||||
/EHsc
|
||||
/volatile:iso
|
||||
@ -47,15 +49,6 @@ if (MSVC)
|
||||
/external:W0
|
||||
)
|
||||
|
||||
# Since MSVC's debugging information is not very deterministic, so we have to disable it
|
||||
# when using ccache or other caching tools
|
||||
if (NOT USE_CCACHE)
|
||||
add_compile_options(
|
||||
/Zi
|
||||
/Zo
|
||||
)
|
||||
endif()
|
||||
|
||||
# /GS- - No stack buffer overflow checks
|
||||
add_compile_options("$<$<CONFIG:Release>:/GS->")
|
||||
|
||||
|
@ -31,7 +31,7 @@ android {
|
||||
// TODO If this is ever modified, change application_id in strings.xml
|
||||
applicationId "org.citra.citra_emu"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 29
|
||||
targetSdkVersion 28
|
||||
versionCode autoVersion
|
||||
versionName getVersion()
|
||||
ndk.abiFilters abiFilter
|
||||
@ -121,7 +121,7 @@ dependencies {
|
||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager: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() {
|
||||
|
@ -28,8 +28,7 @@
|
||||
android:allowBackup="false"
|
||||
android:supportsRtl="true"
|
||||
android:isGame="true"
|
||||
android:banner="@mipmap/ic_launcher"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
android:banner="@mipmap/ic_launcher">
|
||||
|
||||
<activity
|
||||
android:name="org.citra.citra_emu.ui.main.MainActivity"
|
||||
|
@ -229,9 +229,9 @@ public final class EmulationActivity extends AppCompatActivity {
|
||||
finish();
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
|
||||
NativeLibrary.UnPauseEmulation())
|
||||
.setOnCancelListener(dialogInterface ->
|
||||
NativeLibrary.UnPauseEmulation())
|
||||
{
|
||||
}).setOnDismissListener(dialogInterface ->
|
||||
NativeLibrary.UnPauseEmulation())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
@ -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
|
||||
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) {
|
||||
if (!addToStack && getFragment() != null) {
|
||||
return;
|
||||
}
|
||||
public void onBackPressed() {
|
||||
mPresenter.onBackPressed();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
|
||||
if (addToStack) {
|
||||
@ -114,6 +116,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
||||
}
|
||||
|
||||
transaction.addToBackStack(null);
|
||||
mPresenter.addToStack();
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void popBackStack() {
|
||||
getSupportFragmentManager().popBackStackImmediate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSettingChanged() {
|
||||
mPresenter.onSettingChanged();
|
||||
|
@ -22,6 +22,8 @@ public final class SettingsActivityPresenter {
|
||||
|
||||
private Settings mSettings = new Settings();
|
||||
|
||||
private int mStackCount;
|
||||
|
||||
private boolean mShouldSave;
|
||||
|
||||
private DirectoryStateReceiver directoryStateReceiver;
|
||||
@ -43,6 +45,7 @@ public final class SettingsActivityPresenter {
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
this.mStackCount = 0;
|
||||
prepareCitraDirectoriesIfNeeded();
|
||||
}
|
||||
|
||||
@ -114,6 +117,19 @@ public final class SettingsActivityPresenter {
|
||||
NativeLibrary.ReloadSettings();
|
||||
}
|
||||
|
||||
public void addToStack() {
|
||||
mStackCount++;
|
||||
}
|
||||
|
||||
public void onBackPressed() {
|
||||
if (mStackCount > 0) {
|
||||
mView.popBackStack();
|
||||
mStackCount--;
|
||||
} else {
|
||||
mView.finish();
|
||||
}
|
||||
}
|
||||
|
||||
public void onSettingChanged() {
|
||||
mShouldSave = true;
|
||||
}
|
||||
|
@ -55,6 +55,11 @@ public interface SettingsActivityView {
|
||||
*/
|
||||
void showToastMessage(String message, boolean is_long);
|
||||
|
||||
/**
|
||||
* Show the previous fragment.
|
||||
*/
|
||||
void popBackStack();
|
||||
|
||||
/**
|
||||
* End the activity.
|
||||
*/
|
||||
|
@ -357,7 +357,6 @@ public final class SettingsFragmentPresenter {
|
||||
Setting shadersAccurateMul = rendererSection.getSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL);
|
||||
Setting render3dMode = rendererSection.getSetting(SettingsFile.KEY_RENDER_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);
|
||||
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_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_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 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_SHADERS_ACCURATE_MUL = "shaders_accurate_mul";
|
||||
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_RESOLUTION_FACTOR = "resolution_factor";
|
||||
public static final String KEY_FRAME_LIMIT_ENABLED = "use_frame_limit";
|
||||
|
@ -123,14 +123,12 @@ void Config::ReadValues() {
|
||||
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
|
||||
Settings::values.resolution_factor =
|
||||
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);
|
||||
|
||||
// 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 =
|
||||
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;
|
||||
}
|
||||
@ -145,7 +143,7 @@ void Config::ReadValues() {
|
||||
else if (Settings::values.render_3d == Settings::StereoRenderOption::Interlaced)
|
||||
default_shader = "horizontal (builtin)";
|
||||
Settings::values.pp_shader_name =
|
||||
sdl2_config->GetString("Renderer", "pp_shader_name", default_shader);
|
||||
sdl2_config->GetString("Renderer", "pp_shader_name", default_shader);
|
||||
Settings::values.filter_mode = sdl2_config->GetBoolean("Renderer", "filter_mode", true);
|
||||
|
||||
Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0));
|
||||
@ -174,11 +172,11 @@ void Config::ReadValues() {
|
||||
Settings::values.custom_bottom_bottom =
|
||||
static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480));
|
||||
Settings::values.cardboard_screen_size =
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_screen_size", 85));
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_screen_size", 85));
|
||||
Settings::values.cardboard_x_shift =
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_x_shift", 0));
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_x_shift", 0));
|
||||
Settings::values.cardboard_y_shift =
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_y_shift", 0));
|
||||
static_cast<int>(sdl2_config->GetInteger("Layout", "cardboard_y_shift", 0));
|
||||
|
||||
// Audio
|
||||
Settings::values.enable_dsp_lle = sdl2_config->GetBoolean("Audio", "enable_dsp_lle", false);
|
||||
|
@ -91,12 +91,6 @@ udp_pad_index=
|
||||
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
||||
use_cpu_jit =
|
||||
|
||||
# Change the Clock Frequency of the emulated 3DS CPU.
|
||||
# Underclocking can increase the performance of the game at the risk of freezing.
|
||||
# Overclocking may fix lag that happens on console, but also comes with the risk of freezing.
|
||||
# Range is any positive integer (but we suspect 25 - 400 is a good idea) Default is 100
|
||||
cpu_clock_percentage =
|
||||
|
||||
[Renderer]
|
||||
# Whether to render using GLES or OpenGL
|
||||
# 0: OpenGL, 1 (default): GLES
|
||||
@ -110,10 +104,6 @@ use_hw_renderer =
|
||||
# 0: Software, 1 (default): Hardware
|
||||
use_hw_shader =
|
||||
|
||||
# Whether to use separable shaders to emulate 3DS shaders (macOS only)
|
||||
# 0: Off (Default), 1 : On
|
||||
separable_shader =
|
||||
|
||||
# Whether to use accurate multiplication in hardware shaders
|
||||
# 0: Off (Default. Faster, but causes issues in some games) 1: On (Slower, but correct)
|
||||
shaders_accurate_mul =
|
||||
@ -126,15 +116,6 @@ use_asynchronous_gpu_emulation =
|
||||
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
||||
use_shader_jit =
|
||||
|
||||
# Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can
|
||||
# so only turn this off if you notice a speed difference.
|
||||
# 0: Off, 1 (default): On
|
||||
use_vsync_new =
|
||||
|
||||
# Reduce stuttering by storing and loading generated shaders to disk
|
||||
# 0: Off, 1 (default. On)
|
||||
use_disk_shader_cache =
|
||||
|
||||
# Resolution scale factor
|
||||
# 0: Auto (scales resolution to window size), 1: Native 3DS screen resolution, Otherwise a scale
|
||||
# factor for the 3DS resolution
|
||||
@ -159,7 +140,7 @@ bg_blue =
|
||||
bg_green =
|
||||
|
||||
# Whether and how Stereoscopic 3D should be rendered
|
||||
# 0 (default): Off, 1: Side by Side, 2: Anaglyph, 3: Interlaced, 4: Reverse Interlaced, 5: Cardboard VR
|
||||
# 0 (default): Off, 1: Side by Side, 2: Anaglyph, 3: Interlaced, 4: Cardboard VR
|
||||
render_3d =
|
||||
|
||||
# Change 3D Intensity
|
||||
|
@ -246,8 +246,7 @@ void EmuWindow_Android::TryPresenting() {
|
||||
}
|
||||
}
|
||||
eglSwapInterval(egl_display, Settings::values.use_vsync_new ? 1 : 0);
|
||||
if (VideoCore::g_renderer) {
|
||||
VideoCore::g_renderer->TryPresent(0);
|
||||
if (VideoCore::g_renderer && VideoCore::g_renderer->TryPresent()) {
|
||||
eglSwapBuffers(egl_display, egl_surface);
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,6 @@ static JavaVM* s_java_vm;
|
||||
static jclass s_native_library_class;
|
||||
static jclass s_core_error_class;
|
||||
static jclass s_savestate_info_class;
|
||||
static jclass s_disk_cache_progress_class;
|
||||
static jclass s_load_callback_stage_class;
|
||||
static jmethodID s_on_core_error;
|
||||
static jmethodID s_display_alert_msg;
|
||||
static jmethodID s_display_alert_prompt;
|
||||
@ -32,9 +30,6 @@ static jmethodID s_landscape_screen_layout;
|
||||
static jmethodID s_exit_emulation_activity;
|
||||
static jmethodID s_request_camera_permission;
|
||||
static jmethodID s_request_mic_permission;
|
||||
static jmethodID s_disk_cache_load_progress;
|
||||
|
||||
static std::unordered_map<VideoCore::LoadCallbackStage, jobject> s_java_load_callback_stages;
|
||||
|
||||
namespace IDCache {
|
||||
|
||||
@ -69,14 +64,6 @@ jclass GetSavestateInfoClass() {
|
||||
return s_savestate_info_class;
|
||||
}
|
||||
|
||||
jclass GetDiskCacheProgressClass() {
|
||||
return s_disk_cache_progress_class;
|
||||
}
|
||||
|
||||
jclass GetDiskCacheLoadCallbackStageClass() {
|
||||
return s_load_callback_stage_class;
|
||||
}
|
||||
|
||||
jmethodID GetOnCoreError() {
|
||||
return s_on_core_error;
|
||||
}
|
||||
@ -113,17 +100,6 @@ jmethodID GetRequestMicPermission() {
|
||||
return s_request_mic_permission;
|
||||
}
|
||||
|
||||
jmethodID GetDiskCacheLoadProgress() {
|
||||
return s_disk_cache_load_progress;
|
||||
}
|
||||
|
||||
jobject GetJavaLoadCallbackStage(VideoCore::LoadCallbackStage stage) {
|
||||
const auto it = s_java_load_callback_stages.find(stage);
|
||||
ASSERT_MSG(it != s_java_load_callback_stages.end(), "Invalid LoadCallbackStage: {}", stage);
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
} // namespace IDCache
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -147,19 +123,13 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
FileUtil::GetUserPath(FileUtil::UserPath::LogDir) + LOG_FILE));
|
||||
LOG_INFO(Frontend, "Logging backend initialised");
|
||||
|
||||
// Initialize Java classes
|
||||
// Initialize Java methods
|
||||
const jclass native_library_class = env->FindClass("org/citra/citra_emu/NativeLibrary");
|
||||
s_native_library_class = reinterpret_cast<jclass>(env->NewGlobalRef(native_library_class));
|
||||
s_savestate_info_class = reinterpret_cast<jclass>(
|
||||
env->NewGlobalRef(env->FindClass("org/citra/citra_emu/NativeLibrary$SavestateInfo")));
|
||||
s_core_error_class = reinterpret_cast<jclass>(
|
||||
env->NewGlobalRef(env->FindClass("org/citra/citra_emu/NativeLibrary$CoreError")));
|
||||
s_disk_cache_progress_class = reinterpret_cast<jclass>(env->NewGlobalRef(
|
||||
env->FindClass("org/citra/citra_emu/disk_shader_cache/DiskShaderCacheProgress")));
|
||||
s_load_callback_stage_class = reinterpret_cast<jclass>(env->NewGlobalRef(env->FindClass(
|
||||
"org/citra/citra_emu/disk_shader_cache/DiskShaderCacheProgress$LoadCallbackStage")));
|
||||
|
||||
// Initialize Java methods
|
||||
s_on_core_error = env->GetStaticMethodID(
|
||||
s_native_library_class, "OnCoreError",
|
||||
"(Lorg/citra/citra_emu/NativeLibrary$CoreError;Ljava/lang/String;)Z");
|
||||
@ -179,28 +149,6 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
env->GetStaticMethodID(s_native_library_class, "RequestCameraPermission", "()Z");
|
||||
s_request_mic_permission =
|
||||
env->GetStaticMethodID(s_native_library_class, "RequestMicPermission", "()Z");
|
||||
s_disk_cache_load_progress = env->GetStaticMethodID(
|
||||
s_disk_cache_progress_class, "loadProgress",
|
||||
"(Lorg/citra/citra_emu/disk_shader_cache/DiskShaderCacheProgress$LoadCallbackStage;II)V");
|
||||
|
||||
// Initialize LoadCallbackStage map
|
||||
const auto to_java_load_callback_stage = [env](const std::string& stage) {
|
||||
jclass load_callback_stage_class = IDCache::GetDiskCacheLoadCallbackStageClass();
|
||||
return env->NewGlobalRef(env->GetStaticObjectField(
|
||||
load_callback_stage_class,
|
||||
env->GetStaticFieldID(load_callback_stage_class, stage.c_str(),
|
||||
"Lorg/citra/citra_emu/disk_shader_cache/"
|
||||
"DiskShaderCacheProgress$LoadCallbackStage;")));
|
||||
};
|
||||
|
||||
s_java_load_callback_stages.emplace(VideoCore::LoadCallbackStage::Prepare,
|
||||
to_java_load_callback_stage("Prepare"));
|
||||
s_java_load_callback_stages.emplace(VideoCore::LoadCallbackStage::Decompile,
|
||||
to_java_load_callback_stage("Decompile"));
|
||||
s_java_load_callback_stages.emplace(VideoCore::LoadCallbackStage::Build,
|
||||
to_java_load_callback_stage("Build"));
|
||||
s_java_load_callback_stages.emplace(VideoCore::LoadCallbackStage::Complete,
|
||||
to_java_load_callback_stage("Complete"));
|
||||
|
||||
MiiSelector::InitJNI(env);
|
||||
SoftwareKeyboard::InitJNI(env);
|
||||
@ -218,13 +166,6 @@ void JNI_OnUnload(JavaVM* vm, void* reserved) {
|
||||
env->DeleteGlobalRef(s_native_library_class);
|
||||
env->DeleteGlobalRef(s_savestate_info_class);
|
||||
env->DeleteGlobalRef(s_core_error_class);
|
||||
env->DeleteGlobalRef(s_disk_cache_progress_class);
|
||||
env->DeleteGlobalRef(s_load_callback_stage_class);
|
||||
|
||||
for (auto& [key, object] : s_java_load_callback_stages) {
|
||||
env->DeleteGlobalRef(object);
|
||||
}
|
||||
|
||||
MiiSelector::CleanupJNI(env);
|
||||
SoftwareKeyboard::CleanupJNI(env);
|
||||
Camera::StillImage::CleanupJNI(env);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <jni.h>
|
||||
#include "video_core/rasterizer_interface.h"
|
||||
|
||||
namespace IDCache {
|
||||
|
||||
@ -15,8 +14,6 @@ JNIEnv* GetEnvForThread();
|
||||
jclass GetNativeLibraryClass();
|
||||
jclass GetCoreErrorClass();
|
||||
jclass GetSavestateInfoClass();
|
||||
jclass GetDiskCacheProgressClass();
|
||||
jclass GetDiskCacheLoadCallbackStageClass();
|
||||
jmethodID GetOnCoreError();
|
||||
jmethodID GetDisplayAlertMsg();
|
||||
jmethodID GetDisplayAlertPrompt();
|
||||
@ -26,9 +23,6 @@ jmethodID GetLandscapeScreenLayout();
|
||||
jmethodID GetExitEmulationActivity();
|
||||
jmethodID GetRequestCameraPermission();
|
||||
jmethodID GetRequestMicPermission();
|
||||
jmethodID GetDiskCacheLoadProgress();
|
||||
|
||||
jobject GetJavaLoadCallbackStage(VideoCore::LoadCallbackStage stage);
|
||||
|
||||
} // namespace IDCache
|
||||
|
||||
|
@ -47,7 +47,7 @@ ANativeWindow* s_surf;
|
||||
|
||||
std::unique_ptr<EmuWindow_Android> window;
|
||||
|
||||
std::atomic<bool> stop_run{true};
|
||||
std::atomic<bool> is_running{false};
|
||||
std::atomic<bool> pause_emulation{false};
|
||||
|
||||
std::mutex paused_mutex;
|
||||
@ -119,14 +119,6 @@ static bool HandleCoreError(Core::System::ResultStatus result, const std::string
|
||||
env->NewStringUTF(details.c_str())) != JNI_FALSE;
|
||||
}
|
||||
|
||||
static void LoadDiskCacheProgress(VideoCore::LoadCallbackStage stage, int progress, int max) {
|
||||
JNIEnv* env = IDCache::GetEnvForThread();
|
||||
env->CallStaticVoidMethod(IDCache::GetDiskCacheProgressClass(),
|
||||
IDCache::GetDiskCacheLoadProgress(),
|
||||
IDCache::GetJavaLoadCallbackStage(stage), static_cast<jint>(progress),
|
||||
static_cast<jint>(max));
|
||||
}
|
||||
|
||||
static Camera::NDK::Factory* g_ndk_factory{};
|
||||
|
||||
static void TryShutdown() {
|
||||
@ -195,26 +187,9 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
||||
auto& telemetry_session = Core::System::GetInstance().TelemetrySession();
|
||||
telemetry_session.AddField(Telemetry::FieldType::App, "Frontend", "SDL");
|
||||
|
||||
stop_run = false;
|
||||
is_running = true;
|
||||
pause_emulation = false;
|
||||
|
||||
LoadDiskCacheProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
||||
|
||||
std::unique_ptr<Frontend::GraphicsContext> cpu_context;
|
||||
if (Settings::values.use_asynchronous_gpu_emulation) {
|
||||
cpu_context = window->CreateSharedContext();
|
||||
cpu_context->MakeCurrent();
|
||||
}
|
||||
|
||||
system.Renderer().Rasterizer()->LoadDiskResources(stop_run, &LoadDiskCacheProgress);
|
||||
|
||||
if (Settings::values.use_asynchronous_gpu_emulation) {
|
||||
cpu_context->DoneCurrent();
|
||||
cpu_context.reset();
|
||||
}
|
||||
|
||||
LoadDiskCacheProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
|
||||
|
||||
SCOPE_EXIT({ TryShutdown(); });
|
||||
|
||||
// Audio stretching on Android is only useful with lower framerates, disable it when fullspeed
|
||||
@ -233,7 +208,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
||||
system.CoreTiming().ScheduleEvent(audio_stretching_ticks, audio_stretching_event);
|
||||
|
||||
// Start running emulation
|
||||
while (!stop_run) {
|
||||
while (is_running) {
|
||||
if (!pause_emulation) {
|
||||
const auto result = system.RunLoop();
|
||||
if (result == Core::System::ResultStatus::Success) {
|
||||
@ -256,7 +231,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
||||
Settings::values.volume = 0;
|
||||
|
||||
std::unique_lock<std::mutex> pause_lock(paused_mutex);
|
||||
running_cv.wait(pause_lock, [] { return !pause_emulation || stop_run; });
|
||||
running_cv.wait(pause_lock, [] { return !pause_emulation || !is_running; });
|
||||
window->PollEvents();
|
||||
}
|
||||
}
|
||||
@ -288,7 +263,7 @@ void Java_org_citra_citra_1emu_NativeLibrary_SurfaceDestroyed(JNIEnv* env,
|
||||
}
|
||||
|
||||
void Java_org_citra_citra_1emu_NativeLibrary_DoFrame(JNIEnv* env, [[maybe_unused]] jclass clazz) {
|
||||
if (stop_run || pause_emulation) {
|
||||
if (!is_running || pause_emulation) {
|
||||
return;
|
||||
}
|
||||
window->TryPresenting();
|
||||
@ -358,7 +333,6 @@ jobjectArray Java_org_citra_citra_1emu_NativeLibrary_GetInstalledGamePaths(
|
||||
return jgames;
|
||||
}
|
||||
|
||||
// TODO(xperia64): ensure these cannot be called in an invalid state (e.g. after StopEmulation)
|
||||
void Java_org_citra_citra_1emu_NativeLibrary_UnPauseEmulation(JNIEnv* env,
|
||||
[[maybe_unused]] jclass clazz) {
|
||||
pause_emulation = false;
|
||||
@ -374,7 +348,7 @@ void Java_org_citra_citra_1emu_NativeLibrary_PauseEmulation(JNIEnv* env,
|
||||
|
||||
void Java_org_citra_citra_1emu_NativeLibrary_StopEmulation(JNIEnv* env,
|
||||
[[maybe_unused]] jclass clazz) {
|
||||
stop_run = true;
|
||||
is_running = false;
|
||||
pause_emulation = false;
|
||||
window->StopPresenting();
|
||||
running_cv.notify_all();
|
||||
@ -382,7 +356,7 @@ void Java_org_citra_citra_1emu_NativeLibrary_StopEmulation(JNIEnv* env,
|
||||
|
||||
jboolean Java_org_citra_citra_1emu_NativeLibrary_IsRunning(JNIEnv* env,
|
||||
[[maybe_unused]] jclass clazz) {
|
||||
return static_cast<jboolean>(!stop_run);
|
||||
return static_cast<jboolean>(is_running);
|
||||
}
|
||||
|
||||
jboolean Java_org_citra_citra_1emu_NativeLibrary_onGamePadEvent(JNIEnv* env,
|
||||
@ -602,8 +576,8 @@ void Java_org_citra_citra_1emu_NativeLibrary_Run__Ljava_lang_String_2(JNIEnv* en
|
||||
jstring j_path) {
|
||||
const std::string path = GetJString(env, j_path);
|
||||
|
||||
if (!stop_run) {
|
||||
stop_run = true;
|
||||
if (is_running) {
|
||||
is_running = false;
|
||||
running_cv.notify_all();
|
||||
}
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/spacing_large"
|
||||
android:layout_marginRight="@dimen/spacing_large"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/progress_text"
|
||||
android:layout_alignParentStart="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/spacing_large"
|
||||
android:layout_marginRight="@dimen/spacing_large"
|
||||
android:gravity="right"
|
||||
android:text="1/100" />
|
||||
</LinearLayout>
|
@ -159,7 +159,6 @@
|
||||
<item>Side by Side</item>
|
||||
<item>Anaglyph</item>
|
||||
<item>Interlaced</item>
|
||||
<item>Reverse Interlaced</item>
|
||||
<item>Cardboard VR</item>
|
||||
</string-array>
|
||||
|
||||
@ -169,6 +168,5 @@
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</integer-array>
|
||||
</resources>
|
||||
|
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