mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
120 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f65c1dd5bc | ||
|
|
a92297ceec | ||
|
|
a8ea4e55ef | ||
|
|
3195befab1 | ||
|
|
2cdc65c06b | ||
|
|
0529715640 | ||
|
|
2534cb2c9d | ||
|
|
49f4c36b0e | ||
|
|
4b08672f99 | ||
|
|
73f7cb1fa7 | ||
|
|
8f64d118c8 | ||
|
|
e31625d2bd | ||
|
|
7907ead7fc | ||
|
|
276193d876 | ||
|
|
9c61053fe0 | ||
|
|
8779bf44d8 | ||
|
|
5ea4c55a6a | ||
|
|
4662d0e5dc | ||
|
|
cc5f594384 | ||
|
|
d9ff9d7aa1 | ||
|
|
08b9037781 | ||
|
|
59125c9b12 | ||
|
|
e5ba376985 | ||
|
|
165595008e | ||
|
|
8dc905e827 | ||
|
|
7cc8e5887f | ||
|
|
3599438e57 | ||
|
|
88515d58ab | ||
|
|
338e1a71a9 | ||
|
|
d9fc763f82 | ||
|
|
7eeb6c7aca | ||
|
|
a045c917e7 | ||
|
|
a052a43b84 | ||
|
|
94d87a35be | ||
|
|
0c8c798051 | ||
|
|
c9ddab444a | ||
|
|
1222270e44 | ||
|
|
86b5de8785 | ||
|
|
e97f03ed8b | ||
|
|
0a76c5a64d | ||
|
|
01a1b017e8 | ||
|
|
ddefb8a393 | ||
|
|
62a5cd98da | ||
|
|
8ad9d7d047 | ||
|
|
10ed797881 | ||
|
|
23918e25c2 | ||
|
|
de022ab68d | ||
|
|
5561884126 | ||
|
|
406d7468dd | ||
|
|
41124994fa | ||
|
|
c4e048eedf | ||
|
|
eff9b4167c | ||
|
|
47931a0689 | ||
|
|
34ca40fa2a | ||
|
|
821f732ff9 | ||
|
|
54c8ef7ee6 | ||
|
|
dc9e531cb1 | ||
|
|
2bd151e6f2 | ||
|
|
ae084643c4 | ||
|
|
bd1b91b862 | ||
|
|
f221c85e17 | ||
|
|
e2fe93e403 | ||
|
|
f98e23f061 | ||
|
|
18f6518d41 | ||
|
|
74598b3055 | ||
|
|
6159cd4114 | ||
|
|
3c70d7f575 | ||
|
|
bd70f1ca4a | ||
|
|
0e67507d3a | ||
|
|
beab573758 | ||
|
|
e46890fd76 | ||
|
|
3888638f8c | ||
|
|
44778c374f | ||
|
|
207d4df5e7 | ||
|
|
d454a7dafc | ||
|
|
53b4ddc4cb | ||
|
|
23c8780bff | ||
|
|
958ab4048c | ||
|
|
657d20d36e | ||
|
|
fde045241f | ||
|
|
b3be566426 | ||
|
|
1eebb550a8 | ||
|
|
fbe5f88417 | ||
|
|
d9609b9f51 | ||
|
|
815d7b2967 | ||
|
|
98ce7c81c8 | ||
|
|
e4d8f3d901 | ||
|
|
ca5dfdd25c | ||
|
|
11634c6567 | ||
|
|
f6a313f1a5 | ||
|
|
1a46898cde | ||
|
|
63ee30cbb3 | ||
|
|
20241f301b | ||
|
|
61c653c49c | ||
|
|
a7f4f992e1 | ||
|
|
daa9953d40 | ||
|
|
4771198c30 | ||
|
|
d8f3717119 | ||
|
|
33ab6fd09b | ||
|
|
1391e1339e | ||
|
|
2f2614737a | ||
|
|
85a62427f9 | ||
|
|
8fd91cb7df | ||
|
|
c5820a4f54 | ||
|
|
572eae596c | ||
|
|
6f3c189129 | ||
|
|
7a0017bd40 | ||
|
|
74f840f66b | ||
|
|
4a7c194157 | ||
|
|
116eb6dc5b | ||
|
|
0bab3c74ea | ||
|
|
6328de43e3 | ||
|
|
5becdc9ab5 | ||
|
|
26b6394b67 | ||
|
|
1b6086ab62 | ||
|
|
87a4536a2e | ||
|
|
d20b897ac8 | ||
|
|
6f26b064b9 | ||
|
|
3a2c78d17c | ||
|
|
19d375b4bd |
@@ -86,5 +86,5 @@ SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: ForContinuationAndIndentation
|
||||
UseTab: AlignWithSpaces
|
||||
...
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: "Update Base Translation"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Update Base Translation
|
||||
run: ./.github/workflows/scripts/common/update_base_translation.sh
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Get Latest DB and Prepare DB File
|
||||
run: |
|
||||
|
||||
2
.github/workflows/lint_gamedb.yml
vendored
2
.github/workflows/lint_gamedb.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
|
||||
2
.github/workflows/linux_build_flatpak.yml
vendored
2
.github/workflows/linux_build_flatpak.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
|
||||
# 10 here, since the odds of having 10 untagged commits in a row should be slim to none
|
||||
|
||||
2
.github/workflows/linux_build_qt.yml
vendored
2
.github/workflows/linux_build_qt.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
2
.github/workflows/macos_build.yml
vendored
2
.github/workflows/macos_build.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
|
||||
6
.github/workflows/release_cut_new.yml
vendored
6
.github/workflows/release_cut_new.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
outputs:
|
||||
new_tag: ${{ steps.tag_version.outputs.new_tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
# Docs - https://github.com/mathieudutour/github-tag-action
|
||||
- name: Bump Version and Push Tag
|
||||
@@ -163,12 +163,12 @@ jobs:
|
||||
name: "Upload Artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Prepare Artifact Folder
|
||||
run: mkdir ./ci-artifacts/
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
name: Download all Artifacts
|
||||
with:
|
||||
path: ./ci-artifacts/
|
||||
|
||||
30
.github/workflows/scripts/linux/appimage-qt.sh
vendored
30
.github/workflows/scripts/linux/appimage-qt.sh
vendored
@@ -41,8 +41,13 @@ BINARY=pcsx2-qt
|
||||
APPDIRNAME=PCSX2.AppDir
|
||||
STRIP=strip
|
||||
|
||||
# Need both libharfbuzz.so and libharfbuzz.so.0 for bundled libs
|
||||
|
||||
declare -a MANUAL_LIBS=(
|
||||
"libshaderc_shared.so.1"
|
||||
"libharfbuzz.so.0"
|
||||
"libharfbuzz.so"
|
||||
"libfreetype.so.6"
|
||||
)
|
||||
|
||||
declare -a REMOVE_LIBS=(
|
||||
@@ -75,22 +80,29 @@ fi
|
||||
OUTDIR=$(realpath "./$APPDIRNAME")
|
||||
rm -fr "$OUTDIR"
|
||||
|
||||
# Our deps build dosn't create libharfbuzz.so.0, so we have to symlink it here
|
||||
hbpath=$(find "$DEPSDIR" -name "libharfbuzz.so")
|
||||
if [ ! -f "$hbpath" ]; then
|
||||
echo "Missing harfbuzz. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$hbpath.0" ]; then
|
||||
echo "Symlinking libharfbuzz.so.0"
|
||||
ln -s "$hbpath" "$hbpath.0"
|
||||
fi
|
||||
|
||||
echo "Locating extra libraries..."
|
||||
EXTRA_LIBS_ARGS=""
|
||||
EXTRA_LIBS_ARGS=()
|
||||
for lib in "${MANUAL_LIBS[@]}"; do
|
||||
srcpath=$(find "$DEPSDIR" -name "$lib")
|
||||
if [ ! -f "$srcpath" ]; then
|
||||
echo "Missinge extra library $lib. Exiting."
|
||||
echo "Missing extra library $lib. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found $lib at $srcpath."
|
||||
|
||||
if [ "$EXTRA_LIBS_ARGS" == "" ]; then
|
||||
EXTRA_LIBS_ARGS="--library=$srcpath"
|
||||
else
|
||||
EXTRA_LIBS_ARGS="$EXTRA_LIBS_ARGS,$srcpath"
|
||||
fi
|
||||
EXTRA_LIBS_ARGS+=( "--library=$srcpath" )
|
||||
done
|
||||
|
||||
# Why the nastyness? linuxdeploy strips our main binary, and there's no option to turn it off.
|
||||
@@ -122,7 +134,7 @@ EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
|
||||
DEPLOY_PLATFORM_THEMES="1" \
|
||||
QMAKE="$DEPSDIR/bin/qmake" \
|
||||
NO_STRIP="1" \
|
||||
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" $EXTRA_LIBS_ARGS \
|
||||
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" ${EXTRA_LIBS_ARGS[@]} \
|
||||
--desktop-file="net.pcsx2.PCSX2.desktop" --icon-file="PCSX2.png"
|
||||
|
||||
echo "Copying resources into AppDir..."
|
||||
|
||||
@@ -14,16 +14,18 @@ if [ "${INSTALLDIR:0:1}" != "/" ]; then
|
||||
INSTALLDIR="$PWD/$INSTALLDIR"
|
||||
fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBPNG=1.6.50
|
||||
LIBWEBP=1.5.0
|
||||
SDL=SDL3-3.2.18
|
||||
LIBWEBP=1.6.0
|
||||
SDL=SDL3-3.2.20
|
||||
QT=6.9.1
|
||||
LZ4=1.10.0
|
||||
ZSTD=1.5.7
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -35,11 +37,13 @@ mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
1a775bde924397a8e0c08bfda198926c17be859d0288ad0dec1dea1b2ee04f8f $SDL.tar.gz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
40caedbf83cc9a1959610830563565889878bc95f115868bbf545d1914acf28e qtbase-everywhere-src-$QT.tar.xz
|
||||
@@ -53,11 +57,13 @@ a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADE
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
|
||||
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
|
||||
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
|
||||
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
|
||||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
|
||||
@@ -137,6 +143,33 @@ cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building FreeType without HarfBuzz..."
|
||||
rm -fr "freetype-$FREETYPE"
|
||||
tar xf "freetype-$FREETYPE.tar.xz"
|
||||
cd "freetype-$FREETYPE"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building HarfBuzz..."
|
||||
rm -fr "harfbuzz-$HARFBUZZ"
|
||||
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
|
||||
cd "harfbuzz-$HARFBUZZ"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -DHB_HAVE_FREETYPE=ON -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building FreeType with HarfBuzz..."
|
||||
rm -fr "freetype-$FREETYPE"
|
||||
tar xf "freetype-$FREETYPE.tar.xz"
|
||||
cd "freetype-$FREETYPE"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building SDL..."
|
||||
rm -fr "$SDL"
|
||||
tar xf "$SDL.tar.gz"
|
||||
@@ -240,7 +273,7 @@ echo "Building PlutoSVG..."
|
||||
rm -fr "plutosvg-$PLUTOSVG"
|
||||
tar xf "plutosvg-$PLUTOSVG.tar.gz"
|
||||
cd "plutosvg-$PLUTOSVG"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=OFF -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.18.tar.gz",
|
||||
"sha256": "1a775bde924397a8e0c08bfda198926c17be859d0288ad0dec1dea1b2ee04f8f"
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.20.tar.gz",
|
||||
"sha256": "467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/sammycage/plutovg.git",
|
||||
"tag": "v1.1.0",
|
||||
"commit": "1a8412d0574c4345dd7ef8a91ce7b58c7dcfe253"
|
||||
"tag": "v1.3.0",
|
||||
"commit": "1596f459d6796b37f3f6d610ce598de2403350b5"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"app-id": "net.pcsx2.PCSX2",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "6.8",
|
||||
"runtime-version": "6.9",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.llvm18"
|
||||
|
||||
@@ -40,17 +40,17 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
SDL=SDL3-3.2.18
|
||||
SDL=SDL3-3.2.20
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.50
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBWEBP=1.5.0
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -79,11 +79,11 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
1a775bde924397a8e0c08bfda198926c17be859d0288ad0dec1dea1b2ee04f8f $SDL.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
@@ -97,7 +97,7 @@ a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADE
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
SDL=SDL3-3.2.18
|
||||
SDL=SDL3-3.2.20
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.50
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBWEBP=1.5.0
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -59,11 +59,11 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
1a775bde924397a8e0c08bfda198926c17be859d0288ad0dec1dea1b2ee04f8f $SDL.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
@@ -77,7 +77,7 @@ a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADE
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@ set FREETYPE=2.13.3
|
||||
set HARFBUZZ=11.2.0
|
||||
set LIBJPEGTURBO=3.1.1
|
||||
set LIBPNG=1650
|
||||
set SDL=SDL3-3.2.18
|
||||
set SDL=SDL3-3.2.20
|
||||
set QT=6.9.1
|
||||
set QTMINOR=6.9
|
||||
set LZ4=1.10.0
|
||||
set WEBP=1.5.0
|
||||
set WEBP=1.6.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
set PLUTOVG=1.1.0
|
||||
set PLUTOVG=1.3.0
|
||||
set PLUTOSVG=0.0.7
|
||||
|
||||
set SHADERC=2025.3
|
||||
@@ -67,8 +67,8 @@ call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1650.zip 4be6938313b08d5921f9dede13f2789b653c96f4f8595d92ff3f09c9320e51c7 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 208028b3b6225b3c9eae3942e50ed243d8798b4b3a56b98a59b3f7e37baa55fd || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" d76454913ea6f5f38856fbf00578d8e39daf842887f3396c95608414680250f7 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" efa6d8ef9f7ae0fd9f7d280fbff574d71882b60a357ae639e516dc173cf26986 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 8439d3394bc380fd17a920ee96df1d2272bf8d3490871d948ef750f95e0ded06 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" a8f90c768b54e28d61e02c1229b74a2b834e9852af523e5c70bcd2ae4c34a772 || goto error
|
||||
@@ -78,7 +78,7 @@ call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags
|
||||
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
|
||||
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 83b2cd6230909a8d586518f49e79e4a1b1e9fab3847db6a678ec9d2dacab052a || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
|
||||
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
|
||||
|
||||
@@ -44,16 +44,16 @@ set FREETYPE=2.13.3
|
||||
set HARFBUZZ=11.2.0
|
||||
set LIBJPEGTURBO=3.1.1
|
||||
set LIBPNG=1650
|
||||
set SDL=SDL3-3.2.18
|
||||
set SDL=SDL3-3.2.20
|
||||
set QT=6.9.1
|
||||
set QTMINOR=6.9
|
||||
set LZ4=1.10.0
|
||||
set WEBP=1.5.0
|
||||
set WEBP=1.6.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
set PLUTOVG=1.1.0
|
||||
set PLUTOVG=1.3.0
|
||||
set PLUTOSVG=0.0.7
|
||||
|
||||
set SHADERC=2025.3
|
||||
@@ -65,8 +65,8 @@ call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1650.zip 4be6938313b08d5921f9dede13f2789b653c96f4f8595d92ff3f09c9320e51c7 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 208028b3b6225b3c9eae3942e50ed243d8798b4b3a56b98a59b3f7e37baa55fd || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" d76454913ea6f5f38856fbf00578d8e39daf842887f3396c95608414680250f7 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" efa6d8ef9f7ae0fd9f7d280fbff574d71882b60a357ae639e516dc173cf26986 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 8439d3394bc380fd17a920ee96df1d2272bf8d3490871d948ef750f95e0ded06 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" a8f90c768b54e28d61e02c1229b74a2b834e9852af523e5c70bcd2ae4c34a772 || goto error
|
||||
@@ -76,7 +76,7 @@ call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags
|
||||
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
|
||||
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 83b2cd6230909a8d586518f49e79e4a1b1e9fab3847db6a678ec9d2dacab052a || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
|
||||
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
|
||||
|
||||
2
.github/workflows/windows_build_matrix.yml
vendored
2
.github/workflows/windows_build_matrix.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Verify VS Project Files
|
||||
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
|
||||
|
||||
|
||||
4
.github/workflows/windows_build_qt.yml
vendored
4
.github/workflows/windows_build_qt.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Configure MSBuild Clang Version
|
||||
if: inputs.configuration != 'CMake'
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
!./bin/**/*.lib
|
||||
|
||||
- name: Install the Breakpad Symbol Generator
|
||||
uses: baptiste0928/cargo-install@e38323ef017552d7f7af73a3f4db467f278310ed
|
||||
uses: baptiste0928/cargo-install@b687c656bda5733207e629b50a22bf68974a0305
|
||||
with:
|
||||
crate: dump_syms
|
||||
|
||||
|
||||
7687
3rdparty/imgui/CHANGELOG.txt
vendored
Normal file
7687
3rdparty/imgui/CHANGELOG.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
3rdparty/imgui/include/imconfig.h
vendored
4
3rdparty/imgui/include/imconfig.h
vendored
@@ -66,7 +66,7 @@
|
||||
//#define IMGUI_USE_LEGACY_CRC32_ADLER
|
||||
|
||||
//---- Use 32-bit for ImWchar (default is 16-bit) to support Unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
||||
//#define IMGUI_USE_WCHAR32
|
||||
#define IMGUI_USE_WCHAR32
|
||||
|
||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
||||
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
||||
@@ -91,7 +91,7 @@
|
||||
// - plutosvg is currently easier to install, as e.g. it is part of vcpkg. It will support more fonts and may load them faster. See misc/freetype/README for instructions.
|
||||
// - Both require headers to be available in the include path + program to be linked with the library code (not provided).
|
||||
// - (note: lunasvg implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
|
||||
//#define IMGUI_ENABLE_FREETYPE_PLUTOSVG
|
||||
#define IMGUI_ENABLE_FREETYPE_PLUTOSVG
|
||||
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
|
||||
|
||||
//---- Use stb_truetype to build and rasterize the font atlas (default)
|
||||
|
||||
76
3rdparty/imgui/include/imgui.h
vendored
76
3rdparty/imgui/include/imgui.h
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.92.1"
|
||||
#define IMGUI_VERSION_NUM 19210
|
||||
#define IMGUI_VERSION "1.92.2b"
|
||||
#define IMGUI_VERSION_NUM 19222
|
||||
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
|
||||
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
|
||||
|
||||
@@ -317,7 +317,7 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
// - When a Rendered Backend creates a texture, it store its native identifier into a ImTextureID value.
|
||||
// (e.g. Used by DX11 backend to a `ID3D11ShaderResourceView*`; Used by OpenGL backends to store `GLuint`;
|
||||
// Used by SDLGPU backend to store a `SDL_GPUTextureSamplerBinding*`, etc.).
|
||||
// - User may submit their own textures to e.g. ImGui::Image() function by passing the same type.
|
||||
// - User may submit their own textures to e.g. ImGui::Image() function by passing this value.
|
||||
// - During the rendering loop, the Renderer Backend retrieve the ImTextureID, which stored inside a
|
||||
// ImTextureRef, which is stored inside a ImDrawCmd.
|
||||
// - Compile-time type configuration:
|
||||
@@ -337,15 +337,17 @@ typedef ImU64 ImTextureID; // Default: store up to 64-bits (any pointer or
|
||||
#define ImTextureID_Invalid ((ImTextureID)0)
|
||||
#endif
|
||||
|
||||
// ImTextureRef = higher-level identifier for a texture.
|
||||
// ImTextureRef = higher-level identifier for a texture. Store a ImTextureID _or_ a ImTextureData*.
|
||||
// The identifier is valid even before the texture has been uploaded to the GPU/graphics system.
|
||||
// This is what gets passed to functions such as `ImGui::Image()`, `ImDrawList::AddImage()`.
|
||||
// This is what gets stored in draw commands (`ImDrawCmd`) to identify a texture during rendering.
|
||||
// - When a texture is created by user code (e.g. custom images), we directly stores the low-level ImTextureID.
|
||||
// Because of this, when displaying your own texture you are likely to ever only manage ImTextureID values on your side.
|
||||
// - When a texture is created by the backend, we stores a ImTextureData* which becomes an indirection
|
||||
// to extract the ImTextureID value during rendering, after texture upload has happened.
|
||||
// - There is no constructor to create a ImTextureID from a ImTextureData* as we don't expect this
|
||||
// to be useful to the end-user, and it would be erroneously called by many legacy code.
|
||||
// - To create a ImTextureRef from a ImTextureData you can use ImTextureData::GetTexRef().
|
||||
// We intentionally do not provide an ImTextureRef constructor for this: we don't expect this
|
||||
// to be frequently useful to the end-user, and it would be erroneously called by many legacy code.
|
||||
// - If you want to bind the current atlas when using custom rectangle, you can use io.Fonts->TexRef.
|
||||
// - Binding generators for languages such as C (which don't have constructors), should provide a helper, e.g.
|
||||
// inline ImTextureRef ImTextureRefFromID(ImTextureID tex_id) { ImTextureRef tex_ref = { ._TexData = NULL, .TexID = tex_id }; return tex_ref; }
|
||||
@@ -914,7 +916,7 @@ namespace ImGui
|
||||
IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs(); // get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
|
||||
IMGUI_API int TableGetColumnCount(); // return number of columns (value passed to BeginTable)
|
||||
IMGUI_API int TableGetColumnIndex(); // return current column index.
|
||||
IMGUI_API int TableGetRowIndex(); // return current row index.
|
||||
IMGUI_API int TableGetRowIndex(); // return current row index (header rows are accounted for)
|
||||
IMGUI_API const char* TableGetColumnName(int column_n = -1); // return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
|
||||
IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1); // return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.
|
||||
IMGUI_API void TableSetColumnEnabled(int column_n, bool v);// change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody)
|
||||
@@ -1368,10 +1370,17 @@ enum ImGuiTabBarFlags_
|
||||
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
|
||||
ImGuiTabBarFlags_NoTooltip = 1 << 5, // Disable tooltips when hovering a tab
|
||||
ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6, // Draw selected overline markers over selected tab
|
||||
ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 7, // Resize tabs when they don't fit
|
||||
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 8, // Add scroll buttons when tabs don't fit
|
||||
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
|
||||
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown,
|
||||
|
||||
// Fitting/Resize policy
|
||||
ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7, // Shrink down tabs when they don't fit, until width is style.TabMinWidthShrink, then enable scrolling buttons.
|
||||
ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8, // Shrink down tabs when they don't fit
|
||||
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9, // Enable scrolling buttons when tabs don't fit
|
||||
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll,
|
||||
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed,
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
ImGuiTabBarFlags_FittingPolicyResizeDown = ImGuiTabBarFlags_FittingPolicyShrink, // Renamed in 1.92.2
|
||||
#endif
|
||||
};
|
||||
|
||||
// Flags for ImGui::BeginTabItem()
|
||||
@@ -1801,6 +1810,8 @@ enum ImGuiStyleVar_
|
||||
ImGuiStyleVar_ImageBorderSize, // float ImageBorderSize
|
||||
ImGuiStyleVar_TabRounding, // float TabRounding
|
||||
ImGuiStyleVar_TabBorderSize, // float TabBorderSize
|
||||
ImGuiStyleVar_TabMinWidthBase, // float TabMinWidthBase
|
||||
ImGuiStyleVar_TabMinWidthShrink, // float TabMinWidthShrink
|
||||
ImGuiStyleVar_TabBarBorderSize, // float TabBarBorderSize
|
||||
ImGuiStyleVar_TabBarOverlineSize, // float TabBarOverlineSize
|
||||
ImGuiStyleVar_TableAngledHeadersAngle, // float TableAngledHeadersAngle
|
||||
@@ -2170,7 +2181,7 @@ struct ImVector
|
||||
// Constructors, destructor
|
||||
inline ImVector() { Size = Capacity = 0; Data = NULL; }
|
||||
inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
|
||||
inline ImVector<T>& operator=(const ImVector<T>& src) { clear(); resize(src.Size); if (src.Data) memcpy(Data, src.Data, (size_t)Size * sizeof(T)); return *this; }
|
||||
inline ImVector<T>& operator=(const ImVector<T>& src) { clear(); resize(src.Size); if (Data && src.Data) memcpy(Data, src.Data, (size_t)Size * sizeof(T)); return *this; }
|
||||
inline ~ImVector() { if (Data) IM_FREE(Data); } // Important: does not destruct anything
|
||||
|
||||
inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } // Important: does not destruct anything
|
||||
@@ -2266,6 +2277,8 @@ struct ImGuiStyle
|
||||
float ImageBorderSize; // Thickness of border around Image() calls.
|
||||
float TabRounding; // Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
|
||||
float TabBorderSize; // Thickness of border around tabs.
|
||||
float TabMinWidthBase; // Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected.
|
||||
float TabMinWidthShrink; // Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy.
|
||||
float TabCloseButtonMinWidthSelected; // -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width.
|
||||
float TabCloseButtonMinWidthUnselected; // -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. FLT_MAX: never show close button when unselected.
|
||||
float TabBarBorderSize; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||
@@ -2512,10 +2525,10 @@ struct ImGuiIO
|
||||
float MouseWheel; // Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold SHIFT to turn vertical scroll into horizontal scroll.
|
||||
float MouseWheelH; // Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends.
|
||||
ImGuiMouseSource MouseSource; // Mouse actual input peripheral (Mouse/TouchScreen/Pen).
|
||||
bool KeyCtrl; // Keyboard modifier down: Control
|
||||
bool KeyCtrl; // Keyboard modifier down: Ctrl (non-macOS), Cmd (macOS)
|
||||
bool KeyShift; // Keyboard modifier down: Shift
|
||||
bool KeyAlt; // Keyboard modifier down: Alt
|
||||
bool KeySuper; // Keyboard modifier down: Cmd/Super/Windows
|
||||
bool KeySuper; // Keyboard modifier down: Windows/Super (non-macOS), Ctrl (macOS)
|
||||
|
||||
// Other state maintained from data above + IO function calls
|
||||
ImGuiKeyChord KeyMods; // Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. Read-only, updated by NewFrame()
|
||||
@@ -3359,7 +3372,7 @@ struct ImDrawList
|
||||
struct ImDrawData
|
||||
{
|
||||
bool Valid; // Only valid after Render() is called and before the next NewFrame() is called.
|
||||
int CmdListsCount; // Number of ImDrawList* to render. (== CmdLists.Size). Exists for legacy reason.
|
||||
int CmdListsCount; // == CmdLists.Size. (OBSOLETE: exists for legacy reasons). Number of ImDrawList* to render.
|
||||
int TotalIdxCount; // For convenience, sum of all ImDrawList's IdxBuffer.Size
|
||||
int TotalVtxCount; // For convenience, sum of all ImDrawList's VtxBuffer.Size
|
||||
ImVector<ImDrawList*> CmdLists; // Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here.
|
||||
@@ -3424,7 +3437,7 @@ struct ImTextureRect
|
||||
struct ImTextureData
|
||||
{
|
||||
//------------------------------------------ core / backend ---------------------------------------
|
||||
int UniqueID; // w - // Sequential index to facilitate identifying a texture when debugging/printing. Unique per atlas.
|
||||
int UniqueID; // w - // [DEBUG] Sequential index to facilitate identifying a texture when debugging/printing. Unique per atlas.
|
||||
ImTextureStatus Status; // rw rw // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy. Always use SetStatus() to modify!
|
||||
void* BackendUserData; // - rw // Convenience storage for backend. Some backends may have enough with TexID.
|
||||
ImTextureID TexID; // r w // Backend-specific texture identifier. Always use SetTexID() to modify! The identifier will stored in ImDrawCmd::GetTexID() and passed to backend's RenderDrawData function.
|
||||
@@ -3442,7 +3455,7 @@ struct ImTextureData
|
||||
bool WantDestroyNextFrame; // rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the current frame.
|
||||
|
||||
// Functions
|
||||
ImTextureData() { memset(this, 0, sizeof(*this)); TexID = ImTextureID_Invalid; }
|
||||
ImTextureData() { memset(this, 0, sizeof(*this)); Status = ImTextureStatus_Destroyed; TexID = ImTextureID_Invalid; }
|
||||
~ImTextureData() { DestroyPixels(); }
|
||||
IMGUI_API void Create(ImTextureFormat format, int w, int h);
|
||||
IMGUI_API void DestroyPixels();
|
||||
@@ -3744,9 +3757,10 @@ struct ImFontBaked
|
||||
float Ascent, Descent; // 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
|
||||
unsigned int MetricsTotalSurface:26;// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||
unsigned int WantDestroy:1; // 0 // // Queued for destroy
|
||||
unsigned int LockLoadingFallback:1; // 0 // //
|
||||
int LastUsedFrame; // 4 // // Record of that time this was bounds
|
||||
ImGuiID BakedId; // 4 //
|
||||
unsigned int LoadNoFallback:1; // 0 // // Disable loading fallback in lower-level calls.
|
||||
unsigned int LoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
|
||||
int LastUsedFrame; // 4 // // Record of that time this was bounds
|
||||
ImGuiID BakedId; // 4 // // Unique ID for this baked storage
|
||||
ImFont* ContainerFont; // 4-8 // in // Parent font
|
||||
void* FontLoaderDatas; // 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer allocated by imgui, passed to loader.
|
||||
|
||||
@@ -3956,24 +3970,24 @@ struct ImGuiPlatformImeData
|
||||
namespace ImGui
|
||||
{
|
||||
// OBSOLETED in 1.92.0 (from June 2025)
|
||||
static inline void PushFont(ImFont* font) { PushFont(font, font ? font->LegacySize : 0.0f); }
|
||||
inline void PushFont(ImFont* font) { PushFont(font, font ? font->LegacySize : 0.0f); }
|
||||
IMGUI_API void SetWindowFontScale(float scale); // Set font scale factor for current window. Prefer using PushFont(NULL, style.FontSizeBase * factor) or use style.FontScaleMain to scale all windows.
|
||||
// OBSOLETED in 1.91.9 (from February 2025)
|
||||
IMGUI_API void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col); // <-- 'border_col' was removed in favor of ImGuiCol_ImageBorder. If you use 'tint_col', use ImageWithBg() instead.
|
||||
// OBSOLETED in 1.91.0 (from July 2024)
|
||||
static inline void PushButtonRepeat(bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
|
||||
static inline void PopButtonRepeat() { PopItemFlag(); }
|
||||
static inline void PushTabStop(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
|
||||
static inline void PopTabStop() { PopItemFlag(); }
|
||||
inline void PushButtonRepeat(bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
|
||||
inline void PopButtonRepeat() { PopItemFlag(); }
|
||||
inline void PushTabStop(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
|
||||
inline void PopTabStop() { PopItemFlag(); }
|
||||
IMGUI_API ImVec2 GetContentRegionMax(); // Content boundaries max (e.g. window boundaries including scrolling, or current column boundaries). You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMin(); // Content boundaries min for the window (roughly (0,0)-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMax(); // Content boundaries max for the window (roughly (0,0)+Size-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||
// OBSOLETED in 1.90.0 (from September 2023)
|
||||
static inline bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags window_flags = 0) { return BeginChild(id, size, ImGuiChildFlags_FrameStyle, window_flags); }
|
||||
static inline void EndChildFrame() { EndChild(); }
|
||||
//static inline bool BeginChild(const char* str_id, const ImVec2& size_arg, bool borders, ImGuiWindowFlags window_flags){ return BeginChild(str_id, size_arg, borders ? ImGuiChildFlags_Borders : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Borders
|
||||
//static inline bool BeginChild(ImGuiID id, const ImVec2& size_arg, bool borders, ImGuiWindowFlags window_flags) { return BeginChild(id, size_arg, borders ? ImGuiChildFlags_Borders : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Borders
|
||||
static inline void ShowStackToolWindow(bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
|
||||
inline bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags window_flags = 0) { return BeginChild(id, size, ImGuiChildFlags_FrameStyle, window_flags); }
|
||||
inline void EndChildFrame() { EndChild(); }
|
||||
//inline bool BeginChild(const char* str_id, const ImVec2& size_arg, bool borders, ImGuiWindowFlags window_flags){ return BeginChild(str_id, size_arg, borders ? ImGuiChildFlags_Borders : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Borders
|
||||
//inline bool BeginChild(ImGuiID id, const ImVec2& size_arg, bool borders, ImGuiWindowFlags window_flags) { return BeginChild(id, size_arg, borders ? ImGuiChildFlags_Borders : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Borders
|
||||
inline void ShowStackToolWindow(bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
|
||||
IMGUI_API bool Combo(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int popup_max_height_in_items = -1);
|
||||
IMGUI_API bool ListBox(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items = -1);
|
||||
// OBSOLETED in 1.89.7 (from June 2023)
|
||||
|
||||
135
3rdparty/imgui/include/imgui_internal.h
vendored
135
3rdparty/imgui/include/imgui_internal.h
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
||||
@@ -369,17 +369,17 @@ IMGUI_API ImGuiID ImHashStr(const char* data, size_t data_size = 0, ImGuiI
|
||||
|
||||
// Helpers: Sorting
|
||||
#ifndef ImQsort
|
||||
static inline void ImQsort(void* base, size_t count, size_t size_of_element, int(IMGUI_CDECL *compare_func)(void const*, void const*)) { if (count > 1) qsort(base, count, size_of_element, compare_func); }
|
||||
inline void ImQsort(void* base, size_t count, size_t size_of_element, int(IMGUI_CDECL *compare_func)(void const*, void const*)) { if (count > 1) qsort(base, count, size_of_element, compare_func); }
|
||||
#endif
|
||||
|
||||
// Helpers: Color Blending
|
||||
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b);
|
||||
|
||||
// Helpers: Bit manipulation
|
||||
static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
|
||||
static inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 && (v & (v - 1)) == 0; }
|
||||
static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
|
||||
static inline unsigned int ImCountSetBits(unsigned int v) { unsigned int count = 0; while (v > 0) { v = v & (v - 1); count++; } return count; }
|
||||
inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
|
||||
inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 && (v & (v - 1)) == 0; }
|
||||
inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
|
||||
inline unsigned int ImCountSetBits(unsigned int v) { unsigned int count = 0; while (v > 0) { v = v & (v - 1); count++; } return count; }
|
||||
|
||||
// Helpers: String
|
||||
#define ImStrlen strlen
|
||||
@@ -398,10 +398,10 @@ IMGUI_API const char* ImStrSkipBlank(const char* str);
|
||||
IMGUI_API int ImStrlenW(const ImWchar* str); // Computer string length (ImWchar string)
|
||||
IMGUI_API const char* ImStrbol(const char* buf_mid_line, const char* buf_begin); // Find beginning-of-line
|
||||
IM_MSVC_RUNTIME_CHECKS_OFF
|
||||
static inline char ImToUpper(char c) { return (c >= 'a' && c <= 'z') ? c &= ~32 : c; }
|
||||
static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
|
||||
static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
|
||||
static inline bool ImCharIsXdigitA(char c) { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); }
|
||||
inline char ImToUpper(char c) { return (c >= 'a' && c <= 'z') ? c &= ~32 : c; }
|
||||
inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
|
||||
inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
|
||||
inline bool ImCharIsXdigitA(char c) { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); }
|
||||
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
|
||||
// Helpers: Formatting
|
||||
@@ -417,7 +417,7 @@ IMGUI_API const char* ImParseFormatSanitizeForScanning(const char* fmt_in, cha
|
||||
IMGUI_API int ImParseFormatPrecision(const char* format, int default_value);
|
||||
|
||||
// Helpers: UTF-8 <> wchar conversions
|
||||
IMGUI_API const char* ImTextCharToUtf8(char out_buf[5], unsigned int c); // return out_buf
|
||||
IMGUI_API int ImTextCharToUtf8(char out_buf[5], unsigned int c); // return output UTF-8 bytes count
|
||||
IMGUI_API int ImTextStrToUtf8(char* out_buf, int out_buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
|
||||
IMGUI_API int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // read one character. return input UTF-8 bytes count
|
||||
IMGUI_API int ImTextStrFromUtf8(ImWchar* out_buf, int out_buf_size, const char* in_text, const char* in_text_end, const char** in_remaining = NULL); // return input UTF-8 bytes count
|
||||
@@ -431,11 +431,11 @@ IMGUI_API int ImTextCountLines(const char* in_text, const char* in_tex
|
||||
#ifdef IMGUI_DISABLE_FILE_FUNCTIONS
|
||||
#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS
|
||||
typedef void* ImFileHandle;
|
||||
static inline ImFileHandle ImFileOpen(const char*, const char*) { return NULL; }
|
||||
static inline bool ImFileClose(ImFileHandle) { return false; }
|
||||
static inline ImU64 ImFileGetSize(ImFileHandle) { return (ImU64)-1; }
|
||||
static inline ImU64 ImFileRead(void*, ImU64, ImU64, ImFileHandle) { return 0; }
|
||||
static inline ImU64 ImFileWrite(const void*, ImU64, ImU64, ImFileHandle) { return 0; }
|
||||
inline ImFileHandle ImFileOpen(const char*, const char*) { return NULL; }
|
||||
inline bool ImFileClose(ImFileHandle) { return false; }
|
||||
inline ImU64 ImFileGetSize(ImFileHandle) { return (ImU64)-1; }
|
||||
inline ImU64 ImFileRead(void*, ImU64, ImU64, ImFileHandle) { return 0; }
|
||||
inline ImU64 ImFileWrite(const void*, ImU64, ImU64, ImFileHandle) { return 0; }
|
||||
#endif
|
||||
#ifndef IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS
|
||||
typedef FILE* ImFileHandle;
|
||||
@@ -462,56 +462,56 @@ IM_MSVC_RUNTIME_CHECKS_OFF
|
||||
#define ImAtan2(Y, X) atan2f((Y), (X))
|
||||
#define ImAtof(STR) atof(STR)
|
||||
#define ImCeil(X) ceilf(X)
|
||||
static inline float ImPow(float x, float y) { return powf(x, y); } // DragBehaviorT/SliderBehaviorT uses ImPow with either float/double and need the precision
|
||||
static inline double ImPow(double x, double y) { return pow(x, y); }
|
||||
static inline float ImLog(float x) { return logf(x); } // DragBehaviorT/SliderBehaviorT uses ImLog with either float/double and need the precision
|
||||
static inline double ImLog(double x) { return log(x); }
|
||||
static inline int ImAbs(int x) { return x < 0 ? -x : x; }
|
||||
static inline float ImAbs(float x) { return fabsf(x); }
|
||||
static inline double ImAbs(double x) { return fabs(x); }
|
||||
static inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : (x > 0.0f) ? 1.0f : 0.0f; } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
static inline double ImSign(double x) { return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
|
||||
inline float ImPow(float x, float y) { return powf(x, y); } // DragBehaviorT/SliderBehaviorT uses ImPow with either float/double and need the precision
|
||||
inline double ImPow(double x, double y) { return pow(x, y); }
|
||||
inline float ImLog(float x) { return logf(x); } // DragBehaviorT/SliderBehaviorT uses ImLog with either float/double and need the precision
|
||||
inline double ImLog(double x) { return log(x); }
|
||||
inline int ImAbs(int x) { return x < 0 ? -x : x; }
|
||||
inline float ImAbs(float x) { return fabsf(x); }
|
||||
inline double ImAbs(double x) { return fabs(x); }
|
||||
inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : (x > 0.0f) ? 1.0f : 0.0f; } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
inline double ImSign(double x) { return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
|
||||
#ifdef IMGUI_ENABLE_SSE
|
||||
static inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
|
||||
inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
|
||||
#else
|
||||
static inline float ImRsqrt(float x) { return 1.0f / sqrtf(x); }
|
||||
inline float ImRsqrt(float x) { return 1.0f / sqrtf(x); }
|
||||
#endif
|
||||
static inline double ImRsqrt(double x) { return 1.0 / sqrt(x); }
|
||||
inline double ImRsqrt(double x) { return 1.0 / sqrt(x); }
|
||||
#endif
|
||||
// - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support variety of types: signed/unsigned int/long long float/double
|
||||
// (Exceptionally using templates here but we could also redefine them for those types)
|
||||
template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
|
||||
template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
|
||||
template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
|
||||
template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
|
||||
template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
|
||||
template<typename T> static inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < mn - b)) return mn; if (b > 0 && (a > mx - b)) return mx; return a + b; }
|
||||
template<typename T> static inline T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 && (a < mn + b)) return mn; if (b < 0 && (a > mx + b)) return mx; return a - b; }
|
||||
template<typename T> T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
|
||||
template<typename T> T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
|
||||
template<typename T> T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
|
||||
template<typename T> T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
|
||||
template<typename T> void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
|
||||
template<typename T> T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < mn - b)) return mn; if (b > 0 && (a > mx - b)) return mx; return a + b; }
|
||||
template<typename T> T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 && (a < mn + b)) return mn; if (b < 0 && (a > mx + b)) return mx; return a - b; }
|
||||
// - Misc maths helpers
|
||||
static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); }
|
||||
static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); }
|
||||
static inline ImVec2 ImClamp(const ImVec2& v, const ImVec2&mn, const ImVec2&mx) { return ImVec2((v.x < mn.x) ? mn.x : (v.x > mx.x) ? mx.x : v.x, (v.y < mn.y) ? mn.y : (v.y > mx.y) ? mx.y : v.y); }
|
||||
static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) { return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); }
|
||||
static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
|
||||
static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
|
||||
static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
|
||||
static inline float ImLengthSqr(const ImVec2& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y); }
|
||||
static inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); }
|
||||
static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = (lhs.x * lhs.x) + (lhs.y * lhs.y); if (d > 0.0f) return ImRsqrt(d); return fail_value; }
|
||||
static inline float ImTrunc(float f) { return (float)(int)(f); }
|
||||
static inline ImVec2 ImTrunc(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); }
|
||||
static inline float ImFloor(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } // Decent replacement for floorf()
|
||||
static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2(ImFloor(v.x), ImFloor(v.y)); }
|
||||
static inline float ImTrunc64(float f) { return (float)(ImS64)(f); }
|
||||
static inline float ImRound64(float f) { return (float)(ImS64)(f + 0.5f); }
|
||||
static inline int ImModPositive(int a, int b) { return (a + b) % b; }
|
||||
static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
|
||||
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
|
||||
static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
||||
static inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x) { return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; }
|
||||
static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
||||
static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
||||
static inline float ImExponentialMovingAverage(float avg, float sample, int n) { avg -= avg / n; avg += sample / n; return avg; }
|
||||
inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); }
|
||||
inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); }
|
||||
inline ImVec2 ImClamp(const ImVec2& v, const ImVec2&mn, const ImVec2&mx){ return ImVec2((v.x < mn.x) ? mn.x : (v.x > mx.x) ? mx.x : v.x, (v.y < mn.y) ? mn.y : (v.y > mx.y) ? mx.y : v.y); }
|
||||
inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) { return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); }
|
||||
inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
|
||||
inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
|
||||
inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
|
||||
inline float ImLengthSqr(const ImVec2& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y); }
|
||||
inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); }
|
||||
inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = (lhs.x * lhs.x) + (lhs.y * lhs.y); if (d > 0.0f) return ImRsqrt(d); return fail_value; }
|
||||
inline float ImTrunc(float f) { return (float)(int)(f); }
|
||||
inline ImVec2 ImTrunc(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); }
|
||||
inline float ImFloor(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } // Decent replacement for floorf()
|
||||
inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2(ImFloor(v.x), ImFloor(v.y)); }
|
||||
inline float ImTrunc64(float f) { return (float)(ImS64)(f); }
|
||||
inline float ImRound64(float f) { return (float)(ImS64)(f + 0.5f); }
|
||||
inline int ImModPositive(int a, int b) { return (a + b) % b; }
|
||||
inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
|
||||
inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
|
||||
inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
||||
inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x) { return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; }
|
||||
inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
||||
inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
||||
inline float ImExponentialMovingAverage(float avg, float sample, int n){ avg -= avg / n; avg += sample / n; return avg; }
|
||||
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
|
||||
// Helpers: Geometry
|
||||
@@ -1487,7 +1487,7 @@ enum ImGuiInputEventType
|
||||
ImGuiInputEventType_COUNT
|
||||
};
|
||||
|
||||
enum ImGuiInputSource
|
||||
enum ImGuiInputSource : int
|
||||
{
|
||||
ImGuiInputSource_None = 0,
|
||||
ImGuiInputSource_Mouse, // Note: may be Mouse or TouchScreen or Pen. See io.MouseSource to distinguish them.
|
||||
@@ -2212,6 +2212,7 @@ struct ImGuiContext
|
||||
bool ActiveIdHasBeenEditedBefore; // Was the value associated to the widget Edited over the course of the Active state.
|
||||
bool ActiveIdHasBeenEditedThisFrame;
|
||||
bool ActiveIdFromShortcut;
|
||||
ImGuiID ActiveIdDisabledId; // When clicking a disabled item we set ActiveId=window->MoveId to avoid interference with widget code. Actual item ID is stored here.
|
||||
int ActiveIdMouseButton : 8;
|
||||
ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
|
||||
ImGuiWindow* ActiveIdWindow;
|
||||
@@ -2328,8 +2329,8 @@ struct ImGuiContext
|
||||
float NavWindowingTimer;
|
||||
float NavWindowingHighlightAlpha;
|
||||
ImGuiInputSource NavWindowingInputSource;
|
||||
bool NavWindowingToggleLayer;
|
||||
ImGuiKey NavWindowingToggleKey;
|
||||
bool NavWindowingToggleLayer; // Set while Alt or GamepadMenu is held, may be cleared by other operations, and processed when releasing the key.
|
||||
ImGuiKey NavWindowingToggleKey; // Keyboard/gamepad key used when toggling to menu layer.
|
||||
ImVec2 NavWindowingAccumDeltaPos;
|
||||
ImVec2 NavWindowingAccumDeltaSize;
|
||||
|
||||
@@ -2735,7 +2736,7 @@ struct ImGuiTabItem
|
||||
int LastFrameSelected; // This allows us to infer an ordered list of the last activated tabs with little maintenance
|
||||
float Offset; // Position relative to beginning of tab
|
||||
float Width; // Width currently displayed
|
||||
float ContentWidth; // Width of label, stored during BeginTabItem() call
|
||||
float ContentWidth; // Width of label + padding, stored during BeginTabItem() call (misnamed as "Content" would normally imply width of label only)
|
||||
float RequestedWidth; // Width optionally requested by caller, -1.0f is unused
|
||||
ImS32 NameOffset; // When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames
|
||||
ImS16 BeginOrder; // BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable
|
||||
@@ -2758,6 +2759,7 @@ struct IMGUI_API ImGuiTabBar
|
||||
int CurrFrameVisible;
|
||||
int PrevFrameVisible;
|
||||
ImRect BarRect;
|
||||
float BarRectPrevWidth; // Backup of previous width. When width change we enforce keep horizontal scroll on focused tab.
|
||||
float CurrTabsContentsHeight;
|
||||
float PrevTabsContentsHeight; // Record the height of contents submitted below the tab bar
|
||||
float WidthAllTabs; // Actual width of all tabs (locked during layout)
|
||||
@@ -2776,6 +2778,7 @@ struct IMGUI_API ImGuiTabBar
|
||||
bool WantLayout;
|
||||
bool VisibleTabWasSubmitted;
|
||||
bool TabsAddedNew; // Set to true when a new tab item or button has been added to the tab bar during last frame
|
||||
bool ScrollButtonEnabled;
|
||||
ImS16 TabsActiveCount; // Number of tabs submitted this frame.
|
||||
ImS16 LastTabItemIdx; // Index of last BeginTabItem() tab for use by EndTabItem()
|
||||
float ItemSpacingY;
|
||||
@@ -3124,7 +3127,7 @@ namespace ImGui
|
||||
IMGUI_API void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags);
|
||||
|
||||
// Fonts, drawing
|
||||
IMGUI_API void RegisterUserTexture(ImTextureData* tex); // Register external texture
|
||||
IMGUI_API void RegisterUserTexture(ImTextureData* tex); // Register external texture. EXPERIMENTAL: DO NOT USE YET.
|
||||
IMGUI_API void UnregisterUserTexture(ImTextureData* tex);
|
||||
IMGUI_API void RegisterFontAtlas(ImFontAtlas* atlas);
|
||||
IMGUI_API void UnregisterFontAtlas(ImFontAtlas* atlas);
|
||||
@@ -3150,6 +3153,7 @@ namespace ImGui
|
||||
IMGUI_API void UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos);
|
||||
IMGUI_API void FindHoveredWindowEx(const ImVec2& pos, bool find_first_and_in_any_viewport, ImGuiWindow** out_hovered_window, ImGuiWindow** out_hovered_window_under_moving_window);
|
||||
IMGUI_API void StartMouseMovingWindow(ImGuiWindow* window);
|
||||
IMGUI_API void StopMouseMovingWindow();
|
||||
IMGUI_API void UpdateMouseMovingWindowNewFrame();
|
||||
IMGUI_API void UpdateMouseMovingWindowEndFrame();
|
||||
|
||||
@@ -3221,7 +3225,7 @@ namespace ImGui
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||
IMGUI_API void PushMultiItemsWidths(int components, float width_full);
|
||||
IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess);
|
||||
IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min);
|
||||
|
||||
// Parameter stacks (shared)
|
||||
IMGUI_API const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx);
|
||||
@@ -3671,7 +3675,6 @@ namespace ImGui
|
||||
//inline bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0) { return TreeNodeUpdateNextOpen(id, flags); } // Renamed in 1.89
|
||||
//inline bool IsKeyPressedMap(ImGuiKey key, bool repeat = true) { IM_ASSERT(IsNamedKey(key)); return IsKeyPressed(key, repeat); } // Removed in 1.87: Mapping from named key is always identity!
|
||||
|
||||
// Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
|
||||
// Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
|
||||
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)'
|
||||
// (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Focused) != 0'
|
||||
|
||||
277
3rdparty/imgui/src/imgui.cpp
vendored
277
3rdparty/imgui/src/imgui.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
@@ -24,7 +24,7 @@
|
||||
// For first-time users having issues compiling/linking/running:
|
||||
// please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above.
|
||||
// Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there.
|
||||
// Since 1.92, we encourage font loading question to also be posted in 'Issues'.
|
||||
// Since 1.92, we encourage font loading questions to also be posted in 'Issues'.
|
||||
|
||||
// Copyright (c) 2014-2025 Omar Cornut
|
||||
// Developed by Omar Cornut and every direct or indirect contributors to the GitHub.
|
||||
@@ -78,7 +78,7 @@ CODE
|
||||
// [SECTION] RENDER HELPERS
|
||||
// [SECTION] INITIALIZATION, SHUTDOWN
|
||||
// [SECTION] MAIN CODE (most of the code! lots of stuff, needs tidying up!)
|
||||
// [SECTION] FONTS
|
||||
// [SECTION] FONTS, TEXTURES
|
||||
// [SECTION] ID STACK
|
||||
// [SECTION] INPUTS
|
||||
// [SECTION] ERROR CHECKING, STATE RECOVERY
|
||||
@@ -392,7 +392,9 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2025/06/25 (1.92.0) - layout: commented out legacy ErrorCheckUsingSetCursorPosToExtendParentBoundaries() fallback obsoleted in 1.89 (August 2022) which allowed a SetCursorPos()/SetCursorScreenPos() call WITHOUT AN ITEM
|
||||
- 2025/08/08 (1.92.2) - Backends: SDL_GPU3: Changed ImTextureID type from SDL_GPUTextureSamplerBinding* to SDL_GPUTexture*, which is more natural and easier for user to manage. If you need to change the current sampler, you can access the ImGui_ImplSDLGPU3_RenderState struct. (#8866, #8163, #7998, #7988)
|
||||
- 2025/07/31 (1.92.2) - Tabs: Renamed ImGuiTabBarFlags_FittingPolicyResizeDown to ImGuiTabBarFlags_FittingPolicyShrink. Kept inline redirection enum (will obsolete).
|
||||
- 2025/06/25 (1.92.0) - Layout: commented out legacy ErrorCheckUsingSetCursorPosToExtendParentBoundaries() fallback obsoleted in 1.89 (August 2022) which allowed a SetCursorPos()/SetCursorScreenPos() call WITHOUT AN ITEM
|
||||
to extend parent window/cell boundaries. Replaced with assert/tooltip that would already happens if previously using IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#5548, #4510, #3355, #1760, #1490, #4152, #150)
|
||||
- Incorrect way to make a window content size 200x200:
|
||||
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
|
||||
@@ -432,6 +434,8 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
cfg2.MergeMode = true;
|
||||
io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
|
||||
- You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate unde
|
||||
- Fonts: **IMPORTANT** on Thread Safety:
|
||||
- A few functions such as font->CalcTextSizeA() were, by sheer luck (== accidentally) thread-safe even thou we had never provided that guarantee. They are definitively not thread-safe anymore as new glyphs may be loaded.
|
||||
- Fonts: ImFont::FontSize was removed and does not make sense anymore. ImFont::LegacySize is the size passed to AddFont().
|
||||
- Fonts: Removed support for PushFont(NULL) which was a shortcut for "default font".
|
||||
- Fonts: Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'.
|
||||
@@ -1287,7 +1291,7 @@ static float NavUpdatePageUpPageDown();
|
||||
static inline void NavUpdateAnyRequestFlag();
|
||||
static void NavUpdateCreateWrappingRequest();
|
||||
static void NavEndFrame();
|
||||
static bool NavScoreItem(ImGuiNavItemData* result);
|
||||
static bool NavScoreItem(ImGuiNavItemData* result, const ImRect& nav_bb);
|
||||
static void NavApplyItemToResult(ImGuiNavItemData* result);
|
||||
static void NavProcessItem();
|
||||
static void NavProcessItemForTabbingRequest(ImGuiID id, ImGuiItemFlags item_flags, ImGuiNavMoveFlags move_flags);
|
||||
@@ -1415,6 +1419,8 @@ ImGuiStyle::ImGuiStyle()
|
||||
ImageBorderSize = 0.0f; // Thickness of border around tabs.
|
||||
TabRounding = 5.0f; // Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
|
||||
TabBorderSize = 0.0f; // Thickness of border around tabs.
|
||||
TabMinWidthBase = 1.0f; // Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected.
|
||||
TabMinWidthShrink = 80.0f; // Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy.
|
||||
TabCloseButtonMinWidthSelected = -1.0f; // -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width.
|
||||
TabCloseButtonMinWidthUnselected = 0.0f; // -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. FLT_MAX: never show close button when unselected.
|
||||
TabBarBorderSize = 1.0f; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||
@@ -1481,6 +1487,8 @@ void ImGuiStyle::ScaleAllSizes(float scale_factor)
|
||||
LogSliderDeadzone = ImTrunc(LogSliderDeadzone * scale_factor);
|
||||
ImageBorderSize = ImTrunc(ImageBorderSize * scale_factor);
|
||||
TabRounding = ImTrunc(TabRounding * scale_factor);
|
||||
TabMinWidthBase = ImTrunc(TabMinWidthBase * scale_factor);
|
||||
TabMinWidthShrink = ImTrunc(TabMinWidthShrink * scale_factor);
|
||||
TabCloseButtonMinWidthSelected = (TabCloseButtonMinWidthSelected > 0.0f && TabCloseButtonMinWidthSelected != FLT_MAX) ? ImTrunc(TabCloseButtonMinWidthSelected * scale_factor) : TabCloseButtonMinWidthSelected;
|
||||
TabCloseButtonMinWidthUnselected = (TabCloseButtonMinWidthUnselected > 0.0f && TabCloseButtonMinWidthUnselected != FLT_MAX) ? ImTrunc(TabCloseButtonMinWidthUnselected * scale_factor) : TabCloseButtonMinWidthUnselected;
|
||||
TabBarOverlineSize = ImTrunc(TabBarOverlineSize * scale_factor);
|
||||
@@ -2582,11 +2590,11 @@ static inline int ImTextCharToUtf8_inline(char* buf, int buf_size, unsigned int
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* ImTextCharToUtf8(char out_buf[5], unsigned int c)
|
||||
int ImTextCharToUtf8(char out_buf[5], unsigned int c)
|
||||
{
|
||||
int count = ImTextCharToUtf8_inline(out_buf, 5, c);
|
||||
out_buf[count] = 0;
|
||||
return out_buf;
|
||||
return count;
|
||||
}
|
||||
|
||||
// Not optimal but we very rarely use this function.
|
||||
@@ -3123,7 +3131,7 @@ static void ImGuiListClipper_SeekCursorAndSetupPrevLine(float pos_y, float line_
|
||||
ImGui::TableEndRow(table);
|
||||
table->RowPosY2 = window->DC.CursorPos.y;
|
||||
const int row_increase = (int)((off_y / line_height) + 0.5f);
|
||||
//table->CurrentRow += row_increase; // Can't do without fixing TableEndRow()
|
||||
table->CurrentRow += row_increase;
|
||||
table->RowBgColorCounter += row_increase;
|
||||
}
|
||||
}
|
||||
@@ -3500,6 +3508,8 @@ static const ImGuiStyleVarInfo GStyleVarsInfo[] =
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, ImageBorderSize) }, // ImGuiStyleVar_ImageBorderSize
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabRounding) }, // ImGuiStyleVar_TabRounding
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabBorderSize) }, // ImGuiStyleVar_TabBorderSize
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabMinWidthBase) }, // ImGuiStyleVar_TabMinWidthBase
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabMinWidthShrink) }, // ImGuiStyleVar_TabMinWidthShrink
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabBarBorderSize) }, // ImGuiStyleVar_TabBarBorderSize
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TabBarOverlineSize) }, // ImGuiStyleVar_TabBarOverlineSize
|
||||
{ 1, ImGuiDataType_Float, (ImU32)offsetof(ImGuiStyle, TableAngledHeadersAngle)}, // ImGuiStyleVar_TableAngledHeadersAngle
|
||||
@@ -4053,6 +4063,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
|
||||
ActiveIdClickOffset = ImVec2(-1, -1);
|
||||
ActiveIdWindow = NULL;
|
||||
ActiveIdSource = ImGuiInputSource_None;
|
||||
ActiveIdDisabledId = 0;
|
||||
ActiveIdMouseButton = -1;
|
||||
ActiveIdPreviousFrame = 0;
|
||||
memset(&DeactivatedItemData, 0, sizeof(DeactivatedItemData));
|
||||
@@ -4501,15 +4512,6 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
||||
// Clear previous active id
|
||||
if (g.ActiveId != 0)
|
||||
{
|
||||
// While most behaved code would make an effort to not steal active id during window move/drag operations,
|
||||
// we at least need to be resilient to it. Canceling the move is rather aggressive and users of 'master' branch
|
||||
// may prefer the weird ill-defined half working situation ('docking' did assert), so may need to rework that.
|
||||
if (g.MovingWindow != NULL && g.ActiveId == g.MovingWindow->MoveId)
|
||||
{
|
||||
IMGUI_DEBUG_LOG_ACTIVEID("SetActiveID() cancel MovingWindow\n");
|
||||
g.MovingWindow = NULL;
|
||||
}
|
||||
|
||||
// Store deactivate data
|
||||
ImGuiDeactivatedItemData* deactivated_data = &g.DeactivatedItemData;
|
||||
deactivated_data->ID = g.ActiveId;
|
||||
@@ -4522,6 +4524,15 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
||||
// One common scenario leading to this is: pressing Key ->NavMoveRequestApplyResult() -> ClearActiveID()
|
||||
if (g.InputTextState.ID == g.ActiveId)
|
||||
InputTextDeactivateHook(g.ActiveId);
|
||||
|
||||
// While most behaved code would make an effort to not steal active id during window move/drag operations,
|
||||
// we at least need to be resilient to it. Canceling the move is rather aggressive and users of 'master' branch
|
||||
// may prefer the weird ill-defined half working situation ('docking' did assert), so may need to rework that.
|
||||
if (g.MovingWindow != NULL && g.ActiveId == g.MovingWindow->MoveId)
|
||||
{
|
||||
IMGUI_DEBUG_LOG_ACTIVEID("SetActiveID() cancel MovingWindow\n");
|
||||
StopMouseMovingWindow();
|
||||
}
|
||||
}
|
||||
|
||||
// Set active id
|
||||
@@ -4545,6 +4556,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
||||
g.ActiveIdWindow = window;
|
||||
g.ActiveIdHasBeenEditedThisFrame = false;
|
||||
g.ActiveIdFromShortcut = false;
|
||||
g.ActiveIdDisabledId = 0;
|
||||
if (id)
|
||||
{
|
||||
g.ActiveIdIsAlive = id;
|
||||
@@ -4688,8 +4700,17 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
||||
const ImGuiID id = g.LastItemData.ID;
|
||||
if ((flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) == 0)
|
||||
if (g.ActiveId != 0 && g.ActiveId != id && !g.ActiveIdAllowOverlap)
|
||||
if (g.ActiveId != window->MoveId)
|
||||
{
|
||||
// When ActiveId == MoveId it means that either:
|
||||
// - (1) user clicked on void _or_ an item with no id, which triggers moving window (ActiveId is set even when window has _NoMove flag)
|
||||
// - the (id == 0) test handles it, however, IsItemHovered() will leak between id==0 items (mostly visible when using _NoMove). // FIXME: May be fixed.
|
||||
// - (2) user clicked a disabled item. UpdateMouseMovingWindowEndFrame() uses ActiveId == MoveId to avoid interference with item logic + sets ActiveIdDisabledId.
|
||||
bool cancel_is_hovered = true;
|
||||
if (g.ActiveId == window->MoveId && (id == 0 || g.ActiveIdDisabledId == id))
|
||||
cancel_is_hovered = false;
|
||||
if (cancel_is_hovered)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Test if interactions on this window are blocked by an active popup or modal.
|
||||
// The ImGuiHoveredFlags_AllowWhenBlockedByPopup flag will be tested here.
|
||||
@@ -4770,7 +4791,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
|
||||
if (!g.ActiveIdFromShortcut)
|
||||
return false;
|
||||
|
||||
// Done with rectangle culling so we can perform heavier checks now.
|
||||
// We are done with rectangle culling so we can perform heavier checks now.
|
||||
if (!(item_flags & ImGuiItemFlags_NoWindowHoverableCheck) && !IsWindowContentHoverable(window, ImGuiHoveredFlags_None))
|
||||
{
|
||||
g.HoveredIdIsDisabled = true;
|
||||
@@ -5075,6 +5096,19 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
|
||||
g.MovingWindow = window;
|
||||
}
|
||||
|
||||
// This is not 100% symetric with StartMouseMovingWindow().
|
||||
// We do NOT clear ActiveID, because:
|
||||
// - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired.
|
||||
// - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item).
|
||||
void ImGui::StopMouseMovingWindow()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
// [nb: docking branch has more stuff in this function]
|
||||
|
||||
g.MovingWindow = NULL;
|
||||
}
|
||||
|
||||
// Handle mouse moving window
|
||||
// Note: moving window with the navigation keys (Square + d-pad / CTRL+TAB + Arrows) are processed in NavUpdateWindowing()
|
||||
// FIXME: We don't have strong guarantee that g.MovingWindow stay synced with g.ActiveId == g.MovingWindow->MoveId.
|
||||
@@ -5098,7 +5132,7 @@ void ImGui::UpdateMouseMovingWindowNewFrame()
|
||||
}
|
||||
else
|
||||
{
|
||||
g.MovingWindow = NULL;
|
||||
StopMouseMovingWindow();
|
||||
ClearActiveID();
|
||||
}
|
||||
}
|
||||
@@ -5140,6 +5174,9 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
|
||||
{
|
||||
StartMouseMovingWindow(g.HoveredWindow); //-V595
|
||||
|
||||
// FIXME: In principal we might be able to call StopMouseMovingWindow() below.
|
||||
// Please note how StartMouseMovingWindow() and StopMouseMovingWindow() and not entirely symetrical, at the later doesn't clear ActiveId.
|
||||
|
||||
// Cancel moving if clicked outside of title bar
|
||||
if (g.IO.ConfigWindowsMoveFromTitleBarOnly)
|
||||
if (!(root_window->Flags & ImGuiWindowFlags_NoTitleBar))
|
||||
@@ -5147,9 +5184,12 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
|
||||
g.MovingWindow = NULL;
|
||||
|
||||
// Cancel moving if clicked over an item which was disabled or inhibited by popups
|
||||
// (when g.HoveredIdIsDisabled == true && g.HoveredId == 0 we are inhibited by popups, when g.HoveredIdIsDisabled == true && g.HoveredId != 0 we are over a disabled item)0 already)
|
||||
// (when g.HoveredIdIsDisabled == true && g.HoveredId == 0 we are inhibited by popups, when g.HoveredIdIsDisabled == true && g.HoveredId != 0 we are over a disabled item)
|
||||
if (g.HoveredIdIsDisabled)
|
||||
{
|
||||
g.MovingWindow = NULL;
|
||||
g.ActiveIdDisabledId = g.HoveredId;
|
||||
}
|
||||
}
|
||||
else if (root_window == NULL && g.NavWindow != NULL)
|
||||
{
|
||||
@@ -5261,46 +5301,6 @@ void ImGui::UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos)
|
||||
io.WantTextInput = (g.WantTextInputNextFrame != -1) ? (g.WantTextInputNextFrame != 0) : false;
|
||||
}
|
||||
|
||||
static void ImGui::UpdateTexturesNewFrame()
|
||||
{
|
||||
// Cannot update every atlases based on atlas's FrameCount < g.FrameCount, because an atlas may be shared by multiple contexts with different frame count.
|
||||
ImGuiContext& g = *GImGui;
|
||||
const bool has_textures = (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) != 0;
|
||||
for (ImFontAtlas* atlas : g.FontAtlases)
|
||||
{
|
||||
if (atlas->OwnerContext == &g)
|
||||
{
|
||||
ImFontAtlasUpdateNewFrame(atlas, g.FrameCount, has_textures);
|
||||
}
|
||||
else
|
||||
{
|
||||
// (1) If you manage font atlases yourself, e.g. create a ImFontAtlas yourself you need to call ImFontAtlasUpdateNewFrame() on it.
|
||||
// Otherwise, calling ImGui::CreateContext() without parameter will create an atlas owned by the context.
|
||||
// (2) If you have multiple font atlases, make sure the 'atlas->RendererHasTextures' as specified in the ImFontAtlasUpdateNewFrame() call matches for that.
|
||||
// (3) If you have multiple imgui contexts, they also need to have a matching value for ImGuiBackendFlags_RendererHasTextures.
|
||||
IM_ASSERT(atlas->Builder != NULL && atlas->Builder->FrameCount != -1);
|
||||
IM_ASSERT(atlas->RendererHasTextures == has_textures);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build a single texture list
|
||||
static void ImGui::UpdateTexturesEndFrame()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
g.PlatformIO.Textures.resize(0);
|
||||
for (ImFontAtlas* atlas : g.FontAtlases)
|
||||
for (ImTextureData* tex : atlas->TexList)
|
||||
{
|
||||
// We provide this information so backends can decide whether to destroy textures.
|
||||
// This means in practice that if N imgui contexts are created with a shared atlas, we assume all of them have a backend initialized.
|
||||
tex->RefCount = (unsigned short)atlas->RefCount;
|
||||
g.PlatformIO.Textures.push_back(tex);
|
||||
}
|
||||
for (ImTextureData* tex : g.UserTextures)
|
||||
g.PlatformIO.Textures.push_back(tex);
|
||||
}
|
||||
|
||||
// Called once a frame. Followed by SetCurrentFont() which sets up the remaining data.
|
||||
// FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
|
||||
static void SetupDrawListSharedData()
|
||||
@@ -7618,12 +7618,19 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Decide if we are going to handle borders and resize grips
|
||||
// 'window->SkipItems' is not updated yet so for child windows we rely on ParentWindow to avoid submitting decorations. (#8815)
|
||||
// Whenever we add support for full decorated child windows we will likely make this logic more general.
|
||||
bool handle_borders_and_resize_grips = true;
|
||||
if ((flags & ImGuiWindowFlags_ChildWindow) && window->ParentWindow->SkipItems)
|
||||
handle_borders_and_resize_grips = false;
|
||||
|
||||
// Handle manual resize: Resize Grips, Borders, Gamepad
|
||||
int border_hovered = -1, border_held = -1;
|
||||
ImU32 resize_grip_col[4] = {};
|
||||
const int resize_grip_count = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) ? 0 : g.IO.ConfigWindowsResizeFromEdges ? 2 : 1; // Allow resize from lower-left if we have the mouse cursor feedback for it.
|
||||
const float resize_grip_draw_size = IM_TRUNC(ImMax(g.FontSize * 1.10f, window->WindowRounding + 1.0f + g.FontSize * 0.2f));
|
||||
if (!window->Collapsed)
|
||||
if (handle_borders_and_resize_grips && !window->Collapsed)
|
||||
if (int auto_fit_mask = UpdateWindowManualResize(window, size_auto_fit, &border_hovered, &border_held, resize_grip_count, &resize_grip_col[0], visibility_rect))
|
||||
{
|
||||
if (auto_fit_mask & (1 << ImGuiAxis_X))
|
||||
@@ -7760,7 +7767,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
// Handle title bar, scrollbar, resize grips and resize borders
|
||||
const ImGuiWindow* window_to_highlight = g.NavWindowingTarget ? g.NavWindowingTarget : g.NavWindow;
|
||||
const bool title_bar_is_highlight = want_focus || (window_to_highlight && window->RootWindowForTitleBarHighlight == window_to_highlight->RootWindowForTitleBarHighlight);
|
||||
const bool handle_borders_and_resize_grips = true; // This exists to facilitate merge with 'docking' branch.
|
||||
RenderWindowDecorations(window, title_bar_rect, title_bar_is_highlight, handle_borders_and_resize_grips, resize_grip_count, resize_grip_col, resize_grip_draw_size);
|
||||
|
||||
if (render_decorations_in_parent)
|
||||
@@ -8671,11 +8677,13 @@ bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] FONTS
|
||||
// [SECTION] FONTS, TEXTURES
|
||||
//-----------------------------------------------------------------------------
|
||||
// Most of the relevant font logic is in imgui_draw.cpp.
|
||||
// Those are high-level support functions.
|
||||
//-----------------------------------------------------------------------------
|
||||
// - UpdateTexturesNewFrame() [Internal]
|
||||
// - UpdateTexturesEndFrame() [Internal]
|
||||
// - UpdateFontsNewFrame() [Internal]
|
||||
// - UpdateFontsEndFrame() [Internal]
|
||||
// - GetDefaultFont() [Internal]
|
||||
@@ -8690,6 +8698,46 @@ bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
|
||||
// - PopFont()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void ImGui::UpdateTexturesNewFrame()
|
||||
{
|
||||
// Cannot update every atlases based on atlas's FrameCount < g.FrameCount, because an atlas may be shared by multiple contexts with different frame count.
|
||||
ImGuiContext& g = *GImGui;
|
||||
const bool has_textures = (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) != 0;
|
||||
for (ImFontAtlas* atlas : g.FontAtlases)
|
||||
{
|
||||
if (atlas->OwnerContext == &g)
|
||||
{
|
||||
ImFontAtlasUpdateNewFrame(atlas, g.FrameCount, has_textures);
|
||||
}
|
||||
else
|
||||
{
|
||||
// (1) If you manage font atlases yourself, e.g. create a ImFontAtlas yourself you need to call ImFontAtlasUpdateNewFrame() on it.
|
||||
// Otherwise, calling ImGui::CreateContext() without parameter will create an atlas owned by the context.
|
||||
// (2) If you have multiple font atlases, make sure the 'atlas->RendererHasTextures' as specified in the ImFontAtlasUpdateNewFrame() call matches for that.
|
||||
// (3) If you have multiple imgui contexts, they also need to have a matching value for ImGuiBackendFlags_RendererHasTextures.
|
||||
IM_ASSERT(atlas->Builder != NULL && atlas->Builder->FrameCount != -1);
|
||||
IM_ASSERT(atlas->RendererHasTextures == has_textures);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build a single texture list
|
||||
static void ImGui::UpdateTexturesEndFrame()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
g.PlatformIO.Textures.resize(0);
|
||||
for (ImFontAtlas* atlas : g.FontAtlases)
|
||||
for (ImTextureData* tex : atlas->TexList)
|
||||
{
|
||||
// We provide this information so backends can decide whether to destroy textures.
|
||||
// This means in practice that if N imgui contexts are created with a shared atlas, we assume all of them have a backend initialized.
|
||||
tex->RefCount = (unsigned short)atlas->RefCount;
|
||||
g.PlatformIO.Textures.push_back(tex);
|
||||
}
|
||||
for (ImTextureData* tex : g.UserTextures)
|
||||
g.PlatformIO.Textures.push_back(tex);
|
||||
}
|
||||
|
||||
void ImGui::UpdateFontsNewFrame()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
@@ -8732,16 +8780,19 @@ ImFont* ImGui::GetDefaultFont()
|
||||
return g.IO.FontDefault ? g.IO.FontDefault : atlas->Fonts[0];
|
||||
}
|
||||
|
||||
// EXPERIMENTAL: DO NOT USE YET.
|
||||
void ImGui::RegisterUserTexture(ImTextureData* tex)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(tex->RefCount > 0);
|
||||
tex->RefCount++;
|
||||
g.UserTextures.push_back(tex);
|
||||
}
|
||||
|
||||
void ImGui::UnregisterUserTexture(ImTextureData* tex)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(tex->RefCount > 0);
|
||||
tex->RefCount--;
|
||||
g.UserTextures.find_erase(tex);
|
||||
}
|
||||
|
||||
@@ -8802,11 +8853,14 @@ void ImGui::UpdateCurrentFontSize(float restore_font_size_after_scaling)
|
||||
g.Style.FontSizeBase = g.FontSizeBase;
|
||||
|
||||
// Early out to avoid hidden window keeping bakes referenced and out of GC reach.
|
||||
// However this would leave a pretty subtle and damning error surface area if g.FontBaked was mismatching, so for now we null it.
|
||||
// However this would leave a pretty subtle and damning error surface area if g.FontBaked was mismatching.
|
||||
// FIXME: perhaps g.FontSize should be updated?
|
||||
if (window != NULL && window->SkipItems)
|
||||
if (g.CurrentTable == NULL || g.CurrentTable->CurrentColumn != -1) // See 8465#issuecomment-2951509561. Ideally the SkipItems=true in tables would be amended with extra data.
|
||||
{
|
||||
ImGuiTable* table = g.CurrentTable;
|
||||
if (table == NULL || (table->CurrentColumn != -1 && table->Columns[table->CurrentColumn].IsSkipItems == false)) // See 8465#issuecomment-2951509561 and #8865. Ideally the SkipItems=true in tables would be amended with extra data.
|
||||
return;
|
||||
}
|
||||
|
||||
// Restoring is pretty much only used by PopFont()
|
||||
float final_size = (restore_font_size_after_scaling > 0.0f) ? restore_font_size_after_scaling : 0.0f;
|
||||
@@ -10135,13 +10189,17 @@ void ImGui::SetNextFrameWantCaptureMouse(bool want_capture_mouse)
|
||||
static const char* GetInputSourceName(ImGuiInputSource source)
|
||||
{
|
||||
const char* input_source_names[] = { "None", "Mouse", "Keyboard", "Gamepad" };
|
||||
IM_ASSERT(IM_ARRAYSIZE(input_source_names) == ImGuiInputSource_COUNT && source >= 0 && source < ImGuiInputSource_COUNT);
|
||||
IM_ASSERT(IM_ARRAYSIZE(input_source_names) == ImGuiInputSource_COUNT);
|
||||
if (source < 0 || source >= ImGuiInputSource_COUNT)
|
||||
return "Unknown";
|
||||
return input_source_names[source];
|
||||
}
|
||||
static const char* GetMouseSourceName(ImGuiMouseSource source)
|
||||
{
|
||||
const char* mouse_source_names[] = { "Mouse", "TouchScreen", "Pen" };
|
||||
IM_ASSERT(IM_ARRAYSIZE(mouse_source_names) == ImGuiMouseSource_COUNT && source >= 0 && source < ImGuiMouseSource_COUNT);
|
||||
IM_ASSERT(IM_ARRAYSIZE(mouse_source_names) == ImGuiMouseSource_COUNT);
|
||||
if (source < 0 || source >= ImGuiMouseSource_COUNT)
|
||||
return "Unknown";
|
||||
return mouse_source_names[source];
|
||||
}
|
||||
static void DebugPrintInputEvent(const char* prefix, const ImGuiInputEvent* e)
|
||||
@@ -12501,10 +12559,10 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
|
||||
|
||||
IM_ASSERT(cur_window); // Not inside a Begin()/End()
|
||||
const bool popup_hierarchy = (flags & ImGuiFocusedFlags_NoPopupHierarchy) == 0;
|
||||
if (flags & ImGuiHoveredFlags_RootWindow)
|
||||
if (flags & ImGuiFocusedFlags_RootWindow)
|
||||
cur_window = GetCombinedRootWindow(cur_window, popup_hierarchy);
|
||||
|
||||
if (flags & ImGuiHoveredFlags_ChildWindows)
|
||||
if (flags & ImGuiFocusedFlags_ChildWindows)
|
||||
return IsWindowChildOf(ref_window, cur_window, popup_hierarchy);
|
||||
else
|
||||
return (ref_window == cur_window);
|
||||
@@ -12826,7 +12884,7 @@ static float inline NavScoreItemDistInterval(float cand_min, float cand_max, flo
|
||||
}
|
||||
|
||||
// Scoring function for keyboard/gamepad directional navigation. Based on https://gist.github.com/rygorous/6981057
|
||||
static bool ImGui::NavScoreItem(ImGuiNavItemData* result)
|
||||
static bool ImGui::NavScoreItem(ImGuiNavItemData* result, const ImRect& nav_bb)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
@@ -12834,7 +12892,7 @@ static bool ImGui::NavScoreItem(ImGuiNavItemData* result)
|
||||
return false;
|
||||
|
||||
// FIXME: Those are not good variables names
|
||||
ImRect cand = g.LastItemData.NavRect; // Current item nav rectangle
|
||||
ImRect cand = nav_bb; // Current item nav rectangle
|
||||
const ImRect curr = g.NavScoringRect; // Current modified source rect (NB: we've applied Max.x = Min.x in NavUpdate() to inhibit the effect of having varied item width)
|
||||
g.NavScoringDebugCount++;
|
||||
|
||||
@@ -13001,13 +13059,13 @@ static void ImGui::NavProcessItem()
|
||||
const ImGuiID id = g.LastItemData.ID;
|
||||
const ImGuiItemFlags item_flags = g.LastItemData.ItemFlags;
|
||||
|
||||
// When inside a container that isn't scrollable with Left<>Right, clip NavRect accordingly (#2221)
|
||||
// When inside a container that isn't scrollable with Left<>Right, clip NavRect accordingly (#2221, #8816)
|
||||
ImRect nav_bb = g.LastItemData.NavRect;
|
||||
if (window->DC.NavIsScrollPushableX == false)
|
||||
{
|
||||
g.LastItemData.NavRect.Min.x = ImClamp(g.LastItemData.NavRect.Min.x, window->ClipRect.Min.x, window->ClipRect.Max.x);
|
||||
g.LastItemData.NavRect.Max.x = ImClamp(g.LastItemData.NavRect.Max.x, window->ClipRect.Min.x, window->ClipRect.Max.x);
|
||||
nav_bb.Min.x = ImClamp(nav_bb.Min.x, window->ClipRect.Min.x, window->ClipRect.Max.x);
|
||||
nav_bb.Max.x = ImClamp(nav_bb.Max.x, window->ClipRect.Min.x, window->ClipRect.Max.x);
|
||||
}
|
||||
const ImRect nav_bb = g.LastItemData.NavRect;
|
||||
|
||||
// Process Init Request
|
||||
if (g.NavInitRequest && g.NavLayer == window->DC.NavLayerCurrent && (item_flags & ImGuiItemFlags_Disabled) == 0)
|
||||
@@ -13039,14 +13097,14 @@ static void ImGui::NavProcessItem()
|
||||
else if (g.NavId != id || (g.NavMoveFlags & ImGuiNavMoveFlags_AllowCurrentNavId))
|
||||
{
|
||||
ImGuiNavItemData* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther;
|
||||
if (NavScoreItem(result))
|
||||
if (NavScoreItem(result, nav_bb))
|
||||
NavApplyItemToResult(result);
|
||||
|
||||
// Features like PageUp/PageDown need to maintain a separate score for the visible set of items.
|
||||
const float VISIBLE_RATIO = 0.70f;
|
||||
if ((g.NavMoveFlags & ImGuiNavMoveFlags_AlsoScoreVisibleSet) && window->ClipRect.Overlaps(nav_bb))
|
||||
if (ImClamp(nav_bb.Max.y, window->ClipRect.Min.y, window->ClipRect.Max.y) - ImClamp(nav_bb.Min.y, window->ClipRect.Min.y, window->ClipRect.Max.y) >= (nav_bb.Max.y - nav_bb.Min.y) * VISIBLE_RATIO)
|
||||
if (NavScoreItem(&g.NavMoveResultLocalVisible))
|
||||
if (NavScoreItem(&g.NavMoveResultLocalVisible, nav_bb))
|
||||
NavApplyItemToResult(&g.NavMoveResultLocalVisible);
|
||||
}
|
||||
}
|
||||
@@ -13706,6 +13764,7 @@ void ImGui::NavUpdateCreateMoveRequest()
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare scoring rectangle.
|
||||
// For scoring we use a single segment on the left side our current item bounding box (not touching the edge to avoid box overlap with zero-spaced items)
|
||||
ImRect scoring_rect;
|
||||
if (window != NULL)
|
||||
@@ -14116,6 +14175,7 @@ static void ImGui::NavUpdateWindowingApplyFocus(ImGuiWindow* apply_focus_window)
|
||||
SetNavCursorVisibleAfterMove();
|
||||
ClosePopupsOverWindow(apply_focus_window, false);
|
||||
FocusWindow(apply_focus_window, ImGuiFocusRequestFlags_RestoreFocusedChild);
|
||||
IM_ASSERT(g.NavWindow != NULL);
|
||||
apply_focus_window = g.NavWindow;
|
||||
if (apply_focus_window->NavLastIds[0] == 0)
|
||||
NavInitWindow(apply_focus_window, false);
|
||||
@@ -14164,9 +14224,16 @@ static void ImGui::NavUpdateWindowing()
|
||||
const bool nav_keyboard_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) != 0;
|
||||
const bool keyboard_next_window = allow_windowing && g.ConfigNavWindowingKeyNext && Shortcut(g.ConfigNavWindowingKeyNext, ImGuiInputFlags_Repeat | ImGuiInputFlags_RouteAlways, owner_id);
|
||||
const bool keyboard_prev_window = allow_windowing && g.ConfigNavWindowingKeyPrev && Shortcut(g.ConfigNavWindowingKeyPrev, ImGuiInputFlags_Repeat | ImGuiInputFlags_RouteAlways, owner_id);
|
||||
const bool start_windowing_with_gamepad = allow_windowing && nav_gamepad_active && !g.NavWindowingTarget && Shortcut(ImGuiKey_NavGamepadMenu, ImGuiInputFlags_RouteAlways, owner_id);
|
||||
const bool start_toggling_with_gamepad = nav_gamepad_active && !g.NavWindowingTarget && Shortcut(ImGuiKey_NavGamepadMenu, ImGuiInputFlags_RouteAlways, owner_id);
|
||||
const bool start_windowing_with_gamepad = allow_windowing && start_toggling_with_gamepad;
|
||||
const bool start_windowing_with_keyboard = allow_windowing && !g.NavWindowingTarget && (keyboard_next_window || keyboard_prev_window); // Note: enabled even without NavEnableKeyboard!
|
||||
bool just_started_windowing_from_null_focus = false;
|
||||
if (start_toggling_with_gamepad)
|
||||
{
|
||||
g.NavWindowingToggleLayer = true; // Gamepad starts toggling layer
|
||||
g.NavWindowingToggleKey = ImGuiKey_NavGamepadMenu;
|
||||
g.NavWindowingInputSource = g.NavInputSource = ImGuiInputSource_Gamepad;
|
||||
}
|
||||
if (start_windowing_with_gamepad || start_windowing_with_keyboard)
|
||||
if (ImGuiWindow* window = g.NavWindow ? g.NavWindow : FindWindowNavFocusable(g.WindowsFocusOrder.Size - 1, -INT_MAX, -1))
|
||||
{
|
||||
@@ -14174,7 +14241,6 @@ static void ImGui::NavUpdateWindowing()
|
||||
g.NavWindowingTarget = g.NavWindowingTargetAnim = window->RootWindow; // Current location
|
||||
g.NavWindowingTimer = g.NavWindowingHighlightAlpha = 0.0f;
|
||||
g.NavWindowingAccumDeltaPos = g.NavWindowingAccumDeltaSize = ImVec2(0.0f, 0.0f);
|
||||
g.NavWindowingToggleLayer = start_windowing_with_gamepad ? true : false; // Gamepad starts toggling layer
|
||||
g.NavWindowingInputSource = g.NavInputSource = start_windowing_with_keyboard ? ImGuiInputSource_Keyboard : ImGuiInputSource_Gamepad;
|
||||
if (g.NavWindow == NULL)
|
||||
just_started_windowing_from_null_focus = true;
|
||||
@@ -15654,10 +15720,14 @@ static void Platform_SetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport*, ImG
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] METRICS/DEBUGGER WINDOW
|
||||
//-----------------------------------------------------------------------------
|
||||
// - MetricsHelpMarker() [Internal]
|
||||
// - DebugRenderViewportThumbnail() [Internal]
|
||||
// - RenderViewportsThumbnails() [Internal]
|
||||
// - DebugRenderKeyboardPreview() [Internal]
|
||||
// - DebugTextEncoding()
|
||||
// - MetricsHelpMarker() [Internal]
|
||||
// - DebugFlashStyleColorStop() [Internal]
|
||||
// - DebugFlashStyleColor()
|
||||
// - UpdateDebugToolFlashStyleColor() [Internal]
|
||||
// - ShowFontAtlas() [Internal but called by Demo!]
|
||||
// - DebugNodeTexture() [Internal]
|
||||
// - ShowMetricsWindow()
|
||||
@@ -15675,6 +15745,21 @@ static void Platform_SetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport*, ImG
|
||||
// - DebugNodeWindowsListByBeginStackParent() [Internal]
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if !defined(IMGUI_DISABLE_DEMO_WINDOWS) || !defined(IMGUI_DISABLE_DEBUG_TOOLS)
|
||||
// Avoid naming collision with imgui_demo.cpp's HelpMarker() for unity builds.
|
||||
static void MetricsHelpMarker(const char* desc)
|
||||
{
|
||||
ImGui::TextDisabled("(?)");
|
||||
if (ImGui::BeginItemTooltip())
|
||||
{
|
||||
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
|
||||
ImGui::TextUnformatted(desc);
|
||||
ImGui::PopTextWrapPos();
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
|
||||
void ImGui::DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb)
|
||||
@@ -15863,19 +15948,6 @@ static const char* FormatTextureIDForDebugDisplay(char* buf, int buf_size, const
|
||||
return FormatTextureIDForDebugDisplay(buf, (int)(buf_end - buf), cmd->TexRef.GetTexID()); // Calling TexRef::GetTexID() to avoid assert of cmd->GetTexID()
|
||||
}
|
||||
|
||||
// Avoid naming collision with imgui_demo.cpp's HelpMarker() for unity builds.
|
||||
static void MetricsHelpMarker(const char* desc)
|
||||
{
|
||||
ImGui::TextDisabled("(?)");
|
||||
if (ImGui::BeginItemTooltip())
|
||||
{
|
||||
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
|
||||
ImGui::TextUnformatted(desc);
|
||||
ImGui::PopTextWrapPos();
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef IMGUI_ENABLE_FREETYPE
|
||||
namespace ImGuiFreeType { IMGUI_API const ImFontLoader* GetFontLoader(); IMGUI_API bool DebugEditFontLoaderFlags(unsigned int* p_font_builder_flags); }
|
||||
#endif
|
||||
@@ -16917,14 +16989,16 @@ void ImGui::DebugNodeFont(ImFont* font)
|
||||
#endif
|
||||
|
||||
char c_str[5];
|
||||
Text("Fallback character: '%s' (U+%04X)", ImTextCharToUtf8(c_str, font->FallbackChar), font->FallbackChar);
|
||||
Text("Ellipsis character: '%s' (U+%04X)", ImTextCharToUtf8(c_str, font->EllipsisChar), font->EllipsisChar);
|
||||
ImTextCharToUtf8(c_str, font->FallbackChar);
|
||||
Text("Fallback character: '%s' (U+%04X)", c_str, font->FallbackChar);
|
||||
ImTextCharToUtf8(c_str, font->EllipsisChar);
|
||||
Text("Ellipsis character: '%s' (U+%04X)", c_str, font->EllipsisChar);
|
||||
|
||||
for (int src_n = 0; src_n < font->Sources.Size; src_n++)
|
||||
{
|
||||
ImFontConfig* src = font->Sources[src_n];
|
||||
if (TreeNode(src, "Input %d: \'%s\', Oversample: %d,%d, PixelSnapH: %d, Offset: (%.1f,%.1f)",
|
||||
src_n, src->Name, src->OversampleH, src->OversampleV, src->PixelSnapH, src->GlyphOffset.x, src->GlyphOffset.y))
|
||||
if (TreeNode(src, "Input %d: \'%s\' [%d], Oversample: %d,%d, PixelSnapH: %d, Offset: (%.1f,%.1f)",
|
||||
src_n, src->Name, src->FontNo, src->OversampleH, src->OversampleV, src->PixelSnapH, src->GlyphOffset.x, src->GlyphOffset.y))
|
||||
{
|
||||
const ImFontLoader* loader = src->FontLoader ? src->FontLoader : atlas->FontLoader;
|
||||
Text("Loader: '%s'", loader->Name ? loader->Name : "N/A");
|
||||
@@ -16960,7 +17034,10 @@ void ImGui::DebugNodeFont(ImFont* font)
|
||||
{
|
||||
char utf8_buf[5];
|
||||
for (unsigned int n = c; n < c_end; n++)
|
||||
BulletText("Codepoint U+%04X (%s)", n, ImTextCharToUtf8(utf8_buf, n));
|
||||
{
|
||||
ImTextCharToUtf8(utf8_buf, n);
|
||||
BulletText("Codepoint U+%04X (%s)", n, utf8_buf);
|
||||
}
|
||||
TreePop();
|
||||
}
|
||||
TableNextColumn();
|
||||
|
||||
40
3rdparty/imgui/src/imgui_demo.cpp
vendored
40
3rdparty/imgui/src/imgui_demo.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@@ -2170,7 +2170,7 @@ static void DemoWindowWidgetsQueryingStatuses()
|
||||
);
|
||||
ImGui::BulletText(
|
||||
"with Hovering Delay or Stationary test:\n"
|
||||
"IsItemHovered() = = %d\n"
|
||||
"IsItemHovered() = %d\n"
|
||||
"IsItemHovered(_Stationary) = %d\n"
|
||||
"IsItemHovered(_DelayShort) = %d\n"
|
||||
"IsItemHovered(_DelayNormal) = %d\n"
|
||||
@@ -3379,6 +3379,18 @@ static void DemoWindowWidgetsSelectionAndMultiSelect(ImGuiDemoWindowData* demo_d
|
||||
// [SECTION] DemoWindowWidgetsTabs()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void EditTabBarFittingPolicyFlags(ImGuiTabBarFlags* p_flags)
|
||||
{
|
||||
if ((*p_flags & ImGuiTabBarFlags_FittingPolicyMask_) == 0)
|
||||
*p_flags |= ImGuiTabBarFlags_FittingPolicyDefault_;
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyMixed", p_flags, ImGuiTabBarFlags_FittingPolicyMixed))
|
||||
*p_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyMixed);
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyShrink", p_flags, ImGuiTabBarFlags_FittingPolicyShrink))
|
||||
*p_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyShrink);
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyScroll", p_flags, ImGuiTabBarFlags_FittingPolicyScroll))
|
||||
*p_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyScroll);
|
||||
}
|
||||
|
||||
static void DemoWindowWidgetsTabs()
|
||||
{
|
||||
IMGUI_DEMO_MARKER("Widgets/Tabs");
|
||||
@@ -3421,12 +3433,7 @@ static void DemoWindowWidgetsTabs()
|
||||
ImGui::CheckboxFlags("ImGuiTabBarFlags_TabListPopupButton", &tab_bar_flags, ImGuiTabBarFlags_TabListPopupButton);
|
||||
ImGui::CheckboxFlags("ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", &tab_bar_flags, ImGuiTabBarFlags_NoCloseWithMiddleMouseButton);
|
||||
ImGui::CheckboxFlags("ImGuiTabBarFlags_DrawSelectedOverline", &tab_bar_flags, ImGuiTabBarFlags_DrawSelectedOverline);
|
||||
if ((tab_bar_flags & ImGuiTabBarFlags_FittingPolicyMask_) == 0)
|
||||
tab_bar_flags |= ImGuiTabBarFlags_FittingPolicyDefault_;
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyResizeDown", &tab_bar_flags, ImGuiTabBarFlags_FittingPolicyResizeDown))
|
||||
tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyResizeDown);
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyScroll", &tab_bar_flags, ImGuiTabBarFlags_FittingPolicyScroll))
|
||||
tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyScroll);
|
||||
EditTabBarFittingPolicyFlags(&tab_bar_flags);
|
||||
|
||||
// Tab Bar
|
||||
ImGui::AlignTextToFramePadding();
|
||||
@@ -3475,12 +3482,8 @@ static void DemoWindowWidgetsTabs()
|
||||
ImGui::Checkbox("Show Trailing TabItemButton()", &show_trailing_button);
|
||||
|
||||
// Expose some other flags which are useful to showcase how they interact with Leading/Trailing tabs
|
||||
static ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_AutoSelectNewTabs | ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_FittingPolicyResizeDown;
|
||||
ImGui::CheckboxFlags("ImGuiTabBarFlags_TabListPopupButton", &tab_bar_flags, ImGuiTabBarFlags_TabListPopupButton);
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyResizeDown", &tab_bar_flags, ImGuiTabBarFlags_FittingPolicyResizeDown))
|
||||
tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyResizeDown);
|
||||
if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyScroll", &tab_bar_flags, ImGuiTabBarFlags_FittingPolicyScroll))
|
||||
tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyScroll);
|
||||
static ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_AutoSelectNewTabs | ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_FittingPolicyShrink;
|
||||
EditTabBarFittingPolicyFlags(&tab_bar_flags);
|
||||
|
||||
if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags))
|
||||
{
|
||||
@@ -8096,6 +8099,9 @@ void ImGui::ShowAboutWindow(bool* p_open)
|
||||
ImGui::Separator();
|
||||
ImGui::Text("sizeof(size_t): %d, sizeof(ImDrawIdx): %d, sizeof(ImDrawVert): %d", (int)sizeof(size_t), (int)sizeof(ImDrawIdx), (int)sizeof(ImDrawVert));
|
||||
ImGui::Text("define: __cplusplus=%d", (int)__cplusplus);
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
ImGui::Text("define: IMGUI_ENABLE_TEST_ENGINE");
|
||||
#endif
|
||||
#ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
ImGui::Text("define: IMGUI_DISABLE_OBSOLETE_FUNCTIONS");
|
||||
#endif
|
||||
@@ -8341,8 +8347,10 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
SliderFloat("TabBarBorderSize", &style.TabBarBorderSize, 0.0f, 2.0f, "%.0f");
|
||||
SliderFloat("TabBarOverlineSize", &style.TabBarOverlineSize, 0.0f, 3.0f, "%.0f");
|
||||
SameLine(); HelpMarker("Overline is only drawn over the selected tab when ImGuiTabBarFlags_DrawSelectedOverline is set.");
|
||||
DragFloat("TabCloseButtonMinWidthSelected", &style.TabCloseButtonMinWidthSelected, 0.1f, -1.0f, 100.0f, (style.TabCloseButtonMinWidthSelected < 0.0f) ? "%.0f (Always)" : "%.0f");
|
||||
DragFloat("TabCloseButtonMinWidthUnselected", &style.TabCloseButtonMinWidthUnselected, 0.1f, -1.0f, 100.0f, (style.TabCloseButtonMinWidthUnselected < 0.0f) ? "%.0f (Always)" : "%.0f");
|
||||
DragFloat("TabMinWidthBase", &style.TabMinWidthBase, 0.5f, 1.0f, 500.0f, "%.0f");
|
||||
DragFloat("TabMinWidthShrink", &style.TabMinWidthShrink, 0.5f, 1.0f, 500.0f, "%0.f");
|
||||
DragFloat("TabCloseButtonMinWidthSelected", &style.TabCloseButtonMinWidthSelected, 0.5f, -1.0f, 100.0f, (style.TabCloseButtonMinWidthSelected < 0.0f) ? "%.0f (Always)" : "%.0f");
|
||||
DragFloat("TabCloseButtonMinWidthUnselected", &style.TabCloseButtonMinWidthUnselected, 0.5f, -1.0f, 100.0f, (style.TabCloseButtonMinWidthUnselected < 0.0f) ? "%.0f (Always)" : "%.0f");
|
||||
SliderFloat("TabRounding", &style.TabRounding, 0.0f, 12.0f, "%.0f");
|
||||
|
||||
SeparatorText("Tables");
|
||||
|
||||
74
3rdparty/imgui/src/imgui_draw.cpp
vendored
74
3rdparty/imgui/src/imgui_draw.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@@ -2312,17 +2312,16 @@ void ImDrawData::DeIndexAllBuffers()
|
||||
{
|
||||
ImVector<ImDrawVert> new_vtx_buffer;
|
||||
TotalVtxCount = TotalIdxCount = 0;
|
||||
for (int i = 0; i < CmdListsCount; i++)
|
||||
for (ImDrawList* draw_list : CmdLists)
|
||||
{
|
||||
ImDrawList* cmd_list = CmdLists[i];
|
||||
if (cmd_list->IdxBuffer.empty())
|
||||
if (draw_list->IdxBuffer.empty())
|
||||
continue;
|
||||
new_vtx_buffer.resize(cmd_list->IdxBuffer.Size);
|
||||
for (int j = 0; j < cmd_list->IdxBuffer.Size; j++)
|
||||
new_vtx_buffer[j] = cmd_list->VtxBuffer[cmd_list->IdxBuffer[j]];
|
||||
cmd_list->VtxBuffer.swap(new_vtx_buffer);
|
||||
cmd_list->IdxBuffer.resize(0);
|
||||
TotalVtxCount += cmd_list->VtxBuffer.Size;
|
||||
new_vtx_buffer.resize(draw_list->IdxBuffer.Size);
|
||||
for (int j = 0; j < draw_list->IdxBuffer.Size; j++)
|
||||
new_vtx_buffer[j] = draw_list->VtxBuffer[draw_list->IdxBuffer[j]];
|
||||
draw_list->VtxBuffer.swap(new_vtx_buffer);
|
||||
draw_list->IdxBuffer.resize(0);
|
||||
TotalVtxCount += draw_list->VtxBuffer.Size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2457,8 +2456,10 @@ const char* ImTextureDataGetFormatName(ImTextureFormat format)
|
||||
|
||||
void ImTextureData::Create(ImTextureFormat format, int w, int h)
|
||||
{
|
||||
IM_ASSERT(Status == ImTextureStatus_Destroyed);
|
||||
DestroyPixels();
|
||||
Format = format;
|
||||
Status = ImTextureStatus_WantCreate;
|
||||
Width = w;
|
||||
Height = h;
|
||||
BytesPerPixel = ImTextureDataGetFormatBytesPerPixel(format);
|
||||
@@ -2630,6 +2631,7 @@ ImFontAtlas::ImFontAtlas()
|
||||
TexMinHeight = 128;
|
||||
TexMaxWidth = 8192;
|
||||
TexMaxHeight = 8192;
|
||||
TexRef._TexID = ImTextureID_Invalid;
|
||||
RendererHasTextures = false; // Assumed false by default, as apps can call e.g Atlas::Build() after backend init and before ImGui can update.
|
||||
TexNextUniqueID = 1;
|
||||
FontNextUniqueID = 1;
|
||||
@@ -2739,10 +2741,9 @@ void ImFontAtlasUpdateNewFrame(ImFontAtlas* atlas, int frame_count, bool rendere
|
||||
if (atlas->Builder == NULL) // This will only happen if fonts were not already loaded.
|
||||
ImFontAtlasBuildMain(atlas);
|
||||
}
|
||||
else // Legacy backend
|
||||
{
|
||||
// Legacy backend
|
||||
if (!atlas->RendererHasTextures)
|
||||
IM_ASSERT_USER_ERROR(atlas->TexIsBuilt, "Backend does not support ImGuiBackendFlags_RendererHasTextures, and font atlas is not built! Update backend OR make sure you called ImGui_ImplXXXX_NewFrame() function for renderer backend, which should call io.Fonts->GetTexDataAsRGBA32() / GetTexDataAsAlpha8().");
|
||||
}
|
||||
if (atlas->TexIsBuilt && atlas->Builder->PreloadedAllGlyphsRanges)
|
||||
IM_ASSERT_USER_ERROR(atlas->RendererHasTextures == false, "Called ImFontAtlas::Build() before ImGuiBackendFlags_RendererHasTextures got set! With new backends: you don't need to call Build().");
|
||||
|
||||
@@ -2797,8 +2798,9 @@ void ImFontAtlasUpdateNewFrame(ImFontAtlas* atlas, int frame_count, bool rendere
|
||||
}
|
||||
else if (tex->WantDestroyNextFrame && tex->Status != ImTextureStatus_WantDestroy)
|
||||
{
|
||||
// Request destroy. Keep bool as it allows us to keep track of things.
|
||||
// We don't destroy pixels right away, as backend may have an in-flight copy from RAM.
|
||||
// Request destroy.
|
||||
// - Keep bool to true in order to differentiate a planned destroy vs a destroy decided by the backend.
|
||||
// - We don't destroy pixels right away, as backend may have an in-flight copy from RAM.
|
||||
IM_ASSERT(tex->Status == ImTextureStatus_OK || tex->Status == ImTextureStatus_WantCreate || tex->Status == ImTextureStatus_WantUpdates);
|
||||
tex->Status = ImTextureStatus_WantDestroy;
|
||||
}
|
||||
@@ -2954,7 +2956,7 @@ void ImFontAtlasTextureBlockQueueUpload(ImFontAtlas* atlas, ImTextureData* tex,
|
||||
tex->UsedRect.h = (unsigned short)(ImMax(tex->UsedRect.y + tex->UsedRect.h, req.y + req.h) - tex->UsedRect.y);
|
||||
atlas->TexIsBuilt = false;
|
||||
|
||||
// No need to queue if status is _WantCreate
|
||||
// No need to queue if status is == ImTextureStatus_WantCreate
|
||||
if (tex->Status == ImTextureStatus_OK || tex->Status == ImTextureStatus_WantUpdates)
|
||||
{
|
||||
tex->Status = ImTextureStatus_WantUpdates;
|
||||
@@ -3361,11 +3363,7 @@ void ImFontAtlasBuildMain(ImFontAtlas* atlas)
|
||||
{
|
||||
IM_ASSERT(!atlas->Locked && "Cannot modify a locked ImFontAtlas!");
|
||||
if (atlas->TexData && atlas->TexData->Format != atlas->TexDesiredFormat)
|
||||
{
|
||||
ImVec2i new_tex_size = ImFontAtlasTextureGetSizeEstimate(atlas);
|
||||
ImFontAtlasBuildDestroy(atlas);
|
||||
ImFontAtlasTextureAdd(atlas, new_tex_size.x, new_tex_size.y);
|
||||
}
|
||||
ImFontAtlasBuildClear(atlas);
|
||||
|
||||
if (atlas->Builder == NULL)
|
||||
ImFontAtlasBuildInit(atlas);
|
||||
@@ -3971,7 +3969,6 @@ ImTextureData* ImFontAtlasTextureAdd(ImFontAtlas* atlas, int w, int h)
|
||||
}
|
||||
|
||||
new_tex->Create(atlas->TexDesiredFormat, w, h);
|
||||
new_tex->Status = ImTextureStatus_WantCreate;
|
||||
atlas->TexIsBuilt = false;
|
||||
|
||||
ImFontAtlasBuildSetTexture(atlas, new_tex);
|
||||
@@ -4375,6 +4372,7 @@ ImTextureRect* ImFontAtlasPackGetRectSafe(ImFontAtlas* atlas, ImFontAtlasRectId
|
||||
if (atlas->Builder == NULL)
|
||||
ImFontAtlasBuildInit(atlas);
|
||||
ImFontAtlasBuilder* builder = (ImFontAtlasBuilder*)atlas->Builder;
|
||||
IM_MSVC_WARNING_SUPPRESS(28182); // Static Analysis false positive "warning C28182: Dereferencing NULL pointer 'builder'"
|
||||
if (index_idx >= builder->RectsIndex.Size)
|
||||
return NULL;
|
||||
ImFontAtlasRectEntry* index_entry = &builder->RectsIndex[index_idx];
|
||||
@@ -4417,7 +4415,7 @@ static ImFontGlyph* ImFontBaked_BuildLoadGlyph(ImFontBaked* baked, ImWchar codep
|
||||
if (atlas->Locked || (font->Flags & ImFontFlags_NoLoadGlyphs))
|
||||
{
|
||||
// Lazily load fallback glyph
|
||||
if (baked->FallbackGlyphIndex == -1 && baked->LockLoadingFallback == 0)
|
||||
if (baked->FallbackGlyphIndex == -1 && baked->LoadNoFallback == 0)
|
||||
ImFontAtlasBuildSetupFontBakedFallback(baked);
|
||||
return NULL;
|
||||
}
|
||||
@@ -4469,7 +4467,7 @@ static ImFontGlyph* ImFontBaked_BuildLoadGlyph(ImFontBaked* baked, ImWchar codep
|
||||
}
|
||||
|
||||
// Lazily load fallback glyph
|
||||
if (baked->LockLoadingFallback)
|
||||
if (baked->LoadNoFallback)
|
||||
return NULL;
|
||||
if (baked->FallbackGlyphIndex == -1)
|
||||
ImFontAtlasBuildSetupFontBakedFallback(baked);
|
||||
@@ -4483,7 +4481,7 @@ static ImFontGlyph* ImFontBaked_BuildLoadGlyph(ImFontBaked* baked, ImWchar codep
|
||||
|
||||
static float ImFontBaked_BuildLoadGlyphAdvanceX(ImFontBaked* baked, ImWchar codepoint)
|
||||
{
|
||||
if (baked->Size >= IMGUI_FONT_SIZE_THRESHOLD_FOR_LOADADVANCEXONLYMODE)
|
||||
if (baked->Size >= IMGUI_FONT_SIZE_THRESHOLD_FOR_LOADADVANCEXONLYMODE || baked->LoadNoRenderOnLayout)
|
||||
{
|
||||
// First load AdvanceX value used by CalcTextSize() API then load the rest when loaded by drawing API.
|
||||
float only_advance_x = 0.0f;
|
||||
@@ -4572,15 +4570,16 @@ static bool ImGui_ImplStbTrueType_FontSrcInit(ImFontAtlas* atlas, ImFontConfig*
|
||||
}
|
||||
src->FontLoaderData = bd_font_data;
|
||||
|
||||
const float ref_size = src->DstFont->Sources[0]->SizePixels;
|
||||
if (src->MergeMode && src->SizePixels == 0.0f)
|
||||
src->SizePixels = src->DstFont->Sources[0]->SizePixels;
|
||||
src->SizePixels = ref_size;
|
||||
|
||||
if (src->SizePixels >= 0.0f)
|
||||
bd_font_data->ScaleFactor = stbtt_ScaleForPixelHeight(&bd_font_data->FontInfo, 1.0f);
|
||||
else
|
||||
bd_font_data->ScaleFactor = stbtt_ScaleForMappingEmToPixels(&bd_font_data->FontInfo, 1.0f);
|
||||
if (src->MergeMode && src->SizePixels != 0.0f)
|
||||
bd_font_data->ScaleFactor *= src->SizePixels / src->DstFont->Sources[0]->SizePixels; // FIXME-NEWATLAS: Should tidy up that a bit
|
||||
if (src->MergeMode && src->SizePixels != 0.0f && ref_size != 0.0f)
|
||||
bd_font_data->ScaleFactor *= src->SizePixels / ref_size; // FIXME-NEWATLAS: Should tidy up that a bit
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4679,15 +4678,12 @@ static bool ImGui_ImplStbTrueType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontC
|
||||
builder->TempBuffer.resize(w * h * 1);
|
||||
unsigned char* bitmap_pixels = builder->TempBuffer.Data;
|
||||
memset(bitmap_pixels, 0, w * h * 1);
|
||||
stbtt_MakeGlyphBitmapSubpixel(&bd_font_data->FontInfo, bitmap_pixels, r->w - oversample_h + 1, r->h - oversample_v + 1, w,
|
||||
scale_for_raster_x, scale_for_raster_y, 0, 0, glyph_index);
|
||||
|
||||
// Oversampling
|
||||
// Render with oversampling
|
||||
// (those functions conveniently assert if pixels are not cleared, which is another safety layer)
|
||||
if (oversample_h > 1)
|
||||
stbtt__h_prefilter(bitmap_pixels, r->w, r->h, r->w, oversample_h);
|
||||
if (oversample_v > 1)
|
||||
stbtt__v_prefilter(bitmap_pixels, r->w, r->h, r->w, oversample_v);
|
||||
float sub_x, sub_y;
|
||||
stbtt_MakeGlyphBitmapSubpixelPrefilter(&bd_font_data->FontInfo, bitmap_pixels, w, h, w,
|
||||
scale_for_raster_x, scale_for_raster_y, 0, 0, oversample_h, oversample_v, &sub_x, &sub_y, glyph_index);
|
||||
|
||||
const float ref_size = baked->ContainerFont->Sources[0]->SizePixels;
|
||||
const float offsets_scale = (ref_size != 0.0f) ? (baked->Size / ref_size) : 1.0f;
|
||||
@@ -4697,8 +4693,8 @@ static bool ImGui_ImplStbTrueType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontC
|
||||
font_off_x = IM_ROUND(font_off_x);
|
||||
if (src->PixelSnapV)
|
||||
font_off_y = IM_ROUND(font_off_y);
|
||||
font_off_x += stbtt__oversample_shift(oversample_h);
|
||||
font_off_y += stbtt__oversample_shift(oversample_v) + IM_ROUND(baked->Ascent);
|
||||
font_off_x += sub_x;
|
||||
font_off_y += sub_y + IM_ROUND(baked->Ascent);
|
||||
float recip_h = 1.0f / (oversample_h * rasterizer_density);
|
||||
float recip_v = 1.0f / (oversample_v * rasterizer_density);
|
||||
|
||||
@@ -5225,9 +5221,9 @@ ImFontGlyph* ImFontBaked::FindGlyphNoFallback(ImWchar c)
|
||||
if (i != IM_FONTGLYPH_INDEX_UNUSED)
|
||||
return &Glyphs.Data[i];
|
||||
}
|
||||
LockLoadingFallback = true; // This is actually a rare call, not done in hot-loop, so we prioritize not adding extra cruft to ImFontBaked_BuildLoadGlyph() call sites.
|
||||
LoadNoFallback = true; // This is actually a rare call, not done in hot-loop, so we prioritize not adding extra cruft to ImFontBaked_BuildLoadGlyph() call sites.
|
||||
ImFontGlyph* glyph = ImFontBaked_BuildLoadGlyph(this, c, NULL);
|
||||
LockLoadingFallback = false;
|
||||
LoadNoFallback = false;
|
||||
return glyph;
|
||||
}
|
||||
|
||||
|
||||
16
3rdparty/imgui/src/imgui_freetype.cpp
vendored
16
3rdparty/imgui/src/imgui_freetype.cpp
vendored
@@ -344,7 +344,7 @@ static void* FreeType_Realloc(FT_Memory /*memory*/, long cur_size, long new_size
|
||||
return block;
|
||||
}
|
||||
|
||||
bool ImGui_ImplFreeType_LoaderInit(ImFontAtlas* atlas)
|
||||
static bool ImGui_ImplFreeType_LoaderInit(ImFontAtlas* atlas)
|
||||
{
|
||||
IM_ASSERT(atlas->FontLoaderData == nullptr);
|
||||
ImGui_ImplFreeType_Data* bd = IM_NEW(ImGui_ImplFreeType_Data)();
|
||||
@@ -384,7 +384,7 @@ bool ImGui_ImplFreeType_LoaderInit(ImFontAtlas* atlas)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImGui_ImplFreeType_LoaderShutdown(ImFontAtlas* atlas)
|
||||
static void ImGui_ImplFreeType_LoaderShutdown(ImFontAtlas* atlas)
|
||||
{
|
||||
ImGui_ImplFreeType_Data* bd = (ImGui_ImplFreeType_Data*)atlas->FontLoaderData;
|
||||
IM_ASSERT(bd != nullptr);
|
||||
@@ -393,7 +393,7 @@ void ImGui_ImplFreeType_LoaderShutdown(ImFontAtlas* atlas)
|
||||
atlas->FontLoaderData = nullptr;
|
||||
}
|
||||
|
||||
bool ImGui_ImplFreeType_FontSrcInit(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
static bool ImGui_ImplFreeType_FontSrcInit(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
{
|
||||
ImGui_ImplFreeType_Data* bd = (ImGui_ImplFreeType_Data*)atlas->FontLoaderData;
|
||||
ImGui_ImplFreeType_FontSrcData* bd_font_data = IM_NEW(ImGui_ImplFreeType_FontSrcData);
|
||||
@@ -410,7 +410,7 @@ bool ImGui_ImplFreeType_FontSrcInit(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImGui_ImplFreeType_FontSrcDestroy(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
static void ImGui_ImplFreeType_FontSrcDestroy(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
{
|
||||
IM_UNUSED(atlas);
|
||||
ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
|
||||
@@ -418,7 +418,7 @@ void ImGui_ImplFreeType_FontSrcDestroy(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
src->FontLoaderData = nullptr;
|
||||
}
|
||||
|
||||
bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
|
||||
static bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
|
||||
{
|
||||
IM_UNUSED(atlas);
|
||||
float size = baked->Size;
|
||||
@@ -464,7 +464,7 @@ bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* src, ImF
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImGui_ImplFreeType_FontBakedDestroy(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
|
||||
static void ImGui_ImplFreeType_FontBakedDestroy(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
|
||||
{
|
||||
IM_UNUSED(atlas);
|
||||
IM_UNUSED(baked);
|
||||
@@ -475,7 +475,7 @@ void ImGui_ImplFreeType_FontBakedDestroy(ImFontAtlas* atlas, ImFontConfig* src,
|
||||
bd_baked_data->~ImGui_ImplFreeType_FontSrcBakedData(); // ~IM_PLACEMENT_DELETE()
|
||||
}
|
||||
|
||||
bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph, float* out_advance_x)
|
||||
static bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph, float* out_advance_x)
|
||||
{
|
||||
ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
|
||||
uint32_t glyph_index = FT_Get_Char_Index(bd_font_data->FtFace, codepoint);
|
||||
@@ -566,7 +566,7 @@ bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ImGui_ImplFreetype_FontSrcContainsGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint)
|
||||
static bool ImGui_ImplFreetype_FontSrcContainsGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint)
|
||||
{
|
||||
IM_UNUSED(atlas);
|
||||
ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
|
||||
|
||||
13
3rdparty/imgui/src/imgui_tables.cpp
vendored
13
3rdparty/imgui/src/imgui_tables.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@@ -542,7 +542,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
|
||||
// Make table current
|
||||
g.CurrentTable = table;
|
||||
outer_window->DC.NavIsScrollPushableX = false; // Shortcut for NavUpdateCurrentWindowIsScrollPushableX();
|
||||
inner_window->DC.NavIsScrollPushableX = false; // Shortcut for NavUpdateCurrentWindowIsScrollPushableX();
|
||||
outer_window->DC.CurrentTableIdx = table_idx;
|
||||
if (inner_window != outer_window) // So EndChild() within the inner window can restore the table properly.
|
||||
inner_window->DC.CurrentTableIdx = table_idx;
|
||||
@@ -1825,6 +1825,11 @@ void ImGui::TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiTable* table = g.CurrentTable;
|
||||
IM_ASSERT(target != ImGuiTableBgTarget_None);
|
||||
if (table == NULL)
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(table != NULL, "Call should only be done while in BeginTable() scope!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (color == IM_COL32_DISABLE)
|
||||
color = 0;
|
||||
@@ -2876,9 +2881,7 @@ ImGuiTableSortSpecs* ImGui::TableGetSortSpecs()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiTable* table = g.CurrentTable;
|
||||
IM_ASSERT(table != NULL);
|
||||
|
||||
if (!(table->Flags & ImGuiTableFlags_Sortable))
|
||||
if (table == NULL || !(table->Flags & ImGuiTableFlags_Sortable))
|
||||
return NULL;
|
||||
|
||||
// Require layout (in case TableHeadersRow() hasn't been called) as it may alter IsSortSpecsDirty in some paths.
|
||||
|
||||
60
3rdparty/imgui/src/imgui_widgets.cpp
vendored
60
3rdparty/imgui/src/imgui_widgets.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.1
|
||||
// dear imgui, v1.92.2b
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
@@ -1830,27 +1830,31 @@ static int IMGUI_CDECL ShrinkWidthItemComparer(const void* lhs, const void* rhs)
|
||||
|
||||
// Shrink excess width from a set of item, by removing width from the larger items first.
|
||||
// Set items Width to -1.0f to disable shrinking this item.
|
||||
void ImGui::ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess)
|
||||
void ImGui::ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min)
|
||||
{
|
||||
if (count == 1)
|
||||
{
|
||||
if (items[0].Width >= 0.0f)
|
||||
items[0].Width = ImMax(items[0].Width - width_excess, 1.0f);
|
||||
items[0].Width = ImMax(items[0].Width - width_excess, width_min);
|
||||
return;
|
||||
}
|
||||
ImQsort(items, (size_t)count, sizeof(ImGuiShrinkWidthItem), ShrinkWidthItemComparer);
|
||||
ImQsort(items, (size_t)count, sizeof(ImGuiShrinkWidthItem), ShrinkWidthItemComparer); // Sort largest first, smallest last.
|
||||
int count_same_width = 1;
|
||||
while (width_excess > 0.0f && count_same_width < count)
|
||||
while (width_excess > 0.001f && count_same_width < count)
|
||||
{
|
||||
while (count_same_width < count && items[0].Width <= items[count_same_width].Width)
|
||||
count_same_width++;
|
||||
float max_width_to_remove_per_item = (count_same_width < count && items[count_same_width].Width >= 0.0f) ? (items[0].Width - items[count_same_width].Width) : (items[0].Width - 1.0f);
|
||||
max_width_to_remove_per_item = ImMin(items[0].Width - width_min, max_width_to_remove_per_item);
|
||||
if (max_width_to_remove_per_item <= 0.0f)
|
||||
break;
|
||||
float width_to_remove_per_item = ImMin(width_excess / count_same_width, max_width_to_remove_per_item);
|
||||
float base_width_to_remove_per_item = ImMin(width_excess / count_same_width, max_width_to_remove_per_item);
|
||||
for (int item_n = 0; item_n < count_same_width; item_n++)
|
||||
items[item_n].Width -= width_to_remove_per_item;
|
||||
width_excess -= width_to_remove_per_item * count_same_width;
|
||||
{
|
||||
float width_to_remove_for_this_item = ImMin(base_width_to_remove_per_item, items[item_n].Width - width_min);
|
||||
items[item_n].Width -= width_to_remove_for_this_item;
|
||||
width_excess -= width_to_remove_for_this_item;
|
||||
}
|
||||
}
|
||||
|
||||
// Round width and redistribute remainder
|
||||
@@ -4940,7 +4944,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
{
|
||||
// Determine if we turn Enter into a \n character
|
||||
bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0;
|
||||
if (!is_multiline || is_gamepad_validate || (ctrl_enter_for_new_line && !io.KeyCtrl) || (!ctrl_enter_for_new_line && io.KeyCtrl))
|
||||
if (!is_multiline || is_gamepad_validate || (ctrl_enter_for_new_line != io.KeyCtrl))
|
||||
{
|
||||
validated = true;
|
||||
if (io.ConfigInputTextEnterKeepActive && !is_multiline)
|
||||
@@ -8879,6 +8883,7 @@ void ImGui::EndMenuBar()
|
||||
|
||||
PopClipRect();
|
||||
PopID();
|
||||
IM_MSVC_WARNING_SUPPRESS(6011); // Static Analysis false positive "warning C6011: Dereferencing NULL pointer 'window'"
|
||||
window->DC.MenuBarOffset.x = window->DC.CursorPos.x - window->Pos.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
|
||||
|
||||
// FIXME: Extremely confusing, cleanup by (a) working on WorkRect stack system (b) not using a Group confusingly here.
|
||||
@@ -9358,6 +9363,7 @@ struct ImGuiTabBarSection
|
||||
{
|
||||
int TabCount; // Number of tabs in this section.
|
||||
float Width; // Sum of width of tabs in this section (after shrinking down)
|
||||
float WidthAfterShrinkMinWidth;
|
||||
float Spacing; // Horizontal spacing at the end of the section.
|
||||
|
||||
ImGuiTabBarSection() { memset(this, 0, sizeof(*this)); }
|
||||
@@ -9429,8 +9435,8 @@ bool ImGui::BeginTabBar(const char* str_id, ImGuiTabBarFlags flags)
|
||||
ImGuiTabBar* tab_bar = g.TabBars.GetOrAddByKey(id);
|
||||
ImRect tab_bar_bb = ImRect(window->DC.CursorPos.x, window->DC.CursorPos.y, window->WorkRect.Max.x, window->DC.CursorPos.y + g.FontSize + g.Style.FramePadding.y * 2);
|
||||
tab_bar->ID = id;
|
||||
tab_bar->SeparatorMinX = tab_bar->BarRect.Min.x - IM_TRUNC(window->WindowPadding.x * 0.5f);
|
||||
tab_bar->SeparatorMaxX = tab_bar->BarRect.Max.x + IM_TRUNC(window->WindowPadding.x * 0.5f);
|
||||
tab_bar->SeparatorMinX = tab_bar_bb.Min.x - IM_TRUNC(window->WindowPadding.x * 0.5f);
|
||||
tab_bar->SeparatorMaxX = tab_bar_bb.Max.x + IM_TRUNC(window->WindowPadding.x * 0.5f);
|
||||
//if (g.NavWindow && IsWindowChildOf(g.NavWindow, window, false, false))
|
||||
flags |= ImGuiTabBarFlags_IsFocused;
|
||||
return BeginTabBarEx(tab_bar, tab_bar_bb, flags);
|
||||
@@ -9550,6 +9556,10 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
ImGuiContext& g = *GImGui;
|
||||
tab_bar->WantLayout = false;
|
||||
|
||||
// Track selected tab when resizing our parent down
|
||||
const bool scroll_to_selected_tab = (tab_bar->BarRectPrevWidth > tab_bar->BarRect.GetWidth());
|
||||
tab_bar->BarRectPrevWidth = tab_bar->BarRect.GetWidth();
|
||||
|
||||
// Garbage collect by compacting list
|
||||
// Detect if we need to sort out tab list (e.g. in rare case where a tab changed section)
|
||||
int tab_dst_n = 0;
|
||||
@@ -9626,6 +9636,9 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
int shrink_buffer_indexes[3] = { 0, sections[0].TabCount + sections[2].TabCount, sections[0].TabCount };
|
||||
g.ShrinkWidthBuffer.resize(tab_bar->Tabs.Size);
|
||||
|
||||
// Minimum shrink width
|
||||
const float shrink_min_width = (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyMixed) ? g.Style.TabMinWidthShrink : 1.0f;
|
||||
|
||||
// Compute ideal tabs widths + store them into shrink buffer
|
||||
ImGuiTabItem* most_recently_selected_tab = NULL;
|
||||
int curr_section_n = -1;
|
||||
@@ -9648,10 +9661,13 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
const char* tab_name = TabBarGetTabName(tab_bar, tab);
|
||||
const bool has_close_button_or_unsaved_marker = (tab->Flags & ImGuiTabItemFlags_NoCloseButton) == 0 || (tab->Flags & ImGuiTabItemFlags_UnsavedDocument);
|
||||
tab->ContentWidth = (tab->RequestedWidth >= 0.0f) ? tab->RequestedWidth : TabItemCalcSize(tab_name, has_close_button_or_unsaved_marker).x;
|
||||
if ((tab->Flags & ImGuiTabItemFlags_Button) == 0)
|
||||
tab->ContentWidth = ImMax(tab->ContentWidth, g.Style.TabMinWidthBase);
|
||||
|
||||
int section_n = TabItemGetSectionIdx(tab);
|
||||
ImGuiTabBarSection* section = §ions[section_n];
|
||||
section->Width += tab->ContentWidth + (section_n == curr_section_n ? g.Style.ItemInnerSpacing.x : 0.0f);
|
||||
section->WidthAfterShrinkMinWidth += ImMin(tab->ContentWidth, shrink_min_width) + (section_n == curr_section_n ? g.Style.ItemInnerSpacing.x : 0.0f);
|
||||
curr_section_n = section_n;
|
||||
|
||||
// Store data so we can build an array sorted by width if we need to shrink tabs down
|
||||
@@ -9663,19 +9679,28 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
}
|
||||
|
||||
// Compute total ideal width (used for e.g. auto-resizing a window)
|
||||
float width_all_tabs_after_min_width_shrink = 0.0f;
|
||||
tab_bar->WidthAllTabsIdeal = 0.0f;
|
||||
for (int section_n = 0; section_n < 3; section_n++)
|
||||
{
|
||||
tab_bar->WidthAllTabsIdeal += sections[section_n].Width + sections[section_n].Spacing;
|
||||
width_all_tabs_after_min_width_shrink += sections[section_n].WidthAfterShrinkMinWidth + sections[section_n].Spacing;
|
||||
}
|
||||
|
||||
// Horizontal scrolling buttons
|
||||
// (note that TabBarScrollButtons() will alter BarRect.Max.x)
|
||||
if ((tab_bar->WidthAllTabsIdeal > tab_bar->BarRect.GetWidth() && tab_bar->Tabs.Size > 1) && !(tab_bar->Flags & ImGuiTabBarFlags_NoTabListScrollingButtons) && (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyScroll))
|
||||
// Important: note that TabBarScrollButtons() will alter BarRect.Max.x.
|
||||
const bool can_scroll = (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyScroll) || (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyMixed);
|
||||
const float width_all_tabs_to_use_for_scroll = (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyScroll) ? tab_bar->WidthAllTabs : width_all_tabs_after_min_width_shrink;
|
||||
tab_bar->ScrollButtonEnabled = ((width_all_tabs_to_use_for_scroll > tab_bar->BarRect.GetWidth() && tab_bar->Tabs.Size > 1) && !(tab_bar->Flags & ImGuiTabBarFlags_NoTabListScrollingButtons) && can_scroll);
|
||||
if (tab_bar->ScrollButtonEnabled)
|
||||
if (ImGuiTabItem* scroll_and_select_tab = TabBarScrollingButtons(tab_bar))
|
||||
{
|
||||
scroll_to_tab_id = scroll_and_select_tab->ID;
|
||||
if ((scroll_and_select_tab->Flags & ImGuiTabItemFlags_Button) == 0)
|
||||
tab_bar->SelectedTabId = scroll_to_tab_id;
|
||||
}
|
||||
if (scroll_to_tab_id == 0 && scroll_to_selected_tab)
|
||||
scroll_to_tab_id = tab_bar->SelectedTabId;
|
||||
|
||||
// Shrink widths if full tabs don't fit in their allocated space
|
||||
float section_0_w = sections[0].Width + sections[0].Spacing;
|
||||
@@ -9689,11 +9714,12 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
width_excess = (section_0_w + section_2_w) - tab_bar->BarRect.GetWidth(); // Excess used to shrink leading/trailing section
|
||||
|
||||
// With ImGuiTabBarFlags_FittingPolicyScroll policy, we will only shrink leading/trailing if the central section is not visible anymore
|
||||
if (width_excess >= 1.0f && ((tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyResizeDown) || !central_section_is_visible))
|
||||
const bool can_shrink = (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyShrink) || (tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyMixed);
|
||||
if (width_excess >= 1.0f && (can_shrink || !central_section_is_visible))
|
||||
{
|
||||
int shrink_data_count = (central_section_is_visible ? sections[1].TabCount : sections[0].TabCount + sections[2].TabCount);
|
||||
int shrink_data_offset = (central_section_is_visible ? sections[0].TabCount + sections[2].TabCount : 0);
|
||||
ShrinkWidths(g.ShrinkWidthBuffer.Data + shrink_data_offset, shrink_data_count, width_excess);
|
||||
ShrinkWidths(g.ShrinkWidthBuffer.Data + shrink_data_offset, shrink_data_count, width_excess, shrink_min_width);
|
||||
|
||||
// Apply shrunk values into tabs and sections
|
||||
for (int tab_n = shrink_data_offset; tab_n < shrink_data_offset + shrink_data_count; tab_n++)
|
||||
@@ -9748,7 +9774,7 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
||||
// Apply request requests
|
||||
if (scroll_to_tab_id != 0)
|
||||
TabBarScrollToTab(tab_bar, scroll_to_tab_id, sections);
|
||||
else if ((tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyScroll) && IsMouseHoveringRect(tab_bar->BarRect.Min, tab_bar->BarRect.Max, true) && IsWindowContentHoverable(g.CurrentWindow))
|
||||
else if (tab_bar->ScrollButtonEnabled && IsMouseHoveringRect(tab_bar->BarRect.Min, tab_bar->BarRect.Max, true) && IsWindowContentHoverable(g.CurrentWindow))
|
||||
{
|
||||
const float wheel = g.IO.MouseWheelRequestAxisSwap ? g.IO.MouseWheel : g.IO.MouseWheelH;
|
||||
const ImGuiKey wheel_key = g.IO.MouseWheelRequestAxisSwap ? ImGuiKey_MouseWheelY : ImGuiKey_MouseWheelX;
|
||||
@@ -10022,7 +10048,7 @@ static ImGuiTabItem* ImGui::TabBarScrollingButtons(ImGuiTabBar* tab_bar)
|
||||
|
||||
PushStyleColor(ImGuiCol_Text, arrow_col);
|
||||
PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
PushItemFlag(ImGuiItemFlags_ButtonRepeat, true);
|
||||
PushItemFlag(ImGuiItemFlags_ButtonRepeat | ImGuiItemFlags_NoNav, true);
|
||||
const float backup_repeat_delay = g.IO.KeyRepeatDelay;
|
||||
const float backup_repeat_rate = g.IO.KeyRepeatRate;
|
||||
g.IO.KeyRepeatDelay = 0.250f;
|
||||
|
||||
@@ -1701,6 +1701,8 @@ SCAJ-20074:
|
||||
SCAJ-20075:
|
||||
name: "Dragon Quest V - Bride of the Sky"
|
||||
region: "NTSC-Unk"
|
||||
roundModes:
|
||||
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
|
||||
SCAJ-20076:
|
||||
name: "Armored Core - Nexus [Disc 1]"
|
||||
region: "NTSC-Unk"
|
||||
@@ -2402,6 +2404,7 @@ SCAJ-20177:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SCAJ-20178:
|
||||
name: "Ape Escape - Million Monkeys"
|
||||
region: "NTSC-Unk"
|
||||
@@ -2521,6 +2524,7 @@ SCAJ-20197:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SCAJ-20198:
|
||||
name: "Everybody's Tennis [PlayStation2 the Best]"
|
||||
region: "NTSC-Unk"
|
||||
@@ -2983,6 +2987,7 @@ SCED-50642:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCED-50660:
|
||||
name: "Dropship - United Peace Force"
|
||||
region: "PAL-A"
|
||||
@@ -3798,8 +3803,11 @@ SCED-52461:
|
||||
SCED-52491:
|
||||
name: "Athens 2004"
|
||||
region: "PAL-M6"
|
||||
SCED-52496:
|
||||
name: "This Is Football 2004 [Demo]"
|
||||
region: "PAL-M4"
|
||||
SCED-52497:
|
||||
name: "This is Football 2004"
|
||||
name: "This Is Football 2004 [Demo]"
|
||||
region: "PAL-M4"
|
||||
SCED-52549:
|
||||
name: "Official PlayStation 2 Magazine Demo 47"
|
||||
@@ -4852,6 +4860,7 @@ SCES-50490:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCES-50491:
|
||||
name: "Final Fantasy X"
|
||||
region: "PAL-F"
|
||||
@@ -4866,12 +4875,13 @@ SCES-50491:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCES-50492:
|
||||
name: "Final Fantasy X"
|
||||
region: "PAL-G"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes interlacing.
|
||||
compat: 5
|
||||
roundModes:
|
||||
eeRoundMode: 2 # Fixes cutscene animations while slightly dislocating a few select meshes. Setting round mode to Chop/Zero or Nearest fixes the issues with meshes at the cost of breaking important cutscenes.
|
||||
clampModes:
|
||||
@@ -4881,6 +4891,7 @@ SCES-50492:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCES-50493:
|
||||
name: "Final Fantasy X"
|
||||
region: "PAL-I"
|
||||
@@ -4895,6 +4906,7 @@ SCES-50493:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCES-50494:
|
||||
name: "Final Fantasy X"
|
||||
region: "PAL-S"
|
||||
@@ -4909,6 +4921,7 @@ SCES-50494:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SCES-50499:
|
||||
name: "Ecco the Dolphin - Defender of the Future"
|
||||
region: "PAL-M5"
|
||||
@@ -7639,6 +7652,7 @@ SCKA-20079:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SCKA-20081:
|
||||
name: "Tekken 5 [PlayStation 2 Big Hit Series]"
|
||||
region: "NTSC-K"
|
||||
@@ -7677,14 +7691,18 @@ SCKA-20086:
|
||||
name: "Shin Onimusha - Dawn of Dreams [Disc 1 of 2]"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
SCKA-20087:
|
||||
name: "Shin Onimusha - Dawn of Dreams [Disc 2 of 2]"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SCKA-20086"
|
||||
SCKA-20088:
|
||||
@@ -13854,7 +13872,7 @@ SLED-53731:
|
||||
name: "Battlefield 2 - Modern Combat [Demo]"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -24102,7 +24120,7 @@ SLES-53729:
|
||||
name: "Battlefield 2 - Modern Combat"
|
||||
region: "PAL-M4"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -24112,7 +24130,7 @@ SLES-53730:
|
||||
name: "Battlefield 2 - Modern Combat"
|
||||
region: "PAL-M3"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -24864,6 +24882,12 @@ SLES-53996:
|
||||
name: "Army Men - Major Malfunction"
|
||||
region: "PAL-E"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 4 # Fixes missing text glow.
|
||||
halfPixelOffset: 5 # Fixes misaligned bloom.
|
||||
nativeScaling: 1 # Fixes misaligned bloom.
|
||||
textureInsideRT: 1 # Fixes bottom half rendering and corrupted shadows.
|
||||
PCRTCOverscan: 1 # Adjusts image upwards to center it correctly.
|
||||
SLES-53998:
|
||||
name: "OutRun 2006 - Coast 2 Coast"
|
||||
region: "PAL-M5"
|
||||
@@ -26058,6 +26082,9 @@ SLES-54382:
|
||||
name: "Jumanji"
|
||||
region: "PAL-M6"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2 # Fixes blending issues during the intro.
|
||||
textureInsideRT: 1 # Fixes half right.
|
||||
SLES-54383:
|
||||
name: "Casper and The Ghostly Trio"
|
||||
region: "PAL-M6"
|
||||
@@ -26180,6 +26207,9 @@ SLES-54426:
|
||||
SLES-54427:
|
||||
name: "Jumanji"
|
||||
region: "PAL-M6"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2 # Fixes blending issues during the intro.
|
||||
textureInsideRT: 1 # Fixes half right.
|
||||
SLES-54430:
|
||||
name: "Teen Titans"
|
||||
region: "PAL-E-F"
|
||||
@@ -26209,11 +26239,14 @@ SLES-54434:
|
||||
name: "Babe"
|
||||
region: "PAL-A"
|
||||
SLES-54435:
|
||||
name: "Babe"
|
||||
name: "Casper and the Ghostly Trio"
|
||||
region: "PAL-A"
|
||||
SLES-54436:
|
||||
name: "Jumanji"
|
||||
region: "PAL-A"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 2 # Fixes blending issues during the intro.
|
||||
textureInsideRT: 1 # Fixes half right.
|
||||
SLES-54437:
|
||||
name: "The King of Fighters XI"
|
||||
name-sort: "King of Fighters XI, The"
|
||||
@@ -26498,8 +26531,11 @@ SLES-54508:
|
||||
name: "National Geographic - Safari Adventures Africa"
|
||||
region: "PAL-M6"
|
||||
SLES-54510:
|
||||
name: "Meet the Robinsons"
|
||||
name: "Walt Disney Pictures Presents Meet the Robinsons"
|
||||
region: "PAL-M3"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes bloom alignment.
|
||||
nativeScaling: 1 # Fixes bloom effects.
|
||||
SLES-54511:
|
||||
name: "UEFA Champions League 2006-2007"
|
||||
region: "PAL-E"
|
||||
@@ -26712,7 +26748,8 @@ SLES-54584:
|
||||
name: "Pac-Man Rally"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes depth line.
|
||||
textureInsideRT: 1 # Fixes Half blackscreen on the splitscreen couch co-op mode.
|
||||
halfPixelOffset: 5 # Fixes depth line.
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes bad geometry.
|
||||
SLES-54586:
|
||||
@@ -26876,6 +26913,7 @@ SLES-54644:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLES-54645:
|
||||
name: "Valkyrie Profile 2 - Silmeria"
|
||||
region: "PAL-F"
|
||||
@@ -26886,6 +26924,7 @@ SLES-54645:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLES-54646:
|
||||
name: "Valkyrie Profile 2 - Silmeria"
|
||||
region: "PAL-G"
|
||||
@@ -26897,6 +26936,7 @@ SLES-54646:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLES-54647:
|
||||
name: "Valkyrie Profile 2 - Silmeria"
|
||||
region: "PAL-I"
|
||||
@@ -26908,6 +26948,7 @@ SLES-54647:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLES-54648:
|
||||
name: "Valkyrie Profile 2 - Silmeria"
|
||||
region: "PAL-S"
|
||||
@@ -26918,6 +26959,7 @@ SLES-54648:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLES-54653:
|
||||
name: "Freak Out - Extreme Freeride"
|
||||
region: "PAL-M5"
|
||||
@@ -27016,8 +27058,11 @@ SLES-54677:
|
||||
region: "PAL-E"
|
||||
compat: 5
|
||||
SLES-54679:
|
||||
name: "Metal Slug - Anthology"
|
||||
name: "Walt Disney Pictures Presents Meet the Robinsons"
|
||||
region: "PAL-M3"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes bloom alignment.
|
||||
nativeScaling: 1 # Fixes bloom effects.
|
||||
SLES-54681:
|
||||
name: "Burnout Dominator"
|
||||
region: "PAL-E"
|
||||
@@ -30052,13 +30097,19 @@ SLES-55676:
|
||||
SLES-82001:
|
||||
name: "Summoner"
|
||||
region: "PAL-E"
|
||||
clampModes:
|
||||
eeClampMode: 2 # Fixes missing shadows and indicators.
|
||||
SLES-82003:
|
||||
name: "Summoner"
|
||||
region: "PAL-F"
|
||||
clampModes:
|
||||
eeClampMode: 2 # Fixes missing shadows and indicators.
|
||||
SLES-82005:
|
||||
name: "Summoner"
|
||||
region: "PAL-G"
|
||||
compat: 5
|
||||
clampModes:
|
||||
eeClampMode: 2 # Fixes missing shadows and indicators.
|
||||
SLES-82009:
|
||||
name: "Metal Gear Solid 2 - Substance"
|
||||
region: "PAL-M5"
|
||||
@@ -30215,15 +30266,19 @@ SLES-82038:
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
SLES-82039:
|
||||
name: "Onimusha - Dawn of Dreams [Disc 2 of 2]"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLES-82038"
|
||||
SLES-82042:
|
||||
@@ -31403,6 +31458,7 @@ SLKA-25214:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLKA-25215:
|
||||
name: "Shining Wind"
|
||||
region: "NTSC-K"
|
||||
@@ -32851,7 +32907,7 @@ SLPM-55034:
|
||||
name-en: "Battlefield 2 - Modern Combat [EA:SY! 1980]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -40674,6 +40730,7 @@ SLPM-65115:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPM-65116:
|
||||
name: "リリーのアトリエ プラス ~ザールブルグの錬金術士3~"
|
||||
name-sort: "りりーのあとりえ ぷらす ~ざーるぶるぐのれんきんじゅつし3~"
|
||||
@@ -43192,6 +43249,8 @@ SLPM-65555:
|
||||
name-en: "Dragon Quest V - Tenkuu no Hanayome"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
roundModes:
|
||||
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
|
||||
SLPM-65556:
|
||||
name: "信長の野望・天下創世"
|
||||
name-sort: "のぶながのやぼう てんかそうせい"
|
||||
@@ -46569,6 +46628,7 @@ SLPM-66124:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPM-66125:
|
||||
name: "ファイナルファンタジーⅩ-2 [Ultimate Hits]"
|
||||
name-sort: "ふぁいなるふぁんたじー10-2 [Ultimate Hits]"
|
||||
@@ -47075,7 +47135,7 @@ SLPM-66206:
|
||||
name-en: "Battlefield 2 - Modern Combat"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -47550,8 +47610,10 @@ SLPM-66275:
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
SLPM-66276:
|
||||
name: "新 鬼武者 DAWN OF DREAMS [ディスク2/2]"
|
||||
name-sort: "しん おにむしゃ DAWN OF DREAMS [でぃすく2/2]"
|
||||
@@ -47559,8 +47621,10 @@ SLPM-66276:
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLPM-66275"
|
||||
SLPM-66277:
|
||||
@@ -48427,6 +48491,7 @@ SLPM-66419:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLPM-66420:
|
||||
name: "フロントミッション4 [Ultimate Hits]"
|
||||
name-sort: "ふろんとみっしょん4 [Ultimate Hits]"
|
||||
@@ -48850,6 +48915,8 @@ SLPM-66480:
|
||||
name-en: "Dragon Quest V - Tenkuu no Hanayome [Ultimate Hits]"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
roundModes:
|
||||
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
|
||||
SLPM-66481:
|
||||
name: "ドラゴンクエストⅧ 空と海と大地と呪われし姫君 [Ultimate Hits]"
|
||||
name-sort: "どらごんくえすと8 そらとうみとだいちとのろわれしひめぎみ [Ultimate Hits]"
|
||||
@@ -49885,7 +49952,7 @@ SLPM-66651:
|
||||
name-en: "Battlefield 2 - Modern Combat [EA Best Hits]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -50087,6 +50154,7 @@ SLPM-66677:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPM-66678:
|
||||
name: "ファイナルファンタジーⅩ-2 インターナショナル+ラストミッション [Ultimate Hits]"
|
||||
name-sort: "ふぁいなるふぁんたじー10-2 いんたーなしょなる+らすとみっしょん [Ultimate Hits]"
|
||||
@@ -50742,6 +50810,7 @@ SLPM-66782:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLPM-66783:
|
||||
name: "アイドル雀士 スーチーパイⅣ 「完全限定版・コレクターズエディション」"
|
||||
name-sort: "あいどるじゃんし すーちーぱい4 [かんぜんげんていばん・これくたーずえでぃしょん]"
|
||||
@@ -51024,8 +51093,11 @@ SLPM-66829:
|
||||
SLPM-66830:
|
||||
name: "ルイスと未来泥棒"
|
||||
name-sort: "るいすとみらいどろぼう"
|
||||
name-en: "Lewis and the Future Thief"
|
||||
name-en: "Walt Disney Pictures Presents Lewis to Mirai Dorobou - Wilbur no Kiken na Jikan Ryokou"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes bloom alignment.
|
||||
nativeScaling: 1 # Fixes bloom effects.
|
||||
SLPM-66832:
|
||||
name: "テニスの王子様 ドキドキサバイバル 海辺のSecret [KONAMI The Best]"
|
||||
name-sort: "てにすのおうじさま どきどきさばいばる うみべのしーくれっと [KONAMI The Best]"
|
||||
@@ -52148,6 +52220,7 @@ SLPM-67513:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPM-67514:
|
||||
name: "Kessen"
|
||||
region: "NTSC-K"
|
||||
@@ -52764,8 +52837,10 @@ SLPM-74232:
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Wrong white textures in FMV.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLPM-66275"
|
||||
SLPM-74233:
|
||||
@@ -52774,8 +52849,10 @@ SLPM-74233:
|
||||
name-en: "Shin Onimusha - Dawn of Dreams [PlayStation2 the Best] [Disc 2 of 2]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLPM-74232"
|
||||
SLPM-74234:
|
||||
@@ -52923,8 +53000,10 @@ SLPM-74251:
|
||||
name-en: "Shin Onimusha - Dawn of Dreams [PlayStation 2 the Best - Reprint Disc 1]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLPM-66275"
|
||||
SLPM-74252:
|
||||
@@ -52933,8 +53012,10 @@ SLPM-74252:
|
||||
name-en: "Shin Onimusha - Dawn of Dreams [PlayStation 2 the Best - Reprint Disc 2]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLPM-74251"
|
||||
SLPM-74253:
|
||||
@@ -56186,6 +56267,7 @@ SLPS-25050:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPS-25051:
|
||||
name: "Missing Blue [通常版]"
|
||||
name-sort: "みっしんぐ ぶるー [つうじょうばん]"
|
||||
@@ -56256,11 +56338,15 @@ SLPS-25060:
|
||||
name-sort: "きどうせんしがんだむ めぐりあいそら [げんていばん]"
|
||||
name-en: "Mobile Suit Gundam - Meguriai Sora [Limited Edition]"
|
||||
region: "NTSC-J"
|
||||
memcardFilters:
|
||||
- "SLPS-25062"
|
||||
SLPS-25061:
|
||||
name: "機動戦士ガンダムVer.1.5 [限定版]"
|
||||
name-sort: "きどうせんしがんだむVer.1.5 [げんていばん]"
|
||||
name-en: "Mobile Suit Gundam Ver.1.5 [Limited Edition]"
|
||||
region: "NTSC-J"
|
||||
memcardFilters:
|
||||
- "SLPS-25063"
|
||||
SLPS-25062:
|
||||
name: "機動戦士ガンダム めぐりあい宇宙 [DVD同梱版]"
|
||||
name-sort: "きどうせんしがんだむ めぐりあいそら [DVDどうこんばん]"
|
||||
@@ -56414,6 +56500,7 @@ SLPS-25088:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPS-25089:
|
||||
name: "SALT LAKE 2002"
|
||||
name-sort: "そるとれいく 2002"
|
||||
@@ -61839,6 +61926,7 @@ SLPS-72501:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLPS-72502:
|
||||
name: "テイルズ オブ デスティニー2 [MEGA HITS!]"
|
||||
name-sort: "ているず おぶ ですてぃにー2 [MEGA HITS!]"
|
||||
@@ -63028,6 +63116,8 @@ SLUS-20074:
|
||||
name: "Summoner"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
clampModes:
|
||||
eeClampMode: 2 # Fixes missing shadows and indicators.
|
||||
SLUS-20075:
|
||||
name: "Disney's Jungle Book - Rhythm & Groove"
|
||||
region: "NTSC-U"
|
||||
@@ -64064,6 +64154,7 @@ SLUS-20312:
|
||||
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
|
||||
roundSprite: 2 # Fixes font artifacts.
|
||||
autoFlush: 1 # Fixes blur effect on attacks.
|
||||
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
|
||||
SLUS-20313:
|
||||
name: "Wave Rally"
|
||||
region: "NTSC-U"
|
||||
@@ -68058,7 +68149,7 @@ SLUS-21026:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -68947,8 +69038,10 @@ SLUS-21180:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
SLUS-21181:
|
||||
name: "D.I.C.E. - DNA Integrated Cybernetic Enterprises"
|
||||
region: "NTSC-U"
|
||||
@@ -70039,7 +70132,7 @@ SLUS-21328:
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes bad geometry.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes depth line.
|
||||
halfPixelOffset: 5 # Fixes depth line.
|
||||
patches:
|
||||
default:
|
||||
content: |-
|
||||
@@ -70295,8 +70388,10 @@ SLUS-21362:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Mostly aligns post-processing.
|
||||
recommendedBlendingLevel: 2 # Improves brightness.
|
||||
halfPixelOffset: 5 # Mostly aligns post-processing.
|
||||
nativeScaling: 2 # Fixes post-processing smoothness and position.
|
||||
bilinearUpscale: 2 # Attempts to sharpen blurry text in menus.
|
||||
memcardFilters:
|
||||
- "SLUS-21180"
|
||||
SLUS-21363:
|
||||
@@ -70909,10 +71004,14 @@ SLUS-21452:
|
||||
textureInsideRT: 1 # Required for swirl battle transition.
|
||||
nativeScaling: 2 # Fixes depth of field effects and bloom.
|
||||
roundSprite: 1 # Fixes lines in transitions.
|
||||
autoFlush: 2 # Fixes shadow rendering in certain scenarios when using DirectX.
|
||||
SLUS-21453:
|
||||
name: "Meet the Robinsons"
|
||||
name: "Walt Disney Pictures Presents Meet the Robinsons"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 5 # Fixes bloom alignment.
|
||||
nativeScaling: 1 # Fixes bloom effects.
|
||||
SLUS-21454:
|
||||
name: "DreamWorks Shrek the Third"
|
||||
region: "NTSC-U"
|
||||
@@ -74138,7 +74237,7 @@ SLUS-29117:
|
||||
name: "Battlefield 2 - Modern Combat [Public Beta Vol.1.0]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -74294,7 +74393,7 @@ SLUS-29152:
|
||||
name: "Battlefield 2 - Modern Combat [Regular Demo]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
@@ -74411,7 +74510,7 @@ SLUS-29172:
|
||||
name: "Battlefield 2 - Modern Combat [Demo]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
|
||||
autoFlush: 1 # Post-processing.
|
||||
halfPixelOffset: 2 # Offset post-processing.
|
||||
texturePreloading: 1 # Improves performance.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
93
bin/resources/fonts/NotoColorEmoji-Regular-license
Normal file
93
bin/resources/fonts/NotoColorEmoji-Regular-license
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2021 Google Inc. All Rights Reserved.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
bin/resources/fonts/NotoColorEmoji-Regular.ttf
Normal file
BIN
bin/resources/fonts/NotoColorEmoji-Regular.ttf
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -10,6 +10,7 @@
|
||||
03000000d0160000060d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
|
||||
03000000d0160000070d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
|
||||
03000000d0160000600a000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
|
||||
03000000c82d00001930000000000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b11,platform:Windows,
|
||||
03000000c82d00000031000000000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00000531000000000000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00000951000000000000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightx:a3,righty:a5,start:b11,platform:Windows,
|
||||
@@ -50,6 +51,7 @@
|
||||
03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000361000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000660000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000960000000000000,8BitDo Pro 3,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b17,paddle2:b16,paddle3:b2,paddle4:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000131000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000231000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000331000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
|
||||
@@ -822,7 +824,7 @@
|
||||
030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000fd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000ff02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000ff02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006f0e0000a802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006f0e0000c802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000c62400003a54000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
@@ -843,6 +845,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
|
||||
# Mac OS X
|
||||
030000008f0e00000300000009010000,2 In 1 Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
|
||||
03000000c82d00001930000000020000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
|
||||
03000000c82d00001930000001000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
|
||||
03000000c82d00000031000001000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00000531000000020000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
|
||||
@@ -1148,6 +1152,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000120c0000101e000000010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
|
||||
# Linux
|
||||
03000000c82d00001930000011010000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
|
||||
05000000c82d00001930000001000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
|
||||
03000000c82d00000031000011010000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00000631000000010000,8BitDo Adapter 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Linux,
|
||||
@@ -1625,7 +1631,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
0300132d9b2800006500000001010000,Raphnet GameCube Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
|
||||
030000009b2800003200000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
|
||||
030000009b2800006000000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
|
||||
030000009b2800003c00000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
|
||||
030000009b2800006100000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
|
||||
030000009b2800006300000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
|
||||
030000009b2800006400000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
|
||||
030000009b2800008000000020020000,Raphnet Wii Classic Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Linux,
|
||||
030000009b2800008000000001010000,Raphnet Wii Classic Adapter V3,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Linux,
|
||||
@@ -1683,10 +1691,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000790000001100000011010000,Sega Saturn,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000790000002201000011010000,Sega Saturn,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000b40400000a01000000010000,Sega Saturn,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Linux,
|
||||
03000000632500002305000010010000,ShanWan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000632500002305000010010000,Shanwan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000632500002605000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000632500007505000010010000,Shanwan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000bc2000000055000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000bc2000000055000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000f025000021c1000010010000,Shanwan Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000341a00000908000010010000,SL6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000004b2900000430000011000000,Snakebyte Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1825,6 +1833,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
060000005e040000120b00000d050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
060000005e040000120b00000f050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
050000005e040000130b000022050000,Xbox Series X Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
060000005e040000120b000011050000,Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
050000005e040000200b000013050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000005e040000200b000017050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000005e040000200b000023050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
|
||||
@@ -18,7 +18,7 @@ find_package(Zstd 1.5.5 REQUIRED)
|
||||
find_package(LZ4 REQUIRED)
|
||||
find_package(WebP REQUIRED) # v1.3.2, spews an error on Linux because no pkg-config.
|
||||
find_package(SDL3 3.2.6 REQUIRED)
|
||||
find_package(Freetype 2.11.1 REQUIRED)
|
||||
find_package(Freetype 2.12 REQUIRED)
|
||||
find_package(plutovg 1.1.0 REQUIRED)
|
||||
find_package(plutosvg 0.0.7 REQUIRED)
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ target_sources(common PRIVATE
|
||||
|
||||
if(_M_X86)
|
||||
target_sources(common PRIVATE
|
||||
emitter/avx.cpp
|
||||
emitter/bmi.cpp
|
||||
emitter/fpu.cpp
|
||||
emitter/groups.cpp
|
||||
@@ -174,9 +173,6 @@ else()
|
||||
target_compile_definitions(common PRIVATE "HAS_LIBBACKTRACE=1")
|
||||
target_link_libraries(common PRIVATE libbacktrace::libbacktrace)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
target_link_libraries(common PRIVATE cpuinfo)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
@@ -206,6 +202,7 @@ target_link_libraries(common PRIVATE
|
||||
JPEG::JPEG
|
||||
PNG::PNG
|
||||
WebP::libwebp
|
||||
cpuinfo
|
||||
)
|
||||
|
||||
target_link_libraries(common PUBLIC
|
||||
|
||||
@@ -335,7 +335,7 @@ bool Log::SetFileOutputLevel(LOGLEVEL level, std::string path)
|
||||
|
||||
const bool was_enabled = (s_file_level > LOGLEVEL_NONE);
|
||||
const bool new_enabled = (level > LOGLEVEL_NONE && !path.empty());
|
||||
if (was_enabled != new_enabled || (new_enabled && path == s_file_path))
|
||||
if (was_enabled != new_enabled || (new_enabled && path != s_file_path))
|
||||
{
|
||||
if (new_enabled)
|
||||
{
|
||||
|
||||
@@ -271,7 +271,7 @@ std::vector<DarwinMisc::CPUClass> DarwinMisc::GetCPUClasses()
|
||||
}
|
||||
else if (std::optional<u32> physcpu = sysctlbyname_T<u32>("hw.physicalcpu"))
|
||||
{
|
||||
out.push_back({"Default", *physcpu, sysctlbyname_T<u32>("hw.logicalcpu").value_or(0)});
|
||||
out.push_back({"Default", *physcpu, sysctlbyname_T<u32>("hw.logicalcpu").value_or(*physcpu)});
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -281,6 +281,35 @@ std::vector<DarwinMisc::CPUClass> DarwinMisc::GetCPUClasses()
|
||||
return out;
|
||||
}
|
||||
|
||||
static CPUInfo CalcCPUInfo()
|
||||
{
|
||||
CPUInfo out;
|
||||
char name[256];
|
||||
size_t name_size = sizeof(name);
|
||||
if (0 != sysctlbyname("machdep.cpu.brand_string", name, &name_size, nullptr, 0))
|
||||
strcpy(name, "Unknown");
|
||||
out.name = name;
|
||||
if (sysctlbyname_T<u32>("sysctl.proc_translated").value_or(0))
|
||||
out.name += " (Rosetta)";
|
||||
std::vector<DarwinMisc::CPUClass> classes = DarwinMisc::GetCPUClasses();
|
||||
out.num_clusters = static_cast<u32>(classes.size());
|
||||
out.num_big_cores = classes.empty() ? 0 : classes[0].num_physical;
|
||||
out.num_threads = classes.empty() ? 0 : classes[0].num_logical;
|
||||
out.num_small_cores = 0;
|
||||
for (std::size_t i = 1; i < classes.size(); i++)
|
||||
{
|
||||
out.num_small_cores += classes[i].num_physical;
|
||||
out.num_threads += classes[i].num_logical;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
const CPUInfo& GetCPUInfo()
|
||||
{
|
||||
static const CPUInfo info = CalcCPUInfo();
|
||||
return info;
|
||||
}
|
||||
|
||||
size_t HostSys::GetRuntimePageSize()
|
||||
{
|
||||
return sysctlbyname_T<u32>("hw.pagesize").value_or(0);
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#include "Console.h"
|
||||
#include "VectorIntrin.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include "cpuinfo.h"
|
||||
#endif
|
||||
|
||||
static u32 PAUSE_TIME = 0;
|
||||
|
||||
static void MultiPause()
|
||||
@@ -135,3 +139,43 @@ void AbortWithMessage(const char* msg)
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
// MacOS version is in DarwinMisc
|
||||
static CPUInfo CalcCPUInfo()
|
||||
{
|
||||
CPUInfo out;
|
||||
out.name = cpuinfo_get_package(0)->name;
|
||||
out.num_threads = cpuinfo_get_processors_count();
|
||||
out.num_clusters = cpuinfo_get_clusters_count();
|
||||
out.num_big_cores = 0;
|
||||
out.num_small_cores = 0;
|
||||
const cpuinfo_cluster* clusters = cpuinfo_get_clusters();
|
||||
uint64_t big_freq = 0;
|
||||
for (uint32_t i = 0; i < out.num_clusters; i++)
|
||||
{
|
||||
const cpuinfo_cluster& cluster = clusters[i];
|
||||
if (cluster.frequency > big_freq)
|
||||
{
|
||||
out.num_small_cores += out.num_big_cores;
|
||||
out.num_big_cores = cluster.core_count;
|
||||
big_freq = cluster.frequency;
|
||||
}
|
||||
else if (cluster.frequency == big_freq)
|
||||
{
|
||||
out.num_big_cores += cluster.core_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
out.num_small_cores += cluster.core_count;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
const CPUInfo& GetCPUInfo()
|
||||
{
|
||||
static const CPUInfo info = CalcCPUInfo();
|
||||
return info;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -192,6 +192,16 @@ extern const u32 SPIN_TIME_NS;
|
||||
|
||||
extern std::string GetOSVersionString();
|
||||
|
||||
struct CPUInfo {
|
||||
std::string name;
|
||||
u32 num_big_cores;
|
||||
u32 num_small_cores;
|
||||
u32 num_threads;
|
||||
u32 num_clusters;
|
||||
};
|
||||
|
||||
const CPUInfo& GetCPUInfo();
|
||||
|
||||
namespace Common
|
||||
{
|
||||
/// Enables or disables the screen saver from starting.
|
||||
|
||||
@@ -600,7 +600,7 @@ bool SmallStringBase::starts_with(const char* str, bool case_sensitive) const
|
||||
return false;
|
||||
|
||||
return (case_sensitive) ? (std::strncmp(str, m_buffer, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str, m_buffer, other_length) == 0);
|
||||
(CASE_N_COMPARE(str, m_buffer, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::starts_with(const SmallStringBase& str, bool case_sensitive) const
|
||||
@@ -610,7 +610,7 @@ bool SmallStringBase::starts_with(const SmallStringBase& str, bool case_sensitiv
|
||||
return false;
|
||||
|
||||
return (case_sensitive) ? (std::strncmp(str.m_buffer, m_buffer, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.m_buffer, m_buffer, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.m_buffer, m_buffer, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::starts_with(const std::string_view str, bool case_sensitive) const
|
||||
@@ -620,7 +620,7 @@ bool SmallStringBase::starts_with(const std::string_view str, bool case_sensitiv
|
||||
return false;
|
||||
|
||||
return (case_sensitive) ? (std::strncmp(str.data(), m_buffer, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.data(), m_buffer, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.data(), m_buffer, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::starts_with(const std::string& str, bool case_sensitive) const
|
||||
@@ -630,7 +630,7 @@ bool SmallStringBase::starts_with(const std::string& str, bool case_sensitive) c
|
||||
return false;
|
||||
|
||||
return (case_sensitive) ? (std::strncmp(str.data(), m_buffer, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.data(), m_buffer, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.data(), m_buffer, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::ends_with(const char* str, bool case_sensitive) const
|
||||
@@ -641,7 +641,7 @@ bool SmallStringBase::ends_with(const char* str, bool case_sensitive) const
|
||||
|
||||
u32 start_offset = m_length - other_length;
|
||||
return (case_sensitive) ? (std::strncmp(str, m_buffer + start_offset, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str, m_buffer + start_offset, other_length) == 0);
|
||||
(CASE_N_COMPARE(str, m_buffer + start_offset, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::ends_with(const SmallStringBase& str, bool case_sensitive) const
|
||||
@@ -652,7 +652,7 @@ bool SmallStringBase::ends_with(const SmallStringBase& str, bool case_sensitive)
|
||||
|
||||
const u32 start_offset = m_length - other_length;
|
||||
return (case_sensitive) ? (std::strncmp(str.m_buffer, m_buffer + start_offset, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.m_buffer, m_buffer + start_offset, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.m_buffer, m_buffer + start_offset, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::ends_with(const std::string_view str, bool case_sensitive) const
|
||||
@@ -663,7 +663,7 @@ bool SmallStringBase::ends_with(const std::string_view str, bool case_sensitive)
|
||||
|
||||
const u32 start_offset = m_length - other_length;
|
||||
return (case_sensitive) ? (std::strncmp(str.data(), m_buffer + start_offset, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.data(), m_buffer + start_offset, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.data(), m_buffer + start_offset, other_length) == 0);
|
||||
}
|
||||
|
||||
bool SmallStringBase::ends_with(const std::string& str, bool case_sensitive) const
|
||||
@@ -674,7 +674,7 @@ bool SmallStringBase::ends_with(const std::string& str, bool case_sensitive) con
|
||||
|
||||
const u32 start_offset = m_length - other_length;
|
||||
return (case_sensitive) ? (std::strncmp(str.data(), m_buffer + start_offset, other_length) == 0) :
|
||||
(CASE_N_COMPARE(str.data(), m_buffer + start_offset, other_length) == 0);
|
||||
(CASE_N_COMPARE(str.data(), m_buffer + start_offset, other_length) == 0);
|
||||
}
|
||||
|
||||
void SmallStringBase::clear()
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\cpuinfo\include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\fast_float\include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\fmt\include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\jpgd</AdditionalIncludeDirectories>
|
||||
@@ -79,9 +80,6 @@
|
||||
<ClCompile Include="Windows\WinThreads.cpp" />
|
||||
<ClCompile Include="HostSys.cpp" />
|
||||
<ClCompile Include="Semaphore.cpp" />
|
||||
<ClCompile Include="emitter\avx.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="emitter\bmi.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@@ -191,4 +189,4 @@
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "common/emitter/internal.h"
|
||||
|
||||
// warning: suggest braces around initialization of subobject [-Wmissing-braces]
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wmissing-braces"
|
||||
#endif
|
||||
|
||||
namespace x86Emitter
|
||||
{
|
||||
const xImplAVX_Move xVMOVAPS = {0x00, 0x28, 0x29};
|
||||
const xImplAVX_Move xVMOVUPS = {0x00, 0x10, 0x11};
|
||||
|
||||
const xImplAVX_ArithFloat xVADD = {
|
||||
{0x00, 0x58}, // VADDPS
|
||||
{0x66, 0x58}, // VADDPD
|
||||
{0xF3, 0x58}, // VADDSS
|
||||
{0xF2, 0x58}, // VADDSD
|
||||
};
|
||||
const xImplAVX_ArithFloat xVSUB = {
|
||||
{0x00, 0x5C}, // VSUBPS
|
||||
{0x66, 0x5C}, // VSUBPD
|
||||
{0xF3, 0x5C}, // VSUBSS
|
||||
{0xF2, 0x5C}, // VSUBSD
|
||||
};
|
||||
const xImplAVX_ArithFloat xVMUL = {
|
||||
{0x00, 0x59}, // VMULPS
|
||||
{0x66, 0x59}, // VMULPD
|
||||
{0xF3, 0x59}, // VMULSS
|
||||
{0xF2, 0x59}, // VMULSD
|
||||
};
|
||||
const xImplAVX_ArithFloat xVDIV = {
|
||||
{0x00, 0x5E}, // VDIVPS
|
||||
{0x66, 0x5E}, // VDIVPD
|
||||
{0xF3, 0x5E}, // VDIVSS
|
||||
{0xF2, 0x5E}, // VDIVSD
|
||||
};
|
||||
const xImplAVX_CmpFloat xVCMP = {
|
||||
{SSE2_Equal},
|
||||
{SSE2_Less},
|
||||
{SSE2_LessOrEqual},
|
||||
{SSE2_Unordered},
|
||||
{SSE2_NotEqual},
|
||||
{SSE2_NotLess},
|
||||
{SSE2_NotLessOrEqual},
|
||||
{SSE2_Ordered},
|
||||
};
|
||||
const xImplAVX_ThreeArgYMM xVPAND = {0x66, 0xDB};
|
||||
const xImplAVX_ThreeArgYMM xVPANDN = {0x66, 0xDF};
|
||||
const xImplAVX_ThreeArgYMM xVPOR = {0x66, 0xEB};
|
||||
const xImplAVX_ThreeArgYMM xVPXOR = {0x66, 0xEF};
|
||||
const xImplAVX_CmpInt xVPCMP = {
|
||||
{0x66, 0x74}, // VPCMPEQB
|
||||
{0x66, 0x75}, // VPCMPEQW
|
||||
{0x66, 0x76}, // VPCMPEQD
|
||||
{0x66, 0x64}, // VPCMPGTB
|
||||
{0x66, 0x65}, // VPCMPGTW
|
||||
{0x66, 0x66}, // VPCMPGTD
|
||||
};
|
||||
|
||||
void xVPMOVMSKB(const xRegister32& to, const xRegisterSSE& from)
|
||||
{
|
||||
xOpWriteC5(0x66, 0xd7, to, xRegister32(), from);
|
||||
}
|
||||
|
||||
void xVMOVMSKPS(const xRegister32& to, const xRegisterSSE& from)
|
||||
{
|
||||
xOpWriteC5(0x00, 0x50, to, xRegister32(), from);
|
||||
}
|
||||
|
||||
void xVMOVMSKPD(const xRegister32& to, const xRegisterSSE& from)
|
||||
{
|
||||
xOpWriteC5(0x66, 0x50, to, xRegister32(), from);
|
||||
}
|
||||
|
||||
void xVZEROUPPER()
|
||||
{
|
||||
// rather than dealing with nonexistant operands..
|
||||
xWrite8(0xc5);
|
||||
xWrite8(0xf8);
|
||||
xWrite8(0x77);
|
||||
}
|
||||
|
||||
void xImplAVX_Move::operator()(const xRegisterSSE& to, const xRegisterSSE& from) const
|
||||
{
|
||||
if (to != from)
|
||||
xOpWriteC5(Prefix, LoadOpcode, to, xRegisterSSE(), from);
|
||||
}
|
||||
|
||||
void xImplAVX_Move::operator()(const xRegisterSSE& to, const xIndirectVoid& from) const
|
||||
{
|
||||
xOpWriteC5(Prefix, LoadOpcode, to, xRegisterSSE(), from);
|
||||
}
|
||||
|
||||
void xImplAVX_Move::operator()(const xIndirectVoid& to, const xRegisterSSE& from) const
|
||||
{
|
||||
xOpWriteC5(Prefix, StoreOpcode, from, xRegisterSSE(), to);
|
||||
}
|
||||
|
||||
void xImplAVX_ThreeArg::operator()(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
pxAssert(!to.IsWideSIMD() && !from1.IsWideSIMD() && !from2.IsWideSIMD());
|
||||
xOpWriteC5(Prefix, Opcode, to, from1, from2);
|
||||
}
|
||||
|
||||
void xImplAVX_ThreeArg::operator()(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
pxAssert(!to.IsWideSIMD() && !from1.IsWideSIMD());
|
||||
xOpWriteC5(Prefix, Opcode, to, from1, from2);
|
||||
}
|
||||
|
||||
void xImplAVX_ThreeArgYMM::operator()(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
xOpWriteC5(Prefix, Opcode, to, from1, from2);
|
||||
}
|
||||
|
||||
void xImplAVX_ThreeArgYMM::operator()(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
xOpWriteC5(Prefix, Opcode, to, from1, from2);
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::PS(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
xOpWriteC5(0x00, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::PS(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
xOpWriteC5(0x00, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::PD(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
xOpWriteC5(0x66, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::PD(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
xOpWriteC5(0x66, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::SS(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
xOpWriteC5(0xF3, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::SS(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
xOpWriteC5(0xF3, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::SD(const xRegisterSSE& to, const xRegisterSSE& from1, const xIndirectVoid& from2) const
|
||||
{
|
||||
xOpWriteC5(0xF2, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
|
||||
void xImplAVX_CmpFloatHelper::SD(const xRegisterSSE& to, const xRegisterSSE& from1, const xRegisterSSE& from2) const
|
||||
{
|
||||
xOpWriteC5(0xF2, 0xC2, to, from1, from2);
|
||||
xWrite8(static_cast<u8>(CType));
|
||||
}
|
||||
} // namespace x86Emitter
|
||||
@@ -29,7 +29,7 @@ namespace x86Emitter
|
||||
// Note on "[Indirect],Imm" forms : use int as the source operand since it's "reasonably inert" from a
|
||||
// compiler perspective. (using uint tends to make the compiler try and fail to match signed immediates
|
||||
// with one of the other overloads).
|
||||
static void _g1_IndirectImm(G1Type InstType, const xIndirect64orLess& sibdest, int imm)
|
||||
void xImpl_Group1::operator()(const xIndirect64orLess& sibdest, int imm) const
|
||||
{
|
||||
if (sibdest.Is8BitOp())
|
||||
{
|
||||
@@ -49,7 +49,7 @@ namespace x86Emitter
|
||||
}
|
||||
}
|
||||
|
||||
void _g1_EmitOp(G1Type InstType, const xRegisterInt& to, const xRegisterInt& from)
|
||||
void xImpl_Group1::operator()(const xRegisterInt& to, const xRegisterInt& from) const
|
||||
{
|
||||
pxAssert(to.GetOperandSize() == from.GetOperandSize());
|
||||
|
||||
@@ -57,19 +57,19 @@ namespace x86Emitter
|
||||
xOpWrite(to.GetPrefix16(), opcode, from, to);
|
||||
}
|
||||
|
||||
static void _g1_EmitOp(G1Type InstType, const xIndirectVoid& sibdest, const xRegisterInt& from)
|
||||
void xImpl_Group1::operator()(const xIndirectVoid& sibdest, const xRegisterInt& from) const
|
||||
{
|
||||
u8 opcode = (from.Is8BitOp() ? 0 : 1) | (InstType << 3);
|
||||
xOpWrite(from.GetPrefix16(), opcode, from, sibdest);
|
||||
}
|
||||
|
||||
static void _g1_EmitOp(G1Type InstType, const xRegisterInt& to, const xIndirectVoid& sibsrc)
|
||||
void xImpl_Group1::operator()(const xRegisterInt& to, const xIndirectVoid& sibsrc) const
|
||||
{
|
||||
u8 opcode = (to.Is8BitOp() ? 2 : 3) | (InstType << 3);
|
||||
xOpWrite(to.GetPrefix16(), opcode, to, sibsrc);
|
||||
}
|
||||
|
||||
static void _g1_EmitOp(G1Type InstType, const xRegisterInt& to, int imm)
|
||||
void xImpl_Group1::operator()(const xRegisterInt& to, int imm) const
|
||||
{
|
||||
if (!to.Is8BitOp() && is_s8(imm))
|
||||
{
|
||||
@@ -92,28 +92,16 @@ namespace x86Emitter
|
||||
}
|
||||
}
|
||||
|
||||
#define ImplementGroup1(g1type, insttype) \
|
||||
void g1type::operator()(const xRegisterInt& to, const xRegisterInt& from) const { _g1_EmitOp(insttype, to, from); } \
|
||||
void g1type::operator()(const xIndirectVoid& to, const xRegisterInt& from) const { _g1_EmitOp(insttype, to, from); } \
|
||||
void g1type::operator()(const xRegisterInt& to, const xIndirectVoid& from) const { _g1_EmitOp(insttype, to, from); } \
|
||||
void g1type::operator()(const xRegisterInt& to, int imm) const { _g1_EmitOp(insttype, to, imm); } \
|
||||
void g1type::operator()(const xIndirect64orLess& sibdest, int imm) const { _g1_IndirectImm(insttype, sibdest, imm); }
|
||||
const xImpl_G1Logic xAND = {{G1Type_AND}, {SIMDInstructionInfo(0x54).commutative()}, {SIMDInstructionInfo(0x54).commutative().p66()}};
|
||||
const xImpl_G1Logic xOR = {{G1Type_OR}, {SIMDInstructionInfo(0x56).commutative()}, {SIMDInstructionInfo(0x56).commutative().p66()}};
|
||||
const xImpl_G1Logic xXOR = {{G1Type_XOR}, {SIMDInstructionInfo(0x57).commutative()}, {SIMDInstructionInfo(0x57).commutative().p66()}};
|
||||
|
||||
ImplementGroup1(xImpl_Group1, InstType)
|
||||
ImplementGroup1(xImpl_G1Logic, InstType)
|
||||
ImplementGroup1(xImpl_G1Arith, InstType)
|
||||
ImplementGroup1(xImpl_G1Compare, G1Type_CMP)
|
||||
|
||||
const xImpl_G1Logic xAND = {G1Type_AND, {0x00, 0x54}, {0x66, 0x54}};
|
||||
const xImpl_G1Logic xOR = {G1Type_OR, {0x00, 0x56}, {0x66, 0x56}};
|
||||
const xImpl_G1Logic xXOR = {G1Type_XOR, {0x00, 0x57}, {0x66, 0x57}};
|
||||
|
||||
const xImpl_G1Arith xADD = {G1Type_ADD, {0x00, 0x58}, {0x66, 0x58}, {0xf3, 0x58}, {0xf2, 0x58}};
|
||||
const xImpl_G1Arith xSUB = {G1Type_SUB, {0x00, 0x5c}, {0x66, 0x5c}, {0xf3, 0x5c}, {0xf2, 0x5c}};
|
||||
const xImpl_G1Compare xCMP = {{0x00, 0xc2}, {0x66, 0xc2}, {0xf3, 0xc2}, {0xf2, 0xc2}};
|
||||
const xImpl_G1Arith xADD = {{G1Type_ADD}, {SIMDInstructionInfo(0x58).commutative()}, {SIMDInstructionInfo(0x58).commutative().p66()}, {SIMDInstructionInfo(0x58).pf3()}, {SIMDInstructionInfo(0x58).pf2()}};
|
||||
const xImpl_G1Arith xSUB = {{G1Type_SUB}, {SIMDInstructionInfo(0x5c)}, {SIMDInstructionInfo(0x5c).p66()}, {SIMDInstructionInfo(0x5c).pf3()}, {SIMDInstructionInfo(0x5c).pf2()}};
|
||||
|
||||
const xImpl_Group1 xADC = {G1Type_ADC};
|
||||
const xImpl_Group1 xSBB = {G1Type_SBB};
|
||||
const xImpl_Group1 xCMP = {G1Type_CMP};
|
||||
|
||||
// =====================================================================================================
|
||||
// Group 2 Instructions - SHR, SHL, etc.
|
||||
@@ -186,11 +174,15 @@ namespace x86Emitter
|
||||
xOpWrite(from.GetPrefix16(), from.Is8BitOp() ? 0xf6 : 0xf7, InstType, from);
|
||||
}
|
||||
|
||||
void xImpl_Group3::operator()(const xRegisterInt& from) const { _g3_EmitOp(InstType, from); }
|
||||
void xImpl_Group3::operator()(const xIndirect64orLess& from) const { _g3_EmitOp(InstType, from); }
|
||||
void xImpl_Group3::operator()(const xRegisterInt& from) const
|
||||
{
|
||||
xOpWrite(from.GetPrefix16(), from.Is8BitOp() ? 0xf6 : 0xf7, InstType, from);
|
||||
}
|
||||
|
||||
void xImpl_iDiv::operator()(const xRegisterInt& from) const { _g3_EmitOp(G3Type_iDIV, from); }
|
||||
void xImpl_iDiv::operator()(const xIndirect64orLess& from) const { _g3_EmitOp(G3Type_iDIV, from); }
|
||||
void xImpl_Group3::operator()(const xIndirect64orLess& from) const
|
||||
{
|
||||
xOpWrite(from.GetPrefix16(), from.Is8BitOp() ? 0xf6 : 0xf7, InstType, from);
|
||||
}
|
||||
|
||||
template <typename SrcType>
|
||||
static void _imul_ImmStyle(const xRegisterInt& param1, const SrcType& param2, int imm)
|
||||
@@ -205,9 +197,6 @@ namespace x86Emitter
|
||||
param1.xWriteImm(imm);
|
||||
}
|
||||
|
||||
void xImpl_iMul::operator()(const xRegisterInt& from) const { _g3_EmitOp(G3Type_iMUL, from); }
|
||||
void xImpl_iMul::operator()(const xIndirect64orLess& from) const { _g3_EmitOp(G3Type_iMUL, from); }
|
||||
|
||||
void xImpl_iMul::operator()(const xRegister32& to, const xRegister32& from) const { xOpWrite0F(0xaf, to, from); }
|
||||
void xImpl_iMul::operator()(const xRegister32& to, const xIndirectVoid& src) const { xOpWrite0F(0xaf, to, src); }
|
||||
void xImpl_iMul::operator()(const xRegister16& to, const xRegister16& from) const { xOpWrite0F(0x66, 0xaf, to, from); }
|
||||
@@ -223,8 +212,8 @@ namespace x86Emitter
|
||||
const xImpl_Group3 xUMUL = {G3Type_MUL};
|
||||
const xImpl_Group3 xUDIV = {G3Type_DIV};
|
||||
|
||||
const xImpl_iDiv xDIV = {{0x00, 0x5e}, {0x66, 0x5e}, {0xf3, 0x5e}, {0xf2, 0x5e}};
|
||||
const xImpl_iMul xMUL = {{0x00, 0x59}, {0x66, 0x59}, {0xf3, 0x59}, {0xf2, 0x59}};
|
||||
const xImpl_iDiv xDIV = {{G3Type_iDIV}, {SIMDInstructionInfo(0x5e)}, {SIMDInstructionInfo(0x5e).p66()}, {SIMDInstructionInfo(0x5e).pf3()}, {SIMDInstructionInfo(0x5e).pf2()}};
|
||||
const xImpl_iMul xMUL = {{G3Type_iMUL}, {SIMDInstructionInfo(0x59).commutative()}, {SIMDInstructionInfo(0x59).commutative().p66()}, {SIMDInstructionInfo(0x59).pf3()}, {SIMDInstructionInfo(0x59).pf2()}};
|
||||
|
||||
// =====================================================================================================
|
||||
// Group 8 Instructions
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace x86Emitter
|
||||
G1Type_CMP
|
||||
};
|
||||
|
||||
extern void _g1_EmitOp(G1Type InstType, const xRegisterInt& to, const xRegisterInt& from);
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImpl_Group1
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -33,99 +31,27 @@ namespace x86Emitter
|
||||
void operator()(const xRegisterInt& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xRegisterInt& to, int imm) const;
|
||||
void operator()(const xIndirect64orLess& to, int imm) const;
|
||||
|
||||
#if 0
|
||||
// ------------------------------------------------------------------------
|
||||
template< typename T > __noinline void operator()( const ModSibBase& to, const xImmReg<T>& immOrReg ) const
|
||||
{
|
||||
_DoI_helpermess( *this, to, immOrReg );
|
||||
}
|
||||
|
||||
template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, const xImmReg<T>& immOrReg ) const
|
||||
{
|
||||
_DoI_helpermess( *this, to, immOrReg );
|
||||
}
|
||||
|
||||
template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, int imm ) const
|
||||
{
|
||||
_DoI_helpermess( *this, to, imm );
|
||||
}
|
||||
|
||||
template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, const xDirectOrIndirect<T>& from ) const
|
||||
{
|
||||
_DoI_helpermess( *this, to, from );
|
||||
}
|
||||
|
||||
// FIXME : Make this struct to 8, 16, and 32 bit registers
|
||||
template< typename T > __noinline void operator()( const xRegisterBase& to, const xDirectOrIndirect<T>& from ) const
|
||||
{
|
||||
_DoI_helpermess( *this, xDirectOrIndirect<T>( to ), from );
|
||||
}
|
||||
|
||||
// FIXME : Make this struct to 8, 16, and 32 bit registers
|
||||
template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, const xRegisterBase& from ) const
|
||||
{
|
||||
_DoI_helpermess( *this, to, xDirectOrIndirect<T>( from ) );
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// This class combines x86 with SSE/SSE2 logic operations (ADD, OR, and NOT).
|
||||
// Note: ANDN [AndNot] is handled below separately.
|
||||
//
|
||||
struct xImpl_G1Logic
|
||||
struct xImpl_G1Logic : public xImpl_Group1
|
||||
{
|
||||
G1Type InstType;
|
||||
|
||||
void operator()(const xRegisterInt& to, const xRegisterInt& from) const;
|
||||
|
||||
void operator()(const xIndirectVoid& to, const xRegisterInt& from) const;
|
||||
void operator()(const xRegisterInt& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xRegisterInt& to, int imm) const;
|
||||
|
||||
void operator()(const xIndirect64orLess& to, int imm) const;
|
||||
|
||||
xImplSimd_DestRegSSE PS; // packed single precision
|
||||
xImplSimd_DestRegSSE PD; // packed double precision
|
||||
xImplSimd_3Arg PS; // packed single precision
|
||||
xImplSimd_3Arg PD; // packed double precision
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// This class combines x86 with SSE/SSE2 arithmetic operations (ADD/SUB).
|
||||
//
|
||||
struct xImpl_G1Arith
|
||||
struct xImpl_G1Arith : public xImpl_Group1
|
||||
{
|
||||
G1Type InstType;
|
||||
|
||||
void operator()(const xRegisterInt& to, const xRegisterInt& from) const;
|
||||
|
||||
void operator()(const xIndirectVoid& to, const xRegisterInt& from) const;
|
||||
void operator()(const xRegisterInt& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xRegisterInt& to, int imm) const;
|
||||
|
||||
void operator()(const xIndirect64orLess& to, int imm) const;
|
||||
|
||||
xImplSimd_DestRegSSE PS; // packed single precision
|
||||
xImplSimd_DestRegSSE PD; // packed double precision
|
||||
xImplSimd_DestRegSSE SS; // scalar single precision
|
||||
xImplSimd_DestRegSSE SD; // scalar double precision
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
struct xImpl_G1Compare
|
||||
{
|
||||
void operator()(const xRegisterInt& to, const xRegisterInt& from) const;
|
||||
|
||||
void operator()(const xIndirectVoid& to, const xRegisterInt& from) const;
|
||||
void operator()(const xRegisterInt& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xRegisterInt& to, int imm) const;
|
||||
|
||||
void operator()(const xIndirect64orLess& to, int imm) const;
|
||||
|
||||
xImplSimd_DestSSE_CmpImm PS;
|
||||
xImplSimd_DestSSE_CmpImm PD;
|
||||
xImplSimd_DestSSE_CmpImm SS;
|
||||
xImplSimd_DestSSE_CmpImm SD;
|
||||
xImplSimd_3Arg PS; // packed single precision
|
||||
xImplSimd_3Arg PD; // packed double precision
|
||||
xImplSimd_3Arg SS; // scalar single precision
|
||||
xImplSimd_3Arg SD; // scalar double precision
|
||||
};
|
||||
|
||||
} // End namespace x86Emitter
|
||||
|
||||
@@ -25,57 +25,26 @@ namespace x86Emitter
|
||||
|
||||
void operator()(const xRegisterInt& from) const;
|
||||
void operator()(const xIndirect64orLess& from) const;
|
||||
|
||||
#if 0
|
||||
template< typename T >
|
||||
void operator()( const xDirectOrIndirect<T>& from ) const
|
||||
{
|
||||
_DoI_helpermess( *this, from );
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImpl_MulDivBase
|
||||
// --------------------------------------------------------------------------------------
|
||||
// This class combines x86 and SSE/SSE2 instructions for iMUL and iDIV.
|
||||
//
|
||||
struct xImpl_MulDivBase
|
||||
{
|
||||
G3Type InstType;
|
||||
u16 OpcodeSSE;
|
||||
|
||||
void operator()(const xRegisterInt& from) const;
|
||||
void operator()(const xIndirect64orLess& from) const;
|
||||
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE PD;
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImpl_iDiv
|
||||
// --------------------------------------------------------------------------------------
|
||||
struct xImpl_iDiv
|
||||
struct xImpl_iDiv : public xImpl_Group3
|
||||
{
|
||||
void operator()(const xRegisterInt& from) const;
|
||||
void operator()(const xIndirect64orLess& from) const;
|
||||
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE PD;
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
const xImplSimd_3Arg PS;
|
||||
const xImplSimd_3Arg PD;
|
||||
const xImplSimd_3Arg SS;
|
||||
const xImplSimd_3Arg SD;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImpl_iMul
|
||||
// --------------------------------------------------------------------------------------
|
||||
//
|
||||
struct xImpl_iMul
|
||||
struct xImpl_iMul : public xImpl_Group3
|
||||
{
|
||||
void operator()(const xRegisterInt& from) const;
|
||||
void operator()(const xIndirect64orLess& from) const;
|
||||
using xImpl_Group3::operator();
|
||||
|
||||
// The following iMul-specific forms are valid for 16 and 32 bit register operands only!
|
||||
|
||||
@@ -89,9 +58,9 @@ namespace x86Emitter
|
||||
void operator()(const xRegister16& to, const xRegister16& from, s16 imm) const;
|
||||
void operator()(const xRegister16& to, const xIndirectVoid& from, s16 imm) const;
|
||||
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE PD;
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
const xImplSimd_3Arg PS;
|
||||
const xImplSimd_3Arg PD;
|
||||
const xImplSimd_3Arg SS;
|
||||
const xImplSimd_3Arg SD;
|
||||
};
|
||||
} // namespace x86Emitter
|
||||
|
||||
@@ -11,15 +11,16 @@ namespace x86Emitter
|
||||
// --------------------------------------------------------------------------------------
|
||||
struct _SimdShiftHelper
|
||||
{
|
||||
u8 Prefix;
|
||||
u16 Opcode;
|
||||
u16 OpcodeImm;
|
||||
u8 Modcode;
|
||||
SIMDInstructionInfo info;
|
||||
SIMDInstructionInfo infoImm;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src) const { (*this)(dst, dst, src); }
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src) const { (*this)(dst, dst, src); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
|
||||
void operator()(const xRegisterSSE& to, u8 imm8) const;
|
||||
void operator()(const xRegisterSSE& dst, u8 imm8) const { (*this)(dst, dst, imm8); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -42,39 +43,40 @@ namespace x86Emitter
|
||||
const _SimdShiftHelper D;
|
||||
const _SimdShiftHelper Q;
|
||||
|
||||
void DQ(const xRegisterSSE& to, u8 imm8) const;
|
||||
void DQ(const xRegisterSSE& dst, u8 imm8) const { DQ(dst, dst, imm8); }
|
||||
void DQ(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
struct xImplSimd_AddSub
|
||||
{
|
||||
const xImplSimd_DestRegEither B;
|
||||
const xImplSimd_DestRegEither W;
|
||||
const xImplSimd_DestRegEither D;
|
||||
const xImplSimd_DestRegEither Q;
|
||||
const xImplSimd_3Arg B;
|
||||
const xImplSimd_3Arg W;
|
||||
const xImplSimd_3Arg D;
|
||||
const xImplSimd_3Arg Q;
|
||||
|
||||
// Add/Sub packed signed byte [8bit] integers from src into dest, and saturate the results.
|
||||
const xImplSimd_DestRegEither SB;
|
||||
const xImplSimd_3Arg SB;
|
||||
|
||||
// Add/Sub packed signed word [16bit] integers from src into dest, and saturate the results.
|
||||
const xImplSimd_DestRegEither SW;
|
||||
const xImplSimd_3Arg SW;
|
||||
|
||||
// Add/Sub packed unsigned byte [8bit] integers from src into dest, and saturate the results.
|
||||
const xImplSimd_DestRegEither USB;
|
||||
const xImplSimd_3Arg USB;
|
||||
|
||||
// Add/Sub packed unsigned word [16bit] integers from src into dest, and saturate the results.
|
||||
const xImplSimd_DestRegEither USW;
|
||||
const xImplSimd_3Arg USW;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
struct xImplSimd_PMul
|
||||
{
|
||||
const xImplSimd_DestRegEither LW;
|
||||
const xImplSimd_DestRegEither HW;
|
||||
const xImplSimd_DestRegEither HUW;
|
||||
const xImplSimd_DestRegEither UDQ;
|
||||
const xImplSimd_3Arg LW;
|
||||
const xImplSimd_3Arg HW;
|
||||
const xImplSimd_3Arg HUW;
|
||||
const xImplSimd_3Arg UDQ;
|
||||
|
||||
// [SSE-3] PMULHRSW multiplies vertically each signed 16-bit integer from dest with the
|
||||
// corresponding signed 16-bit integer of source, producing intermediate signed 32-bit
|
||||
@@ -86,14 +88,14 @@ namespace x86Emitter
|
||||
//
|
||||
// Both operands can be MMX or XMM registers. Source can be register or memory.
|
||||
//
|
||||
const xImplSimd_DestRegEither HRSW;
|
||||
const xImplSimd_3Arg HRSW;
|
||||
|
||||
// [SSE-4.1] Multiply the packed dword signed integers in dest with src, and store
|
||||
// the low 32 bits of each product in xmm1.
|
||||
const xImplSimd_DestRegSSE LD;
|
||||
const xImplSimd_3Arg LD;
|
||||
|
||||
// [SSE-4.1] Multiply the packed signed dword integers in dest with src.
|
||||
const xImplSimd_DestRegSSE DQ;
|
||||
const xImplSimd_3Arg DQ;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -101,26 +103,27 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_rSqrt
|
||||
{
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_2Arg PS;
|
||||
const xImplSimd_3Arg SS;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SQRT has PS/SS/SD forms, but not the PD form.
|
||||
// SQRT has PS/SS/PD/SD forms
|
||||
//
|
||||
struct xImplSimd_Sqrt
|
||||
{
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
const xImplSimd_2Arg PS;
|
||||
const xImplSimd_3Arg SS;
|
||||
const xImplSimd_2Arg PD;
|
||||
const xImplSimd_3Arg SD;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
struct xImplSimd_AndNot
|
||||
{
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_DestRegSSE PD;
|
||||
const xImplSimd_3Arg PS;
|
||||
const xImplSimd_3Arg PD;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -130,15 +133,15 @@ namespace x86Emitter
|
||||
{
|
||||
// [sSSE-3] Computes the absolute value of bytes in the src, and stores the result
|
||||
// in dest, as UNSIGNED.
|
||||
const xImplSimd_DestRegEither B;
|
||||
const xImplSimd_2Arg B;
|
||||
|
||||
// [sSSE-3] Computes the absolute value of word in the src, and stores the result
|
||||
// in dest, as UNSIGNED.
|
||||
const xImplSimd_DestRegEither W;
|
||||
const xImplSimd_2Arg W;
|
||||
|
||||
// [sSSE-3] Computes the absolute value of doublewords in the src, and stores the
|
||||
// result in dest, as UNSIGNED.
|
||||
const xImplSimd_DestRegEither D;
|
||||
const xImplSimd_2Arg D;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -152,21 +155,21 @@ namespace x86Emitter
|
||||
// of a data element in src is positive, the corresponding data element in dest is
|
||||
// unchanged. If a data element in src is zero, the corresponding data element in
|
||||
// dest is set to zero.
|
||||
const xImplSimd_DestRegEither B;
|
||||
const xImplSimd_3Arg B;
|
||||
|
||||
// [sSSE-3] negates each word element of dest if the signed integer value of the
|
||||
// corresponding data element in src is less than zero. If the signed integer value
|
||||
// of a data element in src is positive, the corresponding data element in dest is
|
||||
// unchanged. If a data element in src is zero, the corresponding data element in
|
||||
// dest is set to zero.
|
||||
const xImplSimd_DestRegEither W;
|
||||
const xImplSimd_3Arg W;
|
||||
|
||||
// [sSSE-3] negates each doubleword element of dest if the signed integer value
|
||||
// of the corresponding data element in src is less than zero. If the signed integer
|
||||
// value of a data element in src is positive, the corresponding data element in dest
|
||||
// is unchanged. If a data element in src is zero, the corresponding data element in
|
||||
// dest is set to zero.
|
||||
const xImplSimd_DestRegEither D;
|
||||
const xImplSimd_3Arg D;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -182,7 +185,7 @@ namespace x86Emitter
|
||||
// DEST[63:32] = ( DEST[47:32] * SRC[47:32]) + (DEST[63:48] * SRC[63:48] );
|
||||
// [.. repeat in the case of XMM src/dest operands ..]
|
||||
//
|
||||
const xImplSimd_DestRegEither WD;
|
||||
const xImplSimd_3Arg WD;
|
||||
|
||||
// [sSSE-3] multiplies vertically each unsigned byte of dest with the corresponding
|
||||
// signed byte of src, producing intermediate signed 16-bit integers. Each adjacent
|
||||
@@ -198,7 +201,7 @@ namespace x86Emitter
|
||||
// DEST[31-16] = SaturateToSignedWord( SRC[31-24] * DEST[31-24] + SRC[23-16] * DEST[23-16] );
|
||||
// [.. repeat for each 16 bits up to 64 (mmx) or 128 (xmm) ..]
|
||||
//
|
||||
const xImplSimd_DestRegEither UBSW;
|
||||
const xImplSimd_3Arg UBSW;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -213,14 +216,14 @@ namespace x86Emitter
|
||||
// stores the result in the second dword of dest.
|
||||
// * Adds single-precision floating-point values in the first and second dword of *src*
|
||||
// and stores the result in the third dword of dest.
|
||||
const xImplSimd_DestRegSSE PS;
|
||||
const xImplSimd_3Arg PS;
|
||||
|
||||
// [SSE-3] Horizontal Add of Packed Data. A two step process:
|
||||
// * Adds the double-precision floating-point values in the high and low quadwords of
|
||||
// dest and stores the result in the low quadword of dest.
|
||||
// * Adds the double-precision floating-point values in the high and low quadwords of
|
||||
// *src* stores the result in the high quadword of dest.
|
||||
const xImplSimd_DestRegSSE PD;
|
||||
const xImplSimd_3Arg PD;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -241,10 +244,10 @@ namespace x86Emitter
|
||||
// element in dest. If a broadcast mask bit is zero, the corresponding element in
|
||||
// the destination is set to zero.
|
||||
//
|
||||
xImplSimd_DestRegImmSSE PS;
|
||||
xImplSimd_3ArgImm PS;
|
||||
|
||||
// [SSE-4.1]
|
||||
xImplSimd_DestRegImmSSE PD;
|
||||
xImplSimd_3ArgImm PD;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -262,7 +265,7 @@ namespace x86Emitter
|
||||
// Rounding Mode Reference:
|
||||
// 0 - Nearest, 1 - Negative Infinity, 2 - Positive infinity, 3 - Truncate.
|
||||
//
|
||||
const xImplSimd_DestRegImmSSE PS;
|
||||
const xImplSimd_2ArgImm PS;
|
||||
|
||||
// [SSE-4.1] Rounds the 2 packed double-precision src values and stores them in dest.
|
||||
//
|
||||
@@ -274,7 +277,7 @@ namespace x86Emitter
|
||||
// Rounding Mode Reference:
|
||||
// 0 - Nearest, 1 - Negative Infinity, 2 - Positive infinity, 3 - Truncate.
|
||||
//
|
||||
const xImplSimd_DestRegImmSSE PD;
|
||||
const xImplSimd_2ArgImm PD;
|
||||
|
||||
// [SSE-4.1] Rounds the single-precision src value and stores in dest.
|
||||
//
|
||||
@@ -286,7 +289,7 @@ namespace x86Emitter
|
||||
// Rounding Mode Reference:
|
||||
// 0 - Nearest, 1 - Negative Infinity, 2 - Positive infinity, 3 - Truncate.
|
||||
//
|
||||
const xImplSimd_DestRegImmSSE SS;
|
||||
const xImplSimd_3ArgImm SS;
|
||||
|
||||
// [SSE-4.1] Rounds the double-precision src value and stores in dest.
|
||||
//
|
||||
@@ -298,7 +301,7 @@ namespace x86Emitter
|
||||
// Rounding Mode Reference:
|
||||
// 0 - Nearest, 1 - Negative Infinity, 2 - Positive infinity, 3 - Truncate.
|
||||
//
|
||||
const xImplSimd_DestRegImmSSE SD;
|
||||
const xImplSimd_3ArgImm SD;
|
||||
};
|
||||
|
||||
} // End namespace x86Emitter
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace x86Emitter
|
||||
|
||||
struct xImplSimd_MinMax
|
||||
{
|
||||
const xImplSimd_DestRegSSE PS; // packed single precision
|
||||
const xImplSimd_DestRegSSE PD; // packed double precision
|
||||
const xImplSimd_DestRegSSE SS; // scalar single precision
|
||||
const xImplSimd_DestRegSSE SD; // scalar double precision
|
||||
const xImplSimd_3Arg PS; // packed single precision
|
||||
const xImplSimd_3Arg PD; // packed double precision
|
||||
const xImplSimd_3Arg SS; // scalar single precision
|
||||
const xImplSimd_3Arg SD; // scalar double precision
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -20,17 +20,25 @@ namespace x86Emitter
|
||||
{
|
||||
SSE2_ComparisonType CType;
|
||||
|
||||
void PS(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void PS(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src) const { PS(dst, dst, src); }
|
||||
void PS(const xRegisterSSE& dst, const xIndirectVoid& src) const { PS(dst, dst, src); }
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
|
||||
void PD(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void PD(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src) const { PD(dst, dst, src); }
|
||||
void PD(const xRegisterSSE& dst, const xIndirectVoid& src) const { PD(dst, dst, src); }
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
|
||||
void SS(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void SS(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void SS(const xRegisterSSE& dst, const xRegisterSSE& src) const { SS(dst, dst, src); }
|
||||
void SS(const xRegisterSSE& dst, const xIndirectVoid& src) const { SS(dst, dst, src); }
|
||||
void SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
|
||||
void SD(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void SD(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void SD(const xRegisterSSE& dst, const xRegisterSSE& src) const { SD(dst, dst, src); }
|
||||
void SD(const xRegisterSSE& dst, const xIndirectVoid& src) const { SD(dst, dst, src); }
|
||||
void SD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void SD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -38,8 +46,8 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_COMI
|
||||
{
|
||||
const xImplSimd_DestRegSSE SS;
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
const xImplSimd_2Arg SS;
|
||||
const xImplSimd_2Arg SD;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,36 +55,35 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_PCompare
|
||||
{
|
||||
public:
|
||||
// Compare packed bytes for equality.
|
||||
// If a data element in dest is equal to the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither EQB;
|
||||
const xImplSimd_3Arg EQB;
|
||||
|
||||
// Compare packed words for equality.
|
||||
// If a data element in dest is equal to the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither EQW;
|
||||
const xImplSimd_3Arg EQW;
|
||||
|
||||
// Compare packed doublewords [32-bits] for equality.
|
||||
// If a data element in dest is equal to the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither EQD;
|
||||
const xImplSimd_3Arg EQD;
|
||||
|
||||
// Compare packed signed bytes for greater than.
|
||||
// If a data element in dest is greater than the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither GTB;
|
||||
const xImplSimd_3Arg GTB;
|
||||
|
||||
// Compare packed signed words for greater than.
|
||||
// If a data element in dest is greater than the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither GTW;
|
||||
const xImplSimd_3Arg GTW;
|
||||
|
||||
// Compare packed signed doublewords [32-bits] for greater than.
|
||||
// If a data element in dest is greater than the corresponding date element src, the
|
||||
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
||||
const xImplSimd_DestRegEither GTD;
|
||||
const xImplSimd_3Arg GTD;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -85,27 +92,27 @@ namespace x86Emitter
|
||||
{
|
||||
// Compare packed unsigned byte integers in dest to src and store packed min/max
|
||||
// values in dest.
|
||||
const xImplSimd_DestRegEither UB;
|
||||
const xImplSimd_3Arg UB;
|
||||
|
||||
// Compare packed signed word integers in dest to src and store packed min/max
|
||||
// values in dest.
|
||||
const xImplSimd_DestRegEither SW;
|
||||
const xImplSimd_3Arg SW;
|
||||
|
||||
// [SSE-4.1] Compare packed signed byte integers in dest to src and store
|
||||
// packed min/max values in dest. (SSE operands only)
|
||||
const xImplSimd_DestRegSSE SB;
|
||||
const xImplSimd_3Arg SB;
|
||||
|
||||
// [SSE-4.1] Compare packed signed doubleword integers in dest to src and store
|
||||
// packed min/max values in dest. (SSE operands only)
|
||||
const xImplSimd_DestRegSSE SD;
|
||||
const xImplSimd_3Arg SD;
|
||||
|
||||
// [SSE-4.1] Compare packed unsigned word integers in dest to src and store
|
||||
// packed min/max values in dest. (SSE operands only)
|
||||
const xImplSimd_DestRegSSE UW;
|
||||
const xImplSimd_3Arg UW;
|
||||
|
||||
// [SSE-4.1] Compare packed unsigned doubleword integers in dest to src and store
|
||||
// packed min/max values in dest. (SSE operands only)
|
||||
const xImplSimd_DestRegSSE UD;
|
||||
const xImplSimd_3Arg UD;
|
||||
};
|
||||
|
||||
} // end namespace x86Emitter
|
||||
|
||||
@@ -10,52 +10,151 @@ namespace x86Emitter
|
||||
// xImpl_SIMD Types (template free!)
|
||||
// =====================================================================================================
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE-only logic operations that have xmmreg,xmmreg/rm forms only,
|
||||
// like ANDPS/ANDPD
|
||||
//
|
||||
struct xImplSimd_DestRegSSE
|
||||
{
|
||||
u8 Prefix;
|
||||
u16 Opcode;
|
||||
struct SIMDInstructionInfo {
|
||||
/// The prefix byte of a simd instruction. These match up with their (E)VEX encodings.
|
||||
enum class Prefix : u32 {
|
||||
None = 0,
|
||||
P66 = 1,
|
||||
PF3 = 2,
|
||||
PF2 = 3,
|
||||
};
|
||||
/// The opcode map of a simd instruction. These match up with their (E)VEX encodings.
|
||||
enum class Map : u32 {
|
||||
M0F = 1,
|
||||
M0F38 = 2,
|
||||
M0F3A = 3,
|
||||
};
|
||||
/// Whether an operation operates on float (ss, ps), integer (b, w, d, q), or double (sd, pd) data.
|
||||
/// May be used to choose an appropriate mov instruction if one is needed.
|
||||
enum class Type : u32 {
|
||||
Float, Integer, Double
|
||||
};
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
/// The main opcode
|
||||
u32 opcode : 8;
|
||||
/// Prefix byte
|
||||
Prefix prefix : 2;
|
||||
/// Opcode map
|
||||
Map map : 5;
|
||||
/// Information about the data this operation operates on. Ignored for instructions where the SSE4 and AVX versions have the same number of arguments.
|
||||
Type type : 2;
|
||||
/// For instructions like pslld, the data that should go into the reg field in place of the first src
|
||||
u32 ext : 3;
|
||||
/// If true, the two inputs to the function can be swapped without changing its result.
|
||||
u32 is_commutative : 1;
|
||||
/// If true, the dst and src1 must be the same in AVX (e.g. mov instructions, pshufd)
|
||||
u32 is_mov : 1;
|
||||
/// If true, get `W` from dst register instead of `w_bit`
|
||||
u32 dst_w : 1;
|
||||
/// If true, get `W` from src register instead of `w_bit`
|
||||
u32 src_w : 1;
|
||||
/// If true, the instruction has the VEX W bit set
|
||||
u32 w_bit : 1;
|
||||
|
||||
constexpr SIMDInstructionInfo(u8 opcode_, u8 ext_ = 0)
|
||||
: opcode(opcode_), prefix(Prefix::None), map(Map::M0F), type(Type::Float), ext(ext_)
|
||||
, is_commutative(false), is_mov(false), dst_w(false), src_w(false), w_bit(false)
|
||||
{
|
||||
}
|
||||
|
||||
// For configuration using in a builder-style
|
||||
constexpr SIMDInstructionInfo p66() const { SIMDInstructionInfo copy = *this; copy.prefix = Prefix::P66; return copy; }
|
||||
constexpr SIMDInstructionInfo pf3() const { SIMDInstructionInfo copy = *this; copy.prefix = Prefix::PF3; return copy; }
|
||||
constexpr SIMDInstructionInfo pf2() const { SIMDInstructionInfo copy = *this; copy.prefix = Prefix::PF2; return copy; }
|
||||
constexpr SIMDInstructionInfo m0f38() const { SIMDInstructionInfo copy = *this; copy.map = Map::M0F38; return copy; }
|
||||
constexpr SIMDInstructionInfo m0f3a() const { SIMDInstructionInfo copy = *this; copy.map = Map::M0F3A; return copy; }
|
||||
constexpr SIMDInstructionInfo f() const { SIMDInstructionInfo copy = *this; copy.type = Type::Float; return copy; }
|
||||
constexpr SIMDInstructionInfo i() const { SIMDInstructionInfo copy = *this; copy.type = Type::Integer; return copy; }
|
||||
constexpr SIMDInstructionInfo d() const { SIMDInstructionInfo copy = *this; copy.type = Type::Double; return copy; }
|
||||
constexpr SIMDInstructionInfo w() const { SIMDInstructionInfo copy = *this; copy.w_bit = true; return copy; }
|
||||
constexpr SIMDInstructionInfo dstw() const { SIMDInstructionInfo copy = *this; copy.dst_w = true; return copy; }
|
||||
constexpr SIMDInstructionInfo srcw() const { SIMDInstructionInfo copy = *this; copy.src_w = true; return copy; }
|
||||
constexpr SIMDInstructionInfo commutative() const { SIMDInstructionInfo copy = *this; copy.is_commutative = true; return copy; }
|
||||
constexpr SIMDInstructionInfo mov() const { SIMDInstructionInfo copy = *this; copy.is_mov = true; return copy; }
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE-only logic operations that have xmmreg,reg/rm,imm forms only
|
||||
// (PSHUFD / PSHUFHW / etc).
|
||||
// For implementing SSE/AVX logic operations that have two arguments in both SSE and AVX
|
||||
// like MOVAPS, CVTPS2DQ, etc
|
||||
//
|
||||
struct xImplSimd_DestRegImmSSE
|
||||
struct xImplSimd_2Arg
|
||||
{
|
||||
u8 Prefix;
|
||||
u16 Opcode;
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from, u8 imm) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from, u8 imm) const;
|
||||
};
|
||||
constexpr xImplSimd_2Arg(SIMDInstructionInfo info_): info(info_.mov()) {}
|
||||
|
||||
struct xImplSimd_DestSSE_CmpImm
|
||||
{
|
||||
u8 Prefix;
|
||||
u16 Opcode;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from, SSE2_ComparisonType imm) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from, SSE2_ComparisonType imm) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src) const;
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src) const;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE operations that have reg,reg/rm forms only,
|
||||
// but accept either MM or XMM destinations (most PADD/PSUB and other P arithmetic ops).
|
||||
// For implementing SSE/AVX logic operations that have two arguments in both SSE and AVX, plus an immediate
|
||||
// like PSHUFD
|
||||
//
|
||||
struct xImplSimd_DestRegEither
|
||||
struct xImplSimd_2ArgImm
|
||||
{
|
||||
u8 Prefix;
|
||||
u16 Opcode;
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
constexpr xImplSimd_2ArgImm(SIMDInstructionInfo info_): info(info_.mov()) {}
|
||||
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm) const;
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src, u8 imm) const;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE/AVX logic operations that have three arguments AVX and two in SSE
|
||||
// like ANDPS, ANDPD, etc
|
||||
//
|
||||
struct xImplSimd_3Arg
|
||||
{
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src) const { (*this)(dst, dst, src); }
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src) const { (*this)(dst, dst, src); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE/AVX logic operations that have three arguments AVX and two in SSE
|
||||
// like SHUFPS, INSERTPS, etc
|
||||
//
|
||||
struct xImplSimd_3ArgImm
|
||||
{
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm) const { (*this)(dst, dst, src, imm); }
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src, u8 imm) const { (*this)(dst, dst, src, imm); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, u8 imm) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2, u8 imm) const;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE/AVX logic operations that have three arguments AVX and two in SSE
|
||||
// like SHUFPS, INSERTPS, etc
|
||||
//
|
||||
struct xImplSimd_3ArgCmp
|
||||
{
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src, SSE2_ComparisonType imm) const { (*this)(dst, dst, src, imm); }
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src, SSE2_ComparisonType imm) const { (*this)(dst, dst, src, imm); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, SSE2_ComparisonType imm) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2, SSE2_ComparisonType imm) const;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// For implementing SSE/AVX logic operations that have four arguments AVX and two in SSE (with an implicit xmm0)
|
||||
// like PBLENDVB, BLENDVPS, etc
|
||||
//
|
||||
struct xImplSimd_4ArgBlend
|
||||
{
|
||||
SIMDInstructionInfo sse;
|
||||
SIMDInstructionInfo avx;
|
||||
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src) const { (*this)(dst, dst, src, xmm0); }
|
||||
void operator()(const xRegisterSSE& dst, const xIndirectVoid& src) const { (*this)(dst, dst, src, xmm0); }
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, const xRegisterSSE& src3) const;
|
||||
void operator()(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2, const xRegisterSSE& src3) const;
|
||||
};
|
||||
} // end namespace x86Emitter
|
||||
|
||||
@@ -14,13 +14,15 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_MovHL
|
||||
{
|
||||
u16 Opcode;
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void PS(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void PS(const xIndirectVoid& to, const xRegisterSSE& from) const;
|
||||
void PS(const xRegisterSSE& dst, const xIndirectVoid& src) const { PS(dst, dst, src); }
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
void PS(const xIndirectVoid& dst, const xRegisterSSE& src) const;
|
||||
|
||||
void PD(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void PD(const xIndirectVoid& to, const xRegisterSSE& from) const;
|
||||
void PD(const xRegisterSSE& dst, const xIndirectVoid& src) const { PD(dst, dst, src); }
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2) const;
|
||||
void PD(const xIndirectVoid& dst, const xRegisterSSE& src) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -31,16 +33,18 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_MovHL_RtoR
|
||||
{
|
||||
u16 Opcode;
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
void PS(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void PD(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src) const { PS(dst, dst, src); }
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src) const { PD(dst, dst, src); }
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImplSimd_MoveSSE
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Legends in their own right: MOVAPS / MOVAPD / MOVUPS / MOVUPD
|
||||
// Legends in their own right: MOVAPS / MOVAPD / MOVUPS / MOVUPD / MOVDQA / MOVDQU
|
||||
//
|
||||
// All implementations of Unaligned Movs will, when possible, use aligned movs instead.
|
||||
// This happens when using Mem,Reg or Reg,Mem forms where the address is simple displacement
|
||||
@@ -48,27 +52,10 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_MoveSSE
|
||||
{
|
||||
u8 Prefix;
|
||||
bool isAligned;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
void operator()(const xIndirectVoid& to, const xRegisterSSE& from) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xImplSimd_MoveDQ
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Implementations for MOVDQA / MOVDQU
|
||||
//
|
||||
// All implementations of Unaligned Movs will, when possible, use aligned movs instead.
|
||||
// This happens when using Mem,Reg or Reg,Mem forms where the address is simple displacement
|
||||
// which can be checked for alignment at runtime.
|
||||
|
||||
struct xImplSimd_MoveDQ
|
||||
{
|
||||
u8 Prefix;
|
||||
bool isAligned;
|
||||
SIMDInstructionInfo aligned_load;
|
||||
SIMDInstructionInfo aligned_store;
|
||||
SIMDInstructionInfo unaligned_load;
|
||||
SIMDInstructionInfo unaligned_store;
|
||||
|
||||
void operator()(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void operator()(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
@@ -89,7 +76,7 @@ namespace x86Emitter
|
||||
// If a mask bit is 1, then the corresponding dword in the source operand is copied
|
||||
// to dest, else the dword element in dest is left unchanged.
|
||||
//
|
||||
xImplSimd_DestRegImmSSE PS;
|
||||
xImplSimd_3ArgImm PS;
|
||||
|
||||
// [SSE-4.1] Conditionally copies quadword values from src to dest, depending on the
|
||||
// mask bits in the immediate operand (bits [1:0]). Each mask bit corresponds to a
|
||||
@@ -98,7 +85,7 @@ namespace x86Emitter
|
||||
// If a mask bit is 1, then the corresponding dword in the source operand is copied
|
||||
// to dest, else the dword element in dest is left unchanged.
|
||||
//
|
||||
xImplSimd_DestRegImmSSE PD;
|
||||
xImplSimd_3ArgImm PD;
|
||||
|
||||
// [SSE-4.1] Conditionally copies dword values from src to dest, depending on the
|
||||
// mask (bits [3:0]) in XMM0 (yes, the fixed register). Each mask bit corresponds
|
||||
@@ -107,7 +94,7 @@ namespace x86Emitter
|
||||
// If a mask bit is 1, then the corresponding dword in the source operand is copied
|
||||
// to dest, else the dword element in dest is left unchanged.
|
||||
//
|
||||
xImplSimd_DestRegSSE VPS;
|
||||
xImplSimd_4ArgBlend VPS;
|
||||
|
||||
// [SSE-4.1] Conditionally copies quadword values from src to dest, depending on the
|
||||
// mask (bits [1:0]) in XMM0 (yes, the fixed register). Each mask bit corresponds
|
||||
@@ -116,13 +103,13 @@ namespace x86Emitter
|
||||
// If a mask bit is 1, then the corresponding dword in the source operand is copied
|
||||
// to dest, else the dword element in dest is left unchanged.
|
||||
//
|
||||
xImplSimd_DestRegSSE VPD;
|
||||
xImplSimd_4ArgBlend VPD;
|
||||
};
|
||||
|
||||
struct xImplSimd_PBlend
|
||||
{
|
||||
xImplSimd_DestRegImmSSE W;
|
||||
xImplSimd_DestRegSSE VB;
|
||||
xImplSimd_3ArgImm W;
|
||||
xImplSimd_4ArgBlend VB;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -132,36 +119,36 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_PMove
|
||||
{
|
||||
u16 OpcodeBase;
|
||||
SIMDInstructionInfo info;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low byte values in src into word integers
|
||||
// and store them in dest.
|
||||
void BW(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void BW(const xRegisterSSE& to, const xIndirect64& from) const;
|
||||
void BW(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low byte values in src into dword integers
|
||||
// and store them in dest.
|
||||
void BD(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void BD(const xRegisterSSE& to, const xIndirect32& from) const;
|
||||
void BD(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low byte values in src into qword integers
|
||||
// and store them in dest.
|
||||
void BQ(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void BQ(const xRegisterSSE& to, const xIndirect16& from) const;
|
||||
void BQ(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low word values in src into dword integers
|
||||
// and store them in dest.
|
||||
void WD(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void WD(const xRegisterSSE& to, const xIndirect64& from) const;
|
||||
void WD(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low word values in src into qword integers
|
||||
// and store them in dest.
|
||||
void WQ(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void WQ(const xRegisterSSE& to, const xIndirect32& from) const;
|
||||
void WQ(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
|
||||
// [SSE-4.1] Zero/Sign-extend the low dword values in src into qword integers
|
||||
// and store them in dest.
|
||||
void DQ(const xRegisterSSE& to, const xRegisterSSE& from) const;
|
||||
void DQ(const xRegisterSSE& to, const xIndirect64& from) const;
|
||||
void DQ(const xRegisterSSE& to, const xIndirectVoid& from) const;
|
||||
};
|
||||
} // namespace x86Emitter
|
||||
|
||||
@@ -13,11 +13,15 @@ namespace x86Emitter
|
||||
{
|
||||
inline void _selector_assertion_check(u8 selector) const;
|
||||
|
||||
void PS(const xRegisterSSE& to, const xRegisterSSE& from, u8 selector) const;
|
||||
void PS(const xRegisterSSE& to, const xIndirectVoid& from, u8 selector) const;
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src, u8 selector) const { PS(dst, dst, src, selector); }
|
||||
void PS(const xRegisterSSE& dst, const xIndirectVoid& src, u8 selector) const { PS(dst, dst, src, selector); }
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, u8 selector) const;
|
||||
void PS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2, u8 selector) const;
|
||||
|
||||
void PD(const xRegisterSSE& to, const xRegisterSSE& from, u8 selector) const;
|
||||
void PD(const xRegisterSSE& to, const xIndirectVoid& from, u8 selector) const;
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src, u8 selector) const { PD(dst, dst, src, selector); }
|
||||
void PD(const xRegisterSSE& dst, const xIndirectVoid& src, u8 selector) const { PD(dst, dst, src, selector); }
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, u8 selector) const;
|
||||
void PD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirectVoid& src2, u8 selector) const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -27,17 +31,17 @@ namespace x86Emitter
|
||||
{
|
||||
// Copies doublewords from src and inserts them into dest at dword locations selected
|
||||
// with the order operand (8 bit immediate).
|
||||
const xImplSimd_DestRegImmSSE D;
|
||||
const xImplSimd_2ArgImm D;
|
||||
|
||||
// Copies words from the low quadword of src and inserts them into the low quadword
|
||||
// of dest at word locations selected with the order operand (8 bit immediate).
|
||||
// The high quadword of src is copied to the high quadword of dest.
|
||||
const xImplSimd_DestRegImmSSE LW;
|
||||
const xImplSimd_2ArgImm LW;
|
||||
|
||||
// Copies words from the high quadword of src and inserts them into the high quadword
|
||||
// of dest at word locations selected with the order operand (8 bit immediate).
|
||||
// The low quadword of src is copied to the low quadword of dest.
|
||||
const xImplSimd_DestRegImmSSE HW;
|
||||
const xImplSimd_2ArgImm HW;
|
||||
|
||||
// [sSSE-3] Performs in-place shuffles of bytes in dest according to the shuffle
|
||||
// control mask in src. If the most significant bit (bit[7]) of each byte of the
|
||||
@@ -46,42 +50,7 @@ namespace x86Emitter
|
||||
// byte in dest. The value of each index is the least significant 4 bits (128-bit
|
||||
// operation) or 3 bits (64-bit operation) of the shuffle control byte.
|
||||
//
|
||||
const xImplSimd_DestRegEither B;
|
||||
|
||||
// below is my test bed for a new system, free of subclasses. Was supposed to improve intellisense
|
||||
// but it doesn't (makes it worse). Will try again in MSVC 2010. --air
|
||||
|
||||
#if 0
|
||||
// Copies words from src and inserts them into dest at word locations selected with
|
||||
// the order operand (8 bit immediate).
|
||||
|
||||
// Copies doublewords from src and inserts them into dest at dword locations selected
|
||||
// with the order operand (8 bit immediate).
|
||||
void D( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm ) const { xOpWrite0F( 0x66, 0x70, to, from, imm ); }
|
||||
void D( const xRegisterSSE& to, const xIndirectVoid& from, u8 imm ) const { xOpWrite0F( 0x66, 0x70, to, from, imm ); }
|
||||
|
||||
// Copies words from the low quadword of src and inserts them into the low quadword
|
||||
// of dest at word locations selected with the order operand (8 bit immediate).
|
||||
// The high quadword of src is copied to the high quadword of dest.
|
||||
void LW( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm ) const { xOpWrite0F( 0xf2, 0x70, to, from, imm ); }
|
||||
void LW( const xRegisterSSE& to, const xIndirectVoid& from, u8 imm ) const { xOpWrite0F( 0xf2, 0x70, to, from, imm ); }
|
||||
|
||||
// Copies words from the high quadword of src and inserts them into the high quadword
|
||||
// of dest at word locations selected with the order operand (8 bit immediate).
|
||||
// The low quadword of src is copied to the low quadword of dest.
|
||||
void HW( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm ) const { xOpWrite0F( 0xf3, 0x70, to, from, imm ); }
|
||||
void HW( const xRegisterSSE& to, const xIndirectVoid& from, u8 imm ) const { xOpWrite0F( 0xf3, 0x70, to, from, imm ); }
|
||||
|
||||
// [sSSE-3] Performs in-place shuffles of bytes in dest according to the shuffle
|
||||
// control mask in src. If the most significant bit (bit[7]) of each byte of the
|
||||
// shuffle control mask is set, then constant zero is written in the result byte.
|
||||
// Each byte in the shuffle control mask forms an index to permute the corresponding
|
||||
// byte in dest. The value of each index is the least significant 4 bits (128-bit
|
||||
// operation) or 3 bits (64-bit operation) of the shuffle control byte.
|
||||
//
|
||||
void B( const xRegisterSSE& to, const xRegisterSSE& from ) const { OpWriteSSE( 0x66, 0x0038 ); }
|
||||
void B( const xRegisterSSE& to, const xIndirectVoid& from ) const { OpWriteSSE( 0x66, 0x0038 ); }
|
||||
#endif
|
||||
const xImplSimd_3Arg B;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -90,22 +59,22 @@ namespace x86Emitter
|
||||
struct SimdImpl_PUnpack
|
||||
{
|
||||
// Unpack and interleave low-order bytes from src and dest into dest.
|
||||
const xImplSimd_DestRegEither LBW;
|
||||
const xImplSimd_3Arg LBW;
|
||||
// Unpack and interleave low-order words from src and dest into dest.
|
||||
const xImplSimd_DestRegEither LWD;
|
||||
const xImplSimd_3Arg LWD;
|
||||
// Unpack and interleave low-order doublewords from src and dest into dest.
|
||||
const xImplSimd_DestRegEither LDQ;
|
||||
const xImplSimd_3Arg LDQ;
|
||||
// Unpack and interleave low-order quadwords from src and dest into dest.
|
||||
const xImplSimd_DestRegSSE LQDQ;
|
||||
const xImplSimd_3Arg LQDQ;
|
||||
|
||||
// Unpack and interleave high-order bytes from src and dest into dest.
|
||||
const xImplSimd_DestRegEither HBW;
|
||||
const xImplSimd_3Arg HBW;
|
||||
// Unpack and interleave high-order words from src and dest into dest.
|
||||
const xImplSimd_DestRegEither HWD;
|
||||
const xImplSimd_3Arg HWD;
|
||||
// Unpack and interleave high-order doublewords from src and dest into dest.
|
||||
const xImplSimd_DestRegEither HDQ;
|
||||
const xImplSimd_3Arg HDQ;
|
||||
// Unpack and interleave high-order quadwords from src and dest into dest.
|
||||
const xImplSimd_DestRegSSE HQDQ;
|
||||
const xImplSimd_3Arg HQDQ;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -117,19 +86,19 @@ namespace x86Emitter
|
||||
{
|
||||
// Converts packed signed word integers from src and dest into packed signed
|
||||
// byte integers in dest, using signed saturation.
|
||||
const xImplSimd_DestRegEither SSWB;
|
||||
const xImplSimd_3Arg SSWB;
|
||||
|
||||
// Converts packed signed dword integers from src and dest into packed signed
|
||||
// word integers in dest, using signed saturation.
|
||||
const xImplSimd_DestRegEither SSDW;
|
||||
const xImplSimd_3Arg SSDW;
|
||||
|
||||
// Converts packed unsigned word integers from src and dest into packed unsigned
|
||||
// byte integers in dest, using unsigned saturation.
|
||||
const xImplSimd_DestRegEither USWB;
|
||||
const xImplSimd_3Arg USWB;
|
||||
|
||||
// [SSE-4.1] Converts packed unsigned dword integers from src and dest into packed
|
||||
// unsigned word integers in dest, using signed saturation.
|
||||
const xImplSimd_DestRegSSE USDW;
|
||||
const xImplSimd_3Arg USDW;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -144,14 +113,14 @@ namespace x86Emitter
|
||||
// dest[2] <- dest[3]
|
||||
// dest[3] <- src[3]
|
||||
//
|
||||
const xImplSimd_DestRegSSE HPS;
|
||||
const xImplSimd_3Arg HPS;
|
||||
|
||||
// Unpacks the high quadword [double-precision] values from src and dest into
|
||||
// dest, such that the result of dest looks like this:
|
||||
// dest.lo <- dest.hi
|
||||
// dest.hi <- src.hi
|
||||
//
|
||||
const xImplSimd_DestRegSSE HPD;
|
||||
const xImplSimd_3Arg HPD;
|
||||
|
||||
// Unpacks the low doubleword [single-precision] values from src and dest into
|
||||
// dest, such that the result of dest looks like this:
|
||||
@@ -160,7 +129,7 @@ namespace x86Emitter
|
||||
// dest[1] <- src[0]
|
||||
// dest[0] <- dest[0]
|
||||
//
|
||||
const xImplSimd_DestRegSSE LPS;
|
||||
const xImplSimd_3Arg LPS;
|
||||
|
||||
// Unpacks the low quadword [double-precision] values from src and dest into
|
||||
// dest, effectively moving the low portion of src into the upper portion of dest.
|
||||
@@ -168,7 +137,7 @@ namespace x86Emitter
|
||||
// dest.hi <- src.lo
|
||||
// dest.lo <- dest.lo [remains unchanged!]
|
||||
//
|
||||
const xImplSimd_DestRegSSE LPD;
|
||||
const xImplSimd_3Arg LPD;
|
||||
};
|
||||
|
||||
|
||||
@@ -179,17 +148,25 @@ namespace x86Emitter
|
||||
//
|
||||
struct xImplSimd_PInsert
|
||||
{
|
||||
void B(const xRegisterSSE& to, const xRegister32& from, u8 imm8) const;
|
||||
void B(const xRegisterSSE& to, const xIndirect32& from, u8 imm8) const;
|
||||
void B(const xRegisterSSE& dst, const xRegister32& src, u8 imm8) const { B(dst, dst, src, imm8); }
|
||||
void B(const xRegisterSSE& dst, const xIndirect8& src, u8 imm8) const { B(dst, dst, src, imm8); }
|
||||
void B(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegister32& src2, u8 imm8) const;
|
||||
void B(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect8& src2, u8 imm8) const;
|
||||
|
||||
void W(const xRegisterSSE& to, const xRegister32& from, u8 imm8) const;
|
||||
void W(const xRegisterSSE& to, const xIndirect32& from, u8 imm8) const;
|
||||
void W(const xRegisterSSE& dst, const xRegister32& src, u8 imm8) const { W(dst, dst, src, imm8); }
|
||||
void W(const xRegisterSSE& dst, const xIndirect16& src, u8 imm8) const { W(dst, dst, src, imm8); }
|
||||
void W(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegister32& src2, u8 imm8) const;
|
||||
void W(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect16& src2, u8 imm8) const;
|
||||
|
||||
void D(const xRegisterSSE& to, const xRegister32& from, u8 imm8) const;
|
||||
void D(const xRegisterSSE& to, const xIndirect32& from, u8 imm8) const;
|
||||
void D(const xRegisterSSE& dst, const xRegister32& src, u8 imm8) const { D(dst, dst, src, imm8); }
|
||||
void D(const xRegisterSSE& dst, const xIndirect32& src, u8 imm8) const { D(dst, dst, src, imm8); }
|
||||
void D(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegister32& src2, u8 imm8) const;
|
||||
void D(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect32& src2, u8 imm8) const;
|
||||
|
||||
void Q(const xRegisterSSE& to, const xRegister64& from, u8 imm8) const;
|
||||
void Q(const xRegisterSSE& to, const xIndirect64& from, u8 imm8) const;
|
||||
void Q(const xRegisterSSE& dst, const xRegister64& src, u8 imm8) const { Q(dst, dst, src, imm8); }
|
||||
void Q(const xRegisterSSE& dst, const xIndirect64& src, u8 imm8) const { Q(dst, dst, src, imm8); }
|
||||
void Q(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegister64& src2, u8 imm8) const;
|
||||
void Q(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect64& src2, u8 imm8) const;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -202,8 +179,8 @@ namespace x86Emitter
|
||||
// [SSE-4.1] Copies the byte element specified by imm8 from src to dest. The upper bits
|
||||
// of dest are zero-extended (cleared). This can be used to extract any single packed
|
||||
// byte value from src into an x86 32 bit register.
|
||||
void B(const xRegister32& to, const xRegisterSSE& from, u8 imm8) const;
|
||||
void B(const xIndirect32& dest, const xRegisterSSE& from, u8 imm8) const;
|
||||
void B(const xRegister32& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
void B(const xIndirect8& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
|
||||
// Copies the word element specified by imm8 from src to dest. The upper bits
|
||||
// of dest are zero-extended (cleared). This can be used to extract any single packed
|
||||
@@ -211,16 +188,17 @@ namespace x86Emitter
|
||||
//
|
||||
// [SSE-4.1] Note: Indirect memory forms of this instruction are an SSE-4.1 extension!
|
||||
//
|
||||
void W(const xRegister32& to, const xRegisterSSE& from, u8 imm8) const;
|
||||
void W(const xIndirect32& dest, const xRegisterSSE& from, u8 imm8) const;
|
||||
void W(const xRegister32& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
void W(const xIndirect16& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
|
||||
// [SSE-4.1] Copies the dword element specified by imm8 from src to dest. This can be
|
||||
// used to extract any single packed dword value from src into an x86 32 bit register.
|
||||
void D(const xRegister32& to, const xRegisterSSE& from, u8 imm8) const;
|
||||
void D(const xIndirect32& dest, const xRegisterSSE& from, u8 imm8) const;
|
||||
void D(const xRegister32& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
void D(const xIndirect32& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
|
||||
// Insert a qword integer value from r/m64 into the xmm1 at the destination element specified by imm8.
|
||||
void Q(const xRegister64& to, const xRegisterSSE& from, u8 imm8) const;
|
||||
void Q(const xIndirect64& dest, const xRegisterSSE& from, u8 imm8) const;
|
||||
// [SSE-4.1] Copies the dword element specified by imm8 from src to dest. This can be
|
||||
// used to extract any single packed dword value from src into an x86 64 bit register.
|
||||
void Q(const xRegister64& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
void Q(const xIndirect64& dst, const xRegisterSSE& src, u8 imm8) const;
|
||||
};
|
||||
} // namespace x86Emitter
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace x86Emitter
|
||||
|
||||
extern const xImpl_Group1 xADC;
|
||||
extern const xImpl_Group1 xSBB;
|
||||
extern const xImpl_Group1 xCMP;
|
||||
|
||||
extern const xImpl_G1Logic xAND;
|
||||
extern const xImpl_G1Logic xOR;
|
||||
@@ -36,7 +37,6 @@ namespace x86Emitter
|
||||
|
||||
extern const xImpl_G1Arith xADD;
|
||||
extern const xImpl_G1Arith xSUB;
|
||||
extern const xImpl_G1Compare xCMP;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Group 2 Instruction Class
|
||||
@@ -448,37 +448,40 @@ namespace x86Emitter
|
||||
extern void xFXSAVE(const xIndirectVoid& dest);
|
||||
extern void xFXRSTOR(const xIndirectVoid& src);
|
||||
|
||||
extern void xMOVDZX(const xRegisterSSE& to, const xRegister32or64& from);
|
||||
extern void xMOVDZX(const xRegisterSSE& to, const xIndirectVoid& src);
|
||||
extern void xMOVDZX(const xRegisterSSE& dst, const xRegister32or64& src);
|
||||
extern void xMOVDZX(const xRegisterSSE& dst, const xIndirectVoid& src);
|
||||
|
||||
extern void xMOVD(const xRegister32or64& to, const xRegisterSSE& from);
|
||||
extern void xMOVD(const xIndirectVoid& dest, const xRegisterSSE& from);
|
||||
extern void xMOVD(const xRegister32or64& dst, const xRegisterSSE& src);
|
||||
extern void xMOVD(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVQ(const xIndirectVoid& dest, const xRegisterSSE& from);
|
||||
extern void xMOVQ(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVQZX(const xRegisterSSE& to, const xIndirectVoid& src);
|
||||
extern void xMOVQZX(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xMOVQZX(const xRegisterSSE& dst, const xIndirectVoid& src);
|
||||
extern void xMOVQZX(const xRegisterSSE& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVSS(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xMOVSS(const xIndirectVoid& to, const xRegisterSSE& from);
|
||||
extern void xMOVSD(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xMOVSD(const xIndirectVoid& to, const xRegisterSSE& from);
|
||||
extern void xMOVSS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2);
|
||||
static void xMOVSS(const xRegisterSSE& dst, const xRegisterSSE& src) { xMOVSS(dst, dst, src); }
|
||||
extern void xMOVSS(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
extern void xMOVSD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2);
|
||||
static void xMOVSD(const xRegisterSSE& dst, const xRegisterSSE& src) { xMOVSD(dst, dst, src); }
|
||||
extern void xMOVSD(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVSSZX(const xRegisterSSE& to, const xIndirectVoid& from);
|
||||
extern void xMOVSDZX(const xRegisterSSE& to, const xIndirectVoid& from);
|
||||
extern void xMOVSSZX(const xRegisterSSE& dst, const xIndirectVoid& src);
|
||||
extern void xMOVSDZX(const xRegisterSSE& dst, const xIndirectVoid& src);
|
||||
|
||||
extern void xMOVNTDQA(const xRegisterSSE& to, const xIndirectVoid& from);
|
||||
extern void xMOVNTDQA(const xIndirectVoid& to, const xRegisterSSE& from);
|
||||
extern void xMOVNTDQA(const xRegisterSSE& dst, const xIndirectVoid& src);
|
||||
extern void xMOVNTDQA(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVNTPD(const xIndirectVoid& to, const xRegisterSSE& from);
|
||||
extern void xMOVNTPS(const xIndirectVoid& to, const xRegisterSSE& from);
|
||||
extern void xMOVNTPD(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
extern void xMOVNTPS(const xIndirectVoid& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMOVMSKPS(const xRegister32& to, const xRegisterSSE& from);
|
||||
extern void xMOVMSKPD(const xRegister32& to, const xRegisterSSE& from);
|
||||
extern void xMOVMSKPS(const xRegister32& dst, const xRegisterSSE& src);
|
||||
extern void xMOVMSKPD(const xRegister32& dst, const xRegisterSSE& src);
|
||||
|
||||
extern void xMASKMOV(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xPMOVMSKB(const xRegister32or64& to, const xRegisterSSE& from);
|
||||
extern void xPALIGNR(const xRegisterSSE& to, const xRegisterSSE& from, u8 imm8);
|
||||
extern void xMASKMOV(const xRegisterSSE& dst, const xRegisterSSE& src);
|
||||
extern void xPMOVMSKB(const xRegister32or64& dst, const xRegisterSSE& src);
|
||||
extern void xPALIGNR(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, u8 imm8);
|
||||
static void xPALIGNR(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm8) { xPALIGNR(dst, dst, src, imm8); }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -486,14 +489,8 @@ namespace x86Emitter
|
||||
extern const xImplSimd_MoveSSE xMOVUPS;
|
||||
extern const xImplSimd_MoveSSE xMOVAPD;
|
||||
extern const xImplSimd_MoveSSE xMOVUPD;
|
||||
|
||||
#ifdef ALWAYS_USE_MOVAPS
|
||||
extern const xImplSimd_MoveSSE xMOVDQA;
|
||||
extern const xImplSimd_MoveSSE xMOVDQU;
|
||||
#else
|
||||
extern const xImplSimd_MoveDQ xMOVDQA;
|
||||
extern const xImplSimd_MoveDQ xMOVDQU;
|
||||
#endif
|
||||
|
||||
extern const xImplSimd_MovHL xMOVH;
|
||||
extern const xImplSimd_MovHL xMOVL;
|
||||
@@ -505,27 +502,29 @@ namespace x86Emitter
|
||||
extern const xImplSimd_PMove xPMOVSX;
|
||||
extern const xImplSimd_PMove xPMOVZX;
|
||||
|
||||
extern const xImplSimd_DestRegSSE xMOVSLDUP;
|
||||
extern const xImplSimd_DestRegSSE xMOVSHDUP;
|
||||
extern const xImplSimd_2Arg xMOVSLDUP;
|
||||
extern const xImplSimd_2Arg xMOVSHDUP;
|
||||
|
||||
extern void xINSERTPS(const xRegisterSSE& to, const xRegisterSSE& from, u8 imm8);
|
||||
extern void xINSERTPS(const xRegisterSSE& to, const xIndirect32& from, u8 imm8);
|
||||
extern void xINSERTPS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2, u8 imm8);
|
||||
extern void xINSERTPS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect32& src2, u8 imm8);
|
||||
static void xINSERTPS(const xRegisterSSE& dst, const xRegisterSSE& src, u8 imm8) { xINSERTPS(dst, dst, src, imm8); }
|
||||
static void xINSERTPS(const xRegisterSSE& dst, const xIndirect32& src, u8 imm8) { xINSERTPS(dst, dst, src, imm8); }
|
||||
|
||||
extern void xEXTRACTPS(const xRegister32or64& to, const xRegisterSSE& from, u8 imm8);
|
||||
extern void xEXTRACTPS(const xIndirect32& dest, const xRegisterSSE& from, u8 imm8);
|
||||
extern void xEXTRACTPS(const xRegister32& dst, const xRegisterSSE& src, u8 imm8);
|
||||
extern void xEXTRACTPS(const xIndirect32& dst, const xRegisterSSE& src, u8 imm8);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
extern const xImplSimd_DestRegEither xPAND;
|
||||
extern const xImplSimd_DestRegEither xPANDN;
|
||||
extern const xImplSimd_DestRegEither xPOR;
|
||||
extern const xImplSimd_DestRegEither xPXOR;
|
||||
extern const xImplSimd_3Arg xPAND;
|
||||
extern const xImplSimd_3Arg xPANDN;
|
||||
extern const xImplSimd_3Arg xPOR;
|
||||
extern const xImplSimd_3Arg xPXOR;
|
||||
|
||||
extern const xImplSimd_Shuffle xSHUF;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
extern const xImplSimd_DestRegSSE xPTEST;
|
||||
extern const xImplSimd_2Arg xPTEST;
|
||||
|
||||
extern const xImplSimd_MinMax xMIN;
|
||||
extern const xImplSimd_MinMax xMAX;
|
||||
@@ -565,15 +564,23 @@ namespace x86Emitter
|
||||
|
||||
extern void xCVTSD2SI(const xRegister32or64& to, const xRegisterSSE& from);
|
||||
extern void xCVTSD2SI(const xRegister32or64& to, const xIndirect64& from);
|
||||
extern void xCVTSD2SS(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xCVTSD2SS(const xRegisterSSE& to, const xIndirect64& from);
|
||||
extern void xCVTSI2SS(const xRegisterSSE& to, const xRegister32or64& from);
|
||||
extern void xCVTSI2SS(const xRegisterSSE& to, const xIndirect32& from);
|
||||
extern void xCVTSD2SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2);
|
||||
extern void xCVTSD2SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect64& src2);
|
||||
extern void xCVTSI2SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegister32or64& src2);
|
||||
extern void xCVTSI2SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect32& src2);
|
||||
extern void xCVTSI2SS(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect64& src2);
|
||||
static void xCVTSD2SS(const xRegisterSSE& to, const xRegisterSSE& from) { xCVTSD2SS(to, to, from); }
|
||||
static void xCVTSD2SS(const xRegisterSSE& to, const xIndirect64& from) { xCVTSD2SS(to, to, from); }
|
||||
static void xCVTSI2SS(const xRegisterSSE& to, const xRegister32or64& from) { xCVTSI2SS(to, to, from); }
|
||||
static void xCVTSI2SS(const xRegisterSSE& to, const xIndirect32& from) { xCVTSI2SS(to, to, from); }
|
||||
static void xCVTSI2SS(const xRegisterSSE& to, const xIndirect64& from) { xCVTSI2SS(to, to, from); }
|
||||
|
||||
extern void xCVTSS2SD(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xCVTSS2SD(const xRegisterSSE& to, const xIndirect32& from);
|
||||
extern void xCVTSS2SI(const xRegister32or64& to, const xRegisterSSE& from);
|
||||
extern void xCVTSS2SI(const xRegister32or64& to, const xIndirect32& from);
|
||||
extern void xCVTSS2SD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xRegisterSSE& src2);
|
||||
extern void xCVTSS2SD(const xRegisterSSE& dst, const xRegisterSSE& src1, const xIndirect32& src2);
|
||||
static void xCVTSS2SD(const xRegisterSSE& to, const xRegisterSSE& from) { xCVTSS2SD(to, to, from); }
|
||||
static void xCVTSS2SD(const xRegisterSSE& to, const xIndirect32& from) { xCVTSS2SD(to, to, from); }
|
||||
|
||||
extern void xCVTTPD2DQ(const xRegisterSSE& to, const xRegisterSSE& from);
|
||||
extern void xCVTTPD2DQ(const xRegisterSSE& to, const xIndirect128& from);
|
||||
@@ -614,22 +621,6 @@ namespace x86Emitter
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
extern const xImplAVX_Move xVMOVAPS;
|
||||
extern const xImplAVX_Move xVMOVUPS;
|
||||
extern const xImplAVX_ArithFloat xVADD;
|
||||
extern const xImplAVX_ArithFloat xVSUB;
|
||||
extern const xImplAVX_ArithFloat xVMUL;
|
||||
extern const xImplAVX_ArithFloat xVDIV;
|
||||
extern const xImplAVX_CmpFloat xVCMP;
|
||||
extern const xImplAVX_ThreeArgYMM xVPAND;
|
||||
extern const xImplAVX_ThreeArgYMM xVPANDN;
|
||||
extern const xImplAVX_ThreeArgYMM xVPOR;
|
||||
extern const xImplAVX_ThreeArgYMM xVPXOR;
|
||||
extern const xImplAVX_CmpInt xVPCMP;
|
||||
|
||||
extern void xVPMOVMSKB(const xRegister32& to, const xRegisterSSE& from);
|
||||
extern void xVMOVMSKPS(const xRegister32& to, const xRegisterSSE& from);
|
||||
extern void xVMOVMSKPD(const xRegister32& to, const xRegisterSSE& from);
|
||||
extern void xVZEROUPPER();
|
||||
|
||||
} // namespace x86Emitter
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace x86Emitter
|
||||
{
|
||||
|
||||
#define OpWriteSSE(pre, op) xOpWrite0F(pre, op, to, from)
|
||||
#define OpWriteSIMDMovOp(op) EmitSIMD(op.mov(), to, to, from)
|
||||
|
||||
extern void SimdPrefix(u8 prefix, u16 opcode);
|
||||
extern void EmitSibMagic(uint regfield, const void* address, int extraRIPOffset = 0);
|
||||
@@ -25,6 +26,9 @@ namespace x86Emitter
|
||||
extern void EmitRex(const xRegisterBase& reg1, const xRegisterBase& reg2);
|
||||
extern void EmitRex(const xRegisterBase& reg1, const void* src);
|
||||
extern void EmitRex(const xRegisterBase& reg1, const xIndirectVoid& sib);
|
||||
extern void EmitRex(SIMDInstructionInfo info, u32 reg1, const xRegisterBase& reg2);
|
||||
extern void EmitRex(SIMDInstructionInfo info, const xRegisterBase& reg1, const xRegisterBase& reg2);
|
||||
extern void EmitRex(SIMDInstructionInfo info, const xRegisterBase& reg1, const xIndirectVoid& sib);
|
||||
|
||||
extern void _xMovRtoR(const xRegisterInt& to, const xRegisterInt& from);
|
||||
|
||||
@@ -171,4 +175,44 @@ namespace x86Emitter
|
||||
xWrite8(opcode);
|
||||
EmitSibMagic(param1, param3);
|
||||
}
|
||||
|
||||
void EmitVEX(SIMDInstructionInfo info, const xRegisterBase& dst, u8 src1, const xRegisterBase& src2, int extraRipOffset = 0);
|
||||
void EmitVEX(SIMDInstructionInfo info, const xRegisterBase& dst, u8 src1, const xIndirectVoid& src2, int extraRipOffset = 0);
|
||||
void EmitVEX(SIMDInstructionInfo info, u32 ext, u8 dst, const xRegisterBase& src2, int extraRipOffset = 0);
|
||||
|
||||
template <typename S2>
|
||||
__emitinline static void EmitVEX(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const S2& src2, int extraRipOffset = 0)
|
||||
{
|
||||
EmitVEX(info, dst, src1.GetId(), src2, extraRipOffset);
|
||||
}
|
||||
|
||||
// Emitter helpers for SIMD operations
|
||||
// These will dispatch to either SSE or AVX implementations
|
||||
|
||||
void EmitSIMDImpl(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, int extraRipOffset);
|
||||
void EmitSIMDImpl(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const xRegisterBase& src2, int extraRipOffset);
|
||||
void EmitSIMDImpl(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const xIndirectVoid& src2, int extraRipOffset);
|
||||
void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const xRegisterBase& src2, const xRegisterBase& src3);
|
||||
void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const xIndirectVoid& src2, const xRegisterBase& src3);
|
||||
|
||||
__emitinline static void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1)
|
||||
{
|
||||
EmitSIMDImpl(info, dst, src1, 0);
|
||||
}
|
||||
__emitinline static void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, u8 imm)
|
||||
{
|
||||
EmitSIMDImpl(info, dst, src1, 1);
|
||||
xWrite8(imm);
|
||||
}
|
||||
template <typename S2>
|
||||
__emitinline static void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const S2& src2)
|
||||
{
|
||||
EmitSIMDImpl(info, dst, src1, src2, 0);
|
||||
}
|
||||
template <typename S2>
|
||||
__emitinline static void EmitSIMD(SIMDInstructionInfo info, const xRegisterBase& dst, const xRegisterBase& src1, const S2& src2, u8 imm)
|
||||
{
|
||||
EmitSIMDImpl(info, dst, src1, src2, 1);
|
||||
xWrite8(imm);
|
||||
}
|
||||
} // namespace x86Emitter
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace x86Emitter
|
||||
const xRegisterInt& to_ = to.GetNonWide();
|
||||
if (!preserve_flags && (imm == 0))
|
||||
{
|
||||
_g1_EmitOp(G1Type_XOR, to_, to_);
|
||||
xXOR(to_, to_);
|
||||
}
|
||||
else if (imm == (sptr)(u32)imm || !to.IsWide())
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,6 +51,8 @@
|
||||
thread_local u8* x86Ptr;
|
||||
thread_local XMMSSEType g_xmmtypes[iREGCNT_XMM] = {XMMT_INT};
|
||||
|
||||
bool x86Emitter::use_avx;
|
||||
|
||||
namespace x86Emitter
|
||||
{
|
||||
|
||||
@@ -502,6 +504,46 @@ const xRegister32
|
||||
EmitRex(w, r, x, b, reg1.IsExtended8Bit());
|
||||
}
|
||||
|
||||
void EmitRex(SIMDInstructionInfo info, const xRegisterBase& reg1, const xRegisterBase& reg2)
|
||||
{
|
||||
bool w = false;
|
||||
if (info.dst_w)
|
||||
w |= reg1.IsWide();
|
||||
if (info.src_w)
|
||||
w |= reg2.IsWide();
|
||||
bool r = reg1.IsExtended();
|
||||
bool x = false;
|
||||
bool b = reg2.IsExtended();
|
||||
EmitRex(w, r, x, b, reg2.IsExtended8Bit());
|
||||
}
|
||||
|
||||
void EmitRex(SIMDInstructionInfo info, const xRegisterBase& reg1, const xIndirectVoid& sib)
|
||||
{
|
||||
bool w = false;
|
||||
if (info.dst_w)
|
||||
w |= reg1.IsWide();
|
||||
if (info.src_w)
|
||||
w |= sib.IsWide();
|
||||
bool r = reg1.IsExtended();
|
||||
bool x = sib.Index.IsExtended();
|
||||
bool b = sib.Base.IsExtended();
|
||||
if (!NeedsSibMagic(sib))
|
||||
{
|
||||
b = x;
|
||||
x = false;
|
||||
}
|
||||
EmitRex(w, r, x, b, reg1.IsExtended8Bit());
|
||||
}
|
||||
|
||||
void EmitRex(SIMDInstructionInfo info, uint reg1, const xRegisterBase& reg2)
|
||||
{
|
||||
bool w = info.src_w ? reg2.IsWide() : false;
|
||||
bool r = false;
|
||||
bool x = false;
|
||||
bool b = reg2.IsExtended();
|
||||
EmitRex(w, r, x, b, reg2.IsExtended8Bit());
|
||||
}
|
||||
|
||||
// For use by instructions that are implicitly wide
|
||||
void EmitRexImplicitlyWide(const xRegisterBase& reg)
|
||||
{
|
||||
@@ -526,6 +568,89 @@ const xRegister32
|
||||
EmitRex(w, r, x, b);
|
||||
}
|
||||
|
||||
__emitinline static u8 GetVEXRXB(u32 ext, const xRegisterBase& src2)
|
||||
{
|
||||
return src2.IsExtended() << 5;
|
||||
}
|
||||
|
||||
__emitinline static u8 GetVEXRXB(const xRegisterBase& dst, const xIndirectVoid& src2)
|
||||
{
|
||||
bool r = dst.IsExtended();
|
||||
bool x = src2.Index.IsExtended();
|
||||
bool b = src2.Base.IsExtended();
|
||||
if (!NeedsSibMagic(src2))
|
||||
{
|
||||
b = x;
|
||||
x = false;
|
||||
}
|
||||
return (r << 7) | (x << 6) | (b << 5);
|
||||
}
|
||||
|
||||
__emitinline static u8 GetVEXRXB(const xRegisterBase& dst, const xRegisterBase& src2)
|
||||
{
|
||||
return (dst.IsExtended() << 7) | (src2.IsExtended() << 5);
|
||||
}
|
||||
|
||||
__emitinline static u8 GetL(const xRegisterBase& arg) { return arg.IsWideSIMD() ? 4 : 0; }
|
||||
__emitinline static u8 GetL(const xIndirectVoid& arg) { return 0; }
|
||||
__emitinline static u8 GetL(u32 ext) { return 0; }
|
||||
|
||||
__emitinline static u8 GetVEXW(const xRegisterBase& arg) { return arg.GetOperandSize() == 8 ? 0x80 : 0; }
|
||||
__emitinline static u8 GetVEXW(const xIndirectVoid& arg) { return arg.GetOperandSize() == 8 ? 0x80 : 0; }
|
||||
__emitinline static u8 GetVEXW(u32 ext) { return 0; }
|
||||
|
||||
template <typename D, typename S2>
|
||||
__emitinline void xOpWriteVEX(SIMDInstructionInfo info, D dst, u8 src1, const S2& src2, int extraRipOffset)
|
||||
{
|
||||
u8 m = static_cast<u8>(info.map);
|
||||
u8 p = static_cast<u8>(info.prefix);
|
||||
u8 w = 0;
|
||||
if (info.src_w || info.dst_w) {
|
||||
if (info.dst_w)
|
||||
w |= GetVEXW(dst);
|
||||
if (info.src_w)
|
||||
w |= GetVEXW(src2);
|
||||
} else {
|
||||
w = info.w_bit << 7;
|
||||
}
|
||||
u8 l = GetL(dst) | GetL(src2); // Needed for 256-bit movemask.
|
||||
u8 rxb = GetVEXRXB(dst, src2);
|
||||
u8 b2 = p | l | (src1 << 3);
|
||||
if (!w && info.map == SIMDInstructionInfo::Map::M0F && !(rxb & 0x7F))
|
||||
{
|
||||
// Can use a C5 VEX
|
||||
u8 b1 = rxb | b2;
|
||||
xWrite8(0xC5);
|
||||
xWrite8(b1 ^ 0xF8);
|
||||
xWrite8(info.opcode);
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 b1 = rxb | m;
|
||||
b2 |= w;
|
||||
xWrite8(0xC4);
|
||||
xWrite8(b1 ^ 0xE0);
|
||||
xWrite8(b2 ^ 0x78);
|
||||
xWrite8(info.opcode);
|
||||
}
|
||||
EmitSibMagic(dst, src2, extraRipOffset);
|
||||
}
|
||||
|
||||
void EmitVEX(SIMDInstructionInfo info, const xRegisterBase& dst, u8 src1, const xRegisterBase& src2, int extraRipOffset)
|
||||
{
|
||||
xOpWriteVEX(info, dst, src1, src2, extraRipOffset);
|
||||
}
|
||||
|
||||
void EmitVEX(SIMDInstructionInfo info, const xRegisterBase& dst, u8 src1, const xIndirectVoid& src2, int extraRipOffset)
|
||||
{
|
||||
xOpWriteVEX(info, dst, src1, src2, extraRipOffset);
|
||||
}
|
||||
|
||||
void EmitVEX(SIMDInstructionInfo info, u32 ext, u8 dst, const xRegisterBase& src2, int extraRipOffset)
|
||||
{
|
||||
xOpWriteVEX(info, ext, dst, src2, extraRipOffset);
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// xSetPtr / xAlignPtr / xGetPtr / xAdvancePtr
|
||||
@@ -941,7 +1066,7 @@ const xRegister32
|
||||
else if (src.Displacement == 0)
|
||||
{
|
||||
_xMovRtoR(to, src.Base.MatchSizeTo(to));
|
||||
_g1_EmitOp(G1Type_ADD, to, src.Index.MatchSizeTo(to));
|
||||
xADD(to, src.Index.MatchSizeTo(to));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@ namespace x86Emitter
|
||||
static constexpr int SHADOW_STACK_SIZE = 0;
|
||||
#endif
|
||||
|
||||
/// This will switch all SSE instructions to generate AVX instructions instead
|
||||
extern bool use_avx;
|
||||
|
||||
extern void xWrite8(u8 val);
|
||||
extern void xWrite16(u16 val);
|
||||
extern void xWrite32(u32 val);
|
||||
@@ -47,23 +50,6 @@ namespace x86Emitter
|
||||
template <typename T>
|
||||
void xWrite(T val);
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ALWAYS_USE_MOVAPS [define] / AlwaysUseMovaps [const]
|
||||
// --------------------------------------------------------------------------------------
|
||||
// This tells the recompiler's emitter to always use movaps instead of movdqa. Both instructions
|
||||
// do the exact same thing, but movaps is 1 byte shorter, and thus results in a cleaner L1 cache
|
||||
// and some marginal speed gains as a result. (it's possible someday in the future the per-
|
||||
// formance of the two instructions could change, so this constant is provided to restore MOVDQA
|
||||
// use easily at a later time, if needed).
|
||||
//
|
||||
#define ALWAYS_USE_MOVAPS
|
||||
|
||||
#ifdef ALWAYS_USE_MOVAPS
|
||||
static const bool AlwaysUseMovaps = true;
|
||||
#else
|
||||
static const bool AlwaysUseMovaps = false;
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// __emitline - preprocessors definition
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -1075,4 +1061,4 @@ extern const xRegister32
|
||||
#include "implement/jmpcall.h"
|
||||
|
||||
#include "implement/bmi.h"
|
||||
#include "implement/avx.h"
|
||||
#include "implement/avx.h"
|
||||
|
||||
@@ -47,16 +47,16 @@ AboutDialog::AboutDialog(QWidget* parent)
|
||||
m_ui.links->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
m_ui.links->setText(QStringLiteral(
|
||||
R"(<a href="%1">%2</a> | <a href="%3">%4</a> | <a href="%5">%6</a> | <a href="%7">%8</a> | <a href="%9">%10</a>)")
|
||||
.arg(getWebsiteUrl())
|
||||
.arg(tr("Website"))
|
||||
.arg(getSupportForumsUrl())
|
||||
.arg(tr("Support Forums"))
|
||||
.arg(getGitHubRepositoryUrl())
|
||||
.arg(tr("GitHub Repository"))
|
||||
.arg(getLicenseUrl())
|
||||
.arg(tr("License"))
|
||||
.arg(getThirdPartyLicensesUrl())
|
||||
.arg(tr("Third-Party Licenses")));
|
||||
.arg(getWebsiteUrl())
|
||||
.arg(tr("Website"))
|
||||
.arg(getSupportForumsUrl())
|
||||
.arg(tr("Support Forums"))
|
||||
.arg(getGitHubRepositoryUrl())
|
||||
.arg(tr("GitHub Repository"))
|
||||
.arg(getLicenseUrl())
|
||||
.arg(tr("License"))
|
||||
.arg(getThirdPartyLicensesUrl())
|
||||
.arg(tr("Third-Party Licenses")));
|
||||
|
||||
connect(m_ui.links, &QLabel::linkActivated, this, &AboutDialog::linksLinkActivated);
|
||||
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>580</width>
|
||||
<height>300</height>
|
||||
<height>320</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
||||
@@ -83,15 +83,15 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Settings/ControllerSettingsWindow.h
|
||||
Settings/ControllerSettingsWindow.ui
|
||||
Settings/ControllerSettingWidgetBinder.h
|
||||
Settings/DebugAnalysisSettingsTab.ui
|
||||
Settings/DebugAnalysisSettingsWidget.cpp
|
||||
Settings/DebugAnalysisSettingsWidget.h
|
||||
Settings/DebugAnalysisSettingsWidget.ui
|
||||
Settings/DebugUserInterfaceSettingsWidget.cpp
|
||||
Settings/DebugUserInterfaceSettingsWidget.h
|
||||
Settings/DebugUserInterfaceSettingsWidget.ui
|
||||
Settings/DebugGSSettingsTab.ui
|
||||
Settings/DebugLoggingSettingsTab.ui
|
||||
Settings/DebugUserInterfaceSettingsTab.ui
|
||||
Settings/DebugSettingsWidget.cpp
|
||||
Settings/DebugSettingsWidget.h
|
||||
Settings/DebugSettingsWidget.ui
|
||||
Settings/EmulationSettingsWidget.cpp
|
||||
Settings/EmulationSettingsWidget.h
|
||||
Settings/EmulationSettingsWidget.ui
|
||||
@@ -114,9 +114,19 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Settings/GameSummaryWidget.cpp
|
||||
Settings/GameSummaryWidget.h
|
||||
Settings/GameSummaryWidget.ui
|
||||
Settings/GraphicsAdvancedSettingsTab.ui
|
||||
Settings/GraphicsDisplaySettingsTab.ui
|
||||
Settings/GraphicsHardwareFixesSettingsTab.ui
|
||||
Settings/GraphicsHardwareRenderingSettingsTab.ui
|
||||
Settings/GraphicsMediaCaptureSettingsTab.ui
|
||||
Settings/GraphicsOnScreenDisplaySettingsTab.ui
|
||||
Settings/GraphicsPostProcessingSettingsTab.ui
|
||||
Settings/GraphicsSettingsHeader.ui
|
||||
Settings/GraphicsSettingsWidget.cpp
|
||||
Settings/GraphicsSettingsWidget.h
|
||||
Settings/GraphicsSettingsWidget.ui
|
||||
Settings/GraphicsSoftwareRenderingSettingsTab.ui
|
||||
Settings/GraphicsTextureReplacementSettingsTab.ui
|
||||
Settings/GraphicsUpscalingFixesSettingsTab.ui
|
||||
Settings/HotkeySettingsWidget.cpp
|
||||
Settings/HotkeySettingsWidget.h
|
||||
Settings/InputBindingDialog.cpp
|
||||
@@ -149,6 +159,8 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Settings/HddCreateQt.cpp
|
||||
Settings/HddCreateQt.h
|
||||
Settings/PatchDetailsWidget.ui
|
||||
Settings/SettingsWidget.cpp
|
||||
Settings/SettingsWidget.h
|
||||
Settings/SettingsWindow.cpp
|
||||
Settings/SettingsWindow.h
|
||||
Settings/SettingsWindow.ui
|
||||
|
||||
@@ -269,7 +269,7 @@ QVariant BreakpointModel::headerData(int section, Qt::Orientation orientation, i
|
||||
//: Warning: limited space available. Abbreviate if needed.
|
||||
return tr("OFFSET");
|
||||
case BreakpointColumns::DESCRIPTION:
|
||||
return "DESCRIPTION";
|
||||
return tr("DESCRIPTION");
|
||||
case BreakpointColumns::SIZE_LABEL:
|
||||
//: Warning: limited space available. Abbreviate if needed.
|
||||
return tr("SIZE / LABEL");
|
||||
|
||||
@@ -38,7 +38,8 @@ namespace DebuggerEvents
|
||||
|
||||
bool switch_to_tab = true;
|
||||
|
||||
static constexpr const char* ACTION_PREFIX = QT_TRANSLATE_NOOP("DebuggerEvents", "Go to in");
|
||||
static constexpr const char* ACTION_STRING = QT_TRANSLATE_NOOP("DebuggerEvents", "Go to in %1");
|
||||
static constexpr const char* ACTION_OVERFLOW_STRING = QT_TRANSLATE_NOOP("DebuggerEvents", "Go to in...");
|
||||
};
|
||||
|
||||
// The state of the VM has changed and views should be updated to reflect
|
||||
@@ -53,6 +54,7 @@ namespace DebuggerEvents
|
||||
u32 address = 0;
|
||||
bool switch_to_tab = true;
|
||||
|
||||
static constexpr const char* ACTION_PREFIX = QT_TRANSLATE_NOOP("DebuggerEvents", "Add to");
|
||||
static constexpr const char* ACTION_STRING = QT_TRANSLATE_NOOP("DebuggerEvents", "Add to %1");
|
||||
static constexpr const char* ACTION_OVERFLOW_STRING = QT_TRANSLATE_NOOP("DebuggerEvents", "Add to...");
|
||||
};
|
||||
} // namespace DebuggerEvents
|
||||
|
||||
@@ -257,7 +257,8 @@ std::vector<QAction*> DebuggerView::createEventActionsImplementation(
|
||||
u32 max_top_level_actions,
|
||||
bool skip_self,
|
||||
const char* event_type,
|
||||
const char* action_prefix,
|
||||
const char* action_string,
|
||||
const char* action_overflow_string,
|
||||
std::function<const DebuggerEvents::Event*()> event_func)
|
||||
{
|
||||
if (!g_debugger_window)
|
||||
@@ -278,8 +279,7 @@ std::vector<QAction*> DebuggerView::createEventActionsImplementation(
|
||||
QMenu* submenu = nullptr;
|
||||
if (receivers.size() > max_top_level_actions)
|
||||
{
|
||||
QString title_format = QCoreApplication::translate("DebuggerEvent", "%1...");
|
||||
submenu = new QMenu(title_format.arg(QCoreApplication::translate("DebuggerEvent", action_prefix)), menu);
|
||||
submenu = new QMenu(QCoreApplication::translate("DebuggerEvents", action_overflow_string), menu);
|
||||
}
|
||||
|
||||
std::vector<QAction*> actions;
|
||||
@@ -290,9 +290,8 @@ std::vector<QAction*> DebuggerView::createEventActionsImplementation(
|
||||
QAction* action;
|
||||
if (!submenu || i + 1 < max_top_level_actions)
|
||||
{
|
||||
QString title_format = QCoreApplication::translate("DebuggerEvent", "%1 %2");
|
||||
QString event_title = QCoreApplication::translate("DebuggerEvent", action_prefix);
|
||||
QString title = title_format.arg(event_title).arg(receiver->displayName());
|
||||
QString title_format = QCoreApplication::translate("DebuggerEvents", action_string);
|
||||
QString title = title_format.arg(receiver->displayName());
|
||||
action = new QAction(title, menu);
|
||||
menu->addAction(action);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,8 @@ public:
|
||||
u32 max_top_level_actions = 5)
|
||||
{
|
||||
return createEventActionsImplementation(
|
||||
menu, max_top_level_actions, skip_self, typeid(Event).name(), Event::ACTION_PREFIX,
|
||||
menu, max_top_level_actions, skip_self, typeid(Event).name(),
|
||||
Event::ACTION_STRING, Event::ACTION_OVERFLOW_STRING,
|
||||
[event_func]() -> DebuggerEvents::Event* {
|
||||
static std::optional<Event> event;
|
||||
event = event_func();
|
||||
@@ -176,7 +177,8 @@ private:
|
||||
u32 max_top_level_actions,
|
||||
bool skip_self,
|
||||
const char* event_type,
|
||||
const char* action_prefix,
|
||||
const char* action_string,
|
||||
const char* action_overflow_string,
|
||||
std::function<const DebuggerEvents::Event*()> event_func);
|
||||
|
||||
// Used for sorting debugger views that have the same display name. Unique
|
||||
|
||||
@@ -874,10 +874,10 @@ inline QString DisassemblyView::DisassemblyStringFromAddress(u32 address, QFont
|
||||
}
|
||||
|
||||
lineString = lineString.leftJustified(4, ' ') // Address / symbol
|
||||
.arg(line.name.c_str())
|
||||
.arg(line.params.c_str()) // opcode + arguments
|
||||
.arg(isConditional ? (isConditionalMet ? "# true" : "# false") : "")
|
||||
.arg(isCurrentPC ? "<--" : "");
|
||||
.arg(line.name.c_str())
|
||||
.arg(line.params.c_str()) // opcode + arguments
|
||||
.arg(isConditional ? (isConditionalMet ? "# true" : "# false") : "")
|
||||
.arg(isCurrentPC ? "<--" : "");
|
||||
|
||||
return lineString;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,10 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
const auto description_iterator = DockTables::DEBUGGER_VIEWS.find(type);
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_VIEWS.end());
|
||||
|
||||
QAction* action = add_another_menu->addAction(description_iterator->second.display_name);
|
||||
QString display_name = QCoreApplication::translate(
|
||||
"DebuggerView", description_iterator->second.display_name);
|
||||
|
||||
QAction* action = add_another_menu->addAction(display_name);
|
||||
connect(action, &QAction::triggered, this, [this, type]() {
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
@@ -158,7 +158,7 @@ Qt::ItemFlags SavedAddressesModel::flags(const QModelIndex& index) const
|
||||
|
||||
void SavedAddressesModel::addRow()
|
||||
{
|
||||
const SavedAddress defaultNewAddress = {0, "Name", "Description"};
|
||||
const SavedAddress defaultNewAddress = {0, tr("Name"), tr("Description")};
|
||||
addRow(defaultNewAddress);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtWidgets/QScrollBar>
|
||||
#include <QtWidgets/QStyledItemDelegate>
|
||||
#include <QShortcut>
|
||||
|
||||
static const char* SUPPORTED_FORMATS_STRING = QT_TRANSLATE_NOOP(GameListWidget,
|
||||
".bin/.iso (ISO Disc Images)\n"
|
||||
@@ -217,6 +218,10 @@ void GameListWidget::initialize()
|
||||
m_sort_model->setFilterName(text);
|
||||
});
|
||||
|
||||
connect(new QShortcut(QKeySequence::Find, this), &QShortcut::activated, [this]() {
|
||||
m_ui.searchText->setFocus();
|
||||
});
|
||||
|
||||
m_table_view = new QTableView(m_ui.stack);
|
||||
m_table_view->setModel(m_sort_model);
|
||||
m_table_view->setSortingEnabled(true);
|
||||
@@ -230,7 +235,6 @@ void GameListWidget::initialize()
|
||||
m_table_view->horizontalHeader()->setHighlightSections(false);
|
||||
m_table_view->horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_table_view->verticalHeader()->hide();
|
||||
m_table_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
m_table_view->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
|
||||
m_table_view->setItemDelegateForColumn(0, new GameListIconStyleDelegate(this));
|
||||
m_table_view->setItemDelegateForColumn(8, new GameListIconStyleDelegate(this));
|
||||
|
||||
@@ -53,12 +53,14 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Game List</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Game List</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-check">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
<iconset theme="list-check"/>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -76,12 +78,14 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Game Grid</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Game Grid</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="function-line">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
<iconset theme="function-line"/>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -99,12 +103,14 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show Titles</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Titles</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="price-tag-3-line">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
<iconset theme="price-tag-3-line"/>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@@ -135,7 +141,7 @@
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -144,7 +150,7 @@
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@@ -166,8 +172,7 @@
|
||||
<string>All Types</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="filter-line">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
<iconset theme="filter-line"/>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@@ -179,8 +184,7 @@
|
||||
<string>All Regions</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="global-line">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
<iconset theme="global-line"/>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
||||
@@ -219,6 +219,9 @@ void MainWindow::setupAdditionalUi()
|
||||
m_ui.actionViewStatusBar->setChecked(status_bar_visible);
|
||||
m_ui.statusBar->setVisible(status_bar_visible);
|
||||
|
||||
const bool show_game_grid = Host::GetBaseBoolSettingValue("UI", "GameListGridView", false);
|
||||
updateGameGridActions(show_game_grid);
|
||||
|
||||
m_game_list_widget = new GameListWidget(getContentParent());
|
||||
m_game_list_widget->initialize();
|
||||
m_ui.actionGridViewShowTitles->setChecked(m_game_list_widget->getShowGridCoverTitles());
|
||||
@@ -390,6 +393,7 @@ void MainWindow::connectSignals()
|
||||
connect(m_game_list_widget, &GameListWidget::layoutChange, this, [this]() {
|
||||
QSignalBlocker sb(m_ui.actionGridViewShowTitles);
|
||||
m_ui.actionGridViewShowTitles->setChecked(m_game_list_widget->getShowGridCoverTitles());
|
||||
updateGameGridActions(m_game_list_widget->isShowingGameGrid());
|
||||
});
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionViewStatusBarVerbose, "UI", "VerboseStatusBar", false);
|
||||
@@ -504,26 +508,24 @@ void MainWindow::createRendererSwitchMenu()
|
||||
};
|
||||
const GSRendererType current_renderer = static_cast<GSRendererType>(
|
||||
Host::GetBaseIntSettingValue("EmuCore/GS", "Renderer", static_cast<int>(GSRendererType::Auto)));
|
||||
|
||||
QActionGroup* switch_renderer_group = new QActionGroup(m_ui.menuDebugSwitchRenderer);
|
||||
|
||||
for (const GSRendererType renderer : renderers)
|
||||
{
|
||||
QAction* action = m_ui.menuDebugSwitchRenderer->addAction(
|
||||
QString::fromUtf8(Pcsx2Config::GSOptions::GetRendererName(renderer)));
|
||||
QAction* action = new QAction(
|
||||
QString::fromUtf8(Pcsx2Config::GSOptions::GetRendererName(renderer)), switch_renderer_group);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(current_renderer == renderer);
|
||||
connect(action,
|
||||
&QAction::triggered, [this, action, renderer] {
|
||||
&QAction::triggered, [renderer] {
|
||||
Host::SetBaseIntSettingValue("EmuCore/GS", "Renderer", static_cast<int>(renderer));
|
||||
Host::CommitBaseSettingChanges();
|
||||
g_emu_thread->applySettings();
|
||||
|
||||
// clear all others
|
||||
for (QObject* obj : m_ui.menuDebugSwitchRenderer->children())
|
||||
{
|
||||
if (QAction* act = qobject_cast<QAction*>(obj); act && act != action)
|
||||
act->setChecked(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
m_ui.menuDebugSwitchRenderer->addActions(switch_renderer_group->actions());
|
||||
}
|
||||
|
||||
void MainWindow::recreate()
|
||||
@@ -1131,8 +1133,8 @@ bool MainWindow::shouldHideMainWindow() const
|
||||
{
|
||||
// NOTE: We can't use isRenderingToMain() here, because this happens post-fullscreen-switch.
|
||||
return (Host::GetBoolSettingValue("UI", "HideMainWindowWhenRunning", false) && !g_emu_thread->shouldRenderToMain()) ||
|
||||
(g_emu_thread->shouldRenderToMain() && (isRenderingFullscreen() || m_is_temporarily_windowed)) ||
|
||||
Host::InNoGUIMode();
|
||||
(g_emu_thread->shouldRenderToMain() && (isRenderingFullscreen() || m_is_temporarily_windowed)) ||
|
||||
Host::InNoGUIMode();
|
||||
}
|
||||
|
||||
bool MainWindow::shouldMouseLock() const
|
||||
@@ -1144,8 +1146,8 @@ bool MainWindow::shouldMouseLock() const
|
||||
return false;
|
||||
|
||||
bool windowsHidden = (!g_debugger_window || g_debugger_window->isHidden()) &&
|
||||
(!m_controller_settings_window || m_controller_settings_window->isHidden()) &&
|
||||
(!m_settings_window || m_settings_window->isHidden());
|
||||
(!m_controller_settings_window || m_controller_settings_window->isHidden()) &&
|
||||
(!m_settings_window || m_settings_window->isHidden());
|
||||
|
||||
return windowsHidden && (isActiveWindow() || isRenderingFullscreen());
|
||||
}
|
||||
@@ -3147,6 +3149,14 @@ void MainWindow::updateGameDependentActions()
|
||||
m_ui.actionReloadPatches->setEnabled(s_vm_valid);
|
||||
}
|
||||
|
||||
void MainWindow::updateGameGridActions(const bool show_game_grid)
|
||||
{
|
||||
m_ui.actionGridViewShowTitles->setEnabled(show_game_grid);
|
||||
m_ui.actionGridViewZoomIn->setEnabled(show_game_grid);
|
||||
m_ui.actionGridViewZoomOut->setEnabled(show_game_grid);
|
||||
m_ui.actionGridViewRefreshCovers->setEnabled(show_game_grid);
|
||||
}
|
||||
|
||||
void MainWindow::doStartFile(std::optional<CDVD_SourceType> source, const QString& path)
|
||||
{
|
||||
if (s_vm_valid)
|
||||
|
||||
@@ -234,6 +234,7 @@ private:
|
||||
void updateEmulationActions(bool starting, bool running, bool stopping);
|
||||
void updateDisplayRelatedActions(bool has_surface, bool render_to_main, bool fullscreen);
|
||||
void updateGameDependentActions();
|
||||
void updateGameGridActions(const bool show_game_grid);
|
||||
void updateStatusBarWidgetVisibility();
|
||||
void updateAdvancedSettingsVisibility();
|
||||
void updateWindowTitle();
|
||||
|
||||
@@ -1000,21 +1000,21 @@ void EmuThread::updatePerformanceMetrics(bool force)
|
||||
if (THREAD_VU1)
|
||||
{
|
||||
gs_stat = tr("Slot: %1 | Volume: %2% | %3 | EE: %4% | VU: %5% | GS: %6%")
|
||||
.arg(SaveStateSelectorUI::GetCurrentSlot())
|
||||
.arg(SPU2::GetOutputVolume())
|
||||
.arg(gs_stat_str.c_str())
|
||||
.arg(PerformanceMetrics::GetCPUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetVUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetGSThreadUsage(), 0, 'f', 0);
|
||||
.arg(SaveStateSelectorUI::GetCurrentSlot())
|
||||
.arg(SPU2::GetOutputVolume())
|
||||
.arg(gs_stat_str.c_str())
|
||||
.arg(PerformanceMetrics::GetCPUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetVUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetGSThreadUsage(), 0, 'f', 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gs_stat = tr("Slot: %1 | Volume: %2% | %3 | EE: %4% | GS: %5%")
|
||||
.arg(SaveStateSelectorUI::GetCurrentSlot())
|
||||
.arg(SPU2::GetOutputVolume())
|
||||
.arg(gs_stat_str.c_str())
|
||||
.arg(PerformanceMetrics::GetCPUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetGSThreadUsage(), 0, 'f', 0);
|
||||
.arg(SaveStateSelectorUI::GetCurrentSlot())
|
||||
.arg(SPU2::GetOutputVolume())
|
||||
.arg(gs_stat_str.c_str())
|
||||
.arg(PerformanceMetrics::GetCPUThreadUsage(), 0, 'f', 0)
|
||||
.arg(PerformanceMetrics::GetGSThreadUsage(), 0, 'f', 0);
|
||||
}
|
||||
|
||||
QMetaObject::invokeMethod(g_main_window->getStatusVerboseWidget(), "setText", Qt::QueuedConnection, Q_ARG(const QString&, gs_stat));
|
||||
@@ -1129,9 +1129,9 @@ void Host::OnAchievementsRefreshed()
|
||||
game_id = Achievements::GetGameID();
|
||||
|
||||
game_info = qApp
|
||||
->translate("EmuThread", "Game: %1 (%2)\n")
|
||||
.arg(QString::fromStdString(Achievements::GetGameTitle()))
|
||||
.arg(game_id);
|
||||
->translate("EmuThread", "Game: %1 (%2)\n")
|
||||
.arg(QString::fromStdString(Achievements::GetGameTitle()))
|
||||
.arg(game_id);
|
||||
|
||||
const std::string& rich_presence_string = Achievements::GetRichPresenceString();
|
||||
if (!rich_presence_string.empty())
|
||||
@@ -1181,7 +1181,7 @@ void Host::OpenHostFileSelectorAsync(std::string_view title, bool select_directo
|
||||
if (!filters.empty())
|
||||
{
|
||||
filters_str.append(QStringLiteral("All File Types (%1)")
|
||||
.arg(QString::fromStdString(StringUtil::JoinString(filters.begin(), filters.end(), " "))));
|
||||
.arg(QString::fromStdString(StringUtil::JoinString(filters.begin(), filters.end(), " "))));
|
||||
for (const std::string& filter : filters)
|
||||
{
|
||||
filters_str.append(
|
||||
|
||||
@@ -90,9 +90,7 @@ namespace QtUtils
|
||||
|
||||
const int min_column_width = header->minimumSectionSize();
|
||||
const int scrollbar_width = ((view->verticalScrollBar() && view->verticalScrollBar()->isVisible()) ||
|
||||
view->verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOn) ?
|
||||
view->verticalScrollBar()->width() :
|
||||
0;
|
||||
view->verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOn) ? view->verticalScrollBar()->width() : 0;
|
||||
int num_flex_items = 0;
|
||||
int total_width = 0;
|
||||
int column_index = 0;
|
||||
|
||||
@@ -242,8 +242,8 @@ namespace SettingWidgetBinder
|
||||
static std::optional<QString> getNullableStringValue(const QCheckBox* widget)
|
||||
{
|
||||
return (widget->checkState() == Qt::PartiallyChecked) ?
|
||||
std::nullopt :
|
||||
std::optional<QString>(widget->isChecked() ? QStringLiteral("1") : QStringLiteral("0"));
|
||||
std::nullopt :
|
||||
std::optional<QString>(widget->isChecked() ? QStringLiteral("1") : QStringLiteral("0"));
|
||||
}
|
||||
static void setNullableStringValue(QCheckBox* widget, std::optional<QString> value)
|
||||
{
|
||||
|
||||
@@ -19,13 +19,12 @@
|
||||
|
||||
const char* AUDIO_FILE_FILTER = QT_TRANSLATE_NOOP("MainWindow", "Audio Files (*.wav)");
|
||||
|
||||
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enable, "Achievements", "Enabled", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hardcoreMode, "Achievements", "ChallengeMode", false);
|
||||
@@ -36,11 +35,12 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.unlockSound, "Achievements", "UnlockSound", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.lbSound, "Achievements", "LBSubmitSound", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.overlays, "Achievements", "Overlays", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.leaderboardOverlays, "Achievements", "LBOverlays", true);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.overlayPosition, "Achievements", "OverlayPosition", static_cast<int>(AchievementOverlayPosition::BottomRight));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.notificationPosition, "Achievements", "NotificationPosition", static_cast<int>(OsdOverlayPos::TopLeft));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.encoreMode, "Achievements", "EncoreMode", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.spectatorMode, "Achievements", "SpectatorMode", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.unofficialAchievements, "Achievements", "UnofficialTestMode",false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.unofficialAchievements, "Achievements", "UnofficialTestMode", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.achievementNotificationsDuration, "Achievements", "NotificationsDuration", Pcsx2Config::AchievementsOptions::DEFAULT_NOTIFICATION_DURATION);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.leaderboardNotificationsDuration, "Achievements", "LeaderboardsDuration", Pcsx2Config::AchievementsOptions::DEFAULT_LEADERBOARD_DURATION);
|
||||
|
||||
@@ -48,18 +48,19 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.unlockSoundPath, m_ui.unlockSoundBrowse, m_ui.unlockSoundOpen, m_ui.unlockSoundReset, "Achievements", "UnlockSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_UNLOCK_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
|
||||
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.lbSoundPath, m_ui.lbSoundBrowse, m_ui.lbSoundOpen, m_ui.lbSoundReset, "Achievements", "LBSubmitSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_LBSUBMIT_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.enable, tr("Enable Achievements"), tr("Unchecked"), tr("When enabled and logged in, PCSX2 will scan for achievements on startup."));
|
||||
dialog->registerWidgetHelp(m_ui.hardcoreMode, tr("Enable Hardcore Mode"), tr("Unchecked"), tr("\"Challenge\" mode for achievements, including leaderboard tracking. Disables save state, cheats, and slowdown functions."));
|
||||
dialog->registerWidgetHelp(m_ui.achievementNotifications, tr("Show Achievement Notifications"), tr("Checked"), tr("Displays popup messages on events such as achievement unlocks and game completion."));
|
||||
dialog->registerWidgetHelp(m_ui.leaderboardNotifications, tr("Show Leaderboard Notifications"), tr("Checked"), tr("Displays popup messages when starting, submitting, or failing a leaderboard challenge."));
|
||||
dialog->registerWidgetHelp(m_ui.soundEffects, tr("Enable Sound Effects"), tr("Checked"), tr("Plays sound effects for events such as achievement unlocks and leaderboard submissions."));
|
||||
dialog->registerWidgetHelp(m_ui.soundEffectsBox, tr("Custom Sound Effect"), tr("Any"), tr("Customize the sound effect that are played whenever you received a notification, earned an achievement or submitted an entry to the leaderboard."));
|
||||
dialog->registerWidgetHelp(m_ui.overlays, tr("Enable In-Game Overlays"), tr("Checked"), tr("Shows icons in the lower-right corner of the screen when a challenge/primed achievement is active."));
|
||||
dialog->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement overlays are positioned on the screen."));
|
||||
dialog->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement notification popups are positioned on the screen."));
|
||||
dialog->registerWidgetHelp(m_ui.encoreMode, tr("Enable Encore Mode"), tr("Unchecked"),tr("When enabled, each session will behave as if no achievements have been unlocked."));
|
||||
dialog->registerWidgetHelp(m_ui.spectatorMode, tr("Enable Spectator Mode"), tr("Unchecked"), tr("When enabled, PCSX2 will assume all achievements are locked and not send any unlock notifications to the server."));
|
||||
dialog->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
|
||||
dialog()->registerWidgetHelp(m_ui.enable, tr("Enable Achievements"), tr("Unchecked"), tr("When enabled and logged in, PCSX2 will scan for achievements on startup."));
|
||||
dialog()->registerWidgetHelp(m_ui.hardcoreMode, tr("Enable Hardcore Mode"), tr("Unchecked"), tr("\"Challenge\" mode for achievements, including leaderboard tracking. Disables save state, cheats, and slowdown functions."));
|
||||
dialog()->registerWidgetHelp(m_ui.achievementNotifications, tr("Show Achievement Notifications"), tr("Checked"), tr("Displays popup messages on events such as achievement unlocks and game completion."));
|
||||
dialog()->registerWidgetHelp(m_ui.leaderboardNotifications, tr("Show Leaderboard Notifications"), tr("Checked"), tr("Displays popup messages when starting, submitting, or failing a leaderboard challenge."));
|
||||
dialog()->registerWidgetHelp(m_ui.soundEffects, tr("Enable Sound Effects"), tr("Checked"), tr("Plays sound effects for events such as achievement unlocks and leaderboard submissions."));
|
||||
dialog()->registerWidgetHelp(m_ui.soundEffectsBox, tr("Custom Sound Effect"), tr("Any"), tr("Customize the sound effect that are played whenever you received a notification, earned an achievement or submitted an entry to the leaderboard."));
|
||||
dialog()->registerWidgetHelp(m_ui.overlays, tr("Enable In-Game Overlays"), tr("Checked"), tr("Shows icons in the screen when a challenge/primed achievement is active."));
|
||||
dialog()->registerWidgetHelp(m_ui.leaderboardOverlays, tr("Enable In-Game Leaderboard Overlays"), tr("Checked"), tr("Shows icons in the screen when leaderboard tracking is active."));
|
||||
dialog()->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement/leaderboard overlays are positioned on the screen."));
|
||||
dialog()->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement/leaderboard notification popups are positioned on the screen."));
|
||||
dialog()->registerWidgetHelp(m_ui.encoreMode, tr("Enable Encore Mode"), tr("Unchecked"), tr("When enabled, each session will behave as if no achievements have been unlocked."));
|
||||
dialog()->registerWidgetHelp(m_ui.spectatorMode, tr("Enable Spectator Mode"), tr("Unchecked"), tr("When enabled, PCSX2 will assume all achievements are locked and not send any unlock notifications to the server."));
|
||||
dialog()->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
|
||||
|
||||
connect(m_ui.enable, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
@@ -74,7 +75,7 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
|
||||
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged);
|
||||
|
||||
if (!m_dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
connect(m_ui.loginButton, &QPushButton::clicked, this, &AchievementSettingsWidget::onLoginLogoutPressed);
|
||||
connect(m_ui.viewProfile, &QPushButton::clicked, this, &AchievementSettingsWidget::onViewProfilePressed);
|
||||
@@ -109,13 +110,13 @@ AchievementSettingsWidget::~AchievementSettingsWidget() = default;
|
||||
|
||||
void AchievementSettingsWidget::updateEnableState()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true);
|
||||
const bool lb_notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
|
||||
const bool sound = m_dialog->getEffectiveBoolValue("Achievements", "SoundEffects", true);
|
||||
const bool info = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "InfoSound", true);
|
||||
const bool unlock = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "UnlockSound", true);
|
||||
const bool lbsound = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "Notifications", true);
|
||||
const bool lb_notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
|
||||
const bool sound = dialog()->getEffectiveBoolValue("Achievements", "SoundEffects", true);
|
||||
const bool info = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "InfoSound", true);
|
||||
const bool unlock = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "UnlockSound", true);
|
||||
const bool lbsound = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
|
||||
m_ui.hardcoreMode->setEnabled(enabled);
|
||||
m_ui.achievementNotifications->setEnabled(enabled);
|
||||
m_ui.leaderboardNotifications->setEnabled(enabled);
|
||||
@@ -124,7 +125,7 @@ void AchievementSettingsWidget::updateEnableState()
|
||||
m_ui.leaderboardNotificationsDuration->setEnabled(lb_notifications);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setEnabled(lb_notifications);
|
||||
|
||||
if (!m_dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.notificationSoundPath->setEnabled(info);
|
||||
m_ui.notificationSoundBrowse->setEnabled(info);
|
||||
@@ -145,16 +146,18 @@ void AchievementSettingsWidget::updateEnableState()
|
||||
|
||||
m_ui.soundEffects->setEnabled(enabled);
|
||||
m_ui.overlays->setEnabled(enabled);
|
||||
|
||||
const bool overlays_enabled = enabled && m_dialog->getEffectiveBoolValue("Achievements", "Overlays", true);
|
||||
const bool notifications_enabled = enabled && (m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true) ||
|
||||
m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
|
||||
m_ui.leaderboardOverlays->setEnabled(enabled);
|
||||
|
||||
const bool overlays_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Overlays", true) ||
|
||||
dialog()->getEffectiveBoolValue("Achievements", "LBOverlays", true));
|
||||
const bool notifications_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Notifications", true) ||
|
||||
dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
|
||||
m_ui.overlaySettingsBox->setEnabled(overlays_enabled || notifications_enabled);
|
||||
m_ui.overlayPosition->setEnabled(overlays_enabled);
|
||||
m_ui.overlayPositionLabel->setEnabled(overlays_enabled);
|
||||
m_ui.notificationPosition->setEnabled(notifications_enabled);
|
||||
m_ui.notificationPositionLabel->setEnabled(notifications_enabled);
|
||||
|
||||
|
||||
m_ui.encoreMode->setEnabled(enabled);
|
||||
m_ui.spectatorMode->setEnabled(enabled);
|
||||
m_ui.unofficialAchievements->setEnabled(enabled);
|
||||
@@ -165,8 +168,8 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
|
||||
if (!QtHost::IsVMValid())
|
||||
return;
|
||||
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool challenge = m_dialog->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
|
||||
const bool challenge = dialog()->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
|
||||
if (!enabled || !challenge)
|
||||
return;
|
||||
|
||||
@@ -188,14 +191,14 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
|
||||
|
||||
void AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "NotificationsDuration",
|
||||
const float duration = dialog()->getEffectiveFloatValue("Achievements", "NotificationsDuration",
|
||||
Pcsx2Config::AchievementsOptions::DEFAULT_NOTIFICATION_DURATION);
|
||||
m_ui.achievementNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
}
|
||||
|
||||
void AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged()
|
||||
{
|
||||
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
|
||||
const float duration = dialog()->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
|
||||
Pcsx2Config::AchievementsOptions::DEFAULT_LEADERBOARD_DURATION);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
|
||||
}
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#pragma once
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_AchievementSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class AchievementSettingsWidget : public QWidget
|
||||
class AchievementSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
explicit AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~AchievementSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
@@ -28,6 +28,4 @@ private:
|
||||
void updateLoginState();
|
||||
|
||||
Ui::AchievementSettingsWidget m_ui;
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
};
|
||||
|
||||
@@ -6,508 +6,497 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>680</width>
|
||||
<height>480</height>
|
||||
<width>700</width>
|
||||
<height>1000</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<widget class="QGroupBox" name="settingsBox">
|
||||
<property name="title">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="unofficialAchievements">
|
||||
<property name="text">
|
||||
<string>Test Unofficial Achievements</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="hardcoreMode">
|
||||
<property name="text">
|
||||
<string>Enable Hardcore Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="enable">
|
||||
<property name="text">
|
||||
<string>Enable Achievements</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="spectatorMode">
|
||||
<property name="text">
|
||||
<string>Enable Spectator Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="encoreMode">
|
||||
<property name="text">
|
||||
<string>Enable Encore Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="notificationBox">
|
||||
<property name="title">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,1">
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="achievementNotificationsDurationSliderContainer" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QSlider" name="achievementNotificationsDuration">
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="achievementNotificationsDurationLabel">
|
||||
<property name="text">
|
||||
<string>5 seconds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="achievementNotifications">
|
||||
<property name="text">
|
||||
<string>Show Achievement Notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="leaderboardNotificationsDurationSliderContainer" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QSlider" name="leaderboardNotificationsDuration">
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
|
||||
<property name="text">
|
||||
<string>5 seconds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="leaderboardNotifications">
|
||||
<property name="text">
|
||||
<string>Show Leaderboard Notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="soundEffects">
|
||||
<property name="text">
|
||||
<string>Enable Sound Effects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="notificationPositionLabel">
|
||||
<property name="text">
|
||||
<string>Notification Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="notificationPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="overlaySettingsBox">
|
||||
<property name="title">
|
||||
<string>Overlay Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_overlay">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="overlayPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="overlayPositionLabel">
|
||||
<property name="text">
|
||||
<string>Overlay Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="overlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Overlays</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="leaderboardOverlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Leaderboard Overlays</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="soundEffectsBox">
|
||||
<property name="title">
|
||||
<string>Sound Effects</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLineEdit" name="lbSoundPath"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="notificationSoundPath"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="unlockSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="notificationSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="unlockSound">
|
||||
<property name="text">
|
||||
<string>Achievement Unlock Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="notificationSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLineEdit" name="unlockSoundPath"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="lbSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="unlockSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="notificationSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="notificationSound">
|
||||
<property name="text">
|
||||
<string>Notification Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QPushButton" name="lbSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="unlockSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QPushButton" name="lbSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="lbSound">
|
||||
<property name="text">
|
||||
<string>Leaderboard Submit Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="loginBox">
|
||||
<property name="title">
|
||||
<string>Account</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="loginStatus">
|
||||
<property name="text">
|
||||
<string>Username:
|
||||
Login token generated at:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="achievementButtons">
|
||||
<item>
|
||||
<widget class="QPushButton" name="viewProfile">
|
||||
<property name="text">
|
||||
<string>View Profile...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loginButton">
|
||||
<property name="text">
|
||||
<string>Login...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gameInfoBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Game Info</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="gameInfo">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rcheevosDisclaimer">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="justify">PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at <a href="https://retroachievements.org/">retroachievements.org</a>.</p><p align="justify">To view the achievement list in-game, press the hotkey for <span style=" font-weight:600;">Open Pause Menu</span> and select <span style=" font-weight:600;">Achievements</span> from the menu.</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaAchievements">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>661</width>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="settingsBox">
|
||||
<property name="title">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="unofficialAchievements">
|
||||
<property name="text">
|
||||
<string>Test Unofficial Achievements</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="hardcoreMode">
|
||||
<property name="text">
|
||||
<string>Enable Hardcore Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="enable">
|
||||
<property name="text">
|
||||
<string>Enable Achievements</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="spectatorMode">
|
||||
<property name="text">
|
||||
<string>Enable Spectator Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="encoreMode">
|
||||
<property name="text">
|
||||
<string>Enable Encore Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="notificationBox">
|
||||
<property name="title">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,0">
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="achievementNotificationsDurationSliderContainer" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QSlider" name="achievementNotificationsDuration">
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="achievementNotificationsDurationLabel">
|
||||
<property name="text">
|
||||
<string>5 seconds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="achievementNotifications">
|
||||
<property name="text">
|
||||
<string>Show Achievement Notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="leaderboardNotificationsDurationSliderContainer" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QSlider" name="leaderboardNotificationsDuration">
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
|
||||
<property name="text">
|
||||
<string>5 seconds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="leaderboardNotifications">
|
||||
<property name="text">
|
||||
<string>Show Leaderboard Notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="soundEffects">
|
||||
<property name="text">
|
||||
<string>Enable Sound Effects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="overlaySettingsBox">
|
||||
<property name="title">
|
||||
<string>Overlay Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_overlay">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="overlayPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="notificationPositionLabel">
|
||||
<property name="text">
|
||||
<string>Notification Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="notificationPosition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Center Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Center</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="overlayPositionLabel">
|
||||
<property name="text">
|
||||
<string>Overlay Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="overlays">
|
||||
<property name="text">
|
||||
<string>Enable In-Game Overlays</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="soundEffectsBox">
|
||||
<property name="title">
|
||||
<string>Sound Effects</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLineEdit" name="lbSoundPath"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="notificationSoundPath"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="unlockSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="notificationSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="unlockSound">
|
||||
<property name="text">
|
||||
<string>Achievement Unlock Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="notificationSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLineEdit" name="unlockSoundPath"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="lbSoundBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="unlockSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="notificationSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="notificationSound">
|
||||
<property name="text">
|
||||
<string>Notification Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QPushButton" name="lbSoundOpen">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="unlockSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QPushButton" name="lbSoundReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="lbSound">
|
||||
<property name="text">
|
||||
<string>Leaderboard Submit Sound</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="loginBox">
|
||||
<property name="title">
|
||||
<string>Account</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="loginStatus">
|
||||
<property name="text">
|
||||
<string>Username:
|
||||
Login token generated at:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="achievementButtons">
|
||||
<item>
|
||||
<widget class="QPushButton" name="viewProfile">
|
||||
<property name="text">
|
||||
<string>View Profile...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loginButton">
|
||||
<property name="text">
|
||||
<string>Login...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gameInfoBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Game Info</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="gameInfo">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rcheevosDisclaimer">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="justify">PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at <a href="https://retroachievements.org/">retroachievements.org</a>.</p><p align="justify">To view the achievement list in-game, press the hotkey for <span style=" font-weight:600;">Open Pause Menu</span> and select <span style=" font-weight:600;">Achievements</span> from the menu.</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::TextFormat::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <algorithm>
|
||||
|
||||
#include "AdvancedSettingsWidget.h"
|
||||
#include "QtHost.h"
|
||||
@@ -10,13 +9,12 @@
|
||||
#include "SettingWidgetBinder.h"
|
||||
#include "SettingsWindow.h"
|
||||
|
||||
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeRecompiler, "EmuCore/CPU/Recompiler", "EnableEE", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeCache, "EmuCore/CPU/Recompiler", "EnableEECache", false);
|
||||
@@ -35,7 +33,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeDivRoundingMode, "EmuCore/CPU", "FPUDiv.Roundmode", static_cast<int>(FPRoundMode::Nearest));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu0RoundingMode, "EmuCore/CPU", "VU0.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu1RoundingMode, "EmuCore/CPU", "VU1.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.eeClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.eeClampMode->itemText(getGlobalClampingModeIndex(-1))));
|
||||
m_ui.vu0ClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.vu0ClampMode->itemText(getGlobalClampingModeIndex(0))));
|
||||
@@ -53,8 +51,8 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.gameFixes, "EmuCore", "EnableGameFixes", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.patches, "EmuCore", "EnablePatches", true);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
|
||||
tr("Show a save state selector UI when switching slots instead of showing a notification bubble."));
|
||||
dialog()->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
|
||||
tr("Show a save state selector UI when switching slots instead of showing a notification bubble."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.savestateCompressionMethod, "EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard));
|
||||
@@ -72,82 +70,86 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pineEnable, "EmuCore", "EnablePINE", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.pineSlot, "EmuCore", "PINESlot", 28011);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
|
||||
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
|
||||
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
tr("Performs just-in-time binary translation of 64-bit MIPS-IV machine code to x86."));
|
||||
|
||||
//: Wait loop: When the game makes the CPU do nothing (loop/spin) while it waits for something to happen (usually an interrupt).
|
||||
dialog->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
|
||||
tr("Moderate speedup for some games, with no known side effects."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
|
||||
dialog()->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
|
||||
|
||||
//: INTC = Name of a PS2 register, leave as-is. "spin" = to make a cpu (or gpu) actively do nothing while you wait for something. Like spinning in a circle, you're moving but not actually going anywhere.
|
||||
dialog->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
|
||||
tr("Huge speedup for some games, with almost no compatibility side effects."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
|
||||
//: "Backpatching" = To edit previously generated code to change what it does (in this case, we generate direct memory accesses, then backpatch them to jump to a fancier handler function when we realize they need the fancier handler function)
|
||||
tr("Uses backpatching to avoid register flushing on every memory access."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
|
||||
tr("Pauses the virtual machine when a TLB miss occurs, instead of ignoring it and continuing. Note that the VM will pause after the "
|
||||
"end of the block, not on the instruction which caused the exception. Refer to the console to see the address where the invalid "
|
||||
"access occurred."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
|
||||
tr("Exposes an additional 96MB of memory to the virtual machine."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"),
|
||||
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
|
||||
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"), tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
|
||||
dialog()->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"),
|
||||
tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
|
||||
"Safe for most games, but a few games may exhibit graphical errors."));
|
||||
|
||||
//: VU0 = Vector Unit 0. One of the PS2's processors.
|
||||
dialog->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
|
||||
dialog()->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
|
||||
|
||||
//: VU1 = Vector Unit 1. One of the PS2's processors.
|
||||
dialog->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
|
||||
dialog()->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
//: mVU = PCSX2's recompiler for VU (Vector Unit) code (full name: microVU)
|
||||
m_ui.vuFlagHack, tr("mVU Flag Hack"), tr("Checked"), tr("Good speedup and high compatibility, may cause graphical errors."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
|
||||
tr("Performs just-in-time binary translation of 32-bit MIPS-I machine code to x86."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
|
||||
tr("Automatically loads and applies fixes to known problematic games on game start."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
|
||||
tr("Automatically loads and applies compatibility patches to known problematic games."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
|
||||
dialog()->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
|
||||
tr("Determines the algorithm to be used when compressing savestates."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
|
||||
dialog()->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
|
||||
tr("Determines the level to be used when compressing savestates."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
|
||||
tr("Automatically saves the emulator state when powering down or exiting. You can then "
|
||||
"resume directly from where you left off next time."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
|
||||
//: Do not translate the ".backup" extension.
|
||||
tr("Creates a backup copy of a save state if it already exists when the save is created. The backup copy has a .backup suffix."));
|
||||
}
|
||||
@@ -174,15 +176,15 @@ int AdvancedSettingsWidget::getGlobalClampingModeIndex(int vunum) const
|
||||
int AdvancedSettingsWidget::getClampingModeIndex(int vunum) const
|
||||
{
|
||||
// This is so messy... maybe we should just make the mode an int in the settings too...
|
||||
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
|
||||
std::optional<bool> default_false = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
|
||||
std::optional<bool> default_true = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
|
||||
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
|
||||
std::optional<bool> default_false = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
|
||||
std::optional<bool> default_true = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
|
||||
|
||||
std::optional<bool> third = m_dialog->getBoolValue(
|
||||
std::optional<bool> third = dialog()->getBoolValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), default_false);
|
||||
std::optional<bool> second = m_dialog->getBoolValue("EmuCore/CPU/Recompiler",
|
||||
std::optional<bool> second = dialog()->getBoolValue("EmuCore/CPU/Recompiler",
|
||||
(vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), default_false);
|
||||
std::optional<bool> first = m_dialog->getBoolValue(
|
||||
std::optional<bool> first = dialog()->getBoolValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), default_true);
|
||||
|
||||
if (third.has_value() && third.value())
|
||||
@@ -201,25 +203,25 @@ void AdvancedSettingsWidget::setClampingMode(int vunum, int index)
|
||||
{
|
||||
std::optional<bool> first, second, third;
|
||||
|
||||
if (!m_dialog->isPerGameSettings() || index > 0)
|
||||
if (!dialog()->isPerGameSettings() || index > 0)
|
||||
{
|
||||
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
|
||||
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
|
||||
third = (index >= (base + 3));
|
||||
second = (index >= (base + 2));
|
||||
first = (index >= (base + 1));
|
||||
}
|
||||
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), third);
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), second);
|
||||
m_dialog->setBoolSettingValue(
|
||||
dialog()->setBoolSettingValue(
|
||||
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), first);
|
||||
}
|
||||
|
||||
void AdvancedSettingsWidget::onSavestateCompressionTypeChanged()
|
||||
{
|
||||
const bool uncompressed = (m_dialog->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
|
||||
const bool uncompressed = (dialog()->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
|
||||
static_cast<int>(SavestateCompressionMethod::Uncompressed));
|
||||
m_ui.savestateCompressionLevel->setDisabled(uncompressed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
#include "ui_AdvancedSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class AdvancedSettingsWidget : public QWidget
|
||||
class AdvancedSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,13 +18,12 @@
|
||||
#include <algorithm>
|
||||
#include <bit>
|
||||
|
||||
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
for (u32 i = 0; i < static_cast<u32>(AudioBackend::Count); i++)
|
||||
m_ui.audioBackend->addItem(QString::fromUtf8(AudioStream::GetBackendDisplayName(static_cast<AudioBackend>(i))));
|
||||
@@ -72,11 +71,11 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
||||
updateLatencyLabel();
|
||||
|
||||
// for per-game, just use the normal path, since it needs to re-read/apply
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.volume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
|
||||
m_ui.fastForwardVolume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
|
||||
m_ui.muted->setChecked(m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
|
||||
m_ui.volume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
|
||||
m_ui.fastForwardVolume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
|
||||
m_ui.muted->setChecked(dialog()->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
|
||||
connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::onOutputVolumeChanged);
|
||||
connect(m_ui.fastForwardVolume, &QSlider::valueChanged, this, &AudioSettingsWidget::onFastForwardVolumeChanged);
|
||||
connect(m_ui.muted, &QCheckBox::checkStateChanged, this, &AudioSettingsWidget::onOutputMutedChanged);
|
||||
@@ -91,39 +90,39 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
||||
connect(m_ui.resetVolume, &QToolButton::clicked, this, [this]() { resetVolume(false); });
|
||||
connect(m_ui.resetFastForwardVolume, &QToolButton::clicked, this, [this]() { resetVolume(true); });
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.audioBackend, tr("Audio Backend"), QStringLiteral("Cubeb"),
|
||||
tr("The audio backend determines how frames produced by the emulator are submitted to the host. Cubeb provides the "
|
||||
"lowest latency, if you encounter issues, try the SDL backend. The null backend disables all host audio "
|
||||
"output."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.bufferMS, tr("Buffer Size"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_BUFFER_MS),
|
||||
tr("Determines the buffer size which the time stretcher will try to keep filled. It effectively selects the "
|
||||
"average latency, as audio will be stretched/shrunk to keep the buffer size within check."));
|
||||
dialog->registerWidgetHelp(
|
||||
dialog()->registerWidgetHelp(
|
||||
m_ui.outputLatencyMS, tr("Output Latency"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS),
|
||||
tr("Determines the latency from the buffer to the host audio output. This can be set lower than the target latency "
|
||||
"to reduce audio delay."));
|
||||
dialog->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
|
||||
dialog()->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
|
||||
tr("Controls the volume of the audio played on the host."));
|
||||
dialog->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
|
||||
dialog()->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
|
||||
tr("Controls the volume of the audio played on the host when fast forwarding."));
|
||||
dialog->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
|
||||
tr("Prevents the emulator from producing any audible sound."));
|
||||
dialog->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
|
||||
dialog()->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
|
||||
tr("Determines how audio is expanded from stereo to surround for supported games. This "
|
||||
"includes games that support Dolby Pro Logic/Pro Logic II."));
|
||||
dialog->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
|
||||
dialog()->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
|
||||
tr("These settings fine-tune the behavior of the FreeSurround-based channel expander."));
|
||||
dialog->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
|
||||
dialog()->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
|
||||
tr("When running outside of 100% speed, adjusts the tempo on audio instead of dropping frames. Produces much nicer fast-forward/slowdown audio."));
|
||||
dialog->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
|
||||
dialog()->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
|
||||
tr("These settings fine-tune the behavior of the SoundTouch audio time stretcher when running outside of 100% speed."));
|
||||
dialog->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
|
||||
m_dialog->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
|
||||
dialog()->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
|
||||
dialog()->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
|
||||
tr("Resets output volume back to the default."));
|
||||
dialog->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
|
||||
m_dialog->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
|
||||
dialog()->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
|
||||
dialog()->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
|
||||
tr("Resets fast forward volume back to the default."));
|
||||
}
|
||||
|
||||
@@ -132,10 +131,10 @@ AudioSettingsWidget::~AudioSettingsWidget() = default;
|
||||
AudioExpansionMode AudioSettingsWidget::getEffectiveExpansionMode() const
|
||||
{
|
||||
return AudioStream::ParseExpansionMode(
|
||||
m_dialog->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
|
||||
AudioStream::GetExpansionModeName(AudioStreamParameters::DEFAULT_EXPANSION_MODE))
|
||||
.c_str())
|
||||
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
|
||||
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
|
||||
}
|
||||
|
||||
u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
|
||||
@@ -144,7 +143,7 @@ u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
|
||||
if (expansion_mode == AudioExpansionMode::Disabled)
|
||||
return 0;
|
||||
|
||||
const u32 config_block_size = m_dialog->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
|
||||
const u32 config_block_size = dialog()->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
|
||||
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE);
|
||||
return std::has_single_bit(config_block_size) ? config_block_size : std::bit_ceil(config_block_size);
|
||||
}
|
||||
@@ -160,9 +159,8 @@ void AudioSettingsWidget::onSyncModeChanged()
|
||||
{
|
||||
const Pcsx2Config::SPU2Options::SPU2SyncMode sync_mode =
|
||||
Pcsx2Config::SPU2Options::ParseSyncMode(
|
||||
m_dialog
|
||||
->getEffectiveStringValue("SPU2/Output", "SyncMode",
|
||||
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE))
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "SyncMode",
|
||||
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE))
|
||||
.c_str())
|
||||
.value_or(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE);
|
||||
m_ui.stretchSettings->setEnabled(sync_mode == Pcsx2Config::SPU2Options::SPU2SyncMode::TimeStretch);
|
||||
@@ -170,10 +168,11 @@ void AudioSettingsWidget::onSyncModeChanged()
|
||||
|
||||
AudioBackend AudioSettingsWidget::getEffectiveBackend() const
|
||||
{
|
||||
return AudioStream::ParseBackendName(m_dialog->getEffectiveStringValue("SPU2/Output", "Backend",
|
||||
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND))
|
||||
.c_str())
|
||||
.value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
|
||||
return AudioStream::ParseBackendName(
|
||||
dialog()->getEffectiveStringValue("SPU2/Output", "Backend",
|
||||
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND))
|
||||
.c_str())
|
||||
.value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
|
||||
}
|
||||
|
||||
void AudioSettingsWidget::updateDriverNames()
|
||||
@@ -194,7 +193,7 @@ void AudioSettingsWidget::updateDriverNames()
|
||||
for (const std::pair<std::string, std::string>& it : names)
|
||||
m_ui.driver->addItem(QString::fromStdString(it.second), QString::fromStdString(it.first));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
|
||||
std::move(names.front().first));
|
||||
connect(m_ui.driver, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::updateDeviceNames);
|
||||
}
|
||||
@@ -205,8 +204,8 @@ void AudioSettingsWidget::updateDriverNames()
|
||||
void AudioSettingsWidget::updateDeviceNames()
|
||||
{
|
||||
const AudioBackend backend = getEffectiveBackend();
|
||||
const std::string driver_name = m_dialog->getEffectiveStringValue("SPU2/Output", "DriverName", "");
|
||||
const std::string current_device = m_dialog->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
|
||||
const std::string driver_name = dialog()->getEffectiveStringValue("SPU2/Output", "DriverName", "");
|
||||
const std::string current_device = dialog()->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
|
||||
const std::vector<AudioStream::DeviceInfo> devices = AudioStream::GetOutputDevices(backend, driver_name.c_str());
|
||||
|
||||
m_ui.outputDevice->disconnect();
|
||||
@@ -239,7 +238,7 @@ void AudioSettingsWidget::updateDeviceNames()
|
||||
QString::fromStdString(current_device));
|
||||
}
|
||||
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
|
||||
"DeviceName", std::move(devices.front().name));
|
||||
}
|
||||
|
||||
@@ -249,9 +248,9 @@ void AudioSettingsWidget::updateDeviceNames()
|
||||
void AudioSettingsWidget::updateLatencyLabel()
|
||||
{
|
||||
const u32 expand_buffer_ms = AudioStream::GetMSForBufferSize(SPU2::SAMPLE_RATE, getEffectiveExpansionBlockSize());
|
||||
const u32 config_buffer_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
|
||||
const u32 config_output_latency_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
const bool minimal_output = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
const u32 config_buffer_ms = dialog()->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
|
||||
const u32 config_output_latency_ms = dialog()->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
|
||||
const bool minimal_output = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
|
||||
//: Preserve the %1 variable, adapt the latter ms (and/or any possible spaces in between) to your language's ruleset.
|
||||
m_ui.outputLatencyLabel->setText(minimal_output ? tr("N/A") : tr("%1 ms").arg(config_output_latency_ms));
|
||||
@@ -299,7 +298,7 @@ void AudioSettingsWidget::updateVolumeLabel()
|
||||
|
||||
void AudioSettingsWidget::onMinimalOutputLatencyChanged()
|
||||
{
|
||||
const bool minimal = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
const bool minimal = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
|
||||
m_ui.outputLatencyMS->setEnabled(!minimal);
|
||||
updateLatencyLabel();
|
||||
}
|
||||
@@ -307,7 +306,7 @@ void AudioSettingsWidget::onMinimalOutputLatencyChanged()
|
||||
void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
Host::SetBaseIntSettingValue("SPU2/Output", "OutputVolume", new_value);
|
||||
Host::CommitBaseSettingChanges();
|
||||
g_emu_thread->applySettings();
|
||||
@@ -318,7 +317,7 @@ void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
||||
void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
Host::SetBaseIntSettingValue("SPU2/Output", "FastForwardVolume", new_value);
|
||||
Host::CommitBaseSettingChanges();
|
||||
g_emu_thread->applySettings();
|
||||
@@ -329,7 +328,7 @@ void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
|
||||
void AudioSettingsWidget::onOutputMutedChanged(int new_state)
|
||||
{
|
||||
// only called for base settings
|
||||
pxAssert(!m_dialog->isPerGameSettings());
|
||||
pxAssert(!dialog()->isPerGameSettings());
|
||||
|
||||
const bool muted = (new_state != 0);
|
||||
Host::SetBaseBoolSettingValue("SPU2/Output", "OutputMuted", muted);
|
||||
@@ -344,7 +343,7 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
|
||||
dlgui.setupUi(&dlg);
|
||||
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.blockSize, "SPU2/Output", "ExpandBlockSize",
|
||||
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE, 0);
|
||||
QtUtils::BindLabelToSlider(dlgui.blockSize, dlgui.blockSizeLabel);
|
||||
@@ -378,42 +377,42 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
|
||||
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE));
|
||||
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CIRCULAR_WRAP));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandShift",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandDepth",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
|
||||
m_dialog->setFloatSettingValue(
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
|
||||
dialog()->setFloatSettingValue(
|
||||
"SPU2/Output", "ExpandFocus",
|
||||
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CENTER_IMAGE));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FRONT_SEPARATION));
|
||||
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_REAR_SEPARATION));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_LOW_CUTOFF));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_HIGH_CUTOFF));
|
||||
|
||||
@@ -433,7 +432,7 @@ void AudioSettingsWidget::onStretchSettingsClicked()
|
||||
dlgui.setupUi(&dlg);
|
||||
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.sequenceLength, "SPU2/Output", "StretchSequenceLengthMS",
|
||||
AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH, 0);
|
||||
QtUtils::BindLabelToSlider(dlgui.sequenceLength, dlgui.sequenceLengthLabel);
|
||||
@@ -450,24 +449,24 @@ void AudioSettingsWidget::onStretchSettingsClicked()
|
||||
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
|
||||
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEEKWINDOW));
|
||||
m_dialog->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_OVERLAP));
|
||||
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_QUICKSEEK));
|
||||
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
|
||||
m_dialog->isPerGameSettings() ?
|
||||
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
|
||||
dialog()->isPerGameSettings() ?
|
||||
std::nullopt :
|
||||
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_AA_FILTER));
|
||||
|
||||
@@ -485,11 +484,11 @@ void AudioSettingsWidget::resetVolume(bool fast_forward)
|
||||
QSlider* const slider = fast_forward ? m_ui.fastForwardVolume : m_ui.volume;
|
||||
QLabel* const label = fast_forward ? m_ui.fastForwardVolumeLabel : m_ui.volumeLabel;
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_dialog->removeSettingValue("SPU2/Output", key);
|
||||
dialog()->removeSettingValue("SPU2/Output", key);
|
||||
|
||||
const int value = m_dialog->getEffectiveIntValue("SPU2/Output", key, 100);
|
||||
const int value = dialog()->getEffectiveIntValue("SPU2/Output", key, 100);
|
||||
QSignalBlocker sb(slider);
|
||||
slider->setValue(value);
|
||||
label->setText(QStringLiteral("%1%2").arg(value).arg(tr("%")));
|
||||
|
||||
@@ -5,21 +5,17 @@
|
||||
|
||||
#include "ui_AudioSettingsWidget.h"
|
||||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
enum class AudioBackend : u8;
|
||||
enum class AudioExpansionMode : u8;
|
||||
|
||||
class SettingsWindow;
|
||||
|
||||
class AudioSettingsWidget : public QWidget
|
||||
class AudioSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~AudioSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
@@ -45,6 +41,5 @@ private:
|
||||
void resetVolume(bool fast_forward);
|
||||
|
||||
Ui::AudioSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
u32 m_output_device_latency = 0;
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>523</width>
|
||||
<height>504</height>
|
||||
<width>700</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -79,7 +79,7 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBothSides</enum>
|
||||
<enum>QSlider::TicksBothSides</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>20</number>
|
||||
@@ -125,7 +125,7 @@
|
||||
<string>Maximum latency: 0 frames (0.00ms)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -147,10 +147,10 @@
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBothSides</enum>
|
||||
<enum>QSlider::TicksBothSides</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>20</number>
|
||||
@@ -234,10 +234,10 @@
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBothSides</enum>
|
||||
<enum>QSlider::TicksBothSides</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>10</number>
|
||||
@@ -256,7 +256,7 @@
|
||||
<string>100%</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -283,10 +283,10 @@
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TickPosition::TicksBothSides</enum>
|
||||
<enum>QSlider::TicksBothSides</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>10</number>
|
||||
@@ -305,7 +305,7 @@
|
||||
<string>100%</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -341,12 +341,12 @@
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
@@ -14,25 +14,23 @@
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <algorithm>
|
||||
|
||||
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBoot, "EmuCore", "EnableFastBoot", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBootFastForward, "EmuCore", "EnableFastBootFastForward", false);
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.searchDirectory, m_ui.browseSearchDirectory, m_ui.openSearchDirectory,
|
||||
m_ui.resetSearchDirectory, "Folders", "Bios", Path::Combine(EmuFolders::DataRoot, "bios"));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
|
||||
tr("Patches the BIOS to skip the console's boot animation."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
|
||||
dialog()->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
|
||||
tr("Removes emulation speed throttle until the game starts to reduce startup time."));
|
||||
|
||||
refreshList();
|
||||
@@ -140,6 +138,6 @@ void BIOSSettingsWidget::listItemChanged(const QTreeWidgetItem* current, const Q
|
||||
|
||||
void BIOSSettingsWidget::fastBootChanged()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
|
||||
m_ui.fastBootFastForward->setEnabled(enabled);
|
||||
}
|
||||
|
||||
@@ -3,25 +3,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <string>
|
||||
|
||||
#include "ui_BIOSSettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
class QThread;
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class BIOSSettingsWidget : public QWidget
|
||||
class BIOSSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~BIOSSettingsWidget();
|
||||
|
||||
static void populateList(QTreeWidget* list, const std::string& directory);
|
||||
@@ -35,5 +26,4 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
Ui::BIOSSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>618</width>
|
||||
<height>408</height>
|
||||
<width>700</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
@@ -161,7 +161,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
@@ -206,7 +206,7 @@ void ControllerSettingsWindow::onRenameProfileClicked()
|
||||
{
|
||||
std::string game_settings_path(game_settings.FileName.c_str());
|
||||
std::unique_ptr<INISettingsInterface> update_sif(std::make_unique<INISettingsInterface>(std::move(game_settings_path)));
|
||||
|
||||
|
||||
update_sif->Load();
|
||||
|
||||
if (!old_profile_name.compare(update_sif->GetStringValue("EmuCore", "InputProfileName")))
|
||||
@@ -458,9 +458,9 @@ void ControllerSettingsWindow::createWidgets()
|
||||
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
item->setText(mtap_enabled[port] ? (tr("Controller Port %1%2\n%3").arg(port + 1).arg(s_mtap_slot_names[slot]).arg(display_name)) :
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
tr("Controller Port %1\n%2").arg(port + 1).arg(display_name));
|
||||
item->setText(mtap_enabled[port] ? (tr("Controller Port %1%2\n%3").arg(port + 1).arg(s_mtap_slot_names[slot]).arg(display_name))
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
: tr("Controller Port %1\n%2").arg(port + 1).arg(display_name));
|
||||
item->setIcon(m_port_bindings[global_slot]->getIcon());
|
||||
item->setData(Qt::UserRole, QVariant(global_slot));
|
||||
m_ui.settingsCategory->addItem(item);
|
||||
@@ -514,9 +514,9 @@ void ControllerSettingsWindow::updateListDescription(u32 global_slot, Controller
|
||||
const QString display_name = QString::fromUtf8(ci ? ci->GetLocalizedName() : "Unknown");
|
||||
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
item->setText(mtap_enabled ? (tr("Controller Port %1%2\n%3").arg(port + 1).arg(s_mtap_slot_names[slot]).arg(display_name)) :
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
tr("Controller Port %1\n%2").arg(port + 1).arg(display_name));
|
||||
item->setText(mtap_enabled ? (tr("Controller Port %1%2\n%3").arg(port + 1).arg(s_mtap_slot_names[slot]).arg(display_name))
|
||||
//: Controller Port is an official term from Sony. Find the official translation for your language inside the console's manual.
|
||||
: tr("Controller Port %1\n%2").arg(port + 1).arg(display_name));
|
||||
item->setIcon(widget->getIcon());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -44,13 +44,12 @@ static const char* s_dns_name[] = {
|
||||
|
||||
using PacketReader::IP::IP_Address;
|
||||
|
||||
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog{dialog}
|
||||
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_ui.setupUi(this);
|
||||
setupTab(m_ui);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Eth Enabled
|
||||
@@ -75,7 +74,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
connect(m_ui.ethInterceptDHCP, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onEthDHCPInterceptChanged);
|
||||
|
||||
//IP settings
|
||||
const IPValidator* ipValidator = new IPValidator(this, m_dialog->isPerGameSettings());
|
||||
const IPValidator* ipValidator = new IPValidator(this, dialog()->isPerGameSettings());
|
||||
|
||||
// clang-format off
|
||||
m_ui.ethPS2Addr ->setValidator(ipValidator);
|
||||
@@ -84,13 +83,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
m_ui.ethDNS1Addr ->setValidator(ipValidator);
|
||||
m_ui.ethDNS2Addr ->setValidator(ipValidator);
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
|
||||
|
||||
m_ui.ethPS2Addr ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "PS2IP", "0.0.0.0").c_str()));
|
||||
m_ui.ethNetMask ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "Mask", "0.0.0.0").c_str()));
|
||||
@@ -100,11 +99,11 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
|
||||
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
|
||||
}
|
||||
|
||||
connect(m_ui.ethPS2Addr, &QLineEdit::editingFinished, this, [&]() { onEthIPChanged(m_ui.ethPS2Addr, "DEV9/Eth", "PS2IP" ); });
|
||||
@@ -171,13 +170,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
connect(m_ui.hddEnabled, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddEnabledChanged);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hddEnabled, "DEV9/Hdd", "HddEnable", false);
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
|
||||
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
|
||||
m_ui.hddFile->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw")));
|
||||
}
|
||||
else
|
||||
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
|
||||
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
|
||||
|
||||
connect(m_ui.hddLBA48, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddLBA48Changed);
|
||||
|
||||
@@ -221,7 +220,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
|
||||
{
|
||||
std::vector<AdapterEntry> list = m_adapter_list[static_cast<u32>(m_api_list[index])];
|
||||
|
||||
const std::string value = m_dialog->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
|
||||
const std::string value = dialog()->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
|
||||
for (size_t i = 0; i < list.size(); i++)
|
||||
{
|
||||
m_ui.ethDev->addItem(QString::fromUtf8(list[i].name));
|
||||
@@ -232,7 +231,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
|
||||
selectedApi = m_api_list[index];
|
||||
}
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
@@ -277,20 +276,20 @@ void DEV9SettingsWidget::onEthDeviceChanged(int index)
|
||||
{
|
||||
const AdapterEntry& adapter = m_adapter_list[static_cast<u32>(m_api_list[m_ui.ethDevType->currentIndex()])][index];
|
||||
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
|
||||
}
|
||||
else if (m_dialog->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
|
||||
else if (dialog()->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
|
||||
{
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
|
||||
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
|
||||
}
|
||||
}
|
||||
|
||||
void DEV9SettingsWidget::onEthDHCPInterceptChanged(Qt::CheckState state)
|
||||
{
|
||||
const bool enabled = (state == Qt::CheckState::PartiallyChecked ? Host::GetBaseBoolSettingValue("DEV9/Eth", "InterceptDHCP", false) : state) ||
|
||||
((m_adapter_options & AdapterOptions::DHCP_ForcedOn) == AdapterOptions::DHCP_ForcedOn);
|
||||
((m_adapter_options & AdapterOptions::DHCP_ForcedOn) == AdapterOptions::DHCP_ForcedOn);
|
||||
|
||||
// clang-format off
|
||||
const bool ipOverride = (m_adapter_options & AdapterOptions::DHCP_OverrideIP) == AdapterOptions::DHCP_OverrideIP;
|
||||
@@ -323,8 +322,8 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
|
||||
//Alow clearing a per-game ip setting
|
||||
if (sender->text().isEmpty())
|
||||
{
|
||||
if (m_dialog->getStringValue(section, key, std::nullopt).has_value())
|
||||
m_dialog->setStringSettingValue(section, key, std::nullopt);
|
||||
if (dialog()->getStringValue(section, key, std::nullopt).has_value())
|
||||
dialog()->setStringSettingValue(section, key, std::nullopt);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -337,9 +336,9 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
|
||||
|
||||
sender->setText(QString::fromUtf8(neatStr.c_str()));
|
||||
|
||||
std::string oldval = m_dialog->getStringValue(section, key, "0.0.0.0").value();
|
||||
std::string oldval = dialog()->getStringValue(section, key, "0.0.0.0").value();
|
||||
if (neatStr != oldval)
|
||||
m_dialog->setStringSettingValue(section, key, neatStr.c_str());
|
||||
dialog()->setStringSettingValue(section, key, neatStr.c_str());
|
||||
}
|
||||
|
||||
void DEV9SettingsWidget::onEthAutoChanged(QCheckBox* sender, Qt::CheckState state, QLineEdit* input, const char* section, const char* key)
|
||||
@@ -357,7 +356,7 @@ void DEV9SettingsWidget::onEthDNSModeChanged(QComboBox* sender, int index, QLine
|
||||
{
|
||||
if (sender->isEnabled())
|
||||
{
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
@@ -522,7 +521,7 @@ void DEV9SettingsWidget::onEthHostImport()
|
||||
|
||||
void DEV9SettingsWidget::onEthHostPerGame()
|
||||
{
|
||||
const std::optional<int> hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
const std::optional<int> hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
if (!hostLengthOpt.has_value())
|
||||
{
|
||||
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Per Game Host list"),
|
||||
@@ -532,12 +531,12 @@ void DEV9SettingsWidget::onEthHostPerGame()
|
||||
switch (ret)
|
||||
{
|
||||
case QMessageBox::StandardButton::No:
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
break;
|
||||
|
||||
case QMessageBox::StandardButton::Yes:
|
||||
{
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
std::vector<HostEntryUi> hosts = ListBaseHostsConfig();
|
||||
for (size_t i = 0; i < hosts.size(); i++)
|
||||
AddNewHostConfig(hosts[i]);
|
||||
@@ -563,7 +562,7 @@ void DEV9SettingsWidget::onEthHostPerGame()
|
||||
for (int i = hostLength - 1; i >= 0; i--)
|
||||
DeleteHostConfig(i);
|
||||
}
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
|
||||
}
|
||||
|
||||
RefreshHostList();
|
||||
@@ -576,16 +575,16 @@ void DEV9SettingsWidget::onEthHostEdit(QStandardItem* item)
|
||||
switch (item->column())
|
||||
{
|
||||
case 0: //Name
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 1: //URL
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 2: //IP
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
|
||||
break;
|
||||
case 3: //Enabled
|
||||
m_dialog->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
|
||||
dialog()->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -634,9 +633,9 @@ void DEV9SettingsWidget::onHddFileEdit()
|
||||
// Also save the hddPath setting
|
||||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
if (hddPath.empty())
|
||||
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
|
||||
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
|
||||
else
|
||||
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
|
||||
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
|
||||
|
||||
UpdateHddSizeUIValues();
|
||||
}
|
||||
@@ -716,7 +715,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIEnabled()
|
||||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
|
||||
bool enableSizeUI;
|
||||
if (m_dialog->isPerGameSettings() && hddPath.empty())
|
||||
if (dialog()->isPerGameSettings() && hddPath.empty())
|
||||
enableSizeUI = false;
|
||||
else
|
||||
enableSizeUI = m_ui.hddFile->isEnabled();
|
||||
@@ -733,7 +732,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIValues()
|
||||
{
|
||||
std::string hddPath(m_ui.hddFile->text().toStdString());
|
||||
|
||||
if (m_dialog->isPerGameSettings() && hddPath.empty())
|
||||
if (dialog()->isPerGameSettings() && hddPath.empty())
|
||||
hddPath = m_ui.hddFile->placeholderText().toStdString();
|
||||
|
||||
if (!Path::IsAbsolute(hddPath))
|
||||
@@ -770,7 +769,7 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event)
|
||||
{
|
||||
//The API combobox dosn't set the EthApi field, that is performed by the device combobox (in addition to saving the device)
|
||||
//This means that this setting can get out of sync with true value, so revert to that if the ui is closed and opened
|
||||
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
|
||||
//SignalBlocker to prevent saving a value already in the config file
|
||||
QSignalBlocker sb(m_ui.ethDev);
|
||||
@@ -864,7 +863,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
||||
m_api_valuelist.push_back(nullptr);
|
||||
|
||||
//We replace the blank entry with one for global settings
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
const std::string valueAPI = Host::GetBaseStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]);
|
||||
for (int i = 0; Pcsx2Config::DEV9Options::NetApiNames[i] != nullptr; i++)
|
||||
@@ -892,7 +891,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
||||
m_adapter_list[static_cast<u32>(Pcsx2Config::DEV9Options::NetApi::Unset)][0].name = baseAdapter;
|
||||
}
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
m_ui.ethDevType->addItem(tr("Use Global Setting [%1]").arg(QString::fromUtf8(Pcsx2Config::DEV9Options::NetApiNames[static_cast<u32>(m_global_api)])));
|
||||
else
|
||||
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[0]));
|
||||
@@ -900,7 +899,7 @@ void DEV9SettingsWidget::LoadAdapters()
|
||||
for (int i = 1; m_api_namelist[i] != nullptr; i++)
|
||||
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[i]));
|
||||
|
||||
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
|
||||
for (int i = 0; m_api_namelist[i] != nullptr; i++)
|
||||
{
|
||||
@@ -924,7 +923,7 @@ void DEV9SettingsWidget::RefreshHostList()
|
||||
|
||||
std::vector<HostEntryUi> hosts;
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
m_ui.ethHostPerGame->setVisible(true);
|
||||
|
||||
@@ -988,7 +987,7 @@ void DEV9SettingsWidget::RefreshHostList()
|
||||
|
||||
int DEV9SettingsWidget::CountHostsConfig()
|
||||
{
|
||||
return m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
|
||||
return dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
|
||||
}
|
||||
|
||||
std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
||||
@@ -996,14 +995,14 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
||||
std::vector<HostEntryUi> hosts;
|
||||
|
||||
std::optional<int> hostLengthOpt;
|
||||
if (m_dialog->isPerGameSettings())
|
||||
if (dialog()->isPerGameSettings())
|
||||
{
|
||||
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
|
||||
if (!hostLengthOpt.has_value())
|
||||
return std::nullopt;
|
||||
}
|
||||
else
|
||||
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0);
|
||||
|
||||
const int hostLength = hostLengthOpt.value();
|
||||
for (int i = 0; i < hostLength; i++)
|
||||
@@ -1011,10 +1010,10 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
|
||||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(i);
|
||||
|
||||
HostEntryUi entry;
|
||||
entry.Url = m_dialog->getStringValue(section.c_str(), "Url", "").value();
|
||||
entry.Desc = m_dialog->getStringValue(section.c_str(), "Desc", "").value();
|
||||
entry.Address = m_dialog->getStringValue(section.c_str(), "Address", "").value();
|
||||
entry.Enabled = m_dialog->getBoolValue(section.c_str(), "Enabled", false).value();
|
||||
entry.Url = dialog()->getStringValue(section.c_str(), "Url", "").value();
|
||||
entry.Desc = dialog()->getStringValue(section.c_str(), "Desc", "").value();
|
||||
entry.Address = dialog()->getStringValue(section.c_str(), "Address", "").value();
|
||||
entry.Enabled = dialog()->getBoolValue(section.c_str(), "Enabled", false).value();
|
||||
hosts.push_back(entry);
|
||||
}
|
||||
|
||||
@@ -1046,12 +1045,12 @@ void DEV9SettingsWidget::AddNewHostConfig(const HostEntryUi& host)
|
||||
const int hostLength = CountHostsConfig();
|
||||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength);
|
||||
// clang-format off
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
|
||||
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
|
||||
dialog()->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
|
||||
// clang-format on
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
|
||||
RefreshHostList();
|
||||
}
|
||||
|
||||
@@ -1066,10 +1065,10 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
|
||||
std::string sectionAhead = "DEV9/Eth/Hosts/Host" + std::to_string(i + 1);
|
||||
|
||||
// clang-format off
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Url", m_dialog->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Desc", m_dialog->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
|
||||
m_dialog->setStringSettingValue(section.c_str(), "Address", m_dialog->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
|
||||
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", m_dialog->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Url", dialog()->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Desc", dialog()->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
|
||||
dialog()->setStringSettingValue(section.c_str(), "Address", dialog()->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
|
||||
dialog()->setBoolSettingValue (section.c_str(), "Enabled", dialog()->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
@@ -1077,9 +1076,9 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
|
||||
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength - 1);
|
||||
//Specifying a value of nullopt will delete the key
|
||||
//if the key is a nullptr, the whole section is deleted
|
||||
m_dialog->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
|
||||
dialog()->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
|
||||
|
||||
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
|
||||
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
|
||||
RefreshHostList();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,18 +3,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
#include "ui_DEV9SettingsWidget.h"
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
#include "DEV9UiCommon.h"
|
||||
#include "DEV9DnsHostDialog.h"
|
||||
#include "DEV9/net.h"
|
||||
|
||||
class SettingsWindow;
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
class DEV9SettingsWidget : public QWidget
|
||||
class DEV9SettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -43,7 +42,7 @@ private Q_SLOTS:
|
||||
void onHddCreateClicked();
|
||||
|
||||
public:
|
||||
DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~DEV9SettingsWidget();
|
||||
|
||||
protected:
|
||||
@@ -63,8 +62,6 @@ private:
|
||||
void UpdateHddSizeUIEnabled();
|
||||
void UpdateHddSizeUIValues();
|
||||
|
||||
SettingsWindow* m_dialog;
|
||||
|
||||
Ui::DEV9SettingsWidget m_ui;
|
||||
|
||||
bool m_firstShow{true};
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>482</height>
|
||||
<width>700</width>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -218,7 +218,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@@ -387,7 +387,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>68</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
99
pcsx2-qt/Settings/DebugAnalysisSettingsTab.ui
Normal file
99
pcsx2-qt/Settings/DebugAnalysisSettingsTab.ui
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DebugAnalysisSettingsTab</class>
|
||||
<widget class="QWidget" name="DebugAnalysisSettingsTab">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="analysisLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>These settings control what and when analysis passes should be performed on the program running in the virtual machine so that the resultant information can be shown in the debugger.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="analysisGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Analysis</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="analysisForm">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="analysisConditionLabel">
|
||||
<property name="text">
|
||||
<string>Automatically Analyze Program:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="analysisCondition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>If Debugger Is Open</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Never</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="generateSymbolsForIRXExportTables">
|
||||
<property name="text">
|
||||
<string>Generate Symbols For IRX Exports</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="analysisSettings" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -245,11 +245,21 @@ void DebugAnalysisSettingsWidget::setupSymbolSourceGrid()
|
||||
int i = 0;
|
||||
for (auto& [name, temp] : m_symbol_sources)
|
||||
{
|
||||
temp.check_box = new QCheckBox(QString::fromStdString(name));
|
||||
QString display_name = SymbolGuardian::TranslateSymbolSourceName(name.c_str());
|
||||
|
||||
temp.check_box = new QCheckBox(display_name);
|
||||
temp.check_box->setChecked(temp.previous_value);
|
||||
layout->addWidget(temp.check_box, i / 2, i % 2);
|
||||
|
||||
connect(temp.check_box, &QCheckBox::checkStateChanged, this, &DebugAnalysisSettingsWidget::symbolSourceCheckStateChanged);
|
||||
connect(temp.check_box, &QCheckBox::checkStateChanged, this, [this, name]() {
|
||||
auto temp = m_symbol_sources.find(name);
|
||||
if (temp == m_symbol_sources.end())
|
||||
return;
|
||||
|
||||
temp->second.modified_by_user = true;
|
||||
|
||||
saveSymbolSources();
|
||||
});
|
||||
|
||||
i++;
|
||||
}
|
||||
@@ -264,21 +274,6 @@ void DebugAnalysisSettingsWidget::setupSymbolSourceGrid()
|
||||
m_ui.symbolSourceErrorMessage->hide();
|
||||
}
|
||||
|
||||
void DebugAnalysisSettingsWidget::symbolSourceCheckStateChanged()
|
||||
{
|
||||
QCheckBox* check_box = qobject_cast<QCheckBox*>(sender());
|
||||
if (!check_box)
|
||||
return;
|
||||
|
||||
auto temp = m_symbol_sources.find(check_box->text().toStdString());
|
||||
if (temp == m_symbol_sources.end())
|
||||
return;
|
||||
|
||||
temp->second.modified_by_user = true;
|
||||
|
||||
saveSymbolSources();
|
||||
}
|
||||
|
||||
void DebugAnalysisSettingsWidget::saveSymbolSources()
|
||||
{
|
||||
if (!m_dialog)
|
||||
|
||||
@@ -30,7 +30,6 @@ public:
|
||||
|
||||
protected:
|
||||
void setupSymbolSourceGrid();
|
||||
void symbolSourceCheckStateChanged();
|
||||
void saveSymbolSources();
|
||||
|
||||
void setupSymbolFileList();
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
214
pcsx2-qt/Settings/DebugGSSettingsTab.ui
Normal file
214
pcsx2-qt/Settings/DebugGSSettingsTab.ui
Normal file
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DebugGSSettingsTab</class>
|
||||
<widget class="QWidget" name="DebugGSSettingsTab">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Draw Dumping</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="dumpGSData">
|
||||
<property name="text">
|
||||
<string>Dump GS Draws</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="saveRT">
|
||||
<property name="text">
|
||||
<string>Save RT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="saveFrame">
|
||||
<property name="text">
|
||||
<string>Save Frame</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="saveTexture">
|
||||
<property name="text">
|
||||
<string>Save Texture</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="saveDepth">
|
||||
<property name="text">
|
||||
<string>Save Depth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="saveAlpha">
|
||||
<property name="text">
|
||||
<string>Save Alpha</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="saveInfo">
|
||||
<property name="text">
|
||||
<string>Save Info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="text">
|
||||
<string>Save Draw Start:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="saveDrawStart">
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Save Draw Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="saveDrawCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Save Frame Start:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="saveFrameStart">
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Save Frame Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="saveFrameCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Hardware Dump Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Software Dump Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,0">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hwDumpDirectory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hwDumpBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hwDumpOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="swDumpDirectory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="swDumpBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="swDumpOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
321
pcsx2-qt/Settings/DebugLoggingSettingsTab.ui
Normal file
321
pcsx2-qt/Settings/DebugLoggingSettingsTab.ui
Normal file
@@ -0,0 +1,321 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DebugLoggingSettingsTab</class>
|
||||
<widget class="QWidget" name="DebugLoggingSettingsTab">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="traceLogHorizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpEELogging">
|
||||
<property name="title">
|
||||
<string>EE</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="grpEELoggingGrid">
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="chkEEDMACTRL">
|
||||
<property name="text">
|
||||
<string>DMA Control</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="chkEEMFIFO">
|
||||
<property name="text">
|
||||
<string>SPR / MFIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="chkEEVIF">
|
||||
<property name="text">
|
||||
<string>VIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="chkEECOP1">
|
||||
<property name="text">
|
||||
<string>COP1 (FPU)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="chkEEMSKPATH3">
|
||||
<property name="text">
|
||||
<string>MSKPATH3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkEECache">
|
||||
<property name="text">
|
||||
<string>Cache</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="chkEEGIF">
|
||||
<property name="text">
|
||||
<string>GIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="chkEER5900">
|
||||
<property name="text">
|
||||
<string>R5900</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkEECOP0">
|
||||
<property name="text">
|
||||
<string>COP0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="chkEEMMIO">
|
||||
<property name="text">
|
||||
<string>HW Regs (MMIO)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="chkEECounters">
|
||||
<property name="text">
|
||||
<string>Counters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="chkEESIF">
|
||||
<property name="text">
|
||||
<string>SIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkEECOP2">
|
||||
<property name="text">
|
||||
<string>COP2 (VU0 Macro)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="chkEEVIFCodes">
|
||||
<property name="text">
|
||||
<string>VIFCodes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="chkEEMemory">
|
||||
<property name="text">
|
||||
<string>Memory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="chkEEUNKNWNMMIO">
|
||||
<property name="text">
|
||||
<string>Unknown MMIO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="chkEEIPU">
|
||||
<property name="text">
|
||||
<string>IPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="chkEEBIOS">
|
||||
<property name="text">
|
||||
<string>BIOS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="chkEEDMARegs">
|
||||
<property name="text">
|
||||
<string>DMA Registers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="chkEEGIFTags">
|
||||
<property name="text">
|
||||
<string>GIFTags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="eeLoggingSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpIOPLogging">
|
||||
<property name="title">
|
||||
<string>IOP</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="grpIOPLoggingGrid">
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPCounters">
|
||||
<property name="text">
|
||||
<string>Counters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPUNKNWNMMIO">
|
||||
<property name="text">
|
||||
<string>Unknown MMIO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMMIO">
|
||||
<property name="text">
|
||||
<string>HW Regs (MMIO)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPCDVD">
|
||||
<property name="text">
|
||||
<string>CDVD</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPR3000A">
|
||||
<property name="text">
|
||||
<string>R3000A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMemcards">
|
||||
<property name="text">
|
||||
<string>Memcards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPDMARegs">
|
||||
<property name="text">
|
||||
<string>DMA Registers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPPad">
|
||||
<property name="text">
|
||||
<string>Pad</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPBIOS">
|
||||
<property name="text">
|
||||
<string>BIOS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMDEC">
|
||||
<property name="text">
|
||||
<string>MDEC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPDMACTRL">
|
||||
<property name="text">
|
||||
<string>DMA Control</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPCOP2">
|
||||
<property name="text">
|
||||
<string>COP2 (GPU)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="iopLoggingSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -3,161 +3,202 @@
|
||||
|
||||
#include "DebugSettingsWidget.h"
|
||||
|
||||
#include "DebugUserInterfaceSettingsWidget.h"
|
||||
#include "DebugAnalysisSettingsWidget.h"
|
||||
#include "QtUtils.h"
|
||||
#include "SettingWidgetBinder.h"
|
||||
#include "SettingsWindow.h"
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Settings/DebugAnalysisSettingsWidget.h"
|
||||
#include "Settings/SettingsWindow.h"
|
||||
|
||||
#include "pcsx2/Host.h"
|
||||
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
{
|
||||
SettingsInterface* sif = dialog->getSettingsInterface();
|
||||
static const char* s_drop_indicators[] = {
|
||||
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Classic"),
|
||||
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Segmented"),
|
||||
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Minimalistic"),
|
||||
nullptr,
|
||||
};
|
||||
|
||||
m_ui.setupUi(this);
|
||||
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
|
||||
: SettingsWidget(settings_dialog, parent)
|
||||
{
|
||||
SettingsInterface* sif = dialog()->getSettingsInterface();
|
||||
|
||||
m_user_interface_tab = setupTab(m_user_interface, tr("User Interface"));
|
||||
setupTab(m_analysis, tr("Analysis"));
|
||||
setupTab(m_gs, tr("GS"));
|
||||
m_logging_tab = setupTab(m_logging, tr("Logging"));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// User Interface Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (!dialog->isPerGameSettings())
|
||||
if (!dialog()->isPerGameSettings())
|
||||
{
|
||||
m_user_interface_settings = new DebugUserInterfaceSettingsWidget(dialog);
|
||||
m_ui.userInterfaceTabWidget->setLayout(new QVBoxLayout());
|
||||
m_ui.userInterfaceTabWidget->layout()->addWidget(m_user_interface_settings);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_user_interface.refreshInterval, "Debugger/UserInterface", "RefreshInterval", 1000);
|
||||
connect(m_user_interface.refreshInterval, &QSpinBox::valueChanged, this, []() {
|
||||
if (g_debugger_window)
|
||||
g_debugger_window->updateFromSettings();
|
||||
});
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.refreshInterval, tr("Refresh Interval"), tr("1000ms"),
|
||||
tr("The amount of time to wait between subsequent attempts to update the user interface to reflect the state "
|
||||
"of the virtual machine."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_user_interface.showOnStartup, "Debugger/UserInterface", "ShowOnStartup", false);
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.showOnStartup, tr("Show On Startup"), tr("Unchecked"),
|
||||
tr("Open the debugger window automatically when PCSX2 starts."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_user_interface.saveWindowGeometry, "Debugger/UserInterface", "SaveWindowGeometry", true);
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.saveWindowGeometry, tr("Save Window Geometry"), tr("Checked"),
|
||||
tr("Save the position and size of the debugger window when it is closed so that it can be restored later."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(
|
||||
sif,
|
||||
m_user_interface.dropIndicator,
|
||||
"Debugger/UserInterface",
|
||||
"DropIndicatorStyle",
|
||||
s_drop_indicators,
|
||||
s_drop_indicators,
|
||||
s_drop_indicators[0],
|
||||
"DebugUserInterfaceSettingsWidget");
|
||||
dialog()->registerWidgetHelp(
|
||||
m_user_interface.dropIndicator, tr("Drop Indicator Style"), tr("Classic"),
|
||||
tr("Choose how the drop indicators that appear when you drag dock windows in the debugger are styled. "
|
||||
"You will have to restart the debugger for this option to take effect."));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui.debugTabs->removeTab(m_ui.debugTabs->indexOf(m_ui.userInterfaceTabWidget));
|
||||
setTabVisible(m_user_interface_tab, false);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Analysis Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(
|
||||
sif, m_ui.analysisCondition, "Debugger/Analysis", "RunCondition",
|
||||
sif, m_analysis.analysisCondition, "Debugger/Analysis", "RunCondition",
|
||||
Pcsx2Config::DebugAnalysisOptions::RunConditionNames, DebugAnalysisCondition::IF_DEBUGGER_IS_OPEN);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_ui.generateSymbolsForIRXExportTables, "Debugger/Analysis", "GenerateSymbolsForIRXExports", true);
|
||||
sif, m_analysis.generateSymbolsForIRXExportTables, "Debugger/Analysis", "GenerateSymbolsForIRXExports", true);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
|
||||
dialog()->registerWidgetHelp(m_analysis.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
|
||||
tr("Choose when the analysis passes should be run: Always (to save time when opening the debugger), If "
|
||||
"Debugger Is Open (to save memory if you never open the debugger), or Never."));
|
||||
dialog->registerWidgetHelp(m_ui.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
|
||||
dialog()->registerWidgetHelp(m_analysis.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
|
||||
tr("Hook IRX module loading/unloading and generate symbols for exported functions on the fly."));
|
||||
|
||||
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog);
|
||||
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog());
|
||||
|
||||
m_ui.analysisSettings->setLayout(new QVBoxLayout());
|
||||
m_ui.analysisSettings->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
m_ui.analysisSettings->layout()->addWidget(m_analysis_settings);
|
||||
m_analysis.analysisSettings->setLayout(new QVBoxLayout());
|
||||
m_analysis.analysisSettings->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
m_analysis.analysisSettings->layout()->addWidget(m_analysis_settings);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// GS Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.dumpGSData, "EmuCore/GS", "DumpGSData", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveRT, "EmuCore/GS", "SaveRT", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveFrame, "EmuCore/GS", "SaveFrame", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveTexture, "EmuCore/GS", "SaveTexture", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveDepth, "EmuCore/GS", "SaveDepth", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveAlpha, "EmuCore/GS", "SaveAlpha", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveInfo, "EmuCore/GS", "SaveInfo", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveDrawStart, "EmuCore/GS", "SaveDrawStart", 0);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveDrawCount, "EmuCore/GS", "SaveDrawCount", 5000);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveFrameStart, "EmuCore/GS", "SaveFrameStart", 0);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveFrameCount, "EmuCore/GS", "SaveFrameCount", 999999);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.dumpGSData, "EmuCore/GS", "DumpGSData", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveRT, "EmuCore/GS", "SaveRT", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveFrame, "EmuCore/GS", "SaveFrame", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveTexture, "EmuCore/GS", "SaveTexture", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveDepth, "EmuCore/GS", "SaveDepth", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveAlpha, "EmuCore/GS", "SaveAlpha", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveInfo, "EmuCore/GS", "SaveInfo", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveDrawStart, "EmuCore/GS", "SaveDrawStart", 0);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveDrawCount, "EmuCore/GS", "SaveDrawCount", 5000);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveFrameStart, "EmuCore/GS", "SaveFrameStart", 0);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveFrameCount, "EmuCore/GS", "SaveFrameCount", 999999);
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(
|
||||
sif, m_ui.hwDumpDirectory, m_ui.hwDumpBrowse, m_ui.hwDumpOpen, nullptr, "EmuCore/GS", "HWDumpDirectory", std::string(), false);
|
||||
sif, m_gs.hwDumpDirectory, m_gs.hwDumpBrowse, m_gs.hwDumpOpen, nullptr, "EmuCore/GS", "HWDumpDirectory", std::string(), false);
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(
|
||||
sif, m_ui.swDumpDirectory, m_ui.swDumpBrowse, m_ui.swDumpOpen, nullptr, "EmuCore/GS", "SWDumpDirectory", std::string(), false);
|
||||
sif, m_gs.swDumpDirectory, m_gs.swDumpBrowse, m_gs.swDumpOpen, nullptr, "EmuCore/GS", "SWDumpDirectory", std::string(), false);
|
||||
|
||||
connect(m_ui.dumpGSData, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onDrawDumpingChanged);
|
||||
connect(m_gs.dumpGSData, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onDrawDumpingChanged);
|
||||
onDrawDumpingChanged();
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Trace Logging Settings
|
||||
// Logging Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEnable, "EmuCore/TraceLog", "Enabled", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEnable, "EmuCore/TraceLog", "Enabled", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEBIOS, "EmuCore/TraceLog", "EE.bios", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMemory, "EmuCore/TraceLog", "EE.memory", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEER5900, "EmuCore/TraceLog", "EE.r5900", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP0, "EmuCore/TraceLog", "EE.cop0", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP1, "EmuCore/TraceLog", "EE.cop1", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP2, "EmuCore/TraceLog", "EE.cop2", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECache, "EmuCore/TraceLog", "EE.cache", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMMIO, "EmuCore/TraceLog", "EE.knownhw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEUNKNWNMMIO, "EmuCore/TraceLog", "EE.unknownhw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMARegs, "EmuCore/TraceLog", "EE.dmahw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEIPU, "EmuCore/TraceLog", "EE.ipu", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIFTags, "EmuCore/TraceLog", "EE.giftag", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIFCodes, "EmuCore/TraceLog", "EE.vifcode", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMSKPATH3, "EmuCore/TraceLog", "EE.mskpath3", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMFIFO, "EmuCore/TraceLog", "EE.spr", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMACTRL, "EmuCore/TraceLog", "EE.dmac", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECounters, "EmuCore/TraceLog", "EE.counters", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIF, "EmuCore/TraceLog", "EE.vif", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIF, "EmuCore/TraceLog", "EE.gif", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEBIOS, "EmuCore/TraceLog", "EE.bios", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMemory, "EmuCore/TraceLog", "EE.memory", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEER5900, "EmuCore/TraceLog", "EE.r5900", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP0, "EmuCore/TraceLog", "EE.cop0", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP1, "EmuCore/TraceLog", "EE.cop1", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP2, "EmuCore/TraceLog", "EE.cop2", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECache, "EmuCore/TraceLog", "EE.cache", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMMIO, "EmuCore/TraceLog", "EE.knownhw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEUNKNWNMMIO, "EmuCore/TraceLog", "EE.unknownhw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEDMARegs, "EmuCore/TraceLog", "EE.dmahw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEIPU, "EmuCore/TraceLog", "EE.ipu", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEGIFTags, "EmuCore/TraceLog", "EE.giftag", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEVIFCodes, "EmuCore/TraceLog", "EE.vifcode", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMSKPATH3, "EmuCore/TraceLog", "EE.mskpath3", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMFIFO, "EmuCore/TraceLog", "EE.spr", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEDMACTRL, "EmuCore/TraceLog", "EE.dmac", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECounters, "EmuCore/TraceLog", "EE.counters", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEVIF, "EmuCore/TraceLog", "EE.vif", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEGIF, "EmuCore/TraceLog", "EE.gif", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPBIOS, "EmuCore/TraceLog", "IOP.Bios", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMemcards, "EmuCore/TraceLog", "IOP.memcards", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPR3000A, "EmuCore/TraceLog", "IOP.r3000a", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCOP2, "EmuCore/TraceLog", "IOP.cop2", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMMIO, "EmuCore/TraceLog", "IOP.knownhw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPUNKNWNMMIO, "EmuCore/TraceLog", "IOP.unknownhw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMARegs, "EmuCore/TraceLog", "IOP.dmahw", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPPad, "EmuCore/TraceLog", "IOP.pad", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMACTRL, "EmuCore/TraceLog", "IOP.dmac", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCounters, "EmuCore/TraceLog", "IOP.counters", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCDVD, "EmuCore/TraceLog", "IOP.cdvd", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMDEC, "EmuCore/TraceLog", "IOP.mdec", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPBIOS, "EmuCore/TraceLog", "IOP.Bios", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMemcards, "EmuCore/TraceLog", "IOP.memcards", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPR3000A, "EmuCore/TraceLog", "IOP.r3000a", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCOP2, "EmuCore/TraceLog", "IOP.cop2", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMMIO, "EmuCore/TraceLog", "IOP.knownhw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPUNKNWNMMIO, "EmuCore/TraceLog", "IOP.unknownhw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPDMARegs, "EmuCore/TraceLog", "IOP.dmahw", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPPad, "EmuCore/TraceLog", "IOP.pad", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPDMACTRL, "EmuCore/TraceLog", "IOP.dmac", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCounters, "EmuCore/TraceLog", "IOP.counters", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCDVD, "EmuCore/TraceLog", "IOP.cdvd", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMDEC, "EmuCore/TraceLog", "IOP.mdec", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEESIF, "EmuCore/TraceLog", "MISC.sif", false);
|
||||
dialog()->registerWidgetHelp(m_logging.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEESIF, "EmuCore/TraceLog", "MISC.sif", false);
|
||||
dialog->registerWidgetHelp(m_ui.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
|
||||
|
||||
connect(m_ui.chkEnable, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onLoggingEnableChanged);
|
||||
connect(m_logging.chkEnable, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onLoggingEnableChanged);
|
||||
onLoggingEnableChanged();
|
||||
|
||||
#else
|
||||
m_ui.debugTabs->removeTab(m_ui.debugTabs->indexOf(m_ui.traceLogTabWidget));
|
||||
setTabVisible(m_logging_tab, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -165,64 +206,64 @@ DebugSettingsWidget::~DebugSettingsWidget() = default;
|
||||
|
||||
void DebugSettingsWidget::onDrawDumpingChanged()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore/GS", "DumpGSData", false);
|
||||
m_ui.saveRT->setEnabled(enabled);
|
||||
m_ui.saveFrame->setEnabled(enabled);
|
||||
m_ui.saveTexture->setEnabled(enabled);
|
||||
m_ui.saveDepth->setEnabled(enabled);
|
||||
m_ui.saveAlpha->setEnabled(enabled);
|
||||
m_ui.saveInfo->setEnabled(enabled);
|
||||
m_ui.saveDrawStart->setEnabled(enabled);
|
||||
m_ui.saveDrawCount->setEnabled(enabled);
|
||||
m_ui.saveFrameStart->setEnabled(enabled);
|
||||
m_ui.saveFrameCount->setEnabled(enabled);
|
||||
m_ui.hwDumpDirectory->setEnabled(enabled);
|
||||
m_ui.hwDumpBrowse->setEnabled(enabled);
|
||||
m_ui.hwDumpOpen->setEnabled(enabled);
|
||||
m_ui.swDumpDirectory->setEnabled(enabled);
|
||||
m_ui.swDumpBrowse->setEnabled(enabled);
|
||||
m_ui.swDumpOpen->setEnabled(enabled);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore/GS", "DumpGSData", false);
|
||||
m_gs.saveRT->setEnabled(enabled);
|
||||
m_gs.saveFrame->setEnabled(enabled);
|
||||
m_gs.saveTexture->setEnabled(enabled);
|
||||
m_gs.saveDepth->setEnabled(enabled);
|
||||
m_gs.saveAlpha->setEnabled(enabled);
|
||||
m_gs.saveInfo->setEnabled(enabled);
|
||||
m_gs.saveDrawStart->setEnabled(enabled);
|
||||
m_gs.saveDrawCount->setEnabled(enabled);
|
||||
m_gs.saveFrameStart->setEnabled(enabled);
|
||||
m_gs.saveFrameCount->setEnabled(enabled);
|
||||
m_gs.hwDumpDirectory->setEnabled(enabled);
|
||||
m_gs.hwDumpBrowse->setEnabled(enabled);
|
||||
m_gs.hwDumpOpen->setEnabled(enabled);
|
||||
m_gs.swDumpDirectory->setEnabled(enabled);
|
||||
m_gs.swDumpBrowse->setEnabled(enabled);
|
||||
m_gs.swDumpOpen->setEnabled(enabled);
|
||||
}
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
void DebugSettingsWidget::onLoggingEnableChanged()
|
||||
{
|
||||
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore/TraceLog", "Enabled", false);
|
||||
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore/TraceLog", "Enabled", false);
|
||||
|
||||
m_ui.chkEEBIOS->setEnabled(enabled);
|
||||
m_ui.chkEEMemory->setEnabled(enabled);
|
||||
m_ui.chkEER5900->setEnabled(enabled);
|
||||
m_ui.chkEECOP0->setEnabled(enabled);
|
||||
m_ui.chkEECOP1->setEnabled(enabled);
|
||||
m_ui.chkEECOP2->setEnabled(enabled);
|
||||
m_ui.chkEECache->setEnabled(enabled);
|
||||
m_ui.chkEEMMIO->setEnabled(enabled);
|
||||
m_ui.chkEEUNKNWNMMIO->setEnabled(enabled);
|
||||
m_ui.chkEEDMARegs->setEnabled(enabled);
|
||||
m_ui.chkEEIPU->setEnabled(enabled);
|
||||
m_ui.chkEEGIFTags->setEnabled(enabled);
|
||||
m_ui.chkEEVIFCodes->setEnabled(enabled);
|
||||
m_ui.chkEEMSKPATH3->setEnabled(enabled);
|
||||
m_ui.chkEEMFIFO->setEnabled(enabled);
|
||||
m_ui.chkEEDMACTRL->setEnabled(enabled);
|
||||
m_ui.chkEECounters->setEnabled(enabled);
|
||||
m_ui.chkEEVIF->setEnabled(enabled);
|
||||
m_ui.chkEEGIF->setEnabled(enabled);
|
||||
m_ui.chkEESIF->setEnabled(enabled);
|
||||
m_logging.chkEEBIOS->setEnabled(enabled);
|
||||
m_logging.chkEEMemory->setEnabled(enabled);
|
||||
m_logging.chkEER5900->setEnabled(enabled);
|
||||
m_logging.chkEECOP0->setEnabled(enabled);
|
||||
m_logging.chkEECOP1->setEnabled(enabled);
|
||||
m_logging.chkEECOP2->setEnabled(enabled);
|
||||
m_logging.chkEECache->setEnabled(enabled);
|
||||
m_logging.chkEEMMIO->setEnabled(enabled);
|
||||
m_logging.chkEEUNKNWNMMIO->setEnabled(enabled);
|
||||
m_logging.chkEEDMARegs->setEnabled(enabled);
|
||||
m_logging.chkEEIPU->setEnabled(enabled);
|
||||
m_logging.chkEEGIFTags->setEnabled(enabled);
|
||||
m_logging.chkEEVIFCodes->setEnabled(enabled);
|
||||
m_logging.chkEEMSKPATH3->setEnabled(enabled);
|
||||
m_logging.chkEEMFIFO->setEnabled(enabled);
|
||||
m_logging.chkEEDMACTRL->setEnabled(enabled);
|
||||
m_logging.chkEECounters->setEnabled(enabled);
|
||||
m_logging.chkEEVIF->setEnabled(enabled);
|
||||
m_logging.chkEEGIF->setEnabled(enabled);
|
||||
m_logging.chkEESIF->setEnabled(enabled);
|
||||
|
||||
m_ui.chkIOPBIOS->setEnabled(enabled);
|
||||
m_ui.chkIOPMemcards->setEnabled(enabled);
|
||||
m_ui.chkIOPR3000A->setEnabled(enabled);
|
||||
m_ui.chkIOPCOP2->setEnabled(enabled);
|
||||
m_ui.chkIOPMMIO->setEnabled(enabled);
|
||||
m_ui.chkIOPUNKNWNMMIO->setEnabled(enabled);
|
||||
m_ui.chkIOPDMARegs->setEnabled(enabled);
|
||||
m_ui.chkIOPMemcards->setEnabled(enabled);
|
||||
m_ui.chkIOPPad->setEnabled(enabled);
|
||||
m_ui.chkIOPDMACTRL->setEnabled(enabled);
|
||||
m_ui.chkIOPCounters->setEnabled(enabled);
|
||||
m_ui.chkIOPCDVD->setEnabled(enabled);
|
||||
m_ui.chkIOPMDEC->setEnabled(enabled);
|
||||
m_logging.chkIOPBIOS->setEnabled(enabled);
|
||||
m_logging.chkIOPMemcards->setEnabled(enabled);
|
||||
m_logging.chkIOPR3000A->setEnabled(enabled);
|
||||
m_logging.chkIOPCOP2->setEnabled(enabled);
|
||||
m_logging.chkIOPMMIO->setEnabled(enabled);
|
||||
m_logging.chkIOPUNKNWNMMIO->setEnabled(enabled);
|
||||
m_logging.chkIOPDMARegs->setEnabled(enabled);
|
||||
m_logging.chkIOPMemcards->setEnabled(enabled);
|
||||
m_logging.chkIOPPad->setEnabled(enabled);
|
||||
m_logging.chkIOPDMACTRL->setEnabled(enabled);
|
||||
m_logging.chkIOPCounters->setEnabled(enabled);
|
||||
m_logging.chkIOPCDVD->setEnabled(enabled);
|
||||
m_logging.chkIOPMDEC->setEnabled(enabled);
|
||||
|
||||
g_emu_thread->applySettings();
|
||||
}
|
||||
|
||||
@@ -3,20 +3,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include "ui_DebugAnalysisSettingsTab.h"
|
||||
#include "ui_DebugGSSettingsTab.h"
|
||||
#include "ui_DebugLoggingSettingsTab.h"
|
||||
#include "ui_DebugUserInterfaceSettingsTab.h"
|
||||
|
||||
#include "ui_DebugSettingsWidget.h"
|
||||
#include "SettingsWidget.h"
|
||||
|
||||
class SettingsWindow;
|
||||
class DebugUserInterfaceSettingsWidget;
|
||||
class DebugAnalysisSettingsWidget;
|
||||
|
||||
class DebugSettingsWidget : public QWidget
|
||||
class DebugSettingsWidget : public SettingsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||
DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
|
||||
~DebugSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
@@ -26,10 +28,14 @@ private Q_SLOTS:
|
||||
#endif
|
||||
|
||||
private:
|
||||
SettingsWindow* m_dialog;
|
||||
|
||||
DebugUserInterfaceSettingsWidget* m_user_interface_settings;
|
||||
DebugAnalysisSettingsWidget* m_analysis_settings;
|
||||
|
||||
Ui::DebugSettingsWidget m_ui;
|
||||
Ui::DebugUserInterfaceSettingsTab m_user_interface;
|
||||
Ui::DebugAnalysisSettingsTab m_analysis;
|
||||
Ui::DebugGSSettingsTab m_gs;
|
||||
Ui::DebugLoggingSettingsTab m_logging;
|
||||
|
||||
QWidget* m_user_interface_tab = nullptr;
|
||||
QWidget* m_logging_tab = nullptr;
|
||||
};
|
||||
|
||||
@@ -1,642 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DebugSettingsWidget</class>
|
||||
<widget class="QWidget" name="DebugSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>647</width>
|
||||
<height>501</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="debugTabs">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="documentMode">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="userInterfaceTabWidget">
|
||||
<attribute name="title">
|
||||
<string>User Interface</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="analysisTabWidget">
|
||||
<attribute name="title">
|
||||
<string>Analysis</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="analysisScrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="analysisScrollAreaContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>645</width>
|
||||
<height>469</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="analysisLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>These settings control what and when analysis passes should be performed on the program running in the virtual machine so that the resultant information can be shown in the debugger.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="analysisGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Analysis</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="analysisForm">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="analysisConditionLabel">
|
||||
<property name="text">
|
||||
<string>Automatically Analyze Program:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="analysisCondition">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>If Debugger Is Open</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Never</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="generateSymbolsForIRXExportTables">
|
||||
<property name="text">
|
||||
<string>Generate Symbols For IRX Exports</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="analysisSettings" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gsTabWidget">
|
||||
<attribute name="title">
|
||||
<string>GS</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="drawDumpingGroupBox">
|
||||
<property name="title">
|
||||
<string>Draw Dumping</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="dumpGSData">
|
||||
<property name="text">
|
||||
<string>Dump GS Draws</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="saveRT">
|
||||
<property name="text">
|
||||
<string>Save RT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="saveFrame">
|
||||
<property name="text">
|
||||
<string>Save Frame</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="saveTexture">
|
||||
<property name="text">
|
||||
<string>Save Texture</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="saveDepth">
|
||||
<property name="text">
|
||||
<string>Save Depth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="saveAlpha">
|
||||
<property name="text">
|
||||
<string>Save Alpha</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="saveInfo">
|
||||
<property name="text">
|
||||
<string>Save Info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="text">
|
||||
<string>Save Draw Start:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="saveDrawStart">
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Save Draw Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="saveDrawCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Save Frame Start:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="saveFrameStart">
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Save Frame Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="saveFrameCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Hardware Dump Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Software Dump Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,0">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hwDumpDirectory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hwDumpBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hwDumpOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="swDumpDirectory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="swDumpBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="swDumpOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="traceLogTabWidget">
|
||||
<attribute name="title">
|
||||
<string>Trace Logging</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="traceLogHorizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpEELogging">
|
||||
<property name="title">
|
||||
<string>EE</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="grpEELoggingGrid">
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="chkEEDMACTRL">
|
||||
<property name="text">
|
||||
<string>DMA Control</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="chkEEMFIFO">
|
||||
<property name="text">
|
||||
<string>SPR / MFIFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="chkEEVIF">
|
||||
<property name="text">
|
||||
<string>VIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="chkEECOP1">
|
||||
<property name="text">
|
||||
<string>COP1 (FPU)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="chkEEMSKPATH3">
|
||||
<property name="text">
|
||||
<string>MSKPATH3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkEECache">
|
||||
<property name="text">
|
||||
<string>Cache</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="chkEEGIF">
|
||||
<property name="text">
|
||||
<string>GIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="chkEER5900">
|
||||
<property name="text">
|
||||
<string>R5900</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkEECOP0">
|
||||
<property name="text">
|
||||
<string>COP0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="chkEEMMIO">
|
||||
<property name="text">
|
||||
<string>HW Regs (MMIO)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="chkEECounters">
|
||||
<property name="text">
|
||||
<string>Counters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="chkEESIF">
|
||||
<property name="text">
|
||||
<string>SIF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkEECOP2">
|
||||
<property name="text">
|
||||
<string>COP2 (VU0 Macro)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="chkEEVIFCodes">
|
||||
<property name="text">
|
||||
<string>VIFCodes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="chkEEMemory">
|
||||
<property name="text">
|
||||
<string>Memory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="chkEEUNKNWNMMIO">
|
||||
<property name="text">
|
||||
<string>Unknown MMIO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="chkEEIPU">
|
||||
<property name="text">
|
||||
<string>IPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="chkEEBIOS">
|
||||
<property name="text">
|
||||
<string>BIOS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="chkEEDMARegs">
|
||||
<property name="text">
|
||||
<string>DMA Registers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="chkEEGIFTags">
|
||||
<property name="text">
|
||||
<string>GIFTags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="eeLoggingSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpIOPLogging">
|
||||
<property name="title">
|
||||
<string>IOP</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="grpIOPLoggingGrid">
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPCounters">
|
||||
<property name="text">
|
||||
<string>Counters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPUNKNWNMMIO">
|
||||
<property name="text">
|
||||
<string>Unknown MMIO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMMIO">
|
||||
<property name="text">
|
||||
<string>HW Regs (MMIO)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPCDVD">
|
||||
<property name="text">
|
||||
<string>CDVD</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPR3000A">
|
||||
<property name="text">
|
||||
<string>R3000A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMemcards">
|
||||
<property name="text">
|
||||
<string>Memcards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPDMARegs">
|
||||
<property name="text">
|
||||
<string>DMA Registers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPPad">
|
||||
<property name="text">
|
||||
<string>Pad</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPBIOS">
|
||||
<property name="text">
|
||||
<string>BIOS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPMDEC">
|
||||
<property name="text">
|
||||
<string>MDEC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="chkIOPDMACTRL">
|
||||
<property name="text">
|
||||
<string>DMA Control</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkIOPCOP2">
|
||||
<property name="text">
|
||||
<string>COP2 (GPU)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="iopLoggingSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user